-
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
Bazel remote cache cannot be shared between users? #5632
Comments
This problem did not exist in bazel
Nginx log:
|
Can you try building with btw. instead of |
Now it works! Thanks for your quick reply. I believe |
I found when running bazel build on a more complex project, cache hit rate is still low. How could I debug bazel cache fingerprints from larger targets are identical across users? Any command to output the relationship between targets and fingerprints? And ideally how each fingerprint is computed? |
We want to turn it on eventually, but can't right now because of backwards compatibility concerns.
when running a build twice from the same environment or when switching between users?
that's currently a bit difficult to debug, as we don't have good tools (yet). Here's the code that builds the action https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/remote/RemoteSpawnRunner.java#L344 you could add breakpoints to this code or add log statements. Generally what goes into an action protobuf is the command line, hash of input files, environment variables (not with strict action env), names of output files and the platform (currently disabled by default). the finger print is just the hash of the serialized action protobuf. What kind of build are you running? language rules? setup? package manager? platform? |
It's been turned on in Bazel 0.22 |
The cel-spec build produces some Java artifacts, so the build input takes the Java version. The Bazel option `--experimental_strict_action_env` _seems_ to fix this, see bazelbuild/bazel#5632
Description of the problem / feature request:
I created a very simple cc_binary and published it here: https://github.com/zz-pony/bazel-test. Then I compiled this code on my computer multiple times, and the result looked really weird:
There was no cache hit, which was as expected.
Cache hit, looking good.
Why there was no cache hit this time? Source files should be identical.
I checked nginx log from my cache server. Looks like
/ac/${fp}
values changed between users. Is this an expected behavior?Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Refer to my above description.
What operating system are you running Bazel on?
Ubuntu 16.04
What's the output of
bazel info release
?release 0.15.0
Have you found anything relevant by searching the web?
Not yet.
The text was updated successfully, but these errors were encountered: