Skip to content

Decouple CI platform builds and share compatible Rust caches - #1143

Merged
Mikola Lysenko (mikolalysenko) merged 5 commits into
mainfrom
ci/independent-pipelines
Oct 8, 2026
Merged

Mikola Lysenko (mikolalysenko) merged 5 commits into
mainfrom
ci/independent-pipelines

Conversation

@mikolalysenko

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

Copy link
Copy Markdown
Collaborator

Linux E2E jobs currently wait for the entire Linux/Windows/macOS build matrix, so a slow Windows compile or queued macOS runner delays unrelated Linux tests. Split the producers and consumers by OS so each platform starts as soon as its own binaries are ready. Move the remaining E2E/Cargo/Yarn jobs off unit-test and coverage dependencies they do not consume.

This is stacked on #1133, which supplies Gradle and test sharding plus obsolete merge-group cleanup. Merge that PR first, then retarget this PR to main.

  • Extend the existing clippy job with a locked, all-targets/all-features compile check and use it as a preflight for expensive CI jobs. Test-only compile failures now stop the fan-out. The repository ruleset has also been updated to require clippy directly, alongside ci-ok, so the queue sees its failure immediately.
  • Share Rust dependency caches by build profile and runner image across compatible jobs and compatibility workflows. Main remains the cache writer; toolchain, Cargo inputs and Rust environment still participate in the action's cache key. Check, release and coverage caches remain separate.
  • Keep every moved matrix row and its filters. Update binary discovery to include both Windows and macOS sibling jobs, and require every new job in ci-ok.

Validation: 269 Python harness tests passed (one skipped); cargo check --locked --workspace --all-targets --all-features and cargo clippy --locked --workspace --all-features -- -D warnings passed. Compared all 221 rows across the affected E2E/Cargo/Yarn families against the parent and confirmed identical selections. Dependency-graph tests check OS isolation, preflight failure propagation, artifact contracts and aggregate-check completeness. Actionlint has no new findings after filtering its existing optional-matrix-property diagnostics; existing Bun/PDM shell warnings remain. Zizmor found no new distinct issues and no medium/high findings in the changed workflows.

Hosted-run timing remains to be measured after landing and warming the shared caches; this PR does not claim an observed end-to-end speedup yet.


Note

Medium Risk
Workflow-only changes affect merge gating and cache behavior; incorrect needs or ci-ok wiring could hide failures or skip coverage, but Python scheduling tests target that graph.

Overview
Decouples CI by OS so Linux E2E and cargo-vex legs no longer wait on Windows/macOS compiles or queued macOS runners. e2e-build is Ubuntu-only; e2e-build-windows and e2e-build-macos reuse the same anchored steps. Windows matrix rows move into e2e-windows and cargo-vex-matrix-windows; macOS consumers depend on e2e-build-macos. e2e-full, yarn matrices, and similar jobs drop needs: [test, coverage] in favor of clippy or the matching OS build only.

clippy becomes the compile preflight: locked cargo clippy plus cargo check --locked --workspace --all-targets --all-features. Heavy jobs (test, e2e-build*, docker, yarn, hosted-e2e, etc.) needs: clippy so test-target compile failures stop the fan-out early.

Rust caches switch from per-job key to shared-key (dev-${{ matrix.os }} vs e2e-${{ matrix.os }}) across ci.yml and compatibility workflows, with comments that main remains the writer and toolchain/manifest hashing still applies.

Harness: new test_ci_scheduling.py guards ci-ok completeness, clippy ancestry, and OS-isolated build→consumer edges; test_ci_vlt_rows.job_rows also aggregates -windows / -macos sibling jobs.

Reviewed by Cursor Bugbot for commit fb8dbf5. Configure here.


Generated by Claude Code

The merge-group CI run took ~46 min, and its critical path was the four
Gradle capstone legs: each ran the agent suites plus all 43 hosted
real-Gradle tests serially (~31 min of test time per leg).

- Split each line's agent+hosted leg into three: the agent suites plus
  gradle_hosted_[345], gradle_hosted_[b-p], and a catch-all that runs
  gradle_hosted_ with --skip on exactly those words, so a new test always
  lands in some leg. test_ci_gradle_prefixes.py's HostedShards checks that
  every hosted test runs in exactly one leg per line and that the
  catch-all's skip list matches the other legs.
- Drop needs: [test, coverage] from yarn-classic-matrix, yarn-berry-e2e,
  cargo-old-toolchains and cargo-vex-matrix (which keeps e2e-build). They
  consume nothing from those jobs and started only after the ~31 min
  windows test leg. Draft skipping is unchanged: the yarn jobs never run on
  pull_request, cargo-old-toolchains has its own draft guard, and
  e2e-build gates cargo-vex-matrix.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Dropping `needs: [test, coverage]` from yarn-classic-matrix,
yarn-berry-e2e and cargo-old-toolchains also dropped the draft skip they
inherited from those jobs, so draft pushes started compiling and running
every leg. Gate them on `github.event.pull_request.draft != true` like
the other top-level jobs; push, merge_group and schedule events have no
pull_request payload and still run them.

Co-Authored-By: Claude <noreply@anthropic.com>
…haned merge-group runs

- test (macOS / Windows): two legs per OS via scripts/ci-test-shard.py.
  The Windows leg spent ~10 min linking ~240 test binaries and ~15 min
  running them in one job (~31 min, the next critical path once the
  Gradle legs are sharded). Shard 1 runs the unit tests, doctests and a
  third of the integration targets; shard 2 the rest. The shards together
  run exactly the old cargo test --workspace selection
  (test_ci_test_shard.py), and a renamed target fails loudly.
- test-release: skipped on merge_group. Every PR already ran it on its
  head, and it still runs on main after each merge; in the queue it
  re-spent ~30 min (23 compiling) per entry. ci-ok counts skipped as
  passing.
- merge-queue-janitor.yml: on each merge group, cancel queued or running
  merge-group runs whose gh-readonly-queue ref was deleted (the queue
  rebuilt or dropped that entry). Only a definite 404 cancels; it never
  fails the merge group.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Keep every E2E and compatibility row while removing cross-platform build barriers and unit-test dependencies. Check all test targets before the expensive fan-out, keep ci-ok dependent on every split job, and share dependency caches by profile and runner image without allowing PR cache writes.
@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

Burn-down agent: labeled Ready for review at 0c9a5e1.


Generated by Claude Code

Base automatically changed from ci/shard-gradle-hosted to main October 8, 2026 18:55
@mikolalysenko Mikola Lysenko (mikolalysenko) removed the Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review label Oct 8, 2026
Conflicts in ci.yml only: kept main's (#1133) ungated yarn/cargo matrices and draft gate comments, and re-applied this branch's `needs: clippy` preflight on top.

Co-Authored-By: Claude <noreply@anthropic.com>
@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

bugbot run


Generated by Claude Code

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit fb8dbf5. Configure here.

@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

Burn-down agent: labeled Ready for review at fb8dbf5.

  • CI: all check suites on the head are success (451 check runs, ci-ok success); no main-wide failures.
  • Bugbot: reviewed this head (Cursor check success); no unresolved review threads.
  • GitHub still reports mergeable UNKNOWN after repeated re-queries over ~15 min; a local git merge-tree against main (830749f) is clean. No CHANGELOG.md change.
  • Slack announcement not sent this run (Slack send tool unavailable); the next run will retry.

Generated by Claude Code

Merged via the queue into main with commit b04be34 Oct 8, 2026
451 checks passed
@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the ci/independent-pipelines branch October 8, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants