Skip to content

CI: Let a dispatch run one OS only (#1818) - #1820

Merged
Mikola Lysenko (mikolalysenko) merged 2 commits into
mainfrom
agent/fix-ci-dispatch-os-input
Oct 29, 2026
Merged

Mikola Lysenko (mikolalysenko) merged 2 commits into
mainfrom
agent/fix-ci-dispatch-os-input

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

LLM Description written by Claude Code:claude-opus-5-5

Fixes #1818

What

ci.yml gets a workflow_dispatch input os (all | linux | windows | macos, default all). A fix for a Windows-only nightly break can now be checked with

gh workflow run ci.yml --ref <branch> -f os=windows

instead 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

  • Each job's if: becomes (<unchanged condition>) && (<os term>). Off dispatch inputs.os is empty, so every inputs.os != '...' term is true and pull_request, merge_group, push and schedule evaluate exactly as before.
  • Linux roots (node-addon, lint-ecosystems, test-release, coverage, docker-base, dispatch-tests, e2e-build, yarn-classic-matrix, yarn-berry-full, cargo-old-toolchains, hosted-e2e) skip for windows/macos; their dependents (e2e, e2e-extended, e2e-full, e2e-docker, cargo-vex-matrix*, coverage-docker/merge) skip with them.
  • e2e-build-windows skips for linux/macos (e2e-windows, cargo-vex-matrix-windows follow); e2e-build-macos and yarn-berry-e2e-macos skip for linux/windows.
  • Mixed matrices: test skips for linux and excludes the other OS's legs; yarn-berry-e2e skips for macos and its full-scope include narrows to the Windows row or the three Linux rows.
  • clippy, release-readiness and ci-ok always run (every OS leg needs the first two). windows-compile-check never ran on dispatch and is untouched. ci-ok already counts skipped jobs as passing; required check names don't change. Depot mappings and the DISABLE_DEPOT_RUNNERS switch are untouched.

The ci-janitor routine's instructions live outside this repo; they should dispatch Windows-only fixes with -f os=windows once this lands.

  • A one-OS dispatch reports its verdict as ci-ok (<os> only), not ci-ok: otherwise a Windows-only dispatch on a PR head would post a green required ci-ok while the PR's Linux jobs were red (a skipped required check would count as passing too). Every other run, os=all dispatches included, still reports ci-ok.
  • OS-filtered dispatches get their own concurrency group (...-windows), so dispatching one per OS on a branch doesn't make the third replace the pending second.

CI cost

  • Lean PR / merge-queue run: unchanged, ~28 Linux jobs, ~8 min (no condition changes off dispatch).
  • Nightly: unchanged (99 jobs).
  • 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.
  • New test_ci_scheduling.py::test_dispatch_os_runs_only_that_os walks 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 on main's ci.yml and passes here.
  • Existing scheduling/tier tests now compare the if: without the dispatch-only OS term (job_if), so their assertions about PR/queue/push gating are unchanged.
  • YAML parses; all 8 fromJSON literals in ci.yml parse as JSON.
  • actionlint / zizmor are not installed in this session and installing them was not permitted; CI's own lint runs instead.
  • No Rust or platform-specific code changes, so no full-scope dispatch.

/code-review high

Fixed: one-OS dispatch posting a green required ci-ok (renamed for those runs, new test test_one_os_dispatch_cannot_post_a_green_ci_ok); per-OS dispatches sharing one concurrency group (group now includes the OS, asserted in test_late_draft_run_cannot_cancel_the_ready_run); the tier test accepting either form of yarn-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=force with os=windows|macos skips hosted-e2e. It's a Linux job, and the os input's comment now says so; making force override os would add a sixth gate variant for a combination nobody uses.
  • "Compute the OS selection once in release-readiness outputs": only the root job of each OS carries a term (dependents skip through 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 the if: alone.

https://claude.ai/code/session_011f9aePNkpUez9XyWCNA48w


Generated by Claude Code

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
@mikolalysenko
Mikola Lysenko (mikolalysenko) marked this pull request as ready for review October 29, 2026 09:04
@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

BugBot review


Generated by Claude Code

@mikolalysenko Mikola Lysenko (mikolalysenko) added the Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review label Oct 29, 2026
@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

Burn-down agent: labeled Ready for review at 39f6776f7b.

  • CI: 83/83 checks on this head pass or are skipped (33 success, 50 skipped), ci-ok green.
  • Bugbot: reviewed this head (check run success), no findings; no open review threads.
  • Reviewer focus: the os dispatch input in .github/workflows/ci.yml. Every job's if: gains an inputs.os term that is true when inputs.os is empty, so pull_request, merge_group, push and schedule runs should behave as before. One-OS dispatches report ci-ok (<os> only) so they can't post a green required ci-ok.
  • Slack: not announced this run (send tool unavailable); the next run will retry.

Generated by Claude Code

@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

Final review brief

What it does. Adds an os input (all/linux/windows/macos, default all) to ci.yml's workflow_dispatch, so a Windows-only nightly fix can be checked with -f os=windows without re-running ~95 Linux/macOS jobs. Each OS's root job gets an inputs.os != ... term. Off dispatch, inputs.os is empty, so pull_request, merge_group, push and schedule runs are unchanged.

Risk: low. CI config only, no Rust changes. The only change that touches the required check is that ci-ok's name: is now an expression. It evaluates to ci-ok whenever inputs.os is empty or all, and this PR's own pull_request run posted a green ci-ok under that name.

Look here

Verified

  • Read the full diff and the job graph. Every Linux root (node-addon, lint-ecosystems, test-release, coverage, docker-base, dispatch-tests, e2e-build, yarn-classic/berry, cargo-old-toolchains, hosted-e2e) is gated. Their dependents skip through needs (none use always()). e2e-build's matrix is ubuntu-only, test has no ubuntu leg, and coverage-merge skips with coverage.
  • inputs is an allowed context in workflow-level concurrency and in job name.
  • python3 -m pytest scripts/tests: 373 passed, 6 skipped. With main's ci.yml, the 3 new or changed scheduling tests fail, so the tests do exercise the change.
  • CI: 83/83 on this head (33 success, 50 skipped). Bugbot: success, no findings. No open threads. CHANGELOG.md untouched.

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 -f os=windows.

Auto-merge is armed, so approving sends it straight to the merge queue.


Generated by Claude Code

Merged via the queue into main with commit 438ba9d Oct 29, 2026
83 checks passed
@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the agent/fix-ci-dispatch-os-input branch October 29, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-perf CI / merge-queue performance finding (profiler routine) Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI perf: workflow_dispatch of CI — Windows-only janitor fixes re-run the full Linux + macOS nightly matrix (~100 min/day, ~30 macOS)

3 participants