bazel: remote/correctness: Bazel doesn't track system libraries.
Bazel currently does not track tools outside a workspace. This can be a problem if, for example, an action uses a compiler from /usr/bin/. Then, two users with different
compilers installed will wrongly share cache hits because the outputs are different but they have the same action hash.
About this issue
- Original URL
- State: open
- Created 9 years ago
- Reactions: 21
- Comments: 23 (12 by maintainers)
Links to this issue
- Avoid bazel-remote-cache collision for different Linux versions - Stack Overflow
- Armazenamento em cache remoto | Bazel
- Uzaktan Önbelleğe Alma | Bazel
- Almacenamiento remoto en caché | Bazel
- Armazenamento em cache remoto | Bazel
- Menyimpan ke Cache Jarak Jauh | Bazel
- Almacenamiento remoto en caché | Bazel
- Uzaktan Önbelleğe Alma | Bazel
- Menyimpan ke Cache Jarak Jauh | Bazel
- Uzaktan Önbelleğe Alma | Bazel
- Almacenamiento remoto en caché | Bazel
- Armazenamento em cache remoto | Bazel
- Lưu vào bộ nhớ đệm từ xa | Bazel
- Menyimpan ke Cache Jarak Jauh | Bazel
- Almacenamiento remoto en caché | Bazel
- Armazenamento em cache remoto | Bazel
- Almacenamiento remoto en caché | Bazel
- Uzaktan Önbelleğe Alma | Bazel
- Lưu vào bộ nhớ đệm từ xa | Bazel
- Lưu vào bộ nhớ đệm từ xa | Bazel
- Lưu vào bộ nhớ đệm từ xa | Bazel
- Lưu vào bộ nhớ đệm từ xa | Bazel
- Uzaktan Önbelleğe Alma | Bazel
- Menyimpan ke Cache Jarak Jauh | Bazel
- Almacenamiento remoto en caché | Bazel
- Uzaktan Önbelleğe Alma | Bazel
- Armazenamento em cache remoto | Bazel
- Almacenamiento remoto en caché | Bazel
- Lưu vào bộ nhớ đệm từ xa | Bazel
- Almacenamiento remoto en caché | Bazel
- Menyimpan ke Cache Jarak Jauh | Bazel
- Uzaktan Önbelleğe Alma | Bazel
- Lưu vào bộ nhớ đệm từ xa | Bazel
- Lưu vào bộ nhớ đệm từ xa | Bazel
- Uzaktan Önbelleğe Alma | Bazel
- Lưu vào bộ nhớ đệm từ xa | Bazel
- Uzaktan Önbelleğe Alma | Bazel
- Almacenamiento remoto en caché | Bazel
- Uzaktan Önbelleğe Alma | Bazel
- Menyimpan ke Cache Jarak Jauh | Bazel
- Menyimpan ke Cache Jarak Jauh | Bazel
- Uzaktan Önbelleğe Alma | Bazel
- Armazenamento em cache remoto | Bazel
- Armazenamento em cache remoto | Bazel
- Menyimpan ke Cache Jarak Jauh | Bazel
- Almacenamiento remoto en caché | Bazel
- Almacenamiento remoto en caché | Bazel
- Armazenamento em cache remoto | Bazel
- Almacenamiento remoto en caché | Bazel
- Menyimpan ke Cache Jarak Jauh | Bazel
- Uzaktan Önbelleğe Alma | Bazel
- Lưu vào bộ nhớ đệm từ xa | Bazel
- Armazenamento em cache remoto | Bazel
- Armazenamento em cache remoto | Bazel
- Uzaktan Önbelleğe Alma | Bazel
- Armazenamento em cache remoto | Bazel
- Lưu vào bộ nhớ đệm từ xa | Bazel
- Armazenamento em cache remoto | Bazel
- Almacenamiento remoto en caché | Bazel
- Armazenamento em cache remoto | Bazel
- Armazenamento em cache remoto | Bazel
- Almacenamiento remoto en caché | Bazel
- Armazenamento em cache remoto | Bazel
- Menyimpan ke Cache Jarak Jauh | Bazel
- Armazenamento em cache remoto | Bazel
- Armazenamento em cache remoto | Bazel
- Armazenamento em cache remoto | Bazel
- Armazenamento em cache remoto | Bazel
- Uzaktan Önbelleğe Alma | Bazel
- Almacenamiento remoto en caché | Bazel
- Armazenamento em cache remoto | Bazel
- Menyimpan ke Cache Jarak Jauh | Bazel
Commits related to this issue
- add option to mangle AC keys with (non-empty) instance names In some client setups, untracked local files can be used by an action without being included in the Action message, which causes action ca... — committed to mostynb/bazel-remote by mostynb 6 years ago
- add option to mangle AC keys with (non-empty) instance names In some client setups, untracked local files can be used by an action without being included in the Action message, which causes action ca... — committed to buchgr/bazel-remote by mostynb 6 years ago
- Add cache-version input to bazel-build-test action. This allows for manually invalidating prior cache results when there are incompatible changes that Bazel doesn't handle. For example, changing the ... — committed to world-federation-of-advertisers/actions by SanjayVas 6 years ago
- Add cache-version input to bazel-build-test action. (#8) This allows for manually invalidating prior cache results when there are incompatible changes that Bazel doesn't handle. For example, changing... — committed to world-federation-of-advertisers/actions by SanjayVas 6 years ago
- Bazel: Move environment variables to --action_env According to https://bazel.build/remote/caching#known-issues and https://github.com/bazelbuild/bazel/issues/4558 this is better since these needs to ... — committed to abseil/abseil-cpp by derekmauro 2 years ago
Following back up on this after a while, FWIW we’ve been working around this for kubernetes for a while now by hashing the toolchains ourselves (since we run in debian container(s) we can do this pretty easily) and using this to key our cache.
So far this has worked well enough as a stopgap.
@BenTheElder ohh I apologize for the misinformation - it was my understanding that
--action_envis supported by all actions. Please use the platform override then - I shall document it on our website.Essentially, you can pass it the following protobuf:
This is passed through to the computation of the action key for remote caching.
@BenTheElder Yep exactly. It’s not just compilers though it’s any tools that your build uses from your system that you did not explicitly specify really. So you might want to include some more info than just your compiler.
@HackAttack correct. however, the local cache affects only a single user while the remote cache can do quite a bit of harm.
See #3320. 😕