ci: cut CircleCI credit burn ~25-30% (e2e overhead, master e2e, bit_pr sizing) - #10597
ci: cut CircleCI credit burn ~25-30% (e2e overhead, master e2e, bit_pr sizing)#10597luvkapur wants to merge 2 commits into
Conversation
…r sizing) Insights (30d, all branches): ~4.8M credits/month (~$2.9k) — e2e_test 3.41M (71%), bit_pr 800k (17%), e2e_test_bbit 200k, bit_merge 153k. - stop persisting .pnpm-store: nothing downstream reads it; it inflated the workspace every node of every job attaches (~2.7min x 40 e2e nodes/run) - e2e_test off master pushes: gates nothing there (bit_merge and the merge queue don't depend on it); a daily canary now runs in nightly instead (~440k credits/month -> ~185k) - e2e_test parallelism 40 -> 30: per-node fixed setup is the only cost that scales with node count (suite time is constant); ~4min wall-clock cost - bit_pr 2xlarge -> xlarge: build is CPU-bound on a single env, 16 cores were idle at 80 credits/min; heap capped at 12GB to fit 16GB RAM (~400k/month if it holds — revert to 2xlarge on 'Killed') - e2e_test_bbit halts on quiet days: no new @teambit/bit version in 24h means the previous nightly already bundled+tested the same thing (32 nodes x 30min) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
PR Summary by QodoCI: reduce CircleCI credits by trimming workspaces, e2e load, and job sizing
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1.
|
…npm call The gate only ever saves work, so a metadata hiccup (npm outage, missing time entry, non-numeric output) must run the tests, not fail the job. Also one npm invocation instead of two — it runs on every parallel node. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Why
CircleCI usage is pacing ~4.8M credits/month. Insights (last 30 days, all branches):
Two measured facts drive the changes: each e2e node spends ~162s attaching the workspace (fixed overhead x 40 nodes x every push), and master-push
e2e_testgates nothing (bit_mergedoesn't require it; the merge queue's "settled" check watchesbit_mergeonly).Changes
.pnpm-storeto the workspace — nothing downstream reads it (all jobs point bit atpackage-manager.cache). Measured on this PR's run: workspace-attach time is unchanged (165s vs 162s median/node) — the payload is dominated bybit/node_modules, so this is hygiene, not savings.e2e_testno longer runs on master pushes — every PR already ran the full suite to merge; a daily master canary now runs in thenightlyworkflow instead (~440k → ~185k credits/mo).e2e_testparallelism 40 → 30 — suite time (~507 min total) is constant across node counts; only the ~3 min/node fixed setup scales with nodes. Costs ~4 min wall clock.bit_pr2xlarge → xlarge, heap 30GB → 12GB — the build is CPU-bound on a single env (see in-file measurement note); 16 cores idled at 80 credits/min. Revert to 2xlarge if the job dies with "Killed".e2e_test_bbithalts on quiet days — when no new@teambit/bitversion was published in 24h, the previous nightly already bundled and tested the identical bits (32 nodes x ~30 min saved).Measured results (this PR's run, paired against the immediately preceding pre-change pipeline)
Proven per-run savings extrapolate to ~300k credits/month; the structural changes (2) and (5) — which remove entire runs rather than shrink them — add an estimated ~350k on top (~440k of master e2e runs removed minus ~185k for the nightly canary, plus quiet-day bbit halts). bit_pr on xlarge is verified for small lanes here; a worst-case full-cascade load test (branch
ci-pr-loadtest-xlarge) validates heavy PRs before this merges.🤖 Generated with Claude Code