Skip to content

fix: honor RetryInfo.retryDelay for 429 RESOURCE_EXHAUSTED#2114

Open
hermann-o wants to merge 13 commits into
googleapis:mainfrom
hermann-o:fix/retry-delay-issue-1875
Open

fix: honor RetryInfo.retryDelay for 429 RESOURCE_EXHAUSTED#2114
hermann-o wants to merge 13 commits into
googleapis:mainfrom
hermann-o:fix/retry-delay-issue-1875

Conversation

@hermann-o

Copy link
Copy Markdown

Fix and test for issue: #1875
Adding code to extract retryDelay from error details in case:
code == 429
status == "RESOURCE_EXHAUSTED"
and wait as suggested.

In fact we wait 1 sec longer as indicated by google.rpc.RetryInfo, given this sample

[429 RESOURCE_EXHAUSTED. {'error': {'code': 429, 'message': 'You exceeded [...] Please retry in 58.934310785s.', 'status': 'RESOURCE_EXHAUSTED', 'details': [...] '@type': 'type.googleapis.com/google.rpc.RetryInfo', 'retryDelay': '58s'}]}}.)

@hermann-o hermann-o force-pushed the fix/retry-delay-issue-1875 branch 2 times, most recently from 795a647 to 3c77703 Compare February 28, 2026 09:33
@hermann-o hermann-o changed the title Handle retryDelay for 429 errors fix: honor RetryInfo.retryDelay for 429 RESOURCE_EXHAUSTED Feb 28, 2026
@Venkaiahbabuneelam Venkaiahbabuneelam self-assigned this Mar 2, 2026
@Venkaiahbabuneelam Venkaiahbabuneelam added the size:L Code changes between 40-100 lines label Mar 2, 2026
@Venkaiahbabuneelam

Copy link
Copy Markdown

Hi @hermann-o, Thanks for reaching out us!

Looks like branch is out of date, Kindly please update the branch.

Thanks

@hermann-o

Copy link
Copy Markdown
Author

Hi @hermann-o, Thanks for reaching out us!

Looks like branch is out of date, Kindly please update the branch.

Thanks

updated

@hermann-o hermann-o force-pushed the fix/retry-delay-issue-1875 branch from 3db3ff9 to 1eb0dbe Compare March 2, 2026 10:47
@hermann-o

Copy link
Copy Markdown
Author

not sure why this is labeled 'waiting for user response'. In case you are waiting for something from my side, please let me know...
-a

anyasabo added a commit to anyasabo/marker that referenced this pull request Jun 6, 2026
Parse retryDelay from the google.rpc.RetryInfo error details and use it
as the sleep duration before retrying. Falls back to the existing linear
backoff (tries * retry_wait_time) when the field is absent or malformed.

Ref: googleapis/python-genai#2114
Ref: datalab-to#490
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L Code changes between 40-100 lines status:awaiting user response

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants