move builder temp-dir to prefix to avoid conflicts with second builder #2263
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.
in our builder we are using
tempfile::tempdir
with a prefix to store temporary files from the build.Due to how the
tempfile
crate works, this in itself won't lead to any issues when running multiple builders.But after #808 (and #1553 / #1586 ) we started cleaning directories with the same prefix, from both builders, which lead to silently deleting temporary files from other builders, and loudly failing when trying to cleanup ( see this sentry error).
This PR makes the tempdir a subdirectory of
Config.prefix
, which IMO is easier to reason with.