From f6dc45c3830a83a746be4c3e8c72a3c85f83eb0c Mon Sep 17 00:00:00 2001 From: Jason Paff Date: Fri, 3 Jul 2026 12:08:50 -0400 Subject: [PATCH] ci: serialize Fly deploys and cap turbo concurrency to stop OOM failures The PR #14 merge exposed two resource-exhaustion failures that never hit PR runs: - Deploy: all three Fly apps built concurrently on the shared remote builder and api/match were OOM-killed (exit 137) in pnpm deploy. Serialize the matrix with max-parallel: 1. - CI: the lockfile change invalidated every turbo hash, so main ran all 25 tasks cold at default concurrency 10 and a vitest worker was killed. Cap the quality gate at --concurrency=4 to match runner cores. Co-Authored-By: Claude Fable 5 --- .github/workflows/ci.yml | 6 +++++- .github/workflows/deploy.yml | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 20bf015..54f9ae3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,4 +58,8 @@ jobs: # a repository *variable*, not a secret. The real web deploy gets its # value from Vercel; this only satisfies CI's quality-gate build. NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ vars.NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY }} - run: pnpm turbo run lint typecheck test build + # --concurrency=4: on a fully cold cache (any lockfile change) all 25 tasks + # otherwise run at turbo's default concurrency of 10 and the stacked + # vitest/tsc/next-build processes OOM the 4-core runner (vitest "Worker + # exited unexpectedly"). Warm runs are cache hits and unaffected. + run: pnpm turbo run lint typecheck test build --concurrency=4 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 05c05b8..0731b0d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -101,6 +101,8 @@ jobs: strategy: # One app failing must not cancel the others' deploys. fail-fast: false + # All apps share one Fly remote builder; concurrent builds OOM it (exit 137). + max-parallel: 1 matrix: app: ${{ fromJSON(needs.detect.outputs.apps) }} # Never let two deploys of the same app race; queue them instead of cancelling.