verify-superset: retry transient 429/5xx before failing closed#42
Open
davanstrien wants to merge 1 commit into
Open
verify-superset: retry transient 429/5xx before failing closed#42davanstrien wants to merge 1 commit into
davanstrien wants to merge 1 commit into
Conversation
davanstrien
commented
Jun 5, 2026
| # backoff so a momentary rate-limit doesn't hard-block a legitimate sync. 200/404 are | ||
| # terminal; a still-transient code after the last try falls through to "fail closed". | ||
| code=000 | ||
| for attempt in 1 2 3; do |
Owner
Author
There was a problem hiding this comment.
maybe a better check is to diff before trying to update?
Owner
Author
There was a problem hiding this comment.
Good call — captured for later as #44 (diff to preview the real add/update/delete set + skip no-op syncs, which also cuts tree-API pressure). Keeping this PR's retry as the immediate fix.
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.
The org-card sync failed once today on a transient HTTP 429 from the Hub tree API — the superset gate correctly failed closed, but a momentary rate-limit shouldn't block a legitimate sync.
Fix: retry the tree fetch up to 3× with linear backoff (1s, 2s, 3s) on
429/5xx;200/404stay terminal. If it's still transient after the last try, it falls through to the existing "fail closed" — so the safety guarantee is unchanged; we just ride out blips.Not likely in steady state (today's 429 came from merging several PRs in seconds + manual API calls), but cheap insurance against a launch-day flurry of migration merges. ~6 lines, fail-closed semantics intact.
Tested: syntax OK, smoke-tested green against
uv-scripts/jobs-utils.