bazel: The `no-cache` tag / execution requirement is broken in 0.9.0
Description of the problem / feature request / question:
As of release 0.9.0, setting the no-cache
execution requirement on a Skylark rule or the no-cache
tag on a built-in rule does not properly prevent a target’s output from being uploaded to the remote cache server. It does prevent the output from being downloaded from the server at build time, so we’re getting the worst of both worlds here: storage space usage on the remote cache server but no build acceleration.
If possible, provide a minimal example to reproduce the problem:
Remote caching enabled in tools/bazel.rc
via
build --experimental_remote_spawn_cache
build --remote_rest_cache=http://remote.cache.server.url
- Build a target with the
no-cache
tag or execution requirement set. - Check your remote cache server and notice its output was uploaded
bazel clean
to clear local cache- Build the target again and notice it is rebuilt locally, not downloading from the remote cache
Environment info
-
Operating System: Ubuntu 16.04
-
Bazel version (output of
bazel info release
):release 0.9.0
Have you found anything relevant by searching the web?
Anything else, information or logs or outputs that would be helpful?
(If they are large, please upload as attachment or provide link).
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 2
- Comments: 31 (21 by maintainers)
Commits related to this issue
- Do not upload artifacts from the local execution of no-cache spawns. Previously, marking a spawn "no-cache" resulted in its outputs being uploaded but not the action result protobuf. This was confusi... — committed to benjaminp/bazel by benjaminp 6 years ago
- Do not upload artifacts from the local execution of no-cache spawns. Previously, marking a spawn "no-cache" resulted in its outputs being uploaded but not the action result protobuf. This was confusi... — committed to benjaminp/bazel by benjaminp 5 years ago
- Do not upload artifacts from the local execution of no-cache spawns. Previously, marking a spawn "no-cache" resulted in its outputs being uploaded but not the action result protobuf. This was confus... — committed to bazelbuild/bazel by benjaminp 5 years ago
- Do not upload artifacts from the local execution of no-cache spawns. Previously, marking a spawn "no-cache" resulted in its outputs being uploaded but not the action result protobuf. This was confusi... — committed to weixiao-huang/bazel by benjaminp 5 years ago
- Automated rollback of commit bb1c2a13be881b80154e558709923c0e0c31c7e9. *** Reason for rollback *** This broke //src/test/shell/bazel/remote:remote_execution_test on Bazel CI. Log here: https://stor... — committed to weixiao-huang/bazel by philwo 5 years ago
- Do not upload artifacts from the local execution of no-cache spawns. Previously, marking a spawn "no-cache" resulted in its outputs being uploaded but not the action result protobuf. This was confus... — committed to weixiao-huang/bazel by benjaminp 5 years ago
It certainly works on
genrule
.Do you mean #7011 here? Either way, this is great progress! Thanks all for the work!