-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat(cloudrun): upgrade helloworld sample to java 25 #10222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(cloudrun): upgrade helloworld sample to java 25 #10222
Conversation
Summary of ChangesHello @alarconesparza, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request modernizes the Cloud Run helloworld Java sample by upgrading its core Java version to 25. This involves updating the Docker build and runtime images, adjusting Maven compiler settings, and refreshing key dependencies and build plugins like Spring Boot and Jib, while also integrating JaCoCo for code coverage. The changes ensure the sample leverages the latest Java features and ecosystem improvements. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request upgrades the helloworld sample to Java 25 and updates several dependencies. However, the changes rely on Docker images and Maven artifacts that are not publicly available. This will cause the build to fail for anyone trying to use this sample. My review comments pinpoint each of these issues. For the sample to be buildable, all dependencies must be available in public repositories.
| # Use the official maven image to create a build artifact. | ||
| # https://hub.docker.com/_/maven | ||
| FROM maven:3-eclipse-temurin-17-alpine as builder | ||
| FROM maven:3-eclipse-temurin-25-alpine as builder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Use Eclipse Temurin for base image. | ||
| # https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds | ||
| FROM eclipse-temurin:17.0.16_8-jre-alpine | ||
| FROM eclipse-temurin:25.0.1_8-jre-alpine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <groupId>com.google.cloud.samples</groupId> | ||
| <artifactId>shared-configuration</artifactId> | ||
| <version>1.2.0</version> | ||
| <version>1.2.2</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <spring-boot.version>3.2.2</spring-boot.version> | ||
| <maven.compiler.target>25</maven.compiler.target> | ||
| <maven.compiler.source>25</maven.compiler.source> | ||
| <spring-boot.version>3.5.9</spring-boot.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <groupId>com.google.cloud.tools</groupId> | ||
| <artifactId>jib-maven-plugin</artifactId> | ||
| <version>3.4.0</version> | ||
| <version>3.5.1</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <plugin> | ||
| <groupId>org.jacoco</groupId> | ||
| <artifactId>jacoco-maven-plugin</artifactId> | ||
| <version>0.8.14</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Fixes internal b/470273769
Checklist
pom.xmlparent set to latestshared-configurationmvn clean verifyrequiredmvn -P lint checkstyle:checkrequiredmvn -P lint clean compile pmd:cpd-check spotbugs:checkadvisory only