Skip to content

perf(ci): rebalance test shards, parallelize typecheck, and skip apt when Chromium launches - #1078

Merged
badcuban merged 2 commits into
mainfrom
chore/audit-ci-speed-reliability
Nov 24, 2026
Merged

badcuban merged 2 commits into
mainfrom
chore/audit-ci-speed-reliability

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

Problem

Recent CI runs take a median of 7.7 minutes and regularly stall or hit avoidable network delays:

  • 108 of 400 server test files and 49 of 118 browser test files were missing from the shard-weight maps, piling the two slowest server tests onto Shard 3 (396s vs 209 to 224s) and skewing Browser Test by 35%.
  • playwright install --with-deps chromium triggered 2.5 to 5 minute apt-get stalls on AWS EC2 ubuntu-latest runners (*.ec2.archive.ubuntu.com bypassed the azure. mirror rewrite) even though all Chromium shared libraries are already preinstalled and apt only fetched optional fonts.
  • Typecheck ran at --concurrency-limit 2 in topological order, leaving apps/server (58s) idle behind apps/web (32s).
  • scripts/release-smoke.ts had a hardcoded manifest list missing apps/relay-worker/package.json, deleted pnpm-lock.yaml, and re-resolved the workspace against live registry.npmjs.org on every run.

Fix

  • Refreshed apps/server/vitest.shard-weights.json (400 files, projected 3-shard loads 278.7 / 278.8 / 278.7s) and apps/web/vitest.browser.shard-weights.json (118 files, projected 2-shard loads 626.5 / 626.4s) from the three newest green runs on main.
  • Updated Browser Test in .github/workflows/ci.yml to run playwright install chromium and verify a headless launch probe via Node, only rewriting all Ubuntu mirrors (([a-z0-9.-]+\.)?archive.ubuntu.com/ubuntu) to HTTPS and running playwright install-deps chromium if launch fails.
  • Switched CI Typecheck to vp exec vp run -r --parallel --concurrency-limit 4 --filter '!@threadlines/monorepo' typecheck.
  • Updated scripts/release-smoke.ts to discover workspace manifests dynamically, assert the bumped version on every manifest in releasePackageFiles, and verify lockfile compatibility offline with vp install --frozen-lockfile --lockfile-only --ignore-scripts --offline.

…when Chromium launches

Recent CI runs averaged 7.7 minutes because 108 server test files and 49 browser test files were missing from the shard-weight maps, Browser Test hit 2.5 to 5 minute apt-get stalls on EC2 Ubuntu mirrors, Typecheck serialized apps/server behind apps/web at concurrency 2, and Release Smoke deleted pnpm-lock.yaml to query live registry.npmjs.org on every run.

Refreshed both shard-weight files from recent green main runs, switched Browser Test to install Playwright Chromium without --with-deps and fall back to HTTPS apt only if a headless launch probe fails, ran Typecheck with --parallel --concurrency-limit 4, and changed Release Smoke to discover all workspace manifests and validate the bumped versions against the frozen lockfile offline.
@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
threadlines Ready Ready Preview Nov 24, 2026 3:00am UTC

Request Review

@badcuban
badcuban added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit ce49f47 Nov 24, 2026
23 checks passed
@badcuban
badcuban deleted the chore/audit-ci-speed-reliability branch November 24, 2026 03:14

This branch was successfully deployed

1 active deployment
Preview — 75f2da13 Deployed Nov 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant