bazel
bazel copied to clipboard
incompatible_remote_results_ignore_disk
Background
Disk cache is a local supplement for the remote cache and can be used solely or combined with the remote cache. When both disk cache and remote cache are enabled (combined cache), Bazel will fetch blobs from remote cache and save them to the disk cache, as well as, upload blobs to both disk and remote cache for later read.
Problem
When disk cache was first introduced, it was treated as remote cache since the implementation was hidden behind the same interface for remote cache. It means some tags (e.g. no-remote) or flags (e.g. --remote_upload_local_results) which should only apply to remote cache also affect disk cache. #8216 #13621
--incompatible_remote_results_ignore_disk was then introduced by #9338 to solve this problem and more features are added behind that switch (e.g. #13769).
Migration
If you don't use combined cache, no migration is needed.
If you use tags or flags to prevent blobs being uploaded/downloaded to/from remote cache, please note that, after --incompatible_remote_results_ignore_disk is flipped, those blobs will be uploaded/downloaded to/from disk cache.
Expected timeline
We expect to flip --incompatible_remote_results_ignore_disk to true and remove it in Bazel 6.0.
@coeuvre Should we flip this flag now? https://buildkite.com/bazel/bazelisk-plus-incompatible-flags/builds/1253 says it won't break any downstream projects (ignore the rules_nodejs ones)
Yes, i will flip this now.