Repository navigation
Conversation
* disable forget for tethering * nets * put in wifiman * batch * revert * draw
* disable forget for tethering * nets * put in wifiman * batch * revert * clean up
Clean up stray files, broken symlinks, FIFOs, and other non-directory entries that listdir_by_creation skips. Also wrap the lock-file check in try/except to handle race conditions and permission errors. Fixes commaai30102 Signed-off-by: SolariSystems <solari@solari.systems>
Tests the deleter with stray files (.tar.gz), broken symlinks, valid symlinks to files, empty files, dotfiles, FIFOs, and mixed combinations of all entry types alongside normal segments. Signed-off-by: SolariSystems <solari@solari.systems>
Process replay diff reportReplays driving segments through this PR and compares the behavior to master. ✅ 0 changed, 66 passed, 0 errors |
|
This PR has had no activity for 24 days. It will be automatically closed in 7 days if there is no activity. |
|
This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes. |
1 similar comment
|
This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes. |
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.
Upstream PR: commaai/openpilot pull/37354
Summary
Fixes 30102. The deleter would ignore (or potentially crash on) non-standard entries in the log root directory, such as
.tar.gzarchives, broken symlinks, and other files a user might place there.Changes to
deleter.py:os.remove().lockfile check (os.listdir) in try/except to handle race conditions where a directory is removed between listing and processingNew tests in
test_deleter.py:test_delete_stray_file—.tar.gzarchive in log roottest_delete_broken_symlink— symlink to non-existent targettest_delete_valid_symlink_to_file— symlink pointing to a real filetest_delete_empty_file— zero-byte filetest_delete_hidden_file— dotfile (.hidden_temp)test_delete_fifo— named pipetest_stray_files_deleted_before_segments— stray files cleaned up alongside segmentstest_mixed_entries_no_crash— combination of segments, stray files, symlinks, FIFOs, and empty directoriesTest plan
os.path.lexists(notPath.exists)