Repository navigation
Keep a setup step's temp folder while programs it started still run - #587
Open
thehobbit85 wants to merge 1 commit into
Open
thehobbit85 wants to merge 1 commit into
thehobbit85 wants to merge 1 commit into
Conversation
A setup step's temp folder was taken away as soon as the step's own program ended. Programs it started and left running, such as a build it handed off to, still had TEMP, TMP and TMPDIR pointing there, and failed when they next wrote a temp file. The folder now stays when the step's process group (Linux and Mac) or job (Windows) still has a process in it; the next setup run empties it, as it already does for a leftover folder.
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 this changes
Refs #551.
A setup step gets its own temp folder (
.recomplauncher-tmp, given asTEMP,TMPandTMPDIR), and the folder was taken away as soon as the step's own program ended. A step can start other programs and exit before they finish, for example a build it hands off to, and the launcher deliberately lets those keep running. They still had their temp variables pointing at the deleted folder, so the next temp file they wrote failed, for example a compiler's "unable to make temporary file: No such file or directory".When the step ends, the launcher now checks whether its process group (Linux and Mac) or its job (Windows) still has a process in it. If it does, the temp folder stays. The next setup run already empties a leftover folder the launcher made, so it doesn't pile up. A step that leaves nothing running is cleaned up exactly as before.
Limits:
How you tested it
Run on macOS against
eaf7ca2, with synthetic step scripts.New test: a step that starts a helper and exits at once. The helper looks for its temp folder a second later. It found the folder gone on
mainand finds it kept with this change. A Windows version of the same test, using a.batandstart /b, runs only on Windows, so CI is its first run.Control test: a step that leaves nothing running still has its temp folder taken away.
cargo check --testspasses forx86_64-pc-windows-gnu.Rust: 1,217 passed, 1 ignored. UI: 1,019 passed, 11 skipped.
git diff --checkclean.npm testpassesnode --test tests/*.test.cjspassesTried it in the launcher (
npm run dev)Checklist
recomplauncher.json