Fix unknown-size file attrs#21
Merged
Merged
Conversation
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.
Fixes #16. Unknown-size blobless files should not be exposed through FUSE as real zero-byte files.
Issue #16 reports that after batch size resolution fails, tracked blobless files can stat as 0 bytes,
catreturns no content, andgit statusmarks them modified before prefetch catches up.GIT_NO_LAZY_FETCH=1and retain partial batch size results ifcat-fileexits after writing stdoutEIOfor attr hydration failures instead of making existing files look deletedUser-facing result:
The target file now reports its hydrated size, reads its Git blob content, and remains clean once hydration succeeds.
Tests passed:
go build ./cmd/artifact-fsgo vet ./...go test ./...go test ./internal/fusefs ./internal/gitstoreAFS_RUN_BENCH=1 go test -run TestBenchRepos -vAFS_RUN_E2E_TESTS=1 go test -run '^TestE2E$' -v .\n-AFS_RUN_E2E_TESTS=1 go test -run TestE2E -v .passed on retry