Skip to content
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

Merged
merged 4 commits into from
Feb 22, 2022

Conversation

EnricoMi
Copy link
Owner

Don't rely on exponential backoff when rate limit is exceeded but wait until rate limit reset happens. This is related to #222.

@github-actions

This comment has been minimized.

@github-actions
Copy link

github-actions bot commented Feb 13, 2022

Unit Test Results (Linux)

     18 files  ±  0       18 suites  ±0   55s ⏱️ +2s
   261 tests +  2     261 ✔️ +  2      0 💤 ±  0  0 ±0 
4 698 runs  +36  4 554 ✔️ +12  144 💤 +24  0 ±0 

Results for commit c6759aa. ± Comparison against base commit ae5d6d6.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Feb 13, 2022

Unit Test Results (Test Files)

  24 files  ±0      4 errors  21 suites  ±0   39m 12s ⏱️ ±0s
272 tests ±0  227 ✔️ ±0  18 💤 ±0  23 ±0  4 🔥 ±0 
437 runs  ±0  354 ✔️ ±0  53 💤 ±0  25 ±0  5 🔥 ±0 

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.

@github-actions
Copy link

github-actions bot commented Feb 13, 2022

Unit Test Results (Dockerfile)

     18 files  ±  0       18 suites  ±0   55s ⏱️ +2s
   261 tests +  2     261 ✔️ +  2      0 💤 ±  0  0 ±0 
4 698 runs  +36  4 554 ✔️ +12  144 💤 +24  0 ±0 

Results for commit c6759aa. ± Comparison against base commit ae5d6d6.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Feb 13, 2022

Unit Test Results (Windows)

     18 files  ±  0       18 suites  ±0   55s ⏱️ +2s
   261 tests +  2     261 ✔️ +  2      0 💤 ±  0  0 ±0 
4 698 runs  +36  4 554 ✔️ +12  144 💤 +24  0 ±0 

Results for commit c6759aa. ± Comparison against base commit ae5d6d6.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Feb 13, 2022

Unit Test Results (Docker Image)

     18 files  ±  0       18 suites  ±0   55s ⏱️ +2s
   261 tests +  2     261 ✔️ +  2      0 💤 ±  0  0 ±0 
4 698 runs  +36  4 554 ✔️ +12  144 💤 +24  0 ±0 

Results for commit c6759aa. ± Comparison against base commit ae5d6d6.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Feb 13, 2022

Unit Test Results (macOS)

     18 files  ±  0       18 suites  ±0   55s ⏱️ +2s
   261 tests +  2     261 ✔️ +  2      0 💤 ±  0  0 ±0 
4 698 runs  +36  4 554 ✔️ +12  144 💤 +24  0 ±0 

Results for commit c6759aa. ± Comparison against base commit ae5d6d6.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Feb 13, 2022

Unit Test Results (reference)

     18 files  ±  0       18 suites  ±0   55s ⏱️ +2s
   261 tests +  2     261 ✔️ +  2      0 💤 ±  0  0 ±0 
4 698 runs  +36  4 554 ✔️ +12  144 💤 +24  0 ±0 

Results for commit c6759aa. ± Comparison against base commit ae5d6d6.

♻️ This comment has been updated with latest results.

@github-actions

This comment has been minimized.

@EnricoMi EnricoMi marked this pull request as ready for review February 13, 2022 16:30
@github-actions
Copy link

Unit Test Results (setup-python)

     18 files  ±  0       18 suites  ±0   55s ⏱️ +2s
   261 tests +  2     261 ✔️ +  2      0 💤 ±  0  0 ±0 
4 698 runs  +36  4 554 ✔️ +12  144 💤 +24  0 ±0 

Results for commit c6759aa. ± Comparison against base commit ae5d6d6.


# backoff until X-RateLimit-Reset
if 'X-RateLimit-Reset' in response.headers:
value = response.headers.get('X-RateLimit-Reset')

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?

Copy link
Owner Author

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.

@EnricoMi EnricoMi merged commit 2c33be4 into master Feb 22, 2022
@EnricoMi EnricoMi deleted the branch-retry-rate-limit branch February 22, 2022 17:29
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.

None yet

2 participants