Repository navigation
Back off GitHub server errors before exhausting job retries - #1508
Merged
Merged
Conversation
timothysmith0609
approved these changes
Oct 13, 2026
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.
GitHub server errors currently exhaust
BackgroundJob's default five executions in roughly 12 seconds, so longer outages spill into the queue adapter's retries and repeatedly report errors. Use Active Job's built-in polynomial backoff with ten total attempts: about 4.3 hours plus jitter before re-raising.The shared policy covers deployment creation, deployment statuses, and check-run refreshes. Exhausted retries still raise to the queue adapter and existing error reporter; rate-limit and authentication handling retain their existing behavior.
Tests exercise all ten attempts through serialized jobs, recovery of a failed deployment status without recreating published records, check-run backoff, and failure propagation from
CreateOnGithubJob.Validation: reproduced the short-delay regression before the fix; 1,254 tests / 3,575 assertions pass with SQLite and Ruby 3.2.0 (
bundle exec rake test); repository-widebundle exec rubocoppasses (328 files).Operational tradeoff: persistent GitHub 5xx failures take longer to reach the error reporter. Production adoption requires releasing the engine, updating Shipit's dependency, and deploying Shipit.
Related: https://github.com/shop/issues/issues/94251