Repository navigation
ci: spread pull-request app-host shards over several runner pools - #14115
teamleaderleo wants to merge 1 commit into
Conversation
MACOS_RUNNER_PR moves the whole pull-request lane to one pool, so hosted macos-15 took every PR job while Blacksmith 15/26 and hosted macos-26 sat idle. A runs-on label array has to match every label, so it cannot mean "any of these pools". app-host-unit-tests now reads MACOS_RUNNER_PR_SHARDS, a JSON object from shard number to runner label, for same-repository pull requests. A shard it does not name, a fork, and every other event keep the existing lane. Compile admission still runs once; restore already accepts a product on any pool with the same xcodebuild -version, so CMUX_CI_XCODE_APP_PR must name an Xcode every listed pool carries. The object may name bare macos-26, which self-hosted fleet runners also carry. The shard's first step fails before checkout unless a macos-* request landed github-hosted, and records requested vs actual runner in the step summary. The runner label policy reads the object label by label and accepts bare macos-NN only there; a new guard keeps the fork gate and the assertion in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EduXdN9PKnGsMQztJK7WeE
|
Caution Pull Request opener is not an author or co-author of any commit in this PR.
This check is blocked to guard against commits being submitted under a trusted identity the submitter does not control. If this PR is a legitimate cherry-pick, release-engineering submission, or mailing-list-style patch delivery, the repository maintainer can opt out of this check by setting
I have read the CLA Document v2.2 and I hereby sign the CLA 1 out of 2 committers have signed the CLA. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
CAN'T DEAL WITH CLAUDE BEING THE SOLE COMMITTER WHY ISN'T IT CO-AUTHORING |
|
Closing in favor of #14097, which stripes the same app-host shards across the four pools and is already running the full suite. Generated by Claude Code |
Summary
Problem.
MACOS_RUNNER_PRmoves the whole pull-request lane to one pool. At 02:24Z it was set tomacos-15. From then on every PR macOS job went to hostedmacos-15(3 vCPU), and Blacksmithmacos-15, Blacksmithmacos-26and hostedmacos-26took no PR work (finding on #14097). Aruns-onlabel array must match every label, so one job cannot target "any of these pools". #14097 closed with only the probe, so no routing change existed.Change. For same-repository pull requests,
app-host-unit-testsreads a new repository variable,MACOS_RUNNER_PR_SHARDS. It is a JSON object from shard number to runner label:MACOS_RUNNER_PRexpression. Unset means today's behavior, and rollback is unsetting the variable.matrix.shardand doesn't touch the matrix line, so it composes with ci: run only the edited suites when a diff edits cmuxTests/ #14083: its shard 8 gets a pool from key"8".MACOS_RUNNER_PR.app_host_test_products.py restorechecks only revision, exactxcodebuild -versionand architecture, so one product feeds shards on every pool, as long as each pool carries the Xcode thatCMUX_CI_XCODE_APP_PRpins (currently/Applications/Xcode_26.3.app).macos-26, which fleet runners also carry. A new first step,Validate shard runner pool, runs before checkout and fails unless amacos-*request landed withrunner.environment == github-hosted. It also writes the requested and actual runner for each shard to the step summary, so pool behavior can be compared from real runs.runner_label_policy.py(health report) reads the object label by label. It accepts baremacos-NNonly in this variable, and it reports an unreadable object as drift, not as clean.check_app_host_shard_pool_identityintests/test_ci_self_hosted_guard.shrequires the fork gate, the matching expression inREQUESTED_RUNNER, and an assertion that runs before checkout.swift-package-testsstays on its dual-Xcode lane.docs/ci-runners.mddocuments the variable.Not verified: whether Blacksmith
macos-26shipsXcode_26.3.app. #13923 records that image shipping 26.5. If 26.3 is missing, shards mapped there fail atSelect Xcodewithin their first minute; remove them from the object. The first mixed-pool run settles this.Overlap: #14107 edits the same
runs-onlines to add a fork clause. Whichever lands second needs a small textual rebase. The fork gate here is already inside the new clause.Testing
tests/test_runner_label_policy.py: 27 pass, including 6 new shard-map cases (the four-pool map is clean, baremacos-26alone is still drift, a fleet label in the map names its shard, malformed maps count as drift).tests/test_ci_self_hosted_guard.shpasses. I also checked that the new guard fails when thegithub-hostedassertion is broken.tests/test_ci_*.py/tests/test_ci_*.shpass excepttest_ci_canonical_build_root.pyandtest_ci_sparkle_build_monotonic.sh, which fail the same way on unmodifiedmain.actionlint1.7.12: clean onci-macos.ymlandci-health-report.yml.Demo Video
N/A (CI routing only).
Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01EduXdN9PKnGsMQztJK7WeE
Generated by Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Spreads
app-host-unit-testspull-request shards over several runner pools instead of sending the whole lane to one pool viaMACOS_RUNNER_PR, so hostedmacos-15stops hogging every PR job while Blacksmith 15/26 and hostedmacos-26sit idle.MACOS_RUNNER_PR_SHARDS, a JSON map from shard number to runner label, read for same-repository pull requests; unset keys, fork PRs, and all other events keep the existingMACOS_RUNNER_PRlane, and unsetting the variable rolls back.CMUX_CI_XCODE_APP_PRpins. Whether Blacksmithmacos-26ships that Xcode is unverified, so mapped shards may fail in their first minute until confirmed.macos-26, which self-hosted fleet runners also carry; a new step fails before checkout unless amacos-*request lands github-hosted, then records requested vs actual runner in the step summary.macos-NNonly there, and reports malformed maps as drift; tests anddocs/ci-runners.mdcover the new behavior.Written for commit d6b1b78. Summary will update on new commits.
Summary by CodeRabbit