-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix LocalFileType computation when the artifact and its metadata disagree. #20419
Closed
Conversation
This file contains 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
tjgq
changed the title
Fix LocalFileType for symlink to directory inside tree artifact.
Fix LocalFileType computation when the artifact and its metadata disagree.
Dec 3, 2023
tjgq
force-pushed
the
tree-with-sym-to-dir-fix
branch
from
December 3, 2023 16:59
1e44dcb
to
e50eb0c
Compare
github-actions
bot
added
team-Performance
Issues for Performance teams
team-Configurability
platforms, toolchains, cquery, select(), config transitions
awaiting-review
PR is awaiting review from an assigned reviewer
labels
Dec 3, 2023
tjgq
force-pushed
the
tree-with-sym-to-dir-fix
branch
2 times, most recently
from
December 3, 2023 21:17
86088e8
to
370768c
Compare
…gree. When a tree artifact contains a symlink to a directory, the TreeArtifactValue contains a TreeFileArtifact mapping to a DirectoryArtifactValue (see bazelbuild#20418). Because the file type to be uploaded to the BES is determined solely by the Artifact type, this causes the uploader to attempt to upload a directory as if it were a file. This fails silently when building with the bytes; when building without the bytes, it crashes when attempting to digest the (in-memory) directory, which has no associated inode (see bazelbuild#20415). This PR fixes the file type computation to take into account both the artifact and its metadata, preferring the latter when available. Fixes bazelbuild#20415.
tjgq
force-pushed
the
tree-with-sym-to-dir-fix
branch
from
December 3, 2023 21:18
370768c
to
17f085d
Compare
meisterT
approved these changes
Dec 4, 2023
github-actions
bot
removed
the
awaiting-review
PR is awaiting review from an assigned reviewer
label
Dec 4, 2023
bazel-io
pushed a commit
to bazel-io/bazel
that referenced
this pull request
Dec 4, 2023
…gree. When a tree artifact contains a symlink to a directory, the TreeArtifactValue contains a TreeFileArtifact mapping to a DirectoryArtifactValue (see bazelbuild#20418). Because the file type to be uploaded to the BES is determined solely by the Artifact type, this causes the uploader to attempt to upload a directory as if it were a file. This fails silently when building with the bytes; when building without the bytes, it crashes when attempting to digest the (in-memory) directory, which has no associated inode (see bazelbuild#20415). This PR fixes the file type computation to take into account both the artifact and its metadata, preferring the latter when available. Fixes bazelbuild#20415. Closes bazelbuild#20419. PiperOrigin-RevId: 587654070 Change-Id: Ib62bbaaed62b00c12bcabdc2bc9bee57aee0bcef
keertk
pushed a commit
that referenced
this pull request
Dec 4, 2023
…act containing symlink to directory + remote cache + BES (#20424) When a tree artifact contains a symlink to a directory, the TreeArtifactValue contains a TreeFileArtifact mapping to a DirectoryArtifactValue (see #20418). Because the file type to be uploaded to the BES is determined solely by the Artifact type, this causes the uploader to attempt to upload a directory as if it were a file. This fails silently when building with the bytes; when building without the bytes, it crashes when attempting to digest the (in-memory) directory, which has no associated inode (see #20415). This PR fixes the file type computation to take into account both the artifact and its metadata, preferring the latter when available. Fixes #20415. Closes #20419. Commit bb5ff63 PiperOrigin-RevId: 587654070 Change-Id: Ib62bbaaed62b00c12bcabdc2bc9bee57aee0bcef Co-authored-by: Tiago Quelhas <tjgq@google.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
team-Configurability
platforms, toolchains, cquery, select(), config transitions
team-Performance
Issues for Performance teams
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.
When a tree artifact contains a symlink to a directory, the TreeArtifactValue contains a TreeFileArtifact mapping to a DirectoryArtifactValue (see #20418).
Because the file type to be uploaded to the BES is determined solely by the Artifact type, this causes the uploader to attempt to upload a directory as if it were a file. This fails silently when building with the bytes; when building without the bytes, it crashes when attempting to digest the (in-memory) directory, which has no associated inode (see #20415).
This PR fixes the file type computation to take into account both the artifact and its metadata, preferring the latter when available.
Fixes #20415.