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
  1. Build a target with the no-cache tag or execution requirement set.
  2. Check your remote cache server and notice its output was uploaded
  3. bazel clean to clear local cache
  4. 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

Most upvoted comments

It certainly works on genrule.

It’s my understanding that #6033 is a massive step in the right direction but doesn’t fix the problem entirely because many rules don’t pass tags through to actions as well as some actions don’t pass them through to spawns.

Do you mean #7011 here? Either way, this is great progress! Thanks all for the work!