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

Add retry logic for github errors to improve reliability. #127

Merged
merged 3 commits into from
Jun 6, 2022

Conversation

calebbrown
Copy link
Contributor

  1. Adds a RetryAfter function for processing responses with Retry-After header (will move to the retry library in the future)
  2. Adds a SecondaryRateLimit function for detecting rate limiting from GitHub and pausing immediately
  3. Adds a ServerError400 function for detecting odd server errors from GitHub
  4. Adds a ServerError function for detecting any 5xx server error and retrying (except for issues/comments which knowingly fails on lots for large numbers of comments).

All of these are well tested to ensure the retry behavior works correctly.

@calebbrown
Copy link
Contributor Author

For reference: I have a job still running at nearly 72 hours non-stop on 1 token with this error handling, so it appears to be sufficient.

@calebbrown calebbrown merged commit 24c936e into main Jun 6, 2022
@calebbrown calebbrown deleted the retrygithub branch June 6, 2022 01:32
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