Repository navigation
ci: cut the per-push job fan-out that queues CI behind the runner limit - #1508
Conversation
CI jobs spent ~13,000 min queued against ~4,600 min running over the last week: one CI run starts ~17-25 jobs, about the org's concurrency limit. - CodeQL: on pull requests, analyze Rust, Go, Python and Actions only when their paths change. Main pushes and the weekly schedule still analyze every language. Removes up to four jobs (Rust alone is ~6 min) from most PR pushes. - Test lanes: refit the default per-file estimate to measured cold runs (0.6s, was 1s) and let Bun suites pack into the small Vitest lanes, run in their own Turbo invocation without Vitest flags. 12 lanes become 10; the dropped two did 2s and 7s of test work each.
Maple review🟢 Confidence 9/10 · safe to merge Path-filters CodeQL's Rust/Go/Python/Actions legs on PRs and packs the Bun suites into the existing test lanes, to cut the per-push job fan-out. The workflow change reproduces the removed five-language matrix on every non-PR event, so it is safe to merge.
Before merge
What was checked
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
Merged with 1 step from "Before merge" still open. If it is done, tick it on the review comment; if not, now is the time.
|
Why
CI's own traces show the slowness is runner contention, not slow jobs. Over the last week CI jobs spent ~13,000 min queued vs ~4,600 min running. Run p50 is ~5 min, but p95 is ~31 min, and nearly all of that is jobs waiting for a runner (p95 queue 15-20 min). A single CI run starts ~17-25 jobs, about the org's concurrency limit. CodeQL starts at the same moment and adds 5 more.
This PR removes jobs that cost a runner slot each but rarely do useful work.
Changes
CodeQL: path-filter the non-JS languages on PRs (
codeql.yml)apps/ingest), Go (14 files), Python (8 files) and Actions ran on every PR push. Over the week that was ~860 runner-min.pull_requestthey now run only when their paths change. Main pushes, the weekly schedule and manual dispatch still analyze every language, so the base-branch results stay current. JS/TS is unchanged and runs on every event.Detect changesfrom paths-filter'schangesoutput. Swift keeps its existing gate.Analyze (...)check is required (main has no protection or rulesets), so a leg that is never created can't leave a PR stuck pending. Like Swift today, the code-scanning check may note that some configurations are missing on a PR that skips them.Test lanes: 12 → 10 (
plan-tests.py,run-tests.py)small-6did ~2s of test work andbun-1~7s, yet each paid ~30s setup plus a queue slot.bun-filters.run-tests.pyruns them in a second Turbo invocation without the Vitest flags, whichbun testrejects. Both invocations run even if the first fails. The 240s lane budget still covers the whole lane.Verification
python3 -m unittest discover -s .github/scripts -p 'test_plan_tests.py': 8 pass, including a new mixed-lane runner test that fails if the second invocation is skipped after a failure.jqfor the PR-no-changes, PR-rust-changed and push cases.small-2(@maple/api+@maple/cli, cold estimate ~138s) stays under the 240s budget. Watch its job summary line.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit