Sorry, something went wrong.
Summary of ChangesHello, 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 resolves a critical pagination issue in the listTenants() method, which previously prevented users from fetching more than 100 tenants. The fix involves correcting a misaligned key mapping for the pagination token, ensuring that the SDK now correctly processes the nextPageToken from the API response, thereby restoring proper pagination functionality. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
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 .gemini/ folder in the base of the repository. Detailed instructions can be found here. 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
|
Sorry, something went wrong.
There was a problem hiding this comment.
This pull request correctly fixes a pagination issue where listTenants() failed to return a pagination token. The fix involves updating the JSON key mapping in ListTenantsResponse from pageToken to nextPageToken to match the API response, and updating the corresponding test. The change is effective and addresses the described issue. I have added one minor suggestion to improve code consistency and maintainability.
Sorry, something went wrong.
|
|
||
| @Key("pageToken") | ||
| @Key("nextPageToken") | ||
| private String pageToken; |
There was a problem hiding this comment.
The field name pageToken is now inconsistent with the JSON key nextPageToken specified in the @Key annotation on line 33. For better code clarity and maintainability, consider renaming this field to nextPageToken. This would likely require updating the constructor and the getPageToken() method as well. If this refactoring is out of scope for this PR, it could be addressed in a follow-up.
Sorry, something went wrong.
There was a problem hiding this comment.
hanges made according to it
Sorry, something went wrong.
This PR fixes an issue where fetching more than 100 tenants via listTenants() fails to return the pagination token, breaking the pagination loop for developers.
The underlying GCP Identity Platform API returns the pagination token under the JSON key "nextPageToken", but the SDK was incorrectly mapping it to "pageToken". This caused the parsed token to always evaluate to null.
Related Issue
Fixes #1192
Changes Made
ListTenantsResponse.java: Updated the @key annotation for the pagination token from "pageToken" to "nextPageToken".
ListTenantsResponseTest.java: Updated the mock JSON payload in testDeserialization to use the correct "nextPageToken" key to reflect real-world API behavior.
Testing
Ran mvn validate to ensure Checkstyle compliance.
Ran mvn test to verify all unit tests pass successfully with the updated mock data