[ci] Speed up fixture tests by enabling parallel execution#13596
Merged
Conversation
|
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers |
Contributor
|
UnknownError: ProviderInitError |
Contributor
|
@petebacondarwin Bonk workflow failed. Check the logs for details. View workflow run · To retry, trigger Bonk again. |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
d1f15fc to
071105d
Compare
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).
071105d to
22354c2
Compare
5 tasks
dario-piotrowicz
approved these changes
Apr 19, 2026
workers-devprod
approved these changes
Apr 19, 2026
workers-devprod
left a comment
Contributor
There was a problem hiding this comment.
Codeowners reviews satisfied
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.
This was referenced Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 viaWRANGLER_REGISTRY_PATH, and single-worker fixtures don't interact with the registry at all.Changes
--concurrency 1from the fixture test CI command, letting Turbo parallelize across available corespages-ws-appfixture — all tests weredescribe.skip(zero coverage, dead code)pages-d1-shimfixture — its single assertion (not.toContain("D1_ERROR")) is already covered identically bypages-workerjs-directoryvitest.shared.tsretry from 2 to 1 — the old network-based registry flakiness is resolved; keep one retry as a safety net for general CI flakinessValidation
Ran fixture tests locally 5 times with unlimited concurrency (4 before changes, 1 after). All runs passed with zero flakes:
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).