fix: Windows build — wait for the sidecar to exit before removing its temp dir (v0.2.134) - #6
Merged
Merged
Conversation
… on the Windows build) On Windows kill() returns before the process is gone and a live process's working directory cannot be removed, so the sidecar-client test's cleanup failed with EBUSY and stopped the installer build. Wait for the exit, retry the delete, and only warn if a temp dir is left behind. App code unchanged.
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.
What broke
Build Windows Installer run 36976756947 stopped in
npm test. Of 202 tests, 201 passed. The failure was in theafterhook oftests/sidecar-client.test.mjs:On Windows,
ChildProcess.kill()returns before the Python sidecar has actually exited. Windows also refuses to delete a folder that a live process is using as its working directory. The hook deleted that folder right afterstop(), so it hitEBUSY.Ubuntu CI (
ci.yml) cannot catch this because Linux allows the delete. Earlier Windows runs passed only because the process happened to exit in time.Fix (test only, app code unchanged)
exitevent before cleaning up, with a 5 s cap.rmSyncnow usesmaxRetries: 10, retryDelay: 200.Checks
npm run lintandnpm run typecheckare clean.npm testpasses all 201 tests, and nomw-sidecar-*folders are left behind.precommit-check.sh 0.2.134passes.