fix(release): Wait only for CI's own checks, not the release job's #41

Merged
namillis merged 1 commit from fix/release-ci-wait into main 2026-11-10 03:28:07 +00:00
Owner

What was wrong

scripts/release.py skips the tests and lint when CI already passed them on the release commit (#28), waiting up to 15 minutes (CI_WAIT_SECONDS) while CI is still running. It read the commit's combined status. That includes the release job's own check, which stays "pending" for as long as the release runs. So every release waited the full 15 minutes and then ran the tests and lint itself.

v0.4.0 showed it: CI passed on fcc766d at 02:51:56 UTC, the release started at 02:52:01, and it then waited until about 03:07 before building. The script's output didn't appear in the CI log until exit, because Python buffers stdout when it's piped, so the wait wasn't visible.

What changed

  • ci_state in release.py reads only the CI workflow's checks: statuses whose context starts with CI / (the workflow is named "CI"). Any failure or error is "failure", all success is "success", otherwise "pending". Other checks, such as the release job's, are ignored. With no CI check at all it returns None, as before.
  • main line-buffers stdout, so the "release: …" progress lines show in the CI log as they happen.

Verified

  • Against the live status of fcc766d while v0.4.0's release was still running: the old code saw "pending", the new code sees "success".
  • Fake status lists through ci_state: CI success plus a pending release check gives "success"; CI pending gives "pending"; CI failure or error gives "failure"; only a release check, or no statuses, gives None.
  • The repo has no Python tests, so I ran these checks from a throwaway script that loads release.py. I didn't run a release with this change; the next release is the real test.
## What was wrong `scripts/release.py` skips the tests and lint when CI already passed them on the release commit (#28), waiting up to 15 minutes (`CI_WAIT_SECONDS`) while CI is still running. It read the commit's combined status. That includes the release job's own check, which stays "pending" for as long as the release runs. So every release waited the full 15 minutes and then ran the tests and lint itself. v0.4.0 showed it: CI passed on `fcc766d` at 02:51:56 UTC, the release started at 02:52:01, and it then waited until about 03:07 before building. The script's output didn't appear in the CI log until exit, because Python buffers stdout when it's piped, so the wait wasn't visible. ## What changed - `ci_state` in `release.py` reads only the CI workflow's checks: statuses whose context starts with `CI /` (the workflow is named "CI"). Any failure or error is "failure", all success is "success", otherwise "pending". Other checks, such as the release job's, are ignored. With no CI check at all it returns None, as before. - `main` line-buffers stdout, so the "release: …" progress lines show in the CI log as they happen. ## Verified - Against the live status of `fcc766d` while v0.4.0's release was still running: the old code saw "pending", the new code sees "success". - Fake status lists through `ci_state`: CI success plus a pending release check gives "success"; CI pending gives "pending"; CI failure or error gives "failure"; only a release check, or no statuses, gives None. - The repo has no Python tests, so I ran these checks from a throwaway script that loads `release.py`. I didn't run a release with this change; the next release is the real test.
fix(release): Wait only for CI's own checks, not the release job's
All checks were successful
CI / test (pull_request) Successful in 31s
c5458f6f0f
release.py skips the tests and lint when CI already passed them on the
commit, waiting up to 15 minutes while CI runs. It read the commit's
combined status, which includes the release job's own check. That
check stays pending while the release runs, so every release waited
the full 15 minutes and then ran the tests itself: v0.4.0's release
spent 15 minutes waiting although CI had passed 5 seconds before it
started.

ci_state now looks only at the CI workflow's checks (contexts starting
with "CI /"). The script also line-buffers stdout, so its progress
lines show in the CI log as they happen instead of at exit.
namillis deleted branch fix/release-ci-wait 2026-11-10 03:28:07 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
namillis/LiveWireTV!41
No description provided.