-
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
"Cannot get node id for DirectoryArtifactValue" on tree artifact containing symlink to directory + remote cache + BES #20415
Labels
Comments
@bazel-io flag |
@bazel-io fork 7.0.0 |
tjgq
added a commit
to tjgq/bazel
that referenced
this issue
Dec 3, 2023
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
added a commit
to tjgq/bazel
that referenced
this issue
Dec 3, 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.
tjgq
added a commit
to tjgq/bazel
that referenced
this issue
Dec 3, 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.
tjgq
added a commit
to tjgq/bazel
that referenced
this issue
Dec 3, 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.
tjgq
added a commit
to tjgq/bazel
that referenced
this issue
Dec 3, 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.
bazel-io
pushed a commit
to bazel-io/bazel
that referenced
this issue
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 issue
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 <[email protected]>
A fix for this issue has been included in Bazel 7.0.0 RC6. Please test out the release candidate and report any issues as soon as possible. Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Repro:
defs.bzl
BUILD
.bazelrc
Build once to populate the remote cache, then clean and rebuild. The following stack trace is produced:
Reproducible on 7.0.0rc5. On 6.4.0 it fails due to a different error, which can be fixed with #20409. See original report at #20408.
The text was updated successfully, but these errors were encountered: