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

✨ use github-client internal rate-limits timer #4473

Merged
merged 2 commits into from
Aug 2, 2024

Conversation

slntopp
Copy link
Member

@slntopp slntopp commented Aug 1, 2024

Github Client is handling rate-limits internally out of the box, which means if rate limits are reached, client will return fake 403 API Rate limits response before even trying out retryable client.
Unfortunately we can't use bypassRateLimitCheck strategy, because it's private, but we can use SleepUntilPrimaryRateLimitResetWhenRateLimited instead, which should be doing just the same job as the retryable client.
Secondary limits must still be handled by retryable client.

Copy link
Member

@chris-rock chris-rock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @slntopp Lets add some comments and we are good to go.

providers/github/connection/connection.go Show resolved Hide resolved
@slntopp slntopp requested a review from chris-rock August 2, 2024 10:40
Copy link
Contributor

github-actions bot commented Aug 2, 2024

Test Results

3 088 tests  ±0   3 087 ✅ ±0   1m 27s ⏱️ +3s
  370 suites ±0       1 💤 ±0 
   28 files   ±0       0 ❌ ±0 

Results for commit 4d5a7cd. ± Comparison against base commit 6cfa85b.

Copy link
Member

@chris-rock chris-rock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @slntopp

@chris-rock chris-rock merged commit 6dbb1de into main Aug 2, 2024
15 checks passed
@chris-rock chris-rock deleted the mik/github/fix-internal-rate-limits branch August 2, 2024 10:57
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants