Conversation
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 addresses an issue where the custom fields retrieval function was limited by the lack of pagination support. By implementing a loop that processes pages using tokens and total size checks, the function now correctly aggregates all available data. Additionally, the package version has been updated to reflect these changes. 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. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates TIPCommon to version 2.3.6 and implements pagination in the list_custom_fields function using nextPageToken. Review feedback suggests a minor version bump for this new feature according to Semantic Versioning. Technical improvements were identified regarding error handling to avoid silent partial data returns, defensive handling of potential null values in the API response, and the use of generator expressions for better memory efficiency.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Roman Yermilov <88602723+timere-nemo@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Roman Yermilov <88602723+timere-nemo@users.noreply.github.com>
KrishnaSharma06
left a comment
There was a problem hiding this comment.
Aren't we updating the TIPCommon in Tools integration?
This fix applies to all Siemplify integration actions that interact with Custom Fields. When the total number of custom fields exceeds the page size, a |
…content-hub into list_custom_fields_pagination
| try: | ||
| validate_response(response, validate_json=True) | ||
| except InternalJSONDecoderError: | ||
| if not custom_fields: |
There was a problem hiding this comment.
there is inconsistency in before and after custom field is filled with values (and for sure in the first loop iteration). should there be such inconsistency?
iddoarie1
left a comment
There was a problem hiding this comment.
Overall PR looks good, just address my comment on the in soar_api.py
Title (Please follow the convention below)
The function fails to account for pagination, resulting in incomplete data when there are many custom fields. These changes add pagination, so the function now retrieves all the data.
https://buganizer.corp.google.com/issues/496121635
Checklist:
Please ensure you have completed the following items before submitting your PR.
This helps us review your contribution faster and more efficiently.
General Checks:
Open-Source Specific Checks:
For Google Team Members and Reviewers Only:
Note
Medium Risk
Updates
list_custom_fieldsto iterate through paginated SOAR API responses, which could change runtime characteristics and error behavior for callers that previously received only the first page.Overview
Fixes incomplete results from
TIPCommon.rest.soar_api.list_custom_fieldsby adding pagination support: it now loops overnextPageToken, accumulates allcustomFields, and handles JSON decode errors differently once partial data has been collected.Bumps
TIPCommonandintegration-testingpackage versions to2.3.6and updates the integration test harness to consume the newTIPCommonwheel inpyproject.toml/uv.lock.Reviewed by Cursor Bugbot for commit 6e0354a. Bugbot is set up for automated code reviews on this repo. Configure here.