Studio CLI: Fix Windows E2E tests#2299
Merged
fredrikekelund merged 122 commits intodev/studio-cli-i2from Jan 14, 2026
Merged
Conversation
To help us diagnose which specific files or directories are causing trouble
This reverts commit 8786163.
fredrikekelund
commented
Dec 19, 2025
Comment on lines
+129
to
+130
|
|
||
| process.on( 'SIGINT', disconnect ); |
Contributor
Author
There was a problem hiding this comment.
The studio site list --watch command would previously not interrupt in response to Ctrl+C
10 tasks
Contributor
Author
|
OK, after one more round of changes, the tests are now consistently green, and I've slimmed down the diff as much as possible. |
fredrikekelund
commented
Jan 13, 2026
Comment on lines
-15
to
+22
| logger.reportStart( LoggerAction.LOAD_SITES, __( 'Loading site…' ) ); | ||
| const site = await getSiteByFolder( sitePath ); | ||
| logger.reportSuccess( __( 'Site loaded' ) ); | ||
|
|
||
| logger.reportStart( LoggerAction.START_DAEMON, __( 'Starting process daemon…' ) ); | ||
| await connect(); | ||
| logger.reportSuccess( __( 'Process daemon started' ) ); | ||
|
|
||
| logger.reportStart( LoggerAction.LOAD_SITES, __( 'Loading site…' ) ); | ||
| const site = await getSiteByFolder( sitePath ); | ||
| logger.reportSuccess( __( 'Site loaded' ) ); | ||
|
|
Contributor
Author
There was a problem hiding this comment.
I moved the connect call to the top of this function to fix a bug where triggering many site start commands in quick succession would cause only one site to start (the others would hang indefinitely).
This reverts commit 01ae1c4.
bcotrim
approved these changes
Jan 14, 2026
Contributor
bcotrim
left a comment
There was a problem hiding this comment.
LGTM 👍
Amazing work not only on making E2E tests pass but ensuring the solution is robust and solid.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issues
Proposed Changes
This PR fixes the Windows E2E tests by making the following changes:
site list --watchcommand in response toSIGINTandSIGTERMsignals. Without this, thesite list --watchcommand couldn't be aborted with Ctrl+C and it would interfere with closing the Electron app.site stop --allcommand to kill all pm2 processes in one go, including the daemon itself.E2ESession::cleanupto not callElectronApplication::close(), but always useelectronApp.evaluate( ( { app } ) => app.quit() ).stopAllServersOnQuitchild process to finish before exiting the Electron app. This ensures all child processes have ended once the app quits, allowing auto-updates to be gracefully applied (if the bundled Node.js runtime were still used to run child processes, it would not be updatable on Windows).will-quitElectron event.rimraffor smart retry behavior.themeZipFileandpluginZipFilebeing deprecated, so I also took the opportunity to replace those keys withthemeDataandpluginDatain the test fixtures.site list --watch) and wait for thespawnevent from the child process before creating the main app window. After working on this for so long, I doubt this makes any difference, but it still seems like good practice.I also made changes related to general stability, not explicitly to the E2E tests:
pm2-connection.locklockfile to ensure that multiplesite startcommands triggered in quick sequence are still able to properly connect to the pm2 daemon. Previously, if multiple sites had anautoStartconfig, only one site would start when Studio started. The other sites would stall indefinitely.pm2.disconnectmethod takes a callback, and make alldisconnectcalls async.Testing Instructions
CI should pass.
Pre-merge Checklist