You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, when the request fails, instead of exiting or handling the error, it is logged and immediately retried.
The retry happens without delay, and happens indefinitely or until the request succeeds.
When a permanent error occurs when getting issues, such as 403 Resource not accessible by personal access token [], this will loop indefinitely, resulting in the GitHub API being spammed and causing the account to be rate limited.
Instead of indefinitely retrying, there should be an errCount or similar variable that makes the function exit after a certain number of retries. It would also be nice if request were retried after a delay, with jitter. Ideally, the function would also return the error, however that would be an API breaking change.
This error made it near impossible to use my GitHub account for several days, as it was constantly rate limited and impossible to tell what was causing the rate limit to be hit. I am thankful that GitHub did not terminate my account for the amount of API requests that were being made.
The text was updated successfully, but these errors were encountered:
Gickup will attempt to retrieve the issues up to five times. If it still fails, it will return the list of issues it has managed to collect so far. I added a special case for a 403 error, as it doesn't make sense to retry when permissions are lacking. In this case, it will try once, throw an error, and then continue with the backup.
The
github.GetIssues
function contains afor
loop to handle issue pagination:gickup/github/github.go
Lines 388 to 402 in d29454e
However, when the request fails, instead of exiting or handling the error, it is logged and immediately retried.
The retry happens without delay, and happens indefinitely or until the request succeeds.
When a permanent error occurs when getting issues, such as
403 Resource not accessible by personal access token []
, this will loop indefinitely, resulting in the GitHub API being spammed and causing the account to be rate limited.Instead of indefinitely retrying, there should be an errCount or similar variable that makes the function exit after a certain number of retries. It would also be nice if request were retried after a delay, with jitter. Ideally, the function would also return the error, however that would be an API breaking change.
This error made it near impossible to use my GitHub account for several days, as it was constantly rate limited and impossible to tell what was causing the rate limit to be hit. I am thankful that GitHub did not terminate my account for the amount of API requests that were being made.
The text was updated successfully, but these errors were encountered: