Skip to content

CI admission: zgx betas join the queue as releases - #1359

Open
katulevskiy wants to merge 7 commits into
zeron/ci-zgx-speedfrom
zeron/ci-zgx-release-admission
Open

katulevskiy wants to merge 7 commits into
zeron/ci-zgx-speedfrom
zeron/ci-zgx-release-admission

Conversation

@katulevskiy

@katulevskiy katulevskiy commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

A follow-up to CI stage 1. The heavy release and beta workflows join the shared admission queue as a verified, top-priority release class. It's stacked on the stage-1 PR named in its base, so review that first.

Why

Until now, releases and betas weren't admitted. Admission only counted their running and queued jobs as taken. Their later jobs (packaging after the builds) didn't count until GitHub created them, so CI could be admitted into runners those jobs needed minutes later, and releases couldn't be steered.

Changes

  • The release class (admit.py).
    • An admitted run can claim release in its admit job's name (admit [linux=… windows=… macos=…] release).
    • Queue order: verified releases (first come, first served), then ci:lock (oldest first), then ci:priority, then everyone.
    • A lock's standing reservation no longer counts against a release, only what its runs hold. Otherwise the two could wait on each other until CI_LOCK_HOURS.
    • The deadlock simulation now includes release waiters, and fails when that exemption is removed.
  • The claim is verified. It counts only for a run of a release workflow (RELEASE_WORKFLOWS, or CI_RELEASE_WORKFLOWS), triggered by workflow_dispatch or by a push of a tag that the API confirms points at the run's commit. A pull request, or any other workflow, claiming release is an ordinary run.
  • Up-front reservations. Each release workflow gets an admit job reserving all its jobs:
    • zeron release.yml: linux 5, windows 1.
    • zgx-beta.yml: linux 9, windows 3, macos 2 on tags; only the chosen platforms on a run by hand.
    • zgx release.yml: one of each.
    • A verified release's not-yet-created jobs stay reserved for 6 hours, since packaging starts only after the builds.
  • Approval-gated jobs aren't reserved while they wait (macOS signing behind apple-release). A job in status waiting holds no runner; it counts once it's queued.
  • Peers' release workflows are read too. CI_PEERS takes several workflows per repo, and older values keep working.
  • Still seen, not admitted (by design): the small or approval-gated workflows, i.e. the Play upload, deploys, the cache janitor and supersede. plan+admit would cost more than the job itself, and reserving across a human approval would block CI for nothing.
  • Releases fail open as before: on API trouble or CI_ADMISSION=off they start at once.

Verified

  • zeron main branch: 120 tests pass; zeron/zgx branch: 123; zgx: 67. All run with PyYAML, so the workflow-consistency checks ran too.
  • admit.py is byte-identical across the three, and the vendored copy's hash test passes.
  • None of it has run on GitHub yet.

Linked PRs

Release admission (this follow-up):

CI stage 1: #1356, #1357, zeronsh/zgx#2037

zgx-beta.yml gets an admit job, which every other job needs through
version. Its name carries the reservation and the release class: a tag's
beta reserves 9 Linux, 3 Windows and 2 macOS runners; one by hand only its
platforms', with the macOS package job, which has no approval to wait for
then. On a tag that job waits for apple-release's reviewers, so it's left
out and counts once approved and queued.

admit.py, its tests and the admission docs as on main (zeron/ci-release-
admission): releases go first in the shared queue, verified by workflow
and event, and peers' release workflows are read too.
zeron/zgx moved the beta's builds into zgx-build.yml, which zgx-beta.yml
calls. The beta's admit job now sits in front of that call (build needs
version and admit) and reserves what the run takes: on a tag, version,
zgx-build's Linux x64 + arm and Windows, and release + channel (5 Linux, 1
Windows; macOS waits for apple-release's approval and counts once queued);
by hand, version and the platforms named.
…lookup, janitor's pass records, zeron/zgx trusted only when protected, no restoring a pull request's own zgx CLI
…only

The release workflows' runs were read from their latest 30, whatever the
event. A fork's pull requests can run an edited copy of a release workflow
(on pull_request), and enough of them pushed a real release out of the
window: it waited as an ordinary run, or wasn't seen at all. They're
listed for the two events that start a release, `push` and
`workflow_dispatch`, 30 each. A pull request's runs of a release workflow
are outside runs now, seen as what they run.
Admission is documented to fail open, but only admit.py's own errors did:
a crash (an exception it doesn't catch) failed the admit job, and every
job with `needs: admit` was skipped. zgx-beta.yml's admit step continues
on error, so its job succeeds and the beta goes on, and has a timeout of
its own, shorter than the job's, so a hang ends the same way rather than
cancelling the job.
The 4-digit cap kept a giant number in an edited admit name from raising
in int(), but would also have stopped pull requests numbered 10000 and up
from claiming ci:priority or ci:lock (zgx is past 2000, ~70 a day). Pull
request numbers take up to 7 digits; reservations stay at 4.

This branch has not been deployed

No deployments
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