-
Notifications
You must be signed in to change notification settings - Fork 70
tests: Add java-showcase-3.21.0 #4081
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?
Conversation
Add a new module java-showcase-3.21.0. This is a copy of the java-showcase module with a different version (3.21.0) of protobuf gen code. This is intended to test the compatibility between protobuf runtime v4.33.0 and gen code 3.21.0. The [gen code contains makeExtensionsImmutable method](https://github.com/googleapis/sdk-platform-java/blob/c80004ad3fdafbf43aa9adf4e8069ac3b4fefaa4/java-showcase-3.21.0/proto-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/AttemptSequenceRequest.java#L90) which proves that it is generated with a protoc version prior to 3.21.7. Add [a new step](https://github.com/googleapis/sdk-platform-java/blob/c80004ad3fdafbf43aa9adf4e8069ac3b4fefaa4/.github/workflows/ci.yaml#L313-L319) in CI to test this module.
Summary of ChangesHello @blakeli0, 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 introduces a new Java showcase module specifically designed to validate the compatibility of an older protobuf generated code (version 3.21.0) with a newer protobuf runtime (version 4.33.0). This is crucial for maintaining stability and ensuring that updates to the protobuf runtime do not break existing generated codebases. The changes include the addition of various client and stub implementations for several services, along with necessary build configurations and documentation, all aimed at facilitating this compatibility testing. Highlights
Ignored Files
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 adds a new module java-showcase-3.21.0 to test compatibility with protobuf gen code v3.21.0. The changes consist of adding a copy of the java-showcase module with the specified protobuf version.
My review has found some critical issues in the pom.xml file where several dependency and plugin versions are specified that do not exist in public Maven repositories. This will cause the build to fail and needs to be addressed. I've also pointed out some minor formatting issues, such as missing newlines at the end of files and trailing whitespace.
| <properties> | ||
| <gapic-showcase.version>0.36.2</gapic-showcase.version> | ||
| <!-- This is the last version supporting slf4j 1.x, do not upgrade --> | ||
| <slf4j1-logback.version>1.2.13</slf4j1-logback.version> | ||
| <slf4j2-logback.version>1.5.21</slf4j2-logback.version> | ||
| </properties> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.jacoco</groupId> | ||
| <artifactId>jacoco-maven-plugin</artifactId> | ||
| <version>0.8.13</version> | ||
| <executions> | ||
| <execution> | ||
| <id>report</id> | ||
| <goals> | ||
| <goal>report</goal> | ||
| </goals> | ||
| <configuration> | ||
| <formats> | ||
| <format>XML</format> | ||
| <format>HTML</format> | ||
| </formats> | ||
| </configuration> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| <plugin> | ||
| <groupId>com.spotify.fmt</groupId> | ||
| <artifactId>fmt-maven-plugin</artifactId> | ||
| <version>2.25</version> | ||
| <configuration> | ||
| <filesNamePattern>(IT.*\.java)|(.*Test.java)|(TestClientInitializer.java)</filesNamePattern> | ||
| </configuration> |
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.
Several dependency and plugin versions in this pom.xml do not seem to exist in public Maven repositories and will likely cause the build to fail. Please verify and correct them. Specifically:
<slf4j2-logback.version>is1.5.21(line 23), but this version does not exist forch.qos.logback. The latest is1.5.6.jacoco-maven-pluginversion is0.8.13(line 31), but the latest is0.8.12.fmt-maven-pluginversion is2.25(line 50), but the latest is2.23.org.slf4j:slf4j-apiversion is2.0.16(line 243), but the latest is2.0.13.
Please update these to valid, existing versions.
| @@ -0,0 +1,2 @@ | |||
| This is a copy of [GAPIC Showcase](https://github.com/googleapis/gapic-showcase) with protobuf 3.21.0 gen code. | |||
| This is intended to test the compatibility between protobuf-java runtime v4.33.0 and gen code 3.21.0. No newline at end of file | |||
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.
This line has trailing whitespace. It's a good practice to remove it. Also, the file is missing a final newline.
| This is intended to test the compatibility between protobuf-java runtime v4.33.0 and gen code 3.21.0. | |
| This is intended to test the compatibility between protobuf-java runtime v4.33.0 and gen code 3.21.0. |
| # name = "showcase_proto_extended", | ||
| # srcs = [], | ||
| # deps = [] | ||
| #) No newline at end of file |
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.
|
|
||
| message EvilResponse { | ||
| string malicious_plan = 1; | ||
| } No newline at end of file |
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.
| </profile> | ||
| </profiles> | ||
|
|
||
| </project> |
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.
| } | ||
| } | ||
| } | ||
| } No newline at end of file |
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.
|
|



Add a new module java-showcase-3.21.0. This is a copy of the java-showcase module with a different version (3.21.0) of protobuf gen code. This is intended to test the compatibility between protobuf runtime v4.33.x and gen code 3.21.0.
The gen code contains makeExtensionsImmutable
method which proves that it is generated with a protoc version prior to 3.21.7.
Add a new
step in CI to test this module.