Skip to content

[ci] Speed up fixture tests by enabling parallel execution#13596

Merged
petebacondarwin merged 2 commits into
mainfrom
pbacondarwin/speed-up-fixture-ci
Apr 20, 2026
Merged

[ci] Speed up fixture tests by enabling parallel execution#13596
petebacondarwin merged 2 commits into
mainfrom
pbacondarwin/speed-up-fixture-ci

Conversation

@petebacondarwin

@petebacondarwin petebacondarwin commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Fixes no specific issue — CI performance improvement.

The fixture tests CI job (Tests (Linux, fixtures)) currently takes ~11 minutes because it runs all ~54 fixture test suites serially (--concurrency 1). This constraint was originally needed because the dev registry was network-based (Express HTTP server on a shared port), causing cross-test interference.

Since the dev registry was migrated to a file-based registry in late 2024 (PR #7706), this constraint is no longer necessary. Fixture tests that use multi-worker service bindings (dev-registry, entrypoints-rpc-tests) already use isolated registry paths via WRANGLER_REGISTRY_PATH, and single-worker fixtures don't interact with the registry at all.

Changes

  1. Remove --concurrency 1 from the fixture test CI command, letting Turbo parallelize across available cores
  2. Delete pages-ws-app fixture — all tests were describe.skip (zero coverage, dead code)
  3. Delete pages-d1-shim fixture — its single assertion (not.toContain("D1_ERROR")) is already covered identically by pages-workerjs-directory
  4. Reduce vitest.shared.ts retry from 2 to 1 — the old network-based registry flakiness is resolved; keep one retry as a safety net for general CI flakiness

Validation

Ran fixture tests locally 5 times with unlimited concurrency (4 before changes, 1 after). All runs passed with zero flakes:

Run Tasks Result Time
1 (baseline) 79/79 Pass 1m11s
2 (baseline) 79/79 Pass 1m38s
3 (baseline) 79/79 Pass 1m34s
4 (baseline) 79/79 Pass 1m33s
5 (after changes) 76/76 Pass 1m52s

Expected CI improvement: ~10min → ~3-4min (the CI runner has fewer cores than my local machine, so the speedup will be less dramatic but still substantial).


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: CI/test-only changes, no user-facing impact

Open in Devin Review

@petebacondarwin petebacondarwin added the ci:no-changeset-required Skip pull request checks for a valid changeset label Apr 19, 2026
@petebacondarwin petebacondarwin added the ci:no-changeset-required Skip pull request checks for a valid changeset label Apr 19, 2026
@changeset-bot

changeset-bot Bot commented Apr 19, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 22354c2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk Apr 19, 2026
@workers-devprod workers-devprod requested review from a team and ascorbic and removed request for a team April 19, 2026 16:58
@workers-devprod

workers-devprod commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@ask-bonk

ask-bonk Bot commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

UnknownError: ProviderInitError

github run

@ask-bonk

ask-bonk Bot commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

@petebacondarwin Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

devin-ai-integration[bot]

This comment was marked as resolved.

@pkg-pr-new

pkg-pr-new Bot commented Apr 19, 2026

Copy link
Copy Markdown
create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@13596

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@13596

miniflare

npm i https://pkg.pr.new/miniflare@13596

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@13596

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@13596

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@13596

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@13596

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@13596

wrangler

npm i https://pkg.pr.new/wrangler@13596

commit: 22354c2

@petebacondarwin petebacondarwin force-pushed the pbacondarwin/speed-up-fixture-ci branch from d1f15fc to 071105d Compare April 19, 2026 17:26
The dev registry was migrated from a network-based (Express HTTP server)
to a file-based registry in late 2024. The --concurrency 1 flag on fixture
tests was originally needed to prevent registry conflicts, but is no longer
necessary.

Changes:
- Remove --concurrency 1 from fixture test CI command, letting Turbo use
  all available cores for parallel execution
- Delete pages-ws-app fixture (all tests were describe.skip, zero coverage)
- Delete pages-d1-shim fixture (its single assertion is already covered by
  pages-workerjs-directory)
- Reduce vitest retry from 2 to 1 (the old registry flakiness is resolved,
  keep one retry as a safety net for general CI flakiness)

Validated locally: 4 consecutive runs with unlimited concurrency, all
passing with zero flakes. Execution time drops from ~10min (serial) to
~1.5min (parallel).
@petebacondarwin petebacondarwin force-pushed the pbacondarwin/speed-up-fixture-ci branch from 071105d to 22354c2 Compare April 19, 2026 21:13
@petebacondarwin petebacondarwin added the ci-flake Applied to PRs addressing CI flakiness label Apr 19, 2026

@dario-piotrowicz dario-piotrowicz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🙂

Comment thread fixtures/pages-ws-app/tests/index.test.ts

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codeowners reviews satisfied

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Apr 19, 2026
@petebacondarwin petebacondarwin merged commit 75f3680 into main Apr 20, 2026
73 of 75 checks passed
@petebacondarwin petebacondarwin deleted the pbacondarwin/speed-up-fixture-ci branch April 20, 2026 05:32
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Apr 20, 2026
petebacondarwin added a commit that referenced this pull request Apr 20, 2026
Follow-up to #13596 and #13601 which removed --concurrency=1 entirely.
Unlimited concurrency caused CPU starvation on 4-vCPU CI runners when
20+ workerd-spawning fixtures or 3+ heavyweight package suites ran
simultaneously, leading to test timeouts.

Changes:
- Cap fixture concurrency at 4 (was unlimited, previously 1)
- Cap package concurrency at 3 (was unlimited, previously 1)
- Add testTimeout: 50_000 to 6 vitest configs that were using Vitest's
  default 5000ms instead of the repo standard 50s from vitest.shared.ts:
  workers-shared/asset-worker, workers-shared/router-worker,
  vite-plugin-cloudflare, edge-preview-authenticated-proxy,
  kv-asset-handler, pages-shared
- Increase start-worker-node-test timeout from 15s to 50s

The timeout fixes address pre-existing fragility - these configs never
extended vitest.shared.ts and relied on Vitest's 5s default, which is
insufficient under any CPU load.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:no-changeset-required Skip pull request checks for a valid changeset ci-flake Applied to PRs addressing CI flakiness

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants