test(e2e): retry Playground smoke tests in CI to absorb boot flakiness#63
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #63 +/- ##
=======================================
Coverage 80.80% 80.80%
=======================================
Files 44 44
Lines 3084 3084
Branches 523 523
=======================================
Hits 2492 2492
Misses 185 185
Partials 407 407 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The Playwright Playground smoke job intermittently fails when a single test times out in ensurePluginActivated waiting for the wp-admin Plugins heading — a transient slow-boot of the @wp-playground/cli@latest server, not a real regression (8/9 tests pass, and tests after the timeout pass). With no retries configured, one such hiccup failed the whole job, which hit main and several branches in the same window. Add retries: 2 in CI (0 locally) so flaky single-test timeouts self-heal. Tests run against an ephemeral WordPress instance, so retries are safe and idempotent. Consistent with the existing editor-not-ready race guard (d961392). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
d677d5d to
1a573ac
Compare
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 Playwright Playground smoke job (
npm run test:e2e:playground) has been flaking: a single test intermittently times out in the sharedensurePluginActivatedhelper waiting for the wp-admin Plugins<h1>to render (30s timeout), while 8/9 tests pass — and tests after the timeout also pass, so WordPress is up, just momentarily slow on one request.This hit
mainand multiple branches in the same ~16:58 UTC window today (e.g. main run 27969931878), pointing at a transient slowdown of the unpinned@wp-playground/cli@latestserver the harness boots — not any code regression. The failing test is non-deterministic (different spec each run), all failing at the identical boot-wait point.Why it was fatal
playwright.config.jshad noretrieskey, so retries defaulted to 0 in CI. A single transient timeout failed the entire smoke job with no second attempt.Fix
Flaky single-test timeouts now self-heal with up to 2 retries in CI; local runs keep fast-fail (
retries: 0). The tests run against an ephemeral WordPress instance, so retries are safe and idempotent. Consistent with the repo's existing posture of guarding E2E against editor-not-ready races (d961392).Verification
CI= node -e "require('./playwright.config.js').retries"→0;CI=true …→2npx playwright test --listloads the config and enumerates the suite without errorNote
This is a separate,
main-targeted fix because the flake affectsmainitself, not just #62. Once merged, #62 (and other branches) can be re-run / rebased and will benefit from the retry behavior.🤖 Generated with Claude Code