Repository navigation
Conversation
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| USER root | ||
| # Keep JETTY_VERSION and JETTY_SHA256 aligned with org.eclipse.jetty in |
There was a problem hiding this comment.
This comment is nothing more than a wish. It sure would be nice if we didn't have to remember to keep these up to date with each other, and could specify versions in only one place. Thoughts?
There was a problem hiding this comment.
Agreed — "please remember to update X when updating Y" comments inevitably rot.
(Ironically, FROM jetty:12-jdk25 previously had the inverse problem: it
silently floated across whatever 12.x minor release Docker Hub published,
drifting away from org.eclipse.jetty:* in core/gradle.lockfile without
anyone noticing.)
We can eliminate the duplicate version/checksum completely by having Gradle
stage jetty-home from dependencies.gradle:
- Declare
jetty-homeindependencies.gradle: Maven Central publishes
the exact distribution tarball we're fetching here as
org.eclipse.jetty:jetty-home:[12.0.0,)@tar.gz. BecausedependencyMapkeys
ongroup:name,checkDependenciesDotGradlehandles@tar.gzartifacts
cleanly. - Unpack it in
jetty/build.gradle: Add a non-transitivejettyHome
configuration (transitive = false, automatically locked in
jetty/gradle.lockfilevia rootlockAllConfigurations()) and unpack the
tarball intobuild/jetty-homeduring:jetty:stage(plus exclude the
non-JAR tarball configuration independency_lic.gradleand sync the
.tar.gzartifact once via our GCS Maven mirror sync script). - Copy from context in
jetty/Dockerfile: ReplaceJETTY_VERSION,
JETTY_SHA256,apt-get install wget, and therepo1.maven.orgdownload
withADD --chown=jetty:jetty build/jetty-home /usr/local/jetty.
That gives us a single version workflow (./gradlew dependencies --write-locks --update-locks '*:*'), removes the live Maven Central network call from
docker build (using our offline GCS Maven mirror instead), and as a bonus
lets :jetty:run use build/jetty-home/start.jar instead of requiring
developers to set JETTY_HOME locally.
(Lighter fallback: a 10-line check in config/presubmits.py asserting
JETTY_VERSION in jetty/Dockerfile matches org.eclipse.jetty:jetty-server
in core/gradle.lockfile — catches drift in CI, though you still have to
manually bump the SHA-256 on upgrades.)
Staging jetty-home via Gradle seems strictly cleaner. Happy to either fold
that into this PR or send it as an immediate follow-up PR — which do you prefer?
There was a problem hiding this comment.
Done. This PR is now rebased on master, and Jetty Home is specified in only one place. org.eclipse.jetty:jetty-home is declared in dependencies.gradle and locked in jetty/gradle.lockfile (12.1.15) like every other dependency. The new :jetty:unpackJettyHome task stages it into build/jetty-home, and the Dockerfile ADDs it. JETTY_VERSION, JETTY_SHA256, and the Maven Central download are gone from the Dockerfile, so it can no longer drift from the lockfile.
|
Is this overall more maintainable and the more supported, well-lit path for how to handle these containers generally? |
Candidly: compared to where we were ( 1. Why this PR is a step forward over
|
Migrate core/Dockerfile, proxy/Dockerfile, and jetty/Dockerfile off tarball-based Docker Hub JDK images (eclipse-temurin:25 and jetty:12-jdk25) onto a shared launcher.gcr.io/google/ubuntu2404 base layer installing openjdk-25-jre-headless via apt-get: - Register OpenJDK 25 and OS packages in /var/lib/dpkg/status so GCP Artifact Analysis natively inventories the JVM runtime as an OS package across nomulus, proxy, and nomulus-tool, while sharing the cached JRE layer and supporting unauthenticated CI builds. - Stage Jetty Home through Gradle instead of downloading it in jetty/Dockerfile. org.eclipse.jetty:jetty-home is declared in dependencies.gradle and locked in jetty/gradle.lockfile (12.1.15), so it is fetched from the configured Maven repository like every other dependency. The new :jetty:unpackJettyHome task unpacks it into build/jetty-home for the image and for :jetty:run, which now falls back to it when JETTY_HOME is unset. - Install the Cloud Profiler Java agent under a non-root jetty:jetty user in jetty/Dockerfile, preserving all runtime paths, permissions, and -XX:-UseBASE64Intrinsics flags. - Update release/prepare_release_tree.sh, release/cloudbuild-release.yaml, release/cloudbuild-nomulus-images.yaml, and release/cloudbuild-proxy-images.yaml to mirror and digest-pin the shared ubuntu2404 base image across core, proxy, and jetty. - Add release/prepare_release_tree_test.sh and wire it into config/presubmits.py. - Refresh all Gradle lockfiles (Jetty 12.1.15, Beam 2.78.0, Netty 4.2.21, gRPC 1.85.1, Jackson 2.23.0, Flyway 13.12.2, and others). - Disable Selenium's OpenTelemetry tracing in :core:fragileTest. Beam 2.78.0 adds its GCP auth OpenTelemetry extension to the classpath, which otherwise fails RemoteWebDriver setup without a Google Cloud project ID. BUG= http://b/587432676
d616b79 to
eb7e9c0
Compare
There was a problem hiding this comment.
⚠️ Attention Required: Lockfile Detected
This pull request contains modifications to one or more *.lockfile files. Please confirm that you have run update_dependency.sh to push new dependencies to the private repo.
Someone with Admin role must manually dismiss this review before merging.
Migrate
core/Dockerfile,proxy/Dockerfile, andjetty/Dockerfileofftarball-based Docker Hub JDK images (
eclipse-temurin:25andjetty:12-jdk25) onto a sharedlauncher.gcr.io/google/ubuntu2404baselayer installing
openjdk-25-jre-headlessviaapt-get:/var/lib/dpkg/statusso GCPArtifact Analysis natively inventories the JVM runtime as an OS
package across
nomulus,proxy, andnomulus-tool, while sharingthe cached JRE layer and supporting unauthenticated CI builds.
jetty/Dockerfile.org.eclipse.jetty:jetty-homeis declared independencies.gradleand locked injetty/gradle.lockfile(12.1.15),so it is fetched from the configured Maven repository like every other
dependency. The new
:jetty:unpackJettyHometask unpacks it intobuild/jetty-homefor the image and for:jetty:run, which now fallsback to it when
JETTY_HOMEis unset.jetty:jettyuser in
jetty/Dockerfile, preserving all runtime paths, permissions,and
-XX:-UseBASE64Intrinsicsflags.release/prepare_release_tree.sh,release/cloudbuild-release.yaml,release/cloudbuild-nomulus-images.yaml, andrelease/cloudbuild-proxy-images.yamlto mirror and digest-pin theshared
ubuntu2404base image acrosscore,proxy, andjetty.release/prepare_release_tree_test.shand wire it intoconfig/presubmits.py.4.2.21, gRPC 1.85.1, Jackson 2.23.0, Flyway 13.12.2, and others).
:core:fragileTest. Beam2.78.0 adds its GCP auth OpenTelemetry extension to the classpath,
which otherwise fails
RemoteWebDriversetup without a Google Cloudproject ID.
BUG= http://b/587432676
This change is