-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix GitHub Actions API rate limit issue #132
Conversation
Rollback Files For Sweep
|
Sandbox Executions
Check cmd/syncer/main.go with contents: |
Fixing PR: track the progress here.I'm currently fixing this PR to address the following: [Sweep GHA Fix] The GitHub Actions run failed with the following error logs: |
Fixing PR: track the progress here.I'm currently fixing this PR to address the following: [Sweep GHA Fix] The GitHub Actions run failed with the following error logs: |
Fixing PR: track the progress here.I'm currently fixing this PR to address the following: [Sweep GHA Fix] The GitHub Actions run failed with the following error logs: |
Fixing PR: track the progress here.I'm currently fixing this PR to address the following: [Sweep GHA Fix] The GitHub Actions run failed with the following error logs: |
Fixing PR: track the progress here.I'm currently fixing this PR to address the following: [Sweep GHA Fix] The GitHub Actions run failed with the following error logs: |
Fixing PR: track the progress here.I'm currently fixing this PR to address the following: [Sweep GHA Fix] The GitHub Actions run failed with the following error logs: |
Fixing PR: track the progress here.I'm currently fixing this PR to address the following: [Sweep GHA Fix] The GitHub Actions run failed with the following error logs: |
This issue is stale because it has been open 7 days with no activity. |
This PR was closed because it has been stalled for 5 days with no activity. You can reopen it if you want. |
PR Feedback (click)
I created this PR to fix the failing GitHub Actions.## Description
This PR introduces a delay between each API request made by the GitHub label syncer tool to avoid hitting the GitHub API rate limit. It also handles the case where the rate limit is hit despite the delay, by waiting until the rate limit is reset before making further requests.
Summary of Changes
time
package incmd/syncer/main.go
.time.Sleep
with a duration of 1 second after each call toSyncLabels
incmd/syncer/main.go
. This introduces a delay between each API request.SyncLabels
in a try-catch block to catch the rate limit error. If this error is caught, the tool uses theRate.Reset
field to determine when the rate limit will be reset, and sleeps until this time before continuing.Rate.Reset
field beingnil
.These changes should prevent the tool from hitting the GitHub API rate limit and causing the GitHub Actions run to fail.