Skip to content

fix(gax): panic in LimitedAttemptCount - #6725

Merged
coryan merged 2 commits into
googleapis:mainfrom
coryan:fix-bug-6677
Sep 8, 2026
Merged

fix(gax): panic in LimitedAttemptCount#6725
coryan merged 2 commits into
googleapis:mainfrom
coryan:fix-bug-6677

Conversation

@coryan

@coryan coryan commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #6677

@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 updates the on_throttle method in LimitedAttemptCount to handle cases where the inner policy continues but the maximum attempt count has been reached, returning ThrottleResult::Exhausted instead of asserting. It also adds a corresponding unit test. The review feedback suggests simplifying the nested match and conditional logic using a match guard to improve readability and adhere to the style guide.

Comment thread src/gax/src/retry_policy.rs
@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.67%. Comparing base (86c2a65) to head (c9d1217).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6725   +/-   ##
=======================================
  Coverage   96.66%   96.67%           
=======================================
  Files         308      308           
  Lines       97778    97801   +23     
=======================================
+ Hits        94519    94546   +27     
+ Misses       3259     3255    -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coryan
coryan marked this pull request as ready for review September 7, 2026 18:04
@coryan
coryan requested a review from a team as a code owner September 7, 2026 18:04
@coryan
coryan merged commit ce12fbd into googleapis:main Sep 8, 2026
42 checks passed
@coryan
coryan deleted the fix-bug-6677 branch September 8, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unconditional panic in LimitedAttemptCount retry policy on throttled requests

2 participants