Skip to content

Conversation

@brandonpayton
Copy link
Member

Motivation for the change, related issues

Prior to this PR, the initial Playground CLI worker was not being cleaned up when Playground CLI was disposed.

Implementation details

This PR:

  • Adds the initial worker and its Playground handle to the list of items to be disposed when Playground CLI is disposed.
  • Prevents multiple workers from being requested when not running the server command.

Testing Instructions (or ideally a Blueprint)

  • CI

@brandonpayton brandonpayton requested a review from a team November 12, 2025 18:18
@brandonpayton brandonpayton self-assigned this Nov 12, 2025
@brandonpayton brandonpayton added [Type] Bug An existing feature does not function as intended [Package][@wp-playground] CLI labels Nov 12, 2025
@brandonpayton
Copy link
Member Author

It looks like there are a couple of test timeouts and then a WP URL assertion failure due to treating a WP RC as the "latest" version. Fix here:

@brandonpayton
Copy link
Member Author

It looks like there are a couple of test timeouts and then a WP URL assertion failure due to treating a WP RC as the "latest" version. Fix here:

Actually, there is another real failure due to a broken check for the server command when --experimental-multi-worker is specified. Fixing...

@adamziel
Copy link
Collaborator

There's a timeout failure so I'll err on the side of cautious and won't merge yet.

@brandonpayton
Copy link
Member Author

There's a timeout failure so I'll err on the side of cautious and won't merge yet.

Good instinct, @adamziel. :) There is indeed a problem with cleanup with the server command. I'll fix it.

@brandonpayton
Copy link
Member Author

Also, the test-built-npm-packages test appears to be running indefinitely. Maybe it is related. Will see if there is an obvious fix there too.

@brandonpayton brandonpayton force-pushed the playground-cli/fix-run-cli-leak branch from eb3da08 to 8221c53 Compare November 13, 2025 20:52
@brandonpayton
Copy link
Member Author

The test failures were due to trying to double-dispose of the initial worker and Playground. That is fixed now, and the tests are passing now. Let's merge.

@brandonpayton brandonpayton merged commit 42e2ece into trunk Nov 13, 2025
29 checks passed
@brandonpayton brandonpayton deleted the playground-cli/fix-run-cli-leak branch November 13, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package][@wp-playground] CLI [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants