Skip to content

Fix release CI gate racing the build-and-test checks#19

Open
lukaskroepfl wants to merge 1 commit into
mainfrom
fix/release-ci-gate-race
Open

Fix release CI gate racing the build-and-test checks#19
lukaskroepfl wants to merge 1 commit into
mainfrom
fix/release-ci-gate-race

Conversation

@lukaskroepfl
Copy link
Copy Markdown
Member

Summary

The ci-passed gate in pack.yml fired immediately on tag push and read the build-and-test check conclusions exactly once. Since the tag push and the branch push that triggers ci.yml happen at the same time, the checks were still queued/in_progress (conclusion null) when the gate ran — so the gate failed and draft-release was skipped. This bit the v0.4.0 release, which needed a manual gh run rerun --failed after CI went green.

This change makes the gate poll the tagged commit's check-runs until the build-and-test checks reach a terminal (completed) state, with a 15-minute timeout, then asserts all of them are success.

Behavior

Check-runs state Gate
both in_progress/queued (null) waits
one completed, one still running waits (handles incremental matrix registration)
none registered yet waits, errors only on timeout
all success passes
any non-success fails

Logic was exercised locally against fixtures for each of these cases.

Test plan

  • Next v* tag push completes the pack workflow without a manual re-run
  • Gate still fails fast (after timeout) if CI never runs or a check fails

The ci-passed gate in pack.yml fires immediately on tag push and read the
build-and-test check conclusions once. Because the tag push and the branch
push that triggers ci.yml happen together, the checks were still queued
(conclusion: null) when the gate ran, so every release failed the gate and
needed a manual re-run after CI went green.

Poll the tagged commit's check-runs until the build-and-test checks reach a
terminal (completed) state, with a 15-minute timeout, then assert all are
success. The poll only breaks once at least one build-and-test check exists
and none are still pending, so it also handles matrix legs registering
incrementally.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@lukaskroepfl lukaskroepfl requested a review from mateun May 27, 2026 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant