Repository navigation
CI: Let a dispatch run one OS only (#1818) - #1820
Conversation
A fix for a Windows-only nightly failure is checked with a manual dispatch of CI, which re-ran every Linux and macOS nightly-tier job too (~97 Linux and ~41 macOS job-minutes per run), although the fix's PR run and the merge queue already cover Linux. Add an `os` dispatch input (all, linux, windows, macos; default all). Each job's `if:` gets a term that is always true off dispatch, so pull_request, merge_group, push and the nightly run exactly what they ran before. clippy and release-readiness still run on every dispatch because every OS leg waits on them. Fixes #1818 Assisted-by: Claude Code:claude-opus-5-5
A dispatch that ran only one OS still reported `ci-ok`, the required check, on the branch head, so a Windows-only run could make a PR whose Linux jobs failed look green. Such a run now reports as `ci-ok (<os> only)`; every other run still reports `ci-ok`. Dispatches for different OSes on one branch also shared a concurrency group, so a third dispatch replaced the pending second one. Each OS-filtered dispatch now gets its own group. Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
|
Burn-down agent: labeled Ready for review at
Generated by Claude Code |
Final review briefWhat it does. Adds an Risk: low. CI config only, no Rust changes. The only change that touches the required check is that Look here
Verified
Changes I made: none. Open questions: none. Once this lands, the ci-janitor routine's instructions (kept outside the repo) should dispatch Windows-only fixes with Auto-merge is armed, so approving sends it straight to the merge queue. Generated by Claude Code |
LLM Description written by Claude Code:claude-opus-5-5
Fixes #1818
What
ci.ymlgets aworkflow_dispatchinputos(all|linux|windows|macos, defaultall). A fix for a Windows-only nightly break can now be checked withinstead of re-running the ~91 Linux and 4 macOS nightly-tier jobs that its PR run and the merge queue already cover.
Root cause
Every nightly-tier job is gated on
github.event_name == 'workflow_dispatch'with no way to pick an OS, so each dispatch ran the whole nightly matrix (issue: ~97 Linux + ~41 macOS job-min per Windows-only dispatch, 5 such dispatches in the last 7 days).How
if:becomes(<unchanged condition>) && (<os term>). Off dispatchinputs.osis empty, so everyinputs.os != '...'term is true and pull_request, merge_group, push and schedule evaluate exactly as before.windows/macos; their dependents (e2e, e2e-extended, e2e-full, e2e-docker, cargo-vex-matrix*, coverage-docker/merge) skip with them.e2e-build-windowsskips forlinux/macos(e2e-windows, cargo-vex-matrix-windows follow);e2e-build-macosandyarn-berry-e2e-macosskip forlinux/windows.testskips forlinuxand excludes the other OS's legs;yarn-berry-e2eskips formacosand its full-scopeincludenarrows to the Windows row or the three Linux rows.clippy,release-readinessandci-okalways run (every OS leg needs the first two).windows-compile-checknever ran on dispatch and is untouched.ci-okalready counts skipped jobs as passing; required check names don't change. Depot mappings and theDISABLE_DEPOT_RUNNERSswitch are untouched.The ci-janitor routine's instructions live outside this repo; they should dispatch Windows-only fixes with
-f os=windowsonce this lands.ci-ok (<os> only), notci-ok: otherwise a Windows-only dispatch on a PR head would post a green requiredci-okwhile the PR's Linux jobs were red (a skipped required check would count as passing too). Every other run,os=alldispatches included, still reportsci-ok....-windows), so dispatching one per OS on a branch doesn't make the third replace the pending second.CI cost
workflow_dispatch -f os=windows: from ~99 jobs (~97 Linux + ~41 macOS + ~50 Windows job-min) to the Windows jobs plus clippy, release-readiness and ci-ok (~50 Windows + ~5 Linux job-min).os=all(default) keeps today's behaviour.Validation
python3 -m pytest scripts/tests -q: 372 passed, 6 skipped.test_ci_scheduling.py::test_dispatch_os_runs_only_that_oswalks the job graph and checks, for each OS value, that exactly the jobs whose matrix/runner targets that OS run (plus the always-on preflights), and that the mixed matrices narrow. It fails onmain'sci.ymland passes here.if:without the dispatch-only OS term (job_if), so their assertions about PR/queue/push gating are unchanged.fromJSONliterals inci.ymlparse as JSON.actionlint/zizmorare not installed in this session and installing them was not permitted; CI's own lint runs instead./code-review high
Fixed: one-OS dispatch posting a green required
ci-ok(renamed for those runs, new testtest_one_os_dispatch_cannot_post_a_green_ci_ok); per-OS dispatches sharing one concurrency group (group now includes the OS, asserted intest_late_draft_run_cannot_cancel_the_ready_run); the tier test accepting either form ofyarn-berry-full's gate (now requires the gated form); a figure in the input comment that mixed jobs and job-minutes.Not changed:
hosted_e2e=forcewithos=windows|macosskips hosted-e2e. It's a Linux job, and theosinput's comment now says so; makingforceoverrideoswould add a sixth gate variant for a combination nobody uses.needs), so it's 16 one-term edits; moving it into job outputs would make each gate depend on a script and not be readable from theif:alone.https://claude.ai/code/session_011f9aePNkpUez9XyWCNA48w
Generated by Claude Code