Skip to content

feat(test): add deferred retry strategy - #44235

Merged
Devin Rousso (dcrousso) merged 1 commit into
mainfrom
fix-44226-44576418773-1
Nov 19, 2026
Merged

Devin Rousso (dcrousso) merged 1 commit into
mainfrom
fix-44226-44576418773-1

Conversation

@microsoft-playwright-automation

Copy link
Copy Markdown
Contributor

Add retryStrategy: 'deferred' to queue retries after unrun tests and allow them to run on available workers. Keep exclusive retry execution for isolated and preserve existing test locks.

Update the configuration docs and generated types. Extend ordering coverage and add a synchronized check for retries overlapping with first attempts and other retries.

Fixes #44226

Triaged on Linux by the Playwright bot - agent run

Comment on lines -192 to +194
if (result.isolatedRetriesJob) {
this._queue.push(result.isolatedRetriesJob);
this._updateCounterForWorkerHash(result.isolatedRetriesJob.workerHash, +1);
if (result.deferredRetriesJob) {
this._queue.push(result.deferredRetriesJob);
this._updateCounterForWorkerHash(result.deferredRetriesJob.workerHash, +1);

@dcrousso Devin Rousso (dcrousso) Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please explain the changes in this file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isolatedRetriesJob was renamed to deferredRetriesJob because both strategies now share the same path: unrun tests return to the front of the queue, retries go to the back, and the worker-count bookkeeping is unchanged. The only scheduling change is that exclusiveLock is added only for isolated; deferred preserves the job's original locks but can run alongside other tests and retries within worker limits, while immediate keeps its existing path.

@microsoft-playwright-automation

This comment has been minimized.

@microsoft-playwright-automation microsoft-playwright-automation Bot added agent-review-done The Playwright bot run ended and removed agent-review labels Nov 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

3 flaky ⚠️ [installation tests] › playwright-cdn.spec.ts:43 › playwright cdn failover should work (https://playwright.download.prss.microsoft.com/dbazure/download/playwright) `@package-installations-macos-latest`
⚠️ [chromium-library] › library/video.spec.ts:762 › screencast › VI-030 should work with video+trace `@chromium-playwright-x64-ubuntu24-64-core-node22`
⚠️ [firefox-library] › library/capabilities.spec.ts:105 › CA-008 should support webgl Radoslav Kirilov (@smoke) `@firefox-playwright-x64-ubuntu24-64-core-node22`

23659 passed, 716 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

3 failed
❌ [chrome] › mcp/crash.spec.ts:31 › crash recovery › reports the navigation error, then resets and logs the crash @mcp-ubuntu-latest-chrome
❌ [chrome] › mcp/crash.spec.ts:58 › crash recovery › lists only one tab @mcp-ubuntu-latest-chrome
❌ [chrome] › mcp/crash.spec.ts:79 › crash recovery › marks non-current crashed tab in the tab list @mcp-ubuntu-latest-chrome

5243 passed, 641 skipped


Merge workflow run.

@microsoft-playwright-automation

Copy link
Copy Markdown
Contributor Author

🟢 All three failures also occur on main

Hi, I'm the Playwright bot. These failures predate this PR.

Evidence for all three failures

Checked MCP run 44578505620 at b5a2d226e35cbed79c4c48c23461da4e6a1df9d2. The PR adds an optional retry mode; MCP does not enable it, and the default immediate retry path is unchanged. The crash tests and their configuration are also unchanged.

Pre-existing flake / infra

All three Chrome crash-recovery tests failed with the same errors in the earlier main job, at 09dab5d70932724a848540549f33ff6f9b817e1b, an ancestor of this PR:

Test in tests/mcp/crash.spec.ts Error in both runs
:31 — reports the navigation error, then resets and logs the crash 30-second timeout in .toPass() at line 48
:58 — lists only one tab 30-second timeout and Not connected at line 71
:79 — marks non-current crashed tab in the tab list 30-second timeout and Not connected at line 93

This confirms pre-existing failures, not whether they are intermittent. None is caused by the new retry strategy. The separate tests 1 report has no failed tests.

Checked the failures on Linux by the Playwright bot - agent run

@dcrousso
Devin Rousso (dcrousso) marked this pull request as ready for review November 19, 2026 18:20
@dcrousso
Devin Rousso (dcrousso) merged commit 13f0547 into main Nov 19, 2026
53 of 54 checks passed
@dcrousso
Devin Rousso (dcrousso) deleted the fix-44226-44576418773-1 branch November 19, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-review-done The Playwright bot run ended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: retryStrategy 'deferred' to run retries at the end, in parallel

2 participants