Skip to content

Commit 8e81f62

Browse files
committed
fix(ci): cap turbo test concurrency at the runner's core count (OOM mitigation)
Test Core started failing deterministically on the hosted runner — plugin-audit#test dies with ZERO vitest output (kernel OOM-kill signature) while passing locally on Node 20 and 22 — first on main @4f8c2d1, then twice on this PR (initial run + job re-run). Onset correlates with the task graph growing past ~100 tasks (connector packages + qa gates): turbo's default concurrency (10) schedules that many vitest workers + tsup DTS builds onto a 4-vCPU runner and peak memory tips over. Cap test-step concurrency at 4 (PR affected-tests + push full-run). CPU-bound workload, so wall-clock cost is minimal; peak memory becomes bounded. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1BtxNeUaGmvUYr8FwtUNu
1 parent eb64258 commit 8e81f62

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,18 +107,26 @@ jobs:
107107
# spec sits at the root of the dependency graph, so spec-touching PRs
108108
# still run (close to) everything — but the many PRs that don't touch
109109
# spec skip the bulk of the 75-package matrix.
110+
# --concurrency=4: turbo's default (10) oversubscribes the 4-vCPU
111+
# hosted runner. As the task graph grew past ~100 tasks (connector
112+
# packages + qa gates), parallel vitest workers + tsup DTS builds
113+
# started exhausting runner memory: plugin-audit#test died with ZERO
114+
# output (kernel OOM-kill signature) deterministically on the runner
115+
# while passing everywhere else — first seen on main @4f8c2d1,
116+
# reproduced twice on #3037. Matching concurrency to the core count
117+
# bounds peak memory; the job is CPU-bound anyway.
110118
- name: Run affected tests (PR)
111119
if: github.event_name == 'pull_request'
112120
env:
113121
TURBO_SCM_BASE: ${{ github.event.pull_request.base.sha }}
114-
run: pnpm turbo run test --affected
122+
run: pnpm turbo run test --affected --concurrency=4
115123

116124
# Push to main: full run, but exclude spec's plain test task — the
117125
# coverage step below executes the exact same 250-file spec suite once,
118126
# with coverage. Previously the spec suite ran twice per push.
119127
- name: Run all tests (push)
120128
if: github.event_name == 'push'
121-
run: pnpm turbo run test --filter=!@objectstack/spec
129+
run: pnpm turbo run test --filter=!@objectstack/spec --concurrency=4
122130

123131
- name: Generate coverage report
124132
if: github.event_name == 'push'

0 commit comments

Comments
 (0)