Skip to content

Cap Playwright workers in CI to match the 4-vCPU executor - #9802

Open
camd wants to merge 1 commit into
masterfrom
camd/fix-playwright-tests
Open

Cap Playwright workers in CI to match the 4-vCPU executor#9802
camd wants to merge 1 commit into
masterfrom
camd/fix-playwright-tests

Conversation

@camd

@camd camd commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Problem

The javascript-integration-tests CircleCI job hangs: all tests start but none ever complete, and the job dies on CircleCI's no-output timeout. The log shows Running 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: 4 when CI is 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:integration locally: 19/19 passed in 8.3s using the capped worker path
  • Plain pnpm test:integration: 19/19 passed, developer workflow unchanged

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.
@netlify

netlify Bot commented Aug 22, 2026

Copy link
Copy Markdown

Deploy Preview for treeherder ready!

Name Link
🔨 Latest commit 57c111f
🔍 Latest deploy log https://app.netlify.com/projects/treeherder/deploys/6a89e58151610e00082151a9
😎 Deploy Preview https://deploy-preview-9802--treeherder.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.67%. Comparing base (dc3080d) to head (57c111f).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@camd camd self-assigned this Aug 23, 2026
@camd
camd requested a review from Archaeopteryx August 23, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants