Skip to content

build(native): fix native binary tests after Jersey 2.48 and SDK 1.236.0 bumps - #718

Closed
stefanoboriero wants to merge 1 commit into
masterfrom
fix/native-reflection-config-jersey-2.48
Closed

stefanoboriero wants to merge 1 commit into
masterfrom
fix/native-reflection-config-jersey-2.48

Conversation

@stefanoboriero

Copy link
Copy Markdown
Contributor

Summary

Master's native binary tests (Linux, MAC, MAC-arm64, Windows) have failed since #59bdd5cb ("update gradle minor and patch"); the previous run on b4ed951 was green. This fixes two reflection-metadata gaps in conf/reflect-config.json.

  1. Jersey 2.47 → 2.48. JerseyClassAnalyzer went from a privately constructed class to a public one with a (ServiceLocator) constructor that HK2 instantiates reflectively. With no reflection entry, every API call logged HK2 service reification failed for [...JerseyClassAnalyzer] to stderr, failing the tests that assert empty stderr (793 of 901 on Linux CI).
  2. SDK 1.233 → 1.236. New Fusion model methods (e.g. getFusionVersion_JsonNullable, getFusionSnapshots_JsonNullable) on 7 classes had no invoke entries, failing with Cannot reflectively invoke method ... (47 tests locally).

Notes

  • The 77 SDK methods are the ones ./gradlew runReflectionConfigGenerator reports as missing for 1.236.0. On GraalVM 25 the agent writes the new unified reachability-metadata.json instead of updating the legacy files, so I did not commit its output; only the missing entries were merged into the existing reflect-config.json format.
  • The README's tracing-agent step cannot capture the Jersey entry: conf/access-filter-file.json only records reflection from io.seqera.tower.model/commands/responses callers, so Jersey/HK2 internals must be added by hand (as the other org.glassfish.jersey.inject.hk2.* entries were).
  • .sdkmanrc pins 21.0.4-graal, but build.gradle requires Oracle GraalVM 25; worth updating separately.
  • Not changed: picocli stays at 4.6.3.

Testing

Built the native image locally with Oracle GraalVM 25.4.4 and ran the suite against it (TOWER_CLI=build/native/nativeCompile/tw ./gradlew cleanTest test): 898 of 900 pass. The 2 remaining failures (TaskCmdTest.testTaskDetail*) are a local locale artifact (the test's expected value renders $0,000000 under my default locale vs the binary's $0.000000); they pass without the binary and should pass in CI's en_US locale. CI on this PR is the real confirmation.

🤖 Generated with Claude Code

…6.0 bumps

Master's native binary tests have failed since 59bdd5c:

- Jersey 2.48 makes JerseyClassAnalyzer a public class with a
  (ServiceLocator) constructor that HK2 instantiates reflectively. It had no
  reflection entry, so every API call printed an HK2 reification warning to
  stderr and failed the binary tests that assert empty stderr.
- The SDK bump to 1.236.0 added Fusion-related model methods (e.g.
  getFusionVersion_JsonNullable) without regenerating reflection metadata, so
  invoking them in the native image failed.

Register JerseyClassAnalyzer, and add the 77 missing SDK model methods that
runReflectionConfigGenerator reports for 1.236.0. The generator's GraalVM 25
output (unified reachability-metadata.json) was not committed; only the missing
entries were merged into the existing reflect-config.json.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@stefanoboriero

Copy link
Copy Markdown
Contributor Author

Closing in favour of #723, this was a hack from Claude manually editing files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants