The GitHub Actions job "Forge - Next GCP Deploy" on 
grails-core.git/hotfix/forge-native-image-8.0.0-M1 has failed.
Run started by GitHub user jamesfredley (triggered by jamesfredley).

Head commit for run:
ae9814891bb3bf217be29deca44d9824c231051e / James Fredley 
<[email protected]>
Drop forge JGit build-time-init list and pin GRM to 0.3.35

PR #15646 added --initialize-at-run-time=ch.qos.logback,org.slf4j to
override the GraalVM Reachability Metadata Repository 1.4.9 entry's
--initialize-at-build-time=ch.qos.logback directive, but
dockerBuildNative still failed: with --trace-class-initialization
enabled, native-image reports that org.eclipse.jgit.transport.Transport
caused build-time initialization of ch.qos.logback.core.CoreConstants
(and the rest of the logback class graph). Transport declares a
static final Logger LOG field, so forcing it to --initialize-at-
build-time in grails-forge-api/native-image.properties transitively
ran LoggerFactory.<clinit> and the whole logback init cascade at
build time, conflicting with our --initialize-at-run-time directive
on logback 1.5.x classes.

Two changes that together let dockerBuildNative succeed end-to-end
locally for both grails-forge-web-netty and grails-forge-analytics-
postgres on the Java 21 GraalVM Community 21.0.2-ol9 image, and let
the resulting native binaries actually start (web-netty serves HTTP
200 in 45ms; analytics-postgres reaches the postgres connection step):

1. Drop the manual --initialize-at-build-time list of jgit classes in
   grails-forge-api/src/main/resources/META-INF/native-image/org.grails.
   forge.api/grails-forge-api/native-image.properties. The list
   predates the GRM repo entry for org.eclipse.jgit, which now ships
   reflection and resource metadata covering jgit 6.5.0+; the manual
   list is the cascade source for the logback initialization at build
   time and is no longer necessary. Keep the existing one-class
   --initialize-at-run-time=org.eclipse.jgit.lib.internal.WorkQueue
   override (this one is opposite direction and unrelated).

2. Pin grails-forge-web-netty and grails-forge-analytics-postgres to
   GRM repo version 0.3.35 (released 2026-03-06) via
   graalvmNative.metadataRepository.version. The version bundled with
   the Micronaut Gradle Application Plugin 4.6.2 selects the
   logback-classic 1.4.9 metadata for our 1.5.17 runtime, whose
   --initialize-at-build-time=ch.qos.logback directive forces the
   conflict regardless of the JGit cascade. GRM 0.3.35 ships a 1.5.7
   metadata directory (covering 1.5.7-1.5.29, including our 1.5.17)
   that contains only reflection / resource configs and no
   --initialize-at-build-time directive, so logback initializes at
   the default (run-time) and our --initialize-at-run-time override
   applies unopposed. GRM 1.x release zips use a new repository
   layout that the GraalVMReachabilityMetadataService bundled with
   the current plugin does not understand, so we stay on the last
   compatible 0.3.x release with the updated logback metadata.

Verified locally with `./gradlew :grails-forge-web-netty:dockerBuildNative`
and `./gradlew :grails-forge-analytics-postgres:dockerBuildNative` on
Docker 29.3.0 against the Java 21 GraalVM Community 21.0.2-ol9 image
used by the Forge deploy workflows; both native binaries start.

Assisted-by: claude-code:claude-4.7-opus

Report URL: https://github.com/apache/grails-core/actions/runs/25578315293

With regards,
GitHub Actions via GitBox

Reply via email to