Repository navigation
ci: poll scratch-branch head in smoke verify steps to absorb replication lag - #97
Merged
Merged
Conversation
…ion lag The e2e-smoke and published-tag-smoke verify steps read the scratch-branch head via the REST API immediately after the action's updateRef returns, and can observe GitHub's stale pre-commit head (read-after-write replication lag). The action had committed correctly, but the "branch head == reported commit" assertion failed spuriously — as seen in run 29433505922 (#96), which an unchanged re-dispatch then passed. Both verify steps now poll the branch head for the reported commit-sha with a bounded retry (up to 5 attempts, 3s apart) before declaring a mismatch. The hard failure after the retry budget is kept, so a genuine no-op (the #58 class of bug this check exists for) is still caught. Refs: #96
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.
Summary
Fixes the read-after-write race in both smoke workflows' verify steps (#96).
The
e2e-smokeandpublished-tag-smoke"branch head points at the reported commit" checks read the scratch-branch head viagh api .../commits/${SCRATCH_BRANCH}immediately after the action'supdateRefreturns. GitHub's replication lag can serve the stale pre-commit head, so the check fails even though the action committed correctly — exactly what happened in run 29433505922, which an unchanged re-dispatch then passed.Change
Both verify steps now poll the branch head for the reported
commit-shawith a bounded retry (up to 5 attempts, 3s apart) before declaring a mismatch. The hard failure after the retry budget is preserved, so a genuine no-op (the #58 class of bug this assertion exists to catch) still fails the job.Steps 1 (empty
commit-sha), 3 (signature), and 4 (content round-trip) are unchanged.Testing
prek run --all-filesgreen (yamllint, shellcheck, etc.).Refs: #96