ci: skip the redundant push re-run of an already-gated SHA #435
No reviewers
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea!435
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ci/sha-dedup-push-rerun"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Under fast-forward-only merges, main's tip is the PR head commit, byte for byte. CI already ran the full gate on that exact SHA as a
pull_requestevent, and that PR run is the cold one (no cache mount, #272), so it is the stronger check. Re-running the same jobs on thepushevent tested identical bytes in a warmer container for no added coverage. Commit4e6fb7bshows it plainly: one SHA carrying bothci / gate (pull_request)andci / gate (push)green, about 9 to 15 minutes of runner time spent twice.This adds a small
dedup checkstep to thegateandmcp-conformancejobs. On apush, it reads the public commit-status list for the SHA and, only if the matching(pull_request)context already succeeded, skips that job's heavy steps.It fails safe:
push. Apull_requestrun is the source of truth and is never skipped.The required branch-protection checks are the
(pull_request)contexts, so a skipped(push)job can never deadlock a merge. I left drift.yml's surface-diff as is: at about 14 seconds warm, the dedup step would cost close to what it saves on the single runner.Verified locally: the YAML parses, the step wiring is correct, and the dedup shell is unit-tested under the Actions shell (
bash -eo pipefail) across push and pull_request, match and no-match, and API-down. Every doubt yields a fail-safe re-run.Refs #426.