Skip to content

fix(native): unbreak the native image build and smoke test (four regressions since 2026-07-27) - #5811

Merged
robfrank merged 3 commits into
mainfrom
fix/native-maven-plugin-1.1.7
Aug 4, 2026
Merged

fix(native): unbreak the native image build and smoke test (four regressions since 2026-07-27)#5811
robfrank merged 3 commits into
mainfrom
fix/native-maven-plugin-1.1.7

Conversation

@robfrank

@robfrank robfrank commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Problem

Every leg of the Native Image workflow fails. It was last green on 2026-07-27 (run 30282412460, 9f6f610a8). Four independent regressions landed after that, each hidden behind the previous one. Every one arrived with [skip ci] or on a side branch, and native-image.yml has no push/pull_request trigger, so nothing caught any of them - the 26.8.1 release run on 2026-08-03 was the first casualty.

1. native-maven-plugin 0.10.6 -> 1.1.6 (68bcf720b)

A required class was missing ... org/apache/maven/shared/utils/logging/MessageUtils

1.1.6 added AbstractNativeImageMojo.isColorEnabled(), an unconditional invokestatic on MessageUtils.isColorEnabled(). The plugin's published pom does not declare maven-shared-utils - its Gradle build leaves the dependency compileOnly, so it is stripped from both the pom and META-INF/maven/plugin.xml, which list only utils, openjson, graalvm-reachability-metadata, cyclonedx-maven-plugin, mojo-executor and transitives: exactly the urls[0..25] set in the failure log. Maven core does not export org.apache.maven.shared.utils from the maven.api realm either (not among maven-core's 76 exported packages), so the jar in Maven's lib/ stays confined to plexus.core. <extensions>true</extensions> is not a factor - the same failure occurs in a plain plugin> realm.

Fix: 1.1.7, which drops the MessageUtils usage entirely.

2. native.graalvm.version 25.0.2 -> 25.2.4 (3fecba4bf)

NoSuchMethodError: OptimizedTruffleRuntime.getLoopNodeFactory()

The bump left native-image.yml's java-version: "25.0.2" untouched, so the Truffle artifacts on the image classpath no longer match the SVM Truffle runtime inside the builder and TruffleBaseFeature.afterRegistration aborts. The property's own comment already warned about this failure, naming the method.

Fix: pin back to 25.0.2. 25.2.4 is not a drop-in for the builder: it is a GraalVM intermediate release, published under tag graal-25.2.4 with assets named graalvm-community-jdk-25i2-25.0.4_*, which setup-graalvm cannot select through a plain java-version. jdk-25.0.2 is the newest mainline JDK 25 Community build.

3. Shaded Netty reaching tcnative at build time

Class initialization of io.grpc.netty.shaded.io.netty.internal.tcnative.AsyncSSLPrivateKeyMethod failed
  Caused by: UnsatisfiedLinkError: NativeStaticallyReferencedJniMethods.sslSignRsaPkcsSha1()

A reflection registration marks the tcnative classes reachable, SVM initializes them at build time, and their static initializers call into libnetty_tcnative, which the image builder cannot load. The pom already defers io.netty to run time for this reason, but grpc-netty-shaded relocates Netty under io.grpc.netty.shaded.io.netty, which that prefix does not match.

Fix: defer exactly the five classes the builder rejects - the ...shaded.io.netty.internal.tcnative package plus handler.ssl.ReferenceCountedOpenSslEngine.

Deferring the whole relocated package is wrong, and this PR tried it first. It also moves PlatformDependent0 off build-time init, and its initializer reflectively reads java.nio.Bits.UNALIGNED, java.nio.Buffer.address and sun.misc.Unsafe.theUnsafe. The reachability metadata repository does register those, but every entry is conditioned on typeReached of the unshaded class (UNALIGNED hangs off io.netty.util.internal.PlatformDependent0$6) - a condition the relocated copy can never satisfy. The image then builds cleanly and dies at startup as soon as the gRPC plugin touches NettyServerBuilder:

MissingReflectionRegistrationError: Cannot reflectively read or write
field 'private static boolean java.nio.Bits.UNALIGNED'
  at io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent0$6.run

Mirroring ~40 metadata entries under the shaded names would trade a build-time failure for a class of startup failures only a smoke test can catch. Keeping everything else build-time initialized reproduces the last green build's behavior. One consequence worth knowing: OpenSsl's initializer probes for tcnative inside a try/catch, so it stays build-time initialized with "unavailable" frozen in - gRPC without TLS is unaffected, and TLS falls back to the JDK SSL provider.

4. Redis smoke check never authenticates

[exercise] WARN: Redis PING did not return PONG (got: -NOAUTH Authentication required.)

Not an image problem. "Require authentication on the Redis wire protocol" (3e76b3b82) reached main with the 26.8.1 security merge, after the last green run: every command other than AUTH and HELLO-with-AUTH now answers -NOAUTH. exercise.sh still sent a bare PING. It warn-skips by default but is a hard failure under WIRE_STRICT=1, which both Linux legs set - so the build would have gone red for a reason unrelated to the binary.

Fix: send RESP AUTH before PING. The Postgres check already authenticates via PGPASSWORD/-U and needed no change.

Verification

Built and smoke-tested on macOS/arm64 with GraalVM CE 25.0.2 - the exact builder CI pins:

mvn -Pnative -pl native -am -DskipTests package    ->  BUILD SUCCESS
Finished generating 'arcadedb-26.9.1-SNAPSHOT-osx-aarch_64' in 2m 54s

Then the actual CI smoke script, with the full Linux wire-protocol plugin list (this is what exercises the gRPC path that crashed):

[exercise] Studio index / create DB / SQL / Cypher / JS round-trips
[exercise] Redis PING -> PONG
[exercise] Bolt negotiated version bytes: 00000405
[exercise] Mongo hello -> reply received
[exercise] gRPC services: com.arcadedb.grpc.ArcadeDbAdminService com.arcadedb.grpc.ArcadeDbService
           grpc.health.v1.Health grpc.reflection.v1alpha.ServerReflection
[smoke] PASS                                       ->  exit 0

The gRPC reflection listing is the meaningful line: it can only be produced by a GrpcServerPlugin that got past NettyServerBuilder, which is precisely where the Linux legs died. The JS round-trip proves Truffle is genuinely functional in the image, not merely past the version check from #2.

For #1 specifically, a minimal standalone project (hello-world + the plugin) isolated it from ArcadeDB entirely: 1.1.6 with extensions -> byte-identical error and realm listing to CI; 1.1.6 without -> same error, plugin> realm; 1.1.6 + an explicit maven-shared-utils plugin dependency -> passes; 1.1.7 unchanged -> passes.

Not verified: the Postgres-wire assertion warn-skips locally (no psql here; CI installs postgresql-client and asserts it). The three Linux/Windows legs are unverified, in particular the two static-link modes (-Dnative.static=true musl, -Dnative.mostlystatic=true), which cannot be exercised on macOS. Dispatch the workflow against this branch before merging.

Also in this PR

  • smoke.sh - HOST/HTTP/PG become environment-overridable. Hardcoded ports mean that on a machine already running something on 2480 the script polls that server and passes without ever touching the binary under test, which is a false green. CI sets none of them and keeps the current defaults.
  • .github/dependabot.yml - a note that GraalVM PRs must be hand-reviewed and merged only alongside a matching java-version bump. Deliberately not an ignore rule: org.graalvm.* also appears in engine/pom.xml, which should keep tracking latest, and ignore rules match coordinates rather than modules - the same trap already documented there for ANTLR.

Follow-up worth considering (not in this PR)

native-image.yml triggers only on workflow_dispatch and release: published, and native/pom.xml sits outside the default reactor (-Pnative). That is why four separate breakages accumulated undetected and surfaced during a release. A pull_request trigger scoped to native/** plus the plugin/GraalVM properties (build-only, no release upload) would have caught all four. Note that #4 came from a change to redisw, so a path filter narrow enough to only watch native/** would still have missed it.

🤖 Generated with Claude Code

…image build

native-maven-plugin 1.1.6 fails every native-image goal invocation with

  A required class was missing while executing
  org.graalvm.buildtools:native-maven-plugin:1.1.6:compile-no-fork:
  org/apache/maven/shared/utils/logging/MessageUtils

on all four platform legs. 1.1.6 added AbstractNativeImageMojo.isColorEnabled(),
which calls MessageUtils.isColorEnabled() from maven-shared-utils, but the
plugin's published pom (and its META-INF/maven/plugin.xml) does not declare that
artifact: the plugin's Gradle build leaves it compileOnly, so it is stripped.
Maven core does not export org.apache.maven.shared.utils from the maven.api
realm either - the jar in Maven's lib/ stays confined to plexus.core - so the
class is absent from the plugin realm at execution time.

1.1.7 removes the MessageUtils usage entirely.

Verified with a minimal reproducer project: 1.1.6 fails identically to CI (with
and without <extensions>true</extensions>), 1.1.7 gets past the color probe and
invokes native-image normally.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mergify

mergify Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@claude

claude Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review

Reviewed the diff against native/pom.xml. This is a clean, minimal, well-scoped fix. 👍

Strengths

  • Right-sized change. A single version property bump (1.1.6 -> 1.1.7) is the correct fix for a plugin regression, rather than working around it with an explicit maven-shared-utils dependency injection.
  • Excellent root-cause documentation. The inline comment explains why 1.1.6 fails (the compileOnly maven-shared-utils stripped from the published pom + Maven core not exporting org.apache.maven.shared.utils from the maven.api realm), why not to revert, and the fallback fix if a future release reintroduces MessageUtils. This is exactly the kind of context that prevents a well-meaning future Dependabot revert.
  • PR description is exemplary - reproduced in isolation with a standalone project, tested both with and without <extensions>true</extensions>, and honestly scoped the verification ("full ArcadeDB native image build was not run locally").

Suggestions / observations

  • Please dispatch the Native Image workflow on this branch before merge. As the PR notes, mvn -Pnative -pl native validate only exercises the color probe and plugin realm resolution - it does not run the actual native-image compile across the four platform legs. Behavior differences between 1.1.6 and 1.1.7 beyond this failure mode remain untested, so a real dispatch is the only way to confirm green end-to-end.
  • Strongly endorse the follow-up. The suggested pull_request trigger scoped to native/** (build-only, no release upload) would have caught this at bump time instead of on a manual dispatch or release. Since native/pom.xml lives outside the default reactor and native-image.yml only fires on workflow_dispatch/release: published, native-only plugin bumps currently merge green while broken - worth prioritizing so this class of breakage can't recur silently. A Dependabot rule routing this plugin to manual review would be a lighter-weight alternative.

Nits

  • The commit trailer uses Co-Authored-By: Claude Opus 5 (1M context). Per CLAUDE.md ("don't add Claude as author of any source code"), consider dropping it - though this is a pom/build change, not source, and the human author is clearly robfrank, so low importance.

No bugs, performance, or security concerns - this is a build-configuration change that only affects the native-image packaging step. LGTM pending a successful native-image workflow dispatch.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 422 third-party dependencies.
     (Public Domain) AOP alliance (aopalliance:aopalliance:1.0 - http://aopalliance.sourceforge.net)
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.11.1 - https://github.com/yawkat/lz4-java)
     (EPL-2.0) (LGPL-2.1-only) Logback Classic Module (ch.qos.logback:logback-classic:1.6.1 - http://logback.qos.ch/logback-classic)
     (EPL-2.0) (LGPL-2.1-only) Logback Core Module (ch.qos.logback:logback-core:1.6.1 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB HA Raft (com.arcadedb:arcadedb-ha-raft:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-ha-raft/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB load tests (com.arcadedb:arcadedb-load-tests:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-load-tests/)
     (Apache 2) ArcadeDB MCP Server (com.arcadedb:arcadedb-mcp:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mcp/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Tracing (com.arcadedb:arcadedb-tracing:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-tracing/)
     (The Apache Software License, Version 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.22 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.22.1 - https://github.com/FasterXML/jackson-core)
     (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.22.1 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.1 - https://github.com/FasterXML/jackson-dataformats-text)
     (The Apache Software License, Version 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.1 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (The Apache Software License, Version 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (The Apache Software License, Version 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (The Apache Software License, Version 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (The Apache Software License, Version 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)
     (Apache License 2.0) JCIP Annotations under Apache License (com.github.stephenc.jcip:jcip-annotations:1.0-1 - http://stephenc.github.com/jcip-annotations)
     (Apache License 2.0) Google Android Annotations Library (com.google.android:annotations:4.1.1.4 - http://source.android.com/)
     (BSD 3-Clause) API Common (com.google.api:api-common:2.53.0 - https://github.com/googleapis/sdk-platform-java)

@codacy-production

codacy-production Bot commented Aug 4, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity

Metric Results
Complexity 0

View in Codacy

🟢 Coverage ∅ diff coverage

Metric Results
Coverage variation Report missing for d3b2bda1
Diff coverage diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (d3b2bda) Report Missing Report Missing Report Missing
Head commit (ea63dd8) 183939 128390 69.80%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#5811) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

1 Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Two further regressions were hiding behind the native-maven-plugin failure.
The Native Image workflow was last green on 2026-07-27 (run 30282412460,
9f6f610); everything below landed after it, all with [skip ci], and the
workflow has no push/pull_request trigger, so nothing caught them.

1. native.graalvm.version 25.0.2 -> 25.2.4 (3fecba4) left native-image.yml's
   java-version at 25.0.2. The Truffle artifacts on the image classpath then no
   longer match the SVM Truffle runtime inside the builder, and
   TruffleBaseFeature.afterRegistration aborts with

     NoSuchMethodError: OptimizedTruffleRuntime.getLoopNodeFactory()

   which is exactly the failure the property's comment already warned about.
   25.2.4 is not a drop-in for the builder: it is a GraalVM intermediate
   release, published under the graal-25.2.4 tag with assets named
   graalvm-community-jdk-25i2-25.0.4_*, which setup-graalvm cannot select via a
   plain java-version. jdk-25.0.2 is the newest mainline JDK 25 Community
   build, so the pin goes back to 25.0.2.

2. The image analysis aborted on io.grpc.netty.shaded.io.netty.internal.tcnative
   classes (AsyncSSLPrivateKeyMethod, CertificateCompressionAlgo,
   ReferenceCountedOpenSslEngine, ...): a reflection registration marks them
   reachable, SVM then initializes them at build time, and their static
   initializers hit UnsatisfiedLinkError calling into libnetty_tcnative, which
   the builder cannot load. The pom already defers io.netty to run time for
   this reason, but grpc-netty-shaded relocates Netty under
   io.grpc.netty.shaded.io.netty, which that prefix does not match, so the
   relocated copy now gets the same directive.

dependabot.yml gains a note that GraalVM PRs must be hand-reviewed and merged
only alongside a matching java-version bump. Deliberately not an ignore rule:
org.graalvm.* also appears in engine/pom.xml, which should keep tracking
latest, and ignore rules match coordinates rather than modules - the same trap
already documented there for ANTLR.

Verified on macOS/arm64 with GraalVM CE 25.0.2, the exact builder CI pins:
'mvn -Pnative -pl native -am -DskipTests package' now succeeds, generating the
image in 2m 41s. The binary boots, serves HTTP, and answers SQL, Cypher and
embedded GraalJS ('var x = 40 + 2; x' -> 42) correctly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@robfrank robfrank changed the title fix(native): bump native-maven-plugin to 1.1.7 to unbreak the native image build fix(native): unbreak the native image build (three regressions since 2026-07-27) Aug 4, 2026
…dis smoke check

The linux legs got past the image build and failed in the smoke test instead,
for two separate reasons.

1. Deferring the whole io.grpc.netty.shaded.io.netty package to run time was
   too broad. It also moved PlatformDependent0 off build-time initialization,
   and its initializer reflectively reads java.nio.Bits.UNALIGNED,
   java.nio.Buffer.address and sun.misc.Unsafe.theUnsafe. The GraalVM
   reachability metadata repository does register all of those, but every entry
   is conditioned on typeReached of the UNSHADED class (java.nio.Bits.UNALIGNED
   hangs off io.netty.util.internal.PlatformDependent0$6), a condition the
   relocated copy can never satisfy. The image built cleanly and then died at
   startup the moment the gRPC plugin touched NettyServerBuilder:

     MissingReflectionRegistrationError: Cannot reflectively read or write
     field 'private static boolean java.nio.Bits.UNALIGNED'

   Mirroring ~40 metadata entries under the shaded package names would trade a
   build-time failure for a class of startup failures only a smoke test can
   catch. Instead the deferral now names just the five classes the builder
   actually rejects - the io.grpc.netty.shaded.io.netty.internal.tcnative
   package plus handler.ssl.ReferenceCountedOpenSslEngine - so everything else
   stays build-time initialized exactly as it was in the last green build.

2. exercise.sh's Redis PING has been failing since "Require authentication on
   the Redis wire protocol" (3e76b3b) reached main with the 26.8.1 security
   merge: every command other than AUTH and HELLO-with-AUTH now answers
   "-NOAUTH Authentication required.". The check warn-skipped by default but is
   a hard failure under WIRE_STRICT=1, which both Linux legs set, so it would
   have failed the build for a reason unrelated to the binary. It now sends
   RESP AUTH before PING. The Postgres check already authenticates via
   PGPASSWORD/-U and needed no change.

smoke.sh's HOST/HTTP/PG become environment-overridable. They were hardcoded, so
on a machine that already has something on 2480 the script polls THAT server
and passes without ever testing the binary under test. CI sets none of them and
keeps the current defaults.

Verified on macOS/arm64 with GraalVM CE 25.0.2 by running the CI smoke script
against the native binary with the full Linux wire-protocol plugin list, which
is what exercises the gRPC path that crashed:

  [exercise] Studio index / create DB / SQL / Cypher / JS round-trips
  [exercise] Redis PING -> PONG
  [exercise] Bolt negotiated version bytes: 00000405
  [exercise] Mongo hello -> reply received
  [exercise] gRPC services: com.arcadedb.grpc.ArcadeDbAdminService
             com.arcadedb.grpc.ArcadeDbService grpc.health.v1.Health
             grpc.reflection.v1alpha.ServerReflection
  [smoke] PASS   (exit 0)

The Postgres-wire assertion warn-skips locally (no psql installed); CI installs
postgresql-client and asserts it on both Linux legs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@robfrank robfrank changed the title fix(native): unbreak the native image build (three regressions since 2026-07-27) fix(native): unbreak the native image build and smoke test (four regressions since 2026-07-27) Aug 4, 2026
@claude

claude Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review: fix(native): unbreak the native image build

Solid, careful fix. I verified each of the three regressions and the two test-script changes against the tree; everything is internally consistent and the root-cause analysis in the description holds up on inspection.

What I checked and confirmed

  • GraalVM pin vs. workflow. native.graalvm.version -> 25.0.2 now matches native-image.yml's java-version: "25.0.2" (line 89) and the graalvm-community distribution. The two sides that must agree now agree, and both carry a comment pointing at the other. Good.
  • Redis AUTH. RedisNetworkExecutor rejects everything except AUTH/HELLO-with-AUTH with -NOAUTH (lines 155-172) and requires the two-argument AUTH <user> <pass> form (line 570). The printf '*3...AUTH...' in exercise.sh sends exactly that form with $DB_USER/$PASS, both of which smoke.sh propagates. The pipelined AUTH-then-PING with a single capture is correct, and grepping for PONG (not +OK) still keys off the PING reply. Correct.
  • Shaded-netty deferral. The new --initialize-at-run-time targets the relocated io.grpc.netty.shaded.io.netty.internal.tcnative package plus ReferenceCountedOpenSslEngine, which the existing io.netty prefix genuinely does not match. XML is well-formed; the directive sits alongside the pre-existing netty one.
  • dependabot.yml. The new note is a plain comment inside the ignore: block (before the first list item), so YAML parsing is unaffected. The rationale (a coordinate-wide ignore would also freeze engine/pom.xml's independent graalvm.version) mirrors the ANTLR precedent already documented right above it - consistent and correct.
  • smoke.sh port overrides. Making HOST/HTTP/PG overridable guards against a locally-running ArcadeDB turning the smoke test into a false green, and the defaults are unchanged so CI is untouched.

Notes / nits (non-blocking)

  1. Test coverage gap is the main risk. As the PR itself flags: only macOS/arm64 was exercised; the Linux/Windows legs and the two static-link modes (native.static musl, native.mostlystatic) are unverified. The shaded-netty initialize-at-run-time fix in particular is the kind of thing that can behave differently under static linking. Please dispatch native-image.yml against this branch and confirm all legs green before merging - that's the one thing this review can't stand in for.
  2. Comment wording. The netty comment says "Only the classes ... are listed, NOT the whole relocated package," but the directive does defer the entire ...internal.tcnative sub-package (which is how it covers AsyncSSLPrivateKeyMethod, CertificateCompressionAlgo, NativeStaticallyReferencedJniMethods at once). It is a narrow sub-package rather than the whole relocated netty, so the intent is right, but the phrasing slightly undersells what is being deferred - worth a one-word tweak for the next reader.
  3. Comment volume. These are very long inline comments. For a fragile, rarely-triggered build path that accumulated three undetected breakages in a week, I think the density is justified here - just flagging it as a deliberate call rather than an oversight.
  4. Strong +1 on the follow-up. Adding a build-only pull_request trigger scoped to native/** and the plugin/GraalVM properties is the real fix for the class of problem - all three regressions landed [skip ci] behind a manual-only workflow. Worth its own PR soon.

Nice work isolating three stacked regressions and documenting the reasoning at each step.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

📜 License Compliance Check

✅ License check passed. See artifacts for full report.

License Summary (first 50 lines)

Lists of 422 third-party dependencies.
     (Public Domain) AOP alliance (aopalliance:aopalliance:1.0 - http://aopalliance.sourceforge.net)
     (Apache License 2.0) LZ4 Java Compression (at.yawk.lz4:lz4-java:1.11.1 - https://github.com/yawkat/lz4-java)
     (EPL-2.0) (LGPL-2.1-only) Logback Classic Module (ch.qos.logback:logback-classic:1.6.1 - http://logback.qos.ch/logback-classic)
     (EPL-2.0) (LGPL-2.1-only) Logback Core Module (ch.qos.logback:logback-core:1.6.1 - http://logback.qos.ch/logback-core)
     (Apache 2) ArcadeDB BOLT Protocol (com.arcadedb:arcadedb-bolt:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-bolt/)
     (Apache 2) ArcadeDB Console (com.arcadedb:arcadedb-console:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-console/)
     (Apache 2) ArcadeDB Engine (com.arcadedb:arcadedb-engine:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-engine/)
     (Apache 2) ArcadeDB GraphQL (com.arcadedb:arcadedb-graphql:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-graphql/)
     (Apache 2) ArcadeDB Gremlin (com.arcadedb:arcadedb-gremlin:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-gremlin/)
     (Apache 2) ArcadeDB gRPC Stubs (com.arcadedb:arcadedb-grpc:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc/)
     (Apache 2) ArcadeDB gRPC Client (com.arcadedb:arcadedb-grpc-client:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpc-client/)
     (Apache 2) ArcadeDB gRpcW (com.arcadedb:arcadedb-grpcw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-grpcw/)
     (Apache 2) ArcadeDB HA Raft (com.arcadedb:arcadedb-ha-raft:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-ha-raft/)
     (Apache 2) ArcadeDB Integration (com.arcadedb:arcadedb-integration:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-integration/)
     (Apache 2) ArcadeDB load tests (com.arcadedb:arcadedb-load-tests:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-load-tests/)
     (Apache 2) ArcadeDB MCP Server (com.arcadedb:arcadedb-mcp:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mcp/)
     (Apache 2) ArcadeDB Metrics (com.arcadedb:arcadedb-metrics:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-metrics/)
     (Apache 2) ArcadeDB MongoDB Wire Protocol (com.arcadedb:arcadedb-mongodbw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-mongodbw/)
     (Apache 2) ArcadeDB Network (com.arcadedb:arcadedb-network:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-network/)
     (Apache 2) ArcadeDB PostgresW (com.arcadedb:arcadedb-postgresw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-postgresw/)
     (Apache 2) ArcadeDB RedisW (com.arcadedb:arcadedb-redisw:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-redisw/)
     (Apache 2) ArcadeDB Server (com.arcadedb:arcadedb-server:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-server/)
     (Apache 2) ArcadeDB Studio (com.arcadedb:arcadedb-studio:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-studio/)
     (Apache 2) ArcadeDB Tracing (com.arcadedb:arcadedb-tracing:26.9.1-SNAPSHOT - https://arcadedata.com/arcadedb-tracing/)
     (The Apache Software License, Version 2.0) HPPC Collections (com.carrotsearch:hppc:0.7.1 - http://labs.carrotsearch.com/hppc.html/hppc)
     (Apache License 2.0) Metrics Core (com.codahale.metrics:metrics-core:3.0.2 - http://metrics.codahale.com/metrics-core/)
     (The Apache License, Version 2.0) com.conversantmedia:disruptor (com.conversantmedia:disruptor:1.2.21 - https://github.com/conversant/disruptor)
     (The Apache Software License, Version 2.0) Jackson-annotations (com.fasterxml.jackson.core:jackson-annotations:2.22 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-core (com.fasterxml.jackson.core:jackson-core:2.22.1 - https://github.com/FasterXML/jackson-core)
     (The Apache Software License, Version 2.0) jackson-databind (com.fasterxml.jackson.core:jackson-databind:2.22.1 - https://github.com/FasterXML/jackson)
     (The Apache Software License, Version 2.0) Jackson-dataformat-YAML (com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.1 - https://github.com/FasterXML/jackson-dataformats-text)
     (The Apache Software License, Version 2.0) Jackson datatype: JSR310 (com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.1 - https://github.com/FasterXML/jackson-modules-java8/jackson-datatype-jsr310)
     (The Apache Software License, Version 2.0) Caffeine cache (com.github.ben-manes.caffeine:caffeine:2.3.1 - https://github.com/ben-manes/caffeine)
     (The Apache Software License, Version 2.0) docker-java-api (com.github.docker-java:docker-java-api:3.7.1 - https://github.com/docker-java/docker-java)
     (The Apache Software License, Version 2.0) docker-java-transport (com.github.docker-java:docker-java-transport:3.7.1 - https://github.com/docker-java/docker-java)
     (The Apache Software License, Version 2.0) docker-java-transport-zerodep (com.github.docker-java:docker-java-transport-zerodep:3.7.1 - https://github.com/docker-java/docker-java)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) btf (com.github.java-json-tools:btf:1.3 - https://github.com/java-json-tools/btf)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils (com.github.java-json-tools:jackson-coreutils:2.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) jackson-coreutils-equivalence (com.github.java-json-tools:jackson-coreutils-equivalence:1.0 - https://github.com/java-json-tools/jackson-coreutils)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-patch (com.github.java-json-tools:json-patch:1.13 - https://github.com/java-json-tools/json-patch)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-core (com.github.java-json-tools:json-schema-core:1.2.14 - https://github.com/java-json-tools/json-schema-core)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) json-schema-validator (com.github.java-json-tools:json-schema-validator:2.2.14 - https://github.com/java-json-tools/json-schema-validator)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) msg-simple (com.github.java-json-tools:msg-simple:1.2 - https://github.com/java-json-tools/msg-simple)
     (Apache Software License, version 2.0) (Lesser General Public License, version 3 or greater) uri-template (com.github.java-json-tools:uri-template:0.10 - https://github.com/java-json-tools/uri-template)
     (Apache License 2.0) (GNU Lesser General Public License) javaparser-core (com.github.javaparser:javaparser-core:3.26.3 - https://github.com/javaparser/javaparser-core)
     (Apache License 2.0) JCIP Annotations under Apache License (com.github.stephenc.jcip:jcip-annotations:1.0-1 - http://stephenc.github.com/jcip-annotations)
     (Apache License 2.0) Google Android Annotations Library (com.google.android:annotations:4.1.1.4 - http://source.android.com/)
     (BSD 3-Clause) API Common (com.google.api:api-common:2.53.0 - https://github.com/googleapis/sdk-platform-java)

@robfrank
robfrank merged commit 1ca1bc4 into main Aug 4, 2026
32 of 34 checks passed
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.85%. Comparing base (adb16f4) to head (ea63dd8).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5811      +/-   ##
==========================================
- Coverage   67.90%   67.85%   -0.05%     
==========================================
  Files        1792     1792              
  Lines      151893   151893              
  Branches    32196    32196              
==========================================
- Hits       103136   103061      -75     
- Misses      35398    35483      +85     
+ Partials    13359    13349      -10     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant