Cap Playwright workers in CI to match the 4-vCPU executor - #9802
Open
camd wants to merge 1 commit into
Open
Conversation
CircleCI containers report the host's CPU count rather than the cgroup limit, so Playwright's default (cores / 2) spawned 18 Firefox workers on a 4-vCPU executor. The oversubscribed container never completed a single test and the job hung until CircleCI's no-output timeout killed it.
✅ Deploy Preview for treeherder ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9802 +/- ##
=======================================
Coverage 83.67% 83.67%
=======================================
Files 640 640
Lines 38864 38864
Branches 3488 3488
=======================================
Hits 32518 32518
Misses 6199 6199
Partials 147 147 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Problem
The
javascript-integration-testsCircleCI job hangs: all tests start but none ever complete, and the job dies on CircleCI's no-output timeout. The log showsRunning 19 tests using 18 workers.Root cause
Playwright defaults its worker count to half of
os.cpus().length. Inside a CircleCI Docker container, Node reports the host machine's CPU count (36) rather than the executor's cgroup limit, so Playwright spawned 18 concurrent Firefox instances plus the rspack dev server on a 4-vCPU (resource_class: large) container. The oversubscription was severe enough that no test ever finished.Fix
Pin
workers: 4whenCIis set, matching the executor's vCPU count. Local runs keep Playwright's default (based on the developer machine's real core count).Verification
CI=1 pnpm test:integrationlocally: 19/19 passed in 8.3s using the capped worker pathpnpm test:integration: 19/19 passed, developer workflow unchanged