-
Notifications
You must be signed in to change notification settings - Fork 69
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
BuildBarn always resolves symlinks to origin files #104
Comments
Have you inspected the action through bb_browser? If it shows up as a file there instead of a symlink, then there is little that we can do on the Buildbarn side. Buildbarn tries to literally set up things the way it's provided by Bazel. |
Thanks for the super quick answer! I did not check with bb_browser yet, but tried to reproduce with another Remote Execution provider (EngFlow) which did not lead to this case. Edit: Apparently I did something wrong during my initiale reproduction with our RBE providers. This issue is persistent over different providers, thus indicating (as mentioned farther below) that this is a Bazel issue. |
Maybe EngFlow always adds an additional level of symlinks to input roots? Then it would coincidentally work there. |
ACK. I will double check the action tomorrow with bb_browser |
So I was somehow unable to really figure out how to operate bb-browser for actions. I used the BEP to finde the hash and byte size for the "symlink artifact". When I visit this in bb-browser |
I usually look in the bb-scheduler UI within a minute after the action finishes. Alternatively, I alter the action to exit with a non-zero exit code, to get Bazel to display a link to bb-browser. |
Bazel master recently added this flag, which may also be of use: |
Thanks, that helped a lot! So basically the first thing I see is that apparently the "symlink action" is not executed remotely and indeed the input artifact for the next action is then directly the file. I am trying to figure out now if I have to change something on the config, to make the symlinking also happening remotely. |
Awesome! Then let me close this issue on this end, because any changes in this area should most likely be done on the Bazel side. Thanks for reaching out! |
Our build is relying on the fact that symlinked files are actual symlinks.
It turns out that, using Remote Execution, a file that is symlinked via https://bazel.build/rules/lib/actions#declare_symlink is not an actual symlink, but the file itself.
Apparently there is a Bazel flag (https://bazel.build/reference/command-line-reference#flag--incompatible_remote_symlinks), which is enabled by default, that should ensure exactly this. Following this flag we find bazelbuild/bazel#6631, which describes the needed feature is already implemented by Bazel.
A small repository with a reproduction of the issue can be found here: https://github.com/castler/buildbarn_bazel_symlink_issue_repro
The BuildBarn worker was using the
native
buildDirectories
.The text was updated successfully, but these errors were encountered: