utils: back off longer and correctly on retry_on_exception (#311) - #328
Open
robwoolley wants to merge 1 commit into
Open
utils: back off longer and correctly on retry_on_exception (#311)#328robwoolley wants to merge 1 commit into
robwoolley wants to merge 1 commit into
Conversation
…structure#311) Fixes ros-infrastructure#311. Under concurrent CI load (multiple distro/platform combinations running at once), GitHub rate limits package.xml fetches with HTTP 429. retry_on_exception's default backoff totaled under 2 seconds (5 retries, starting at 0.125s) -- nowhere near enough for the rate limit to clear -- so fetches were giving up and packages silently failed to generate. Two changes: - Raise the default retry budget so the backoff can actually ride out a real rate-limit window (10 retries, starting at 1s, doubling up to a 60s cap). - Fix the cap logic itself: it previously reset the interval back down to 0.125s after 6 retries instead of staying capped high, which meant retries sped back up right when they should have kept backing off the most under sustained rate limiting. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
Contributor
Author
|
@cottsay Please may I get your feedback on this change to superflore? I am adjusting the backoff from 0.125, 0.25, 0.5, 1, 2 to 1,2,4,8,16 to give GitHub a chance to recover and stop issuing HTTP error 429. This typically happens when I try running multiple superflore scripts in different GHA at the same time and flood GitHub with requests from the same source. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #311. Under concurrent CI load (multiple distro/platform combinations running at once), GitHub rate limits package.xml fetches with HTTP 429. retry_on_exception's default backoff totaled under 2 seconds (5 retries, starting at 0.125s) -- nowhere near enough for the rate limit to clear -- so fetches were giving up and packages silently failed to generate.
Two changes: