Repository navigation
fix(minimal-client): skip entries vanishing during the workspace upload walk - #2316
Merged
norrietaylor merged 2 commits intoOct 18, 2026
Conversation
…ad walk The directory-walk uploader aborted the whole workspace upload with 'reading directory ...: No such file or directory' when a file or subdirectory vanished between the readdir that listed it and the walk's own read_dir, file_type, read_link, or File::open — for example a concurrent git gc pruning .git/objects/xx/ or a build cache being cleaned mid-upload. Treat io::ErrorKind::NotFound like PermissionDenied at every walk site: skip the vanished entry and log at debug. The upload root itself (empty archive prefix) stays a hard error, since a missing root is the caller's mistake, not a race. Adds a regression test that stages the race deterministically — deletion fires from the first poll_write of a bounded-pipe writer while the walk is mid-stream — plus a boundary test pinning that a missing root is still an error.
Contributor
|
Warning Review limit reached
This review includes 1 billable file and costs up to $0.25. Or wait 34 minutes for your next included review. View limit details
Comment |
…per readdir order
Member
|
/review |
Contributor
|
Approved: no findings at Nothing to do. Clobber: none: |
norrietaylor
approved these changes
Oct 18, 2026
Member
There was a problem hiding this comment.
Approved on ARCH PASS at d3a8e92.
norrietaylor
deleted the
inbox-patch/skip-vanished-entries-in-upload-walk-d2f56424b5cda8e0
branch
October 18, 2026 11:32
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.
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABX3vYDQ
The workspace upload walk (
stream_tar_zstd/add_dir_entries_innerinminimal-client) aborted the entire upload when any file or directory
vanished between the readdir that listed it and the walk reaching it —
with "workspace upload failed: reading directory ...: No such file or
directory". A concurrent
git gcpruning.git/objects/xx/or a buildcache cleaned mid-upload reliably killed uploads of active workspaces.
The walk already skipped
PermissionDeniedentries; this extends thesame tolerance to
io::ErrorKind::NotFoundat every walk site(read_dir, next_entry, both file_type calls, read_link, File::open):
skip the vanished entry and log at debug. The read_link site had no
skip handling at all and gains a PermissionDenied arm too. The upload
root itself (empty archive prefix) remains a hard error — a missing
root is the caller's mistake, not a race.
Verification
cargo fmt --all --check --manifest-path target/Cargo.toml— cleancargo clippy --workspace --all-targets --locked --manifest-path target/Cargo.toml -- -D warnings— cleancargo test --locked --manifest-path target/Cargo.toml -p minimal-client— 107 passed, 0 failedstream_skips_entries_vanishing_mid_walk: stages the readdir-vs-open race deterministically (deletion fires from the first poll_write of a bounded-pipe writer mid-walk); fails on the pre-fix tree, passes afterstream_errors_on_missing_upload_root: pins that a missing upload root stays a hard error