Skip to content

ci: bit_pr on xlarge instead of 2xlarge - #10606

Merged
luvkapur merged 2 commits into
masterfrom
ci-bit-pr-xlarge
Aug 12, 2026
Merged

ci: bit_pr on xlarge instead of 2xlarge#10606
luvkapur merged 2 commits into
masterfrom
ci-bit-pr-xlarge

Conversation

@luvkapur

@luvkapur luvkapur commented Aug 12, 2026

Copy link
Copy Markdown
Member

Proposed Changes

  • Run the bit_pr job on xlarge instead of 2xlarge, halving its credit rate (80 to 40 credits per minute).
  • Cap the Node heap at 12GB to fit the 16GB machine (was 30GB).

Validated on live runs at both extremes. A small 2-component lane used 318 credits instead of 661 and finished slightly faster (jobs 438274 vs 438241). A worst-case 98-component auto-snap cascade completed in 25 minutes with no OOM (job 438467). The build is CPU-bound on a single env, so the extra 8 cores were idle at double the rate.

Rollback: if the job ever dies with "Killed", revert to 2xlarge and restore max-old-space-size=30000.

Extracted from #10597 so it can land independently. That PR will rebase.

Validated on live runs at both extremes: a 2-component lane (52% fewer
credits, marginally faster) and a worst-case 98-component auto-snap cascade
(25 min, no OOM at 12GB heap). The build is CPU-bound on a single env, so
the extra 8 cores were idle at double the credit rate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

CI: run bit_pr on xlarge with reduced Node heap

⚙️ Configuration changes 🕐 Less than 10 minutes

Grey Divider

AI Description

• Switch bit_pr CircleCI job from 2xlarge to xlarge to cut CI credit usage.
• Reduce Node max-old-space-size from 30GB to 12GB based on validated runs.
• Document rollback guidance if the job fails with "Killed".
Diagram

graph TD
  A[".circleci/config.yml"] --> B["bit_pr job"] --> C["CircleCI runner (xlarge)"] --> D["bit ci pr"] --> E["Node process"]
  B --> F["NODE_OPTIONS: 12GB heap"]

  subgraph Legend
    direction LR
    _cfg["Config"] ~~~ _job["CI Job"] ~~~ _rt["Runner"]
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Parameterize runner/heap by workload size
  • ➕ Lets small PRs run cheaper while allowing fallback for unusually large cascades without reverting config
  • ➕ Can be gated by pipeline parameter or scheduled canary runs
  • ➖ More CI complexity and branching logic in config
  • ➖ Harder to reason about baseline cost and performance across runs
2. Keep xlarge but add automatic retry on OOM/Killed with 2xlarge
  • ➕ Maintains cost savings for the common case while self-healing rare failures
  • ➕ Avoids manual revert when intermittent memory pressure occurs
  • ➖ Retries can mask real regressions and increase total wall time when failures happen
  • ➖ Requires careful failure detection to avoid retrying on non-resource failures

Recommendation: Current change is a good default: the job is documented as CPU-bound and has been validated on worst-case runs, so xlarge + 12GB heap is a reasonable baseline for cost reduction. If "Killed" events start appearing intermittently, consider an automatic retry/escalation path (xlarge → 2xlarge) before reverting permanently.

Files changed (1) +5 / -5

Other (1) +5 / -5
config.ymlDownsize bit_pr runner and reduce Node heap with rollback notes +5/-5

Downsize bit_pr runner and reduce Node heap with rollback notes

• Switches the bit_pr job from 2xlarge to xlarge and lowers NODE_OPTIONS max-old-space-size from 30000 to 12288 (both at job and step level). Updates comments to document validation results and a clear rollback path if the job fails with "Killed".

.circleci/config.yml

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can enable the Remediation agent and Qodo fixes findings in a dedicated fix PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@luvkapur
luvkapur enabled auto-merge (squash) August 12, 2026 13:50
@luvkapur
luvkapur merged commit 88477f8 into master Aug 12, 2026
14 checks passed
@luvkapur
luvkapur deleted the ci-bit-pr-xlarge branch August 12, 2026 14:54
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.

2 participants