-
-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retry exceeded rate limit after reset timestamp #223
Conversation
This comment has been minimized.
This comment has been minimized.
Unit Test Results (Test Files) 24 files ±0 4 errors 21 suites ±0 39m 12s ⏱️ ±0s For more details on these parsing errors, failures and errors, see this check. Results for commit c6759aa. ± Comparison against base commit ae5d6d6. ♻️ This comment has been updated with latest results. |
This comment has been minimized.
This comment has been minimized.
|
||
# backoff until X-RateLimit-Reset | ||
if 'X-RateLimit-Reset' in response.headers: | ||
value = response.headers.get('X-RateLimit-Reset') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if this is in one day?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then it would wait for a day and the workflow would timeout before. But the action would not be able to complete anyway.
The search rate limit has a one minute window, so it would wait at most a minute here. There are hourly limits so the action could be stuck for at most an hour. In same workflow that is still better than rerunning a whole workflow because this action failed on a rate limit. In that case I would say: Don't overuse your limit, then this action works snappy.
Don't rely on exponential backoff when rate limit is exceeded but wait until rate limit reset happens. This is related to #222.