Repository navigation
fix(ci): keep earlier green shards on Playwright re-run; tolerate route-already-handled race - #34078
Conversation
…handled teardown race - playwright-summary downloaded only the current attempt's results, so a "Re-run failed jobs" attempt saw just the re-run shard and gated on 67+ missing shards (run 36268674020 attempt 2: 0 tests, 68 CI/reporting failures). Download every attempt and prune each shard to its newest one, which still keeps a stale earlier ci-status.json out (run 35650435023). - serverLoad asset cache: "Route is already handled!" is the same page-teardown race ignoreClosedTarget already swallows for closed/disposed targets; it failed ExploreBrowse on #33932. Fixes #33087 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Code Review ✅ Approved🟡 Medium risk · CI shard artifact selection and Playwright teardown error handling change. Fixes two CI issues in Playwright test orchestration: downloads all attempt artifacts instead of only the latest to prevent summary failures on re-runs, and tolerates the "route already handled" race condition in asset cache teardown. Changes include a new OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
✅ Playwright Results — workflow succeededValidated commit ✅ 564 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 50m 42s ⏱️ Max setup 4m 56s · max shard execution 15m 1s · max shard-job elapsed before upload 18m 29s · reporting 4s 🌐 193.90 requests/attempt · 2.22 app boots/UI scenario · 26.30% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Fixes #33087
Describe your changes
Two CI fixes found while getting #33932 green.
1.
playwright-summaryfails every "Re-run failed jobs" attemptThe summary downloads only
playwright-results-json-*-a${{ github.run_attempt }}*. A failed-jobs re-run only re-uploads the shards it re-ran, so on attempt 2 the summary saw one shard and counted the rest as missing. In run 36268674020 attempt 2 the re-run shard passed, but the gate reported0 Playwright test failure(s); 68 CI/reporting failure(s). The one downloaded artifact was also flattened intoresults/, so not even that shard was found.playwright-results-json-*).keep_latest_playwright_attempt.pydeletes each shard's superseded attempts. This keeps the protection the attempt filter was added for (run 35650435023: a stale attempt-1ci-status.jsonoutranking a green re-run), because the classifier doesn't dedupe by attempt.download-artifactkeeps the per-artifact subfolders again.2.
serverLoad.tsasset cache:route.fulfill: Route is already handled!This is the same page-teardown race
ignoreClosedTargetalready ignores for "has been closed" and "Response has been disposed". It failedExploreBrowse.spec.ts"every result-card breadcrumb links to its hierarchy destination" on #33932 (job 108482457444), on both the first attempt and the retry. Added the message to the ignored list.Tests
.github/scripts/tests/test_keep_latest_playwright_attempt.py: newest attempt kept per shard,-retrypair kept, legacy unsuffixed dirs superseded, non-results dirs untouched, missing dir is a no-op.pytest .github/scripts/tests: 212 passed. The 2 failures (test_unavailable_first_attempt_evidence_never_becomes_a_pass[False],test_basic_project_excludes_dedicated_state_specs) also fail on current main.Type of change
🤖 Generated with Claude Code