-
-
Notifications
You must be signed in to change notification settings - Fork 109
fix: pause Updatecli when running out of GitHub API limit #6168
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
Implements automatic rate limit handling for GitHub API exhaustion by adding sleep functionality when API requests are depleted. The change prevents immediate failures when hitting GitHub's rate limits and automatically resumes processing after the reset time.
- Adds sleep functionality when GitHub API rate limit is reached (remaining = 0)
- Replaces the previous warning-only approach with automatic waiting until reset time
- Simplifies the rate limit display logic by removing the conditional warning for low credits
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
chore: remove useless code chore: cleanup comment Signed-off-by: Olblak <[email protected]>
…to github/api/exhausted
* make a http request to only retrieve the rate limit if the previous request failed due to api limit exceeded * fix the monitor error mesage Signed-off-by: Olblak <[email protected]>
Signed-off-by: Olblak <[email protected]>
Fix updatecli#5323 Sometimes a git pull doesn't detect immediately git commit created via the GitHub api So we try to pull multiple times This commit also fixes the rate limit mutation within the create commit api call by removing wront graphql variable Signed-off-by: Olblak <[email protected]>
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
Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Olblak <[email protected]>
Signed-off-by: Olblak <[email protected]>
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
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
fix: #5323
When the GitHub token used by Updatecli is running out of API request, then Updatecli sleep until the reset time.
This is especially useful in the context of udash where we execute a significant amount of Updatecli pipelines to monitor the various git repositories.
Test
This pull request was tested manually
Additional Information
Checklist
Tradeoff
Using a sleep could mean wasting compute resources, such as the machine running Updatecli while the process is sleeping.
We could introduce an environment variable to disable this behavior
Potential improvement