Repository navigation
ci: run PR unit shards on free hosted ARM as 12 shards - #34906
Conversation
Enterprise's 1,000-job limit makes more, smaller shards free. A 12-shard cold run on ubuntu-24.04-arm measured 361s median / 412s max per shard, against ~390s / ~441s for five warm Blacksmith 8-vCPU shards. The Blacksmith-store module cache producer becomes dispatch-only since hosted shards cannot read it.
|
No actionable comments were generated in the recent review.
|
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
e9658f34-5abf-4214-8e57-5ce624caa551
Files selected for processing: 10-
.github/workflows/pr.yml.github/workflows/unit-module-cache.yml.github/workflows/unit-plan.ymlconfig/scripts/ci-dependency-download-cache.test.mjsconfig/scripts/ci-unit-plan.mjsconfig/scripts/ci-unit-plan.test.mjsconfig/scripts/ci-unit-selection.mjsconfig/scripts/ci-unit-selection.test.mjsconfig/scripts/pr-preflight-gates.test.mjsdocs/readme/ci-runners.md
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
-
| # Five shards use fewer runner minutes; the repository variable can request 2 to 10. | ||
| ORCA_UNIT_FULL_SHARD_COUNT: ${{ vars.ORCA_UNIT_FULL_SHARD_COUNT || '5' }} | ||
| # Twelve 4-vCPU hosted shards match the old 8-vCPU wall time; the repository variable can request 2 to 16. | ||
| ORCA_UNIT_FULL_SHARD_COUNT: '12' |
There was a problem hiding this comment.
Restore the repository-variable expression before merge.
pr-preflight-gates.test.mjs expects ${{ vars.ORCA_UNIT_FULL_SHARD_COUNT || '12' }}. The literal '12' makes the current unit-test suite fail and prevents repository configuration from changing the PR shard count. The commit is temporary, so remove this override before merge. (raw.githubusercontent.com)
Proposed fix
-
--- "a/.github/workflows/pr.yml" +++ "b/.github/workflows/pr.yml" @@ -234,7 +234,7 @@ ORCA_UNIT_SELECTION_MODE: ${{ vars.ORCA_UNIT_SELECTION_MODE || 'shadow' }} ORCA_PULL_REQUEST_DRAFT: ${{ github.event.pull_request.draft }} # Twelve 4-vCPU hosted shards match the old 8-vCPU wall time; the repository variable can request 2 to 16. - ORCA_UNIT_FULL_SHARD_COUNT: '12' + ORCA_UNIT_FULL_SHARD_COUNT: ${{ vars.ORCA_UNIT_FULL_SHARD_COUNT || '12' }} run: | if [ "$PREFLIGHT_PHASE_SELECTED" != true ] || [ "$PREFLIGHT_PRIOR_SUCCESS" != true ]; then exit 0; fi node config/scripts/ci-unit-plan.mjs
Committable suggestion
-
IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.Suggested changeORCA_UNIT_FULL_SHARD_COUNT: '12' ORCA_UNIT_FULL_SHARD_COUNT: ${{ vars.ORCA_UNIT_FULL_SHARD_COUNT || '12' }}
[Medium impact] The PR appears safe to merge, with the existing non-blocking draft shard-limit issue still open. Findings
SummaryMoves PR unit shards to hosted ARM runners and raises the default count from five to twelve.
No new actionable issues were found. Reviews (5) · Last reviewed commit: "Merge branch 'main' into ci/unit-shards-..." · Reviewed by Greptile |
| // Job slots, not cores, drive queueing: eight shards consumed 68% of daily slots. Five budget ~8.8min/shard versus 10.5min p95 queue. | ||
| // Full PR/daily callers use five; selected drafts may use fewer. | ||
| export const FULL_SHARD_COUNT = 5 | ||
| export const FULL_SHARD_COUNT = 12 |
There was a problem hiding this comment.
Drafts exceed the configured count
Raising FULL_SHARD_COUNT to 12 also raises the draft limit, but selected drafts ignore the configured fullShardCount. With ORCA_UNIT_FULL_SHARD_COUNT=5, a large selected draft can now start up to 12 jobs, while a full run starts only five. Previously, that configuration capped both at five.
Use fullShardCount in the selected branch too, so lowering the configured count still limits runner use and helps reduce queues.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

Minor · Use explicit cold mode until a hosted ARM producer exists. · pr.yml:890-891
.github/workflows/pr.yml:890-891
🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick winUse explicit cold mode until a hosted ARM producer exists.
ubuntu-24.04-armdefaults tomodule_cache: warm, but the only producer runs on Blacksmith, and its workflow states that hosted PR shards cannot read that cache. A warm restore miss removes the cache path, so each shard runs cold transforms. Preserve the existing opt-out controls and change only the fallback mode:Suggested fix
- module_cache: ${{ (vars.ORCA_UNIT_MODULE_CACHE == 'off' || contains(github.event.pull_request.labels.*.name, 'ci:cold-unit-cache')) && 'off' || 'warm' }} + module_cache: ${{ (vars.ORCA_UNIT_MODULE_CACHE == 'off' || contains(github.event.pull_request.labels.*.name, 'ci:cold-unit-cache')) && 'off' || 'cold' }}

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
e6364443-8e70-415e-bf2f-e1f90b7ed0c1
Files selected for processing: 2-
.github/workflows/pr.ymlconfig/scripts/pr-unit-support-routing.test.mjs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
-
Moves the largest remaining Blacksmith cost (PR unit shards, ~$267/day) to free hosted runners, made possible by the 1,000-job Enterprise limit.
Benchmark (unit-module-cache-benchmark, cold, 12 shards):
Changes
pr.ymltest →ubuntu-24.04-arm(--maxWorkers=4already applies to ARM64).ORCA_UNIT_FULL_SHARD_COUNT(currently 5) must be set to 12 at merge.unit-module-cache.ymlproducer → dispatch-only: it seeds Blacksmith's store, which hosted shards can't read. Re-seeding in GitHub's store is deferred; the Actions cache is at 9.8/10 GB.Temporary commit forces 12 shards for this PR's own run; it is dropped before merge.