Skip to content

fix: remove global-setup REST warm-up that hung CI for 30 minutes - #30

Merged
josephfusco merged 5 commits into
mainfrom
fix/revert-hanging-globalsetup-warmup
Aug 19, 2026
Merged

fix: remove global-setup REST warm-up that hung CI for 30 minutes#30
josephfusco merged 5 commits into
mainfrom
fix/revert-hanging-globalsetup-warmup

Conversation

@josephfusco

Copy link
Copy Markdown
Collaborator

The last main run (from #28's merge) ran "Run Playwright tests" for 26 minutes with zero test output ever produced, hitting the job's 30-minute cap and getting force-killed. Traced this to the RequestUtils REST warm-up I added to global-setup.ts in a previous PR: it's the first thing that runs, and something about it hangs indefinitely in real CI (never reproduced this locally, which is exactly the risk of trusting an untested-in-CI addition).

The two actual fixes from this session (Gutenberg auto-enabling the collaboration experiment, and the corrected filter-detection notice) don't depend on this warm-up at all. Verified locally against a genuinely cold-started wp-env: 11/11 passing in ~22s with it removed entirely.

Use of AI Tools

Assisting with diagnosing the hang from CI logs and implementing the revert.

@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.90%. Comparing base (8d09690) to head (07459c0).

Additional details and impacted files
@@            Coverage Diff            @@
##               main      #30   +/-   ##
=========================================
  Coverage     63.90%   63.90%           
  Complexity       35       35           
=========================================
  Files             7        7           
  Lines           266      266           
=========================================
  Hits            170      170           
  Misses           96       96           
Flag Coverage Δ
multisite 63.90% <ø> (ø)
phpunit 64.63% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@josephfusco
josephfusco force-pushed the fix/revert-hanging-globalsetup-warmup branch from 4e84f84 to 9eb2226 Compare August 19, 2026 04:30
@josephfusco

josephfusco commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator Author

Playwright Tests had three separate causes, fixed in order:

  1. Slow user provisioning. ensureCollaborator() created test users over REST (admin.createUser()), which pays a full login + REST-discovery bootstrap per call. Switched to WP-CLI (wp user get/create/update), ~1s instead of 30s+.
  2. Wrong WordPress instance. getAPIRootURL() in @wordpress/e2e-test-utils-playwright resolves via its own internal WP_BASE_URL default (:8889, wp-env's "tests" env) whenever process.env.WP_BASE_URL is unset, ignoring our configured baseURL. .env is gitignored and never exists in CI, so every REST call was silently hitting the wrong WordPress instance and getting 403s. Confirmed via the failed run's trace.zip network log. Fixed by committing .env.example and copying it into place in CI.
  3. Slow/flaky browser install. Install Playwright browsers ran apt-get on every run regardless of cache hit, and the cache key had no restore-keys fallback. A lockfile-hash cache miss plus a stalled apt mirror hung the job 20+ minutes. Added the fallback and skip apt-get on cache hit.

Verified locally against a cold wp-env restart and the CI-exact .env-missing condition before each push.

@josephfusco
josephfusco force-pushed the fix/revert-hanging-globalsetup-warmup branch from 9198778 to b33e901 Compare August 19, 2026 16:10
@josephfusco
josephfusco merged commit 787f557 into main Aug 19, 2026
18 checks passed
@josephfusco
josephfusco deleted the fix/revert-hanging-globalsetup-warmup branch August 19, 2026 16:42
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.

1 participant