Skip to content

perf(ci): add 4th server test shard and skip duplicate push CI after merge queue - #1080

Merged
badcuban merged 1 commit into
mainfrom
perf/ci-server-shard-and-dedup
Nov 24, 2026
Merged

badcuban merged 1 commit into
mainfrom
perf/ci-server-shard-and-dedup

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

Problem

  • Even with balanced weights, Server Test (3 shards, 5.5 to 6.2 min) is the only CI job taking longer than 4.3 minutes.
  • Every PR merged through the merge queue runs full CI a third time on push to main for the exact same commit SHA, wasting ~35 runner-minutes per merge and occasionally failing nightly releases when a duplicate push run flakes after merge_group passed.

Fix

  • Scaled server_test from 3 to 4 shards in .github/workflows/ci.yml and updated DEFAULT_REQUIRED_CHECKS in scripts/verify-release-ci.ts.
  • Added a push-only precheck job (skipped instantly on pull_request, merge_group, and workflow_dispatch with no runner startup delay) that verifies whether a green merge_group run of ci.yml targeting main already passed all required checks on github.sha:
    • When verified, skips duplicate test/build jobs and runs warm_cache only if the pnpm-lock.yaml blob SHA changed (or could not be confirmed).
    • Fails open to full CI on direct pushes or API errors, and keeps deploy_web_app explicit on its direct needs so manual dispatches still deploy.
  • Updated scripts/verify-release-ci.ts (and scripts/verify-release-ci.test.ts) to query filter=all, treat skipped alongside cancelled as non-verdicts, and order queued runs with null timestamps above older completed runs.
  • Updated scripts/update-test-shard-weights.ts to sample green merge_group runs whose commits landed on origin/main as well as push runs on main.

…merge queue

After PR #1078 rebalanced shards and skipped unnecessary apt installs, Server Test (5.5 to 6.2 min) remained the only job above 4.3 minutes, and every merged PR still ran full CI a third time on push to main (wasting ~35 runner-minutes per merge and allowing post-merge flakes to block nightlies).

Added a 4th server_test shard (and updated DEFAULT_REQUIRED_CHECKS in scripts/verify-release-ci.ts), added a push-only precheck job that skips duplicate main runs when a green main merge_group run already verified all required checks on the exact SHA (while warming the main pnpm cache if pnpm-lock.yaml changed and failing open to full CI on errors or direct pushes), updated verify-release-ci.ts to query filter=all and treat skipped runs as non-verdicts while ordering queued runs properly, and updated update-test-shard-weights.ts to sample landed merge_group runs.
@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:27am UTC

Request Review

@badcuban
badcuban added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit 365d56e Nov 24, 2026
23 checks passed
@badcuban
badcuban deleted the perf/ci-server-shard-and-dedup branch November 24, 2026 03:43

This branch was successfully deployed

1 active deployment
Preview — 6d3b7077 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