Skip to content

fix(cli): wait for dashboard daemon READY signal before returning from cli show#40725

Merged
Skn0tt merged 4 commits intomicrosoft:mainfrom
Skn0tt:fix-cli-show-ready
May 8, 2026
Merged

fix(cli): wait for dashboard daemon READY signal before returning from cli show#40725
Skn0tt merged 4 commits intomicrosoft:mainfrom
Skn0tt:fix-cli-show-ready

Conversation

@Skn0tt
Copy link
Copy Markdown
Member

@Skn0tt Skn0tt commented May 8, 2026

Summary

Diagnostic work in #40703.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Skn0tt added 3 commits May 8, 2026 13:04
…m `cli show`

The daemon now writes one byte to fd 3 once the dashboard is ready,
and `cli show` waits for that signal (or daemon exit, or 60s timeout)
before returning. This makes the Windows named-pipe race band-aids
reverted in the prior commits unnecessary.

Also bumps the MCP test timeout to 60s on Windows where
persistent-context launch is genuinely slow, and wraps `cli()`
invocations in `test.step` for nicer reports.
@Skn0tt Skn0tt force-pushed the fix-cli-show-ready branch from c17b4fb to bfc51aa Compare May 8, 2026 11:05
@github-actions

This comment has been minimized.

@Skn0tt Skn0tt requested a review from dgozman May 8, 2026 11:13
return;
}
const readyStream = (child.stdio as unknown as Readable[])[3];
await new Promise<void>((resolve, reject) => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If this one throws, we do not unref (does it mean this process never exits?), and we also don't output anything. Let's figure this out.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

When I set the timeout to 10ms, I see the error bubble up and exit the process with the error message. Doesn't seem like unref is needed in the error case. I added some code to SIGKILL the misbehaving daemon though.

Comment thread packages/playwright-core/src/tools/cli-client/program.ts Outdated
@github-actions

This comment has been minimized.

Address review feedback: on a failed READY handshake, SIGKILL the
orphan daemon and wait for the OS to reap it before propagating
the error. Also replace ternary with if/else in settle().
@Skn0tt Skn0tt requested a review from dgozman May 8, 2026 12:38
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Test results for "MCP"

2 failed
❌ [webkit] › mcp/config.ini.spec.ts:57 › ini config sets browser launch options @mcp-windows-latest-webkit
❌ [webkit] › mcp/video.spec.ts:21 › should work with recordVideo (isolated) @mcp-windows-latest-webkit

7029 passed, 1068 skipped


Merge workflow run.

@Skn0tt Skn0tt merged commit d8c56b0 into microsoft:main May 8, 2026
17 of 18 checks passed
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