fix(cloud-run): CloudRun/HelloWorld upgrade to Java25 along Docker#10276
Merged
iennae merged 3 commits intoJun 4, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request attempts to upgrade the project to Java 25 and Spring Boot 3.5.0, configures the JaCoCo plugin, updates the Jib plugin base image, and adjusts the test configuration. However, the reviewer notes that Java 25 and Spring Boot 3.5.0 are not yet generally available (GA). This will cause build and compilation failures because the required Docker images and dependencies do not exist. The reviewer recommends downgrading to Java 21 (LTS) and a stable Spring Boot 3.x version (such as 3.4.2) across the Dockerfile, Maven compiler properties, and Jib configuration.
|
LGTM. |
amcolin
reviewed
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes: b/470273769
Upgrade the Hello World Cloud Run sample to Java 25. This includes:
shared-configurationversion to1.2.2.25.3.5.0to match compatibility requirements for Java 25.eclipse-temurin:25-jre-alpine.Dockerfileto usemaven:3-eclipse-temurin-25-alpinefor the builder stage andeclipse-temurin:25-jre-alpinefor the runner stage.HelloworldApplication.class.Notes
Here we have an issue with Kokoro when upgrading samples to Java25
Kokoro fails on both Java 11 and Java 17 presubmit builds, caused by the same issue: the repository's test runner (btlr ) does not yet support Java version 25 as a compiler target in pom.xml, and fails immediately when encountering it.
This PR follows the workaround applied in appengine-java25/helloworld/pom.xml and flexible/java-25/websocket-jetty/pom.xml ) which is using Java 21 Target in POM
We would set
maven.compiler.targetandmaven.compiler.sourceto 21 in pom.xml, but keep the build/runtime environment in the Dockerfile configured to use Java 25.Checklist
pom.xmlparent set to latestshared-configurationmvn clean verifyrequiredmvn -P lint checkstyle:checkrequiredmvn -P lint clean compile pmd:cpd-check spotbugs:checkadvisory only (Note: fails under JDK 25 compiler withIllegalAccessErroron unnamed module/ErrorProne access tocom.sun.tools.javac.api.BasicJavacTask)