Repository navigation
fix(cli): stop editor descendants when project creation times out - #1215
Open
tuncaypeker wants to merge 1 commit into
Open
tuncaypeker wants to merge 1 commit into
tuncaypeker wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
runEditorCreateProjectuses execFile's timeout, which kills only the editor parent. Processes it started continue running after the promise rejects. Reproduced on main (3681e35 / CLI 1.15.0) with a native Windows fixture that starts a worker: after the 1500 ms timeout, the worker was still alive and its heartbeat file kept changing.Use spawn with a dedicated process group on POSIX, then invoke the existing cli-core process-tree stop helper before the parent disappears (
taskkill /T /Fon Windows, process-group kill on POSIX). Wait for the stop operation and process close before returning the timeout error. Reuse the existing exit cleanup hook, and remove the hook/timer after completion. Preserve editor arguments, failure-prefix/stderr diagnostics, and support for large stdout by discarding stdout rather than buffering it.Validation:
npm test -- --maxWorkers=1 --testTimeout=30000— all 62 files passed, 942 tests passed, 15 skipped. The pretest TypeScript build passed.childStillAlive=falseandchildStillWriting=false. It ran with permissions for Windows process inspection/termination; the sandbox restricts those operations. Fixture workers are cleaned up after every test.git diff --checkpassed.Rebased onto d69d73a after validation; its changes did not touch the CLI. Also checked subsequent main changes through c17091c (#1213/#1214): they affect Unity RQL/screenshot code and fixtures, not this CLI path.