chore: upgrade base image to eclipse-temurin 8 - #225
Conversation
The runtime image openjdk:8-jre ships 8u342 and is officially deprecated by the docker-library maintainers. adoptopenjdk, used in the build stage, is deprecated as well; both recommend Eclipse Temurin as the replacement. 8u342 predates cgroup v2 support, which landed in 8u372 (JDK-8230305). On cgroup v2 nodes UseContainerSupport reports true but is inert, so the JVM reads host memory and CPU instead of the container limits, sizing the heap, GC threads and JIT threads for the node rather than the pod. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Docker build and runtime stages now use Eclipse Temurin 8 images. The build steps and runtime files remain unchanged. The project version increases from 0.8.0 to 0.8.1. The JFrog build-info plugin and implementation dependency are removed. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to No actionable issue was found. The image build remains unverified, so run it as a normal release check before deployment. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
build-info-extractor-gradle:4.4.7 and build-info-extractor:2.6.3 were published to JCenter only. JCenter is shut down and the Gradle Plugin Portal no longer proxies it, so neither artifact resolves from any configured repository and `./gradlew build` fails while configuring the root project. This also breaks `docker build`, since the image build stage runs the same command. Neither is used: no com.jfrog.artifactory plugin is applied and nothing under src/ references org.jfrog. Every other dependency, including the remaining buildscript classpath entry, resolves from Maven Central. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
What changed
Swaps both Docker stages onto Eclipse Temurin 8.
adoptopenjdk:8-jdk-openj9eclipse-temurin:8-jdkopenjdk:8-jreeclipse-temurin:8-jreAlso bumps
versionto0.8.1, and drops two dependencies that no longer resolve (see below).Unblocking the build
./gradlew buildcurrently fails onmainfor reasons unrelated to this change:Both artifacts were published to JCenter only. JCenter is shut down and the Gradle Plugin Portal no longer proxies it, so neither resolves from any configured repository — Maven Central returns 404 for both. Nothing uses them: no
com.jfrog.artifactoryplugin is applied, and nothing undersrc/referencesorg.jfrog. They are removed here.This is a prerequisite for the image change rather than a drive-by: the Dockerfile's build stage runs
./gradlew build, sodocker buildfails the same way. Without it the new base image cannot be exercised at all. Every remaining dependency, including the other buildscript classpath entry, resolves from Maven Central.Why
Both current images are deprecated.
openjdkis officially deprecated by the docker-library maintainers (docker-library/openjdk#505), andadoptopenjdkis superseded by Temurin. Neither receives further updates, so the runtime has been frozen on 8u342 (July 2022) and accumulating unpatched CVEs.The JVM can't see its container. Nodes run cgroup v2 (
cgroup2fs), and the JDK inraystack/firehose:0.8.0predates cgroup v2 support, which landed in 8u372 (JDK-8230305). SoUseContainerSupport=trueis a lie in practice — the JVM reads the host's 62GB and setsMaxHeapSize≈ 14GB, while the cgroup says536870912(512Mi).MaxRAMPercentage=25is applied to the wrong denominator.The JVM in the current image reports:
8u342 shipped July 2022, before the 8u372 backport, so the code honouring
UseContainerSupportonly understands cgroup v1 paths and silently falls back to host values. Knock-on effects on a 512Mi pod on a 62GB node:OutOfMemoryErrorUseParallelGCselected ergonomically — Java 8's default collector, chosen because the JVM believes it is on a server-class machineavailableProcessors()returns host cores, so GC and JIT thread counts are sized for the node, not the podKubernetes documents 8u372+ as the requirement for cgroup v2 awareness. Temurin
8-jrecurrently resolves to 8u502-b07, well past that line.Why Temurin and why the floating tag. Temurin is the Adoptium successor recommended by both deprecated images. The floating
8-jretag keeps JRE and OS CVE fixes arriving on each rebuild; pinning an exact build is how this Dockerfile drifted onto a frozen 8u342 in the first place, and this repo has no Dependabot or Renovate config to raise bumps.Verification
CI (
build.yml) runs./gradlew build, which exercises the Gradle fix but not the Dockerfile — the image is built only bypackage.ymlon release, then pushed straight toraystack/firehose:latest. I could not build the image locally either, so the base image swap itself is unexercised until a release cuts an image. Worth a manualdocker build .before merge.Adding a build-only Docker step to
build.ymlwould close that gap permanently, and is worth doing in a follow-up;build.ymlalso still uses the deprecatedactions/checkout@v2andactions/setup-java@v1, and has no Gradle caching.Behavioural notes for reviewers:
curl, so the jolokia agent download in the build stage is unaffected.CMDis deliberately untouched. Note it passes-server,-Dlogback.configurationFileand-Xloggcafter the main class, so the JVM treats them as program args and ignores them. Pre-existing; not addressed here.-XX:MaxRAMPercentagebecomes the right way to size the heap. Default ergonomics give roughly 25% of the limit, which may be conservative for large batch sizes.✔️ Checklist
🤖 Generated with Claude Code