I would like to be able to use the --disk_cache as a read/write cache, but the remote cache as a read-only cache. I thought --noremote_upload_local_results would do this, but it seems that flag is just overridden by the --disk_cache option. It seems this is the expected behavior, since in #7512, I see it says:
On put, Bazel will store items in both the disk and the HTTP cache.
Could this be changed to support this mixed use case?
We are still in the process of moving our build to bazel, and not all builds on dev machines are safe to be pushed to the shared remote cache, so we only populate the remote cache from CI builds. Being able to have a local cache is very helpful when switching between dev branches for super fast builds. Our current workaround is to run a remote cache on every machine that acts as a proxy to the real shared cache, but we would like to move away from all of that overhead.
I agree. disk cache should always be read/write and the remote_upload_local_results flag should only apply to remote caching.
Hey @ishikhman! Have you had a chance to look any further into this?
@SrodriguezO we love contributions :)
We're happy to help! Just wanted to avoid duplicate efforts, since the issue's assigned. We can start looking into it next week.
We'll still hold off to hear back from @ishikhman though (to avoid duplicate efforts)
We'll still hold off to hear back from @ishikhman though (to avoid duplicate efforts)
unfortunately, not yet. That would be really great if you could look into it! Removed myself from the assignment ;)
Silly me.. I just realized this won't actually solve our problem :(
We're exploring a move to RBE and are hoping to utilize its remote cache, but it isn't compatible with local disk caching in the first place :/
@SrodriguezO it's just not been implemented yet. It should be a straightforward PR. Would also love your contribution :)
@buchgr I dug around a bit and it seems a bit involved. I opened a draft PR to test things out as well as a feature request to formalize the process and to get some input. I'd love your feedback. https://github.com/bazelbuild/bazel/issues/8690
@buchgr any chance we could mark this as a blocker for 1.0?
I am hopeful that we'll get this fixed before 1.0 (September 2nd). However, I don't think that it qualifies as a blocker. Why do you think so?
It just seems like this feature is dead in the water until this is fixed
Most helpful comment
I agree. disk cache should always be read/write and the
remote_upload_local_resultsflag should only apply to remote caching.