Skip to content

fix(http): fail fast on GitHub API rate limit instead of hanging#1120

Open
LalatenduMohanty wants to merge 1 commit intopython-wheel-build:mainfrom
LalatenduMohanty:fix/github-rate-limit-fail-fast
Open

fix(http): fail fast on GitHub API rate limit instead of hanging#1120
LalatenduMohanty wants to merge 1 commit intopython-wheel-build:mainfrom
LalatenduMohanty:fix/github-rate-limit-fail-fast

Conversation

@LalatenduMohanty
Copy link
Copy Markdown
Member

@LalatenduMohanty LalatenduMohanty commented May 6, 2026

Summary

  • Add GitHubRateLimitError exception that raises immediately when the GitHub API rate limit reset is more than 120 seconds away, instead of sleeping 300s per retry for up to ~40 minutes
  • The error message suggests setting GITHUB_TOKEN to increase the limit from 60 to 5000 requests/hour
  • Short waits (under 120s) still sleep and retry as before

Closes: #1118

@LalatenduMohanty LalatenduMohanty requested a review from a team as a code owner May 6, 2026 15:53
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Warning

Rate limit exceeded

@LalatenduMohanty has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 58 minutes and 4 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 757030cb-37dd-44c2-87f2-abafd18cf58a

📥 Commits

Reviewing files that changed from the base of the PR and between b5b31d9 and d9ad52b.

📒 Files selected for processing (2)
  • src/fromager/http_retry.py
  • tests/test_http_retry.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mergify mergify Bot added the ci label May 6, 2026
Raise GitHubRateLimitError immediately when the rate limit reset is
more than 120 seconds away, instead of sleeping 300s per retry for up
to ~40 minutes. The error message suggests setting GITHUB_TOKEN.

Closes: python-wheel-build#1118
Co-Authored-By: Claude <claude@anthropic.com>
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
@LalatenduMohanty LalatenduMohanty force-pushed the fix/github-rate-limit-fail-fast branch from b27bf14 to d9ad52b Compare May 6, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fail fast on GitHub API rate limit instead of hanging for 25+ minutes

1 participant