Repository navigation
fix: Remove downloaded assets after use to prevent disk space leakage - #271
Merged
Merged
Conversation
This was referenced Aug 24, 2025
Owner
Author
This was referenced Aug 24, 2025
kalbasit
marked this pull request as ready for review
August 24, 2025 22:27
kalbasit
force-pushed
the
remove_temp_file_outside_download_fn
branch
from
August 24, 2025 22:46
ba39f91 to
89cd2a9
Compare
kalbasit
force-pushed
the
recognize_error_early
branch
3 times, most recently
from
August 24, 2025 22:53
05885c9 to
6f11c52
Compare
kalbasit
force-pushed
the
remove_temp_file_outside_download_fn
branch
from
August 24, 2025 22:53
89cd2a9 to
03646b4
Compare
kalbasit
force-pushed
the
recognize_error_early
branch
from
August 24, 2025 22:59
6f11c52 to
7aba5c1
Compare
kalbasit
force-pushed
the
remove_temp_file_outside_download_fn
branch
from
August 24, 2025 22:59
03646b4 to
4eea1f6
Compare
kalbasit
changed the base branch from
recognize_error_early
to
graphite-base/271
August 24, 2025 23:09
kalbasit
force-pushed
the
remove_temp_file_outside_download_fn
branch
from
August 24, 2025 23:09
4eea1f6 to
d4d29fc
Compare
kalbasit
force-pushed
the
graphite-base/271
branch
from
August 24, 2025 23:09
7aba5c1 to
c51a1fb
Compare
kalbasit
force-pushed
the
remove_temp_file_outside_download_fn
branch
from
August 24, 2025 23:09
d4d29fc to
8e17203
Compare
kalbasit
force-pushed
the
remove_temp_file_outside_download_fn
branch
from
August 24, 2025 23:10
8e17203 to
1823c8d
Compare
Owner
Author
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.

TL;DR
Added cleanup for temporary NAR files after download completion to prevent file system clutter.
What changed?
downloadStatestruct to include async.WaitGroupandassetPathfield to track the temporary filepullNarIntoStorefunction to:defer os.Remove()call that was previously usedHow to test?
Why make this change?
The previous implementation immediately removed temporary files after download, which could cause issues if the file was still being processed. This change ensures proper cleanup of temporary NAR files only after they're no longer needed, preventing potential file system leaks while maintaining data integrity during concurrent operations.