Add an opt-in JDK AOT cache to Docker images #1723
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 192 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.315
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1723"
general
weight: 0.35
alvarosanchez
Adds an opt-in JDK AOT cache (Java 25+) to the images of the
dockeranddockerfilegoals. A cache only works with the JDK, OS and CPU architecture that created it, so the image build trains it with the image's ownjavaand starts the application with it.Fixes #1721
Configuration
micronaut.docker.jdkAotCache(false) turns it on. When off, images and generated Dockerfiles do not change.micronaut.docker.jdkAotCache.trainingMode:LOADloads the bean definitions and exits, so the build needs no database or broker;STARTstarts the application and sends the training requests. Default:LOADwith Micronaut Core 5.3.0 or later,STARTbefore.micronaut.docker.jdkAotCache.trainingPaths: theGETrequests of aSTARTrun.micronaut.docker.jdkAotCache.trainingTimeout(180 s).Notes
packagedmode, trains on the Docker daemon, then builds for the daemon's platform with the cache in an extra layer. It needs an explicit-XX:+Use*GC.Dockerfiletrains in aRUNstep, so its base image needsbash.LOADneeds micronaut-core#13402 (5.3.x, unreleased). The twoLOADITs pass locally against 5.3.0-SNAPSHOT and are skipped in CI until then (#1729).For reviewers
Cache.retrieveMetadata), since Jib has no public API for it. If that fails, the build warns and does not pin.🤖 Generated with Claude Code