Harden loader temp directory logic#404
Merged
filiph merged 4 commits intoalnitak:mainfrom Feb 28, 2026
Merged
Conversation
This change addresses a few issues with the current I/O loader: - It no longer tries to delete the temprorary directory in `cleanUp`. This would lead to the directory being deleted just after initialization when `automaticCleanup` is `true`. - It creates the temporary directory with `recursive: true`, trying to avoid failures when the directory returned by `path_provider` doesn’t yet exist. - It adds stack trace to the severe log in initialization, and downgrades cleanup severe logs to warning logs.
Collaborator
Author
|
No hurry to land this. I'll test it in the wild first, to see if it actually makes things better. |
Owner
This also adds a fine-level log. Until now, the clean up was pretty much invisible in the wild because the only log call was `_log.finest()`, which is almost always ignored.
Collaborator
Author
|
I think this is ok — I haven't seen any reports from the wild. |
Owner
|
Great! Thank you! |
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.
Description
This change addresses a few issues with the current I/O loader:
cleanUp. This would lead to the directory being deleted just after initialization whenautomaticCleanupistrue, which is a catastrophic failure.recursive: true, trying to avoid failures when the directory returned bypath_providerdoesn’t yet exist.path_providerfails for any reason (I'm seeing this in the wild on macOS), use the system temp directory instead.Type of Change