Skip to content

fix(dashboard): don't evict live registration on a transient probe#41895

Closed
microsoft-playwright-automation[bot] wants to merge 1 commit into
mainfrom
fix-flakes/macos-15-xlarge-29817954196
Closed

fix(dashboard): don't evict live registration on a transient probe#41895
microsoft-playwright-automation[bot] wants to merge 1 commit into
mainfrom
fix-flakes/macos-15-xlarge-29817954196

Conversation

@microsoft-playwright-automation

Copy link
Copy Markdown
Contributor

The mcp/annotate.spec.ts suite flakes on macOS bots: connectToDashboard
polls cli list until the dashboard app registers, but occasionally the
registration vanishes for good and the poll never recovers ("dashboard app
... is not registered yet" / undefined endpoint).

Root cause: serverRegistry.list() probes each descriptor with a single
net.connect and unlinks the descriptor file the moment one probe fails.
Under CI contention a live endpoint can transiently refuse/reset a
connection (listen backlog, daemon mid-cold-start), so a healthy dashboard
registration gets permanently deleted from disk — every later list then
reports it missing. This is deeper than the poll cadence #41894 addressed.

Fix the probe to retry a few times with a short per-attempt timeout before
declaring the endpoint dead. A truly gone endpoint keeps failing fast and is
still evicted; a busy one recovers and stays registered.

DB evidence (from #41894, rolling window, macOS bots, expected=passed): every
test in mcp/annotate.spec.ts flakes on mcp-macos-* bots. Top offenders on
mcp-macos-latest-firefox (317 runs): "downloads zip with feedback.md" 21 fails
(6.6%), "switch screencast to -s session" 20 (6.3%), "disengage annotate mode
when client disconnects" 19 (6.0%), "abort annotation when last screenshot is
removed" 18 (5.7%) — all the same endpoint TypeError on test timeout. #41894's
macOS Chromium/Chrome jobs still failed with the same symptom.

Verified locally on macOS 15 (Arm64):

  • New deterministic regression test tests/library/unit/server-registry.spec.ts:
    a registration whose first probe fails but whose endpoint comes up mid-retry
    survives; one that never becomes reachable is still evicted. Passes on
    chromium/firefox/webkit-library.
  • npm run test-mcp -- --project=chromium tests/mcp/annotate.spec.ts:110
    --repeat-each=3 --workers=2 — 3/3 passed.
  • npm run flint — clean.

Ref: #41894
CI run: https://github.com/microsoft/playwright/actions/runs/29817954196

Suggested-reviewer: Skn0tt

The mcp/annotate.spec.ts suite flakes on macOS bots: `connectToDashboard`
polls `cli list` until the dashboard app registers, but occasionally the
registration vanishes for good and the poll never recovers ("dashboard app
... is not registered yet" / undefined `endpoint`).

Root cause: `serverRegistry.list()` probes each descriptor with a single
`net.connect` and unlinks the descriptor file the moment one probe fails.
Under CI contention a live endpoint can transiently refuse/reset a
connection (listen backlog, daemon mid-cold-start), so a healthy dashboard
registration gets permanently deleted from disk — every later `list` then
reports it missing. This is deeper than the poll cadence #41894 addressed.

Fix the probe to retry a few times with a short per-attempt timeout before
declaring the endpoint dead. A truly gone endpoint keeps failing fast and is
still evicted; a busy one recovers and stays registered.

DB evidence (from #41894, rolling window, macOS bots, expected=passed): every
test in mcp/annotate.spec.ts flakes on mcp-macos-* bots. Top offenders on
mcp-macos-latest-firefox (317 runs): "downloads zip with feedback.md" 21 fails
(6.6%), "switch screencast to -s session" 20 (6.3%), "disengage annotate mode
when client disconnects" 19 (6.0%), "abort annotation when last screenshot is
removed" 18 (5.7%) — all the same endpoint TypeError on test timeout. #41894's
macOS Chromium/Chrome jobs still failed with the same symptom.

Verified locally on macOS 15 (Arm64):
- New deterministic regression test tests/library/unit/server-registry.spec.ts:
  a registration whose first probe fails but whose endpoint comes up mid-retry
  survives; one that never becomes reachable is still evicted. Passes on
  chromium/firefox/webkit-library.
- npm run test-mcp -- --project=chromium tests/mcp/annotate.spec.ts:110
  --repeat-each=3 --workers=2 — 3/3 passed.
- npm run flint — clean.

Ref: #41894
CI run: https://github.com/microsoft/playwright/actions/runs/29817954196

Suggested-reviewer: Skn0tt
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [firefox] › mcp/cli-killall.spec.ts:42 › kill-all kills filtered dashboard pid @mcp-ubuntu-latest-firefox

7759 passed, 1249 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

5 flaky ⚠️ [chromium-library] › library/chromium/oopif.spec.ts:282 › should click `@frozen-time-library-chromium-linux`
⚠️ [chromium-library] › library/browsercontext-page-event.spec.ts:160 › should work with Shift-clicking `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:736 › screencast › should work with video+trace `@chromium-ubuntu-22.04-arm-node20`
⚠️ [chromium-library] › library/video.spec.ts:736 › screencast › should work with video+trace `@realtime-time-library-chromium-linux`
⚠️ [chromium-library] › library/beforeunload.spec.ts:130 › should support dismissing the dialog multiple times `@chromium-ubuntu-22.04-node24`

50003 passed, 1189 skipped


Merge workflow run.

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