Skip to content

refactor: set max retry attempts to 3#11072

Merged
gsquared94 merged 2 commits into
google-gemini:mainfrom
gsquared94:fix-max-attempts
Oct 13, 2025
Merged

refactor: set max retry attempts to 3#11072
gsquared94 merged 2 commits into
google-gemini:mainfrom
gsquared94:fix-max-attempts

Conversation

@gsquared94

Copy link
Copy Markdown
Contributor

No description provided.

@gsquared94 gsquared94 requested a review from a team as a code owner October 13, 2025 22:57
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @gsquared94, 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 refactors the retryWithBackoff utility by adjusting its default behavior. The primary change involves reducing the default maximum number of retry attempts from ten to three, which can help prevent excessive retries in scenarios where a quick failure is preferable. The corresponding tests have been updated to align with this new default, ensuring the utility functions as expected under the revised configuration.

Highlights

  • Default Retry Attempts: The default maximum number of retry attempts for the retryWithBackoff utility has been reduced from 10 to 3.
  • Test Updates: Unit tests for retryWithBackoff have been updated to reflect the new default of 3 maximum attempts, ensuring the utility behaves as expected with this change.
Using Gemini Code Assist

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.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 reduces the default maximum retry attempts from 10 to 3 and updates the corresponding tests. The changes are implemented correctly. I've added one comment to refactor the updated tests to improve maintainability by reducing code duplication. While the change is functionally correct, please note that reducing the retry count so significantly is a major behavioral change that could impact the tool's resilience to transient network or quota issues. It would be beneficial to add context for this decision to the pull request description.

Comment thread packages/core/src/utils/retry.test.ts
@gsquared94 gsquared94 added this pull request to the merge queue Oct 13, 2025
Merged via the queue into google-gemini:main with commit dd01af6 Oct 13, 2025
33 of 37 checks passed
@gsquared94 gsquared94 deleted the fix-max-attempts branch October 13, 2025 23:35
@gsquared94

Copy link
Copy Markdown
Contributor Author

/patch

@github-actions

Copy link
Copy Markdown

Patch workflow(s) dispatched successfully!

📋 Details:

  • Channels: stable,preview
  • Commit: dd01af609e12be26e42b8ee513a711e376291268
  • Workflows Created: 2

🔗 Track Progress:

github-actions Bot pushed a commit that referenced this pull request Oct 13, 2025
# Conflicts:
#	packages/core/src/utils/retry.test.ts
#	packages/core/src/utils/retry.ts
@github-actions

Copy link
Copy Markdown

🚀 Patch PR Created!

📋 Patch Details:

📝 Next Steps:

  1. ⚠️ Resolve conflicts in the hotfix PR first: #11075
  2. Test your changes after resolving conflicts
  3. Once merged, the patch release will automatically trigger
  4. You'll receive updates here when the release completes

🔗 Track Progress:

@github-actions

Copy link
Copy Markdown

🚀 Patch PR Created!

📋 Patch Details:

📝 Next Steps:

  1. Review and approve the hotfix PR: #11076
  2. Once merged, the patch release will automatically trigger
  3. You'll receive updates here when the release completes

🔗 Track Progress:

@github-actions

Copy link
Copy Markdown

🚀 Patch Release Started!

📋 Release Details:

⏳ Status: The patch release is now running. You'll receive another update when it completes.

🔗 Track Progress:

@github-actions

Copy link
Copy Markdown

Patch Release Failed!

📋 Details:

  • Version: 0.9.0-preview.3
  • Channel: preview
  • Error: The patch release workflow encountered an error

🔍 Next Steps:

  1. Check the workflow logs for detailed error information
  2. The maintainers have been notified via automatic issue creation
  3. You may need to retry the patch once the issue is resolved

🔗 Troubleshooting:

Millsondylan pushed a commit to Millsondylan/gemini-cli-1 that referenced this pull request Oct 19, 2025
cocosheng-g pushed a commit that referenced this pull request May 6, 2026
@sripasg sripasg added the size/s A small PR label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s A small PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants