Skip to content

Release a beta skipped for the gap within minutes of the gap ending - #982

Merged
coderhelm[bot] merged 2 commits into
mainfrom
beta-gap-waiter
Dec 5, 2026
Merged

coderhelm[bot] merged 2 commits into
mainfrom
beta-gap-waiter

Conversation

@nambok

@nambok nambok commented Dec 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

A beta skipped for the gap between betas now goes out within a few minutes of the gap ending, with no dependence on GitHub's schedule. Until now it waited for the 30-minute schedule in beta-follow-up.yml, which GitHub can start hours late, so merged and deployed work could sit past the end of the gap with no beta.

The run of auto-release.yml that skips a beta for the gap now starts a waiter: beta-follow-up.yml dispatched with that run's skip record. The waiter sleeps in its own run until the gap ends, checks, and starts auto-release.yml in mode beta-after-deploy, the same run a deploy starts. It sleeps in its own run, not in auto-release.yml, so the auto-release concurrency group is never held, and a queued promotion or stable release is never replaced. The schedule stays as a backstop.

Changes

  • .github/scripts/auto_release.py
    • plan also writes the skip record as the due_record output.
    • follow_up returns wait: the seconds after which checking again may change its answer. That is the time left until the record is due, or POLL_SECONDS (two minutes) while a run of auto-release.yml is queued or running. It is None when the answer is final.
    • follow_up now asks whether a run is busy only when that matters.
    • New wait_for_due: it repeats the check for at most --wait-minutes. When those minutes run out before a final answer, it writes again=true.
  • .github/workflows/auto-release.yml: new job wait (actions: write, 5-minute limit) after plan. When the plan skipped for the gap, it dispatches beta-follow-up.yml with record. The beta-due artifact stays, for the backstop.
  • .github/workflows/beta-follow-up.yml
    • New record input. With a record, the due job waits for up to 330 minutes: past the 4-hour gap and its margin, and under the 6-hour job limit (timeout 350).
    • New job again starts a new waiter with the same record when the time runs out, for example while a long release run is still going.
    • Concurrency: waiters share beta-follow-up-wait, so a newer skip's waiter replaces the older one. The schedule and dispatches without a record use beta-follow-up, so the backstop never cancels a waiter.
  • docs/self-host/updates-security.md: the release chain section describes the waiter, with the schedule as the backstop.

No new way to cut a beta: the waiter only starts the same beta-after-deploy run. That run still checks that main's head was deployed, that CI passed on it, and that the gap has ended. It skips a commit that is already released, so the waiter can never cut a second beta within the gap or a duplicate beta. Dispatching either workflow by hand works as before.

Verification

  • python3 -m unittest discover -s .github/scripts -p 'test_*.py': 229 tests pass. New tests cover:
    • the due_record output;
    • asking whether a run is busy only when that matters;
    • the wait values;
    • the waiter, on a fake clock:
      • it sleeps once, to the minute the record is due, then releases;
      • it waits out a busy release run;
      • it stops once the commit is released;
      • it hands over when its minutes run out;
    • the follow-up --wait-minutes command;
    • the wiring of both workflows: concurrency groups, the dispatch lines, permissions, and that the wait outlasts BETA_GAP_HOURS inside the job limit.
  • python3 .github/scripts/check_workflows.py: 11 workflows clean.
  • python3 .github/scripts/brand_spelling.py: clean.
  • actionlint on both changed workflows: clean.

A beta skipped for the gap waited for beta-follow-up.yml's schedule, which
GitHub can start hours late. The run that skips it now starts a waiter
(beta-follow-up.yml with its skip record) that sleeps in its own run until
the gap ends, then starts mode beta-after-deploy again. It re-checks that
the commit is still unreleased, checks again every two minutes while a run
of auto-release.yml is queued or running, and hands over to a new waiter
when its minutes run out. A newer skip's waiter replaces it. The schedule
stays as the backstop, in its own concurrency group.
@nambok nambok added the ch-review CoderHelm reviews this pull request label Dec 5, 2026
coderhelm[bot]

This comment was marked as outdated.

@coderhelm

coderhelm Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Post-merge health check: deploy cancelled: the deploy for 988ca14 was cancelled; nothing later deployed it.

@coderhelm coderhelm Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approved 22a157d (merged)

@coderhelm
coderhelm Bot merged commit 988ca14 into main Dec 5, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ch-review CoderHelm reviews this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant