Skip to content

ci: run PR unit shards on free hosted ARM as 12 shards - #34906

Merged
OrcaWin merged 7 commits into
mainfrom
ci/unit-shards-hosted-arm
Oct 29, 2026
Merged

OrcaWin merged 7 commits into
mainfrom
ci/unit-shards-hosted-arm

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​10 $\color{#cf222e}{\Huge{\mathbf{−}}}$​10 0
Prod 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​16 $\color{#cf222e}{\Huge{\mathbf{−}}}$​33 $\color{#cf222e}{\Huge{\mathbf{−}}}$​17

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):

Runner median max
ubuntu-24.04-arm 361s 412s
ubuntu-24.04 (x64) 448s 473s
Blacksmith 8 vCPU × 5, warm cache (today's PRs) ~390s ~441s

Changes

  • pr.yml test → ubuntu-24.04-arm (--maxWorkers=4 already applies to ARM64).
  • Shard count default 5 → 12; cap 10 → 16. The repo variable ORCA_UNIT_FULL_SHARD_COUNT (currently 5) must be set to 12 at merge.
  • unit-module-cache.yml producer → 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.
  • Peak concurrency estimate: ~550 of 1,000 (today's peak hour: 355 total, 109 Blacksmith Linux).

Temporary commit forces 12 shards for this PR's own run; it is dropped before merge.

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.
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent 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: 52f22dc8-6a35-41cf-be13-7a84089bd029
Commits

Reviewing files that changed from the base of the PR and between 7acf6fa and 701b395.

Files selected for processing: 1
  • .github/workflows/pr.yml

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

Walkthrough

The unit-test workflow now uses 12 shards on hosted ubuntu-24.04-arm runners. Shard-count validation accepts values from 2 through 16, and selected draft runs use the full shard count as their cap. The unit-module-cache workflow now runs only through manual dispatch. CI runner documentation and related tests reflect these changes.

Priority: Normal

Merge Risk: Minimal · up to 701b3

No actionable merge-blocking risk remains: shard configuration honors repository settings, and the hosted ARM cache fallback is intentional.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description explains the main changes, motivation, benchmarks, runner choice, shard-count changes, cache limitation, and concurrency estimate. However, it omits most required template sections, in… Add the required template sections and complete them. Include an actual linked issue, state N/A with a reason for visual proof, document testing and platform coverage, complete the applicable checklists, address cross-platform and compatibi…
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: moving PR unit shards to hosted ARM runners and increasing the shard count to 12.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the main changes, motivation, benchmarks, runner choice, shard-count changes, cache limitation, and concurrency estimate. However, it omits most required template sections, including the linked issue, visual-proof statement, testing checklist, AI disclosure or internal-contributor handling, review notes, boundary checklist, and final checklist.

Resolution

Add the required template sections and complete them. Include an actual linked issue, state N/A with a reason for visual proof, document testing and platform coverage, complete the applicable checklists, address cross-platform and compatibility considerations, and confirm the temporary commit will be removed before merge.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 7 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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
Commits

Reviewing files that changed from the base of the PR and between d6918c7 and 1596633.

Files selected for processing: 10
  • .github/workflows/pr.yml
  • .github/workflows/unit-module-cache.yml
  • .github/workflows/unit-plan.yml
  • config/scripts/ci-dependency-download-cache.test.mjs
  • config/scripts/ci-unit-plan.mjs
  • config/scripts/ci-unit-plan.test.mjs
  • config/scripts/ci-unit-selection.mjs
  • config/scripts/ci-unit-selection.test.mjs
  • config/scripts/pr-preflight-gates.test.mjs
  • docs/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.

Comment thread .github/workflows/pr.yml Outdated
# 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'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Major · Functional Correctness · Quick win

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 change
ORCA_UNIT_FULL_SHARD_COUNT: '12'
ORCA_UNIT_FULL_SHARD_COUNT: ${{ vars.ORCA_UNIT_FULL_SHARD_COUNT || '12' }}

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with the existing non-blocking draft shard-limit issue still open.

Findings

  1. P2 Drafts exceed the configured count ▶

Summary

Moves PR unit shards to hosted ARM runners and raises the default count from five to twelve.

  • PR unit tests run on hosted ARM in twelve shards by default.
  • The Blacksmith cache producer runs only when manually started.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

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 win

Use explicit cold mode until a hosted ARM producer exists.

ubuntu-24.04-arm defaults to module_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
Commits

Reviewing files that changed from the base of the PR and between a23b38e and 7acf6fa.

Files selected for processing: 2
  • .github/workflows/pr.yml
  • config/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.

@OrcaWin
OrcaWin merged commit 006bbb2 into main Oct 29, 2026
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant