-
Notifications
You must be signed in to change notification settings - Fork 70
tests: Add java-showcase-3.25.8. #4080
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
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 dedicated module for testing protobuf compatibility within the Java SDK platform. By isolating a specific protobuf generated code version and integrating its testing into the CI pipeline, the change aims to enhance the robustness and reliability of the SDK against various protobuf runtime environments. 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 java-showcase-3.25.8 module, which is a copy of an existing module, to test compatibility with a specific version of protobuf generated code. The changes are extensive, consisting entirely of new, generated files. The code is largely correct for its purpose, but I have identified a potential issue in the generated REST stub for the Compliance service. The issue relates to how query parameters are constructed when fields from a nested message are also used in the URL path, which could lead to malformed requests. This appears to be a bug in the code generator.
| serializer.putQueryParam(fields, "fInt32", request.getFInt32()); | ||
| serializer.putQueryParam(fields, "fInt64", request.getFInt64()); | ||
| serializer.putQueryParam(fields, "info", request.getInfo()); | ||
| if (request.hasIntendedBindingUri()) { |
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.
The info object is being serialized as a query parameter, but some of its fields are already part of the URL path template for this method (/v1beta1/repeat/{info.fString}/{info.fInt32}/{info.fDouble}/{info.fBool}/{info.fKingdom}:simplepath). This is redundant and can lead to incorrect request formatting. The generator should ideally only serialize the fields of the info object that are not already in the path as individual query parameters. Serializing the entire info object is incorrect. This same issue is present for the repeatDataPathResource and repeatDataPathTrailingResource methods in this file.
|
|



Add a new module java-showcase-3.25.8. This is a copy of the java-showcase module with a different version (3.25.8) of protobuf gen code. This is intended to test the compatibility between protobuf runtime v4.33.x and gen code 3.25.8.
Add a new step in CI to test this module.