-
Notifications
You must be signed in to change notification settings - Fork 0
fix: handle graphql rate limit #467
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
Conversation
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.
Pull Request Overview
This PR adds retry logic with exponential backoff and jitter to the GraphQL query function to handle GitHub API rate limits.
- Introduces
getGraphQlResponseOnQuerywith configurable retry attempts and backoff - Implements detailed logging for rate‐limit retries
- Documents the new function with JSDoc
Comments suppressed due to low confidence (1)
crawler/src/main.js:161
- Consider adding unit tests or integration tests that mock rate-limit responses and verify that the retry count, exponential backoff delays, and success/failure paths behave as expected.
async function getGraphQlResponseOnQuery(query) {
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.
Pull Request Overview
A PR to improve rate limit handling for GraphQL queries by implementing exponential backoff with jitter.
- Introduces new environment-based delay constants (BASE_DELAY, MAX_DELAY, and JITTER_FACTOR).
- Adds the getGraphQlResponseOnQuery function which implements retry logic with exponential backoff and jitter.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Thanks for the PR!
Any successful deployments (not always required) will be available below.
API available
Frontend available
Once merged, code will be promoted and handed off to following workflow run.
Main Merge Workflow