-
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
Build event file creation fails with symlinks when using --remote_download_minimal #11942
Comments
The example fails in the second build because:
Symlinks in action outputs are not yet supported with |
I think this might be a duplicate of #11532, for which I have a pending PR. |
I think this would be different as this problem exists even when the symlinks are not toplevel. |
@exoson, you're probably right. I am thinking that RemoteActionFS should not delegate to the underlying file system in this case because that can't resolve symlinks. Or maybe we shouldn't be creating dangling symlinks on the underlying file system, but instead create them in RemoteActionFS? |
This became a warning instead of an error at some point between 4.x and 5.x (likely in e855a26). |
Fixes bazelbuild#11942. PiperOrigin-RevId: 539589072 Change-Id: I760b842b145d7f88013024ff0dffee414261520f
Description of the problem / feature request:
If generating build event file for a target which creates a file and a symlink to this file with
--remote_download_minimal
and the target exists in remote cache, BEP upload code will fail withERROR: Unable to write all BEP events to file due to 'java.io.FileNotFoundException: /home/exoson/.cache/dazel/_dazel_exoson/5d75fbbb8d44bec03b8dc3734a1ad976/execroot/test_repo/bazel-out/k8-py3-fastbuild/bin/asdf_link (No such file or directory)'
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Have symlink.bzl
and BUILD
Run
What operating system are you running Bazel on?
Ubuntu 18.04
If
bazel info release
returns "development version" or "(@non-git)", tell us how you built Bazel.Ran the installation script built with this
What's the output of
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?https://github.com/bazelbuild/bazel.git
40e7636
40e7636
Have you found anything relevant by searching the web?
#6862 (comment)
#11119
Any other information, logs, or outputs that you want to share?
Seems like when using
--remote_download_minimal
symlinks are created while the file linked to isn't and thus BEP upload code will fail when trying to compute the digest for the symlinked file.bazel/src/main/java/com/google/devtools/build/lib/remote/ByteStreamBuildEventArtifactUploader.java
Line 129 in 40e7636
The text was updated successfully, but these errors were encountered: