Discard cache for rules affected by --experimental_docker_image #9868
Labels
more data needed
team-Configurability
platforms, toolchains, cquery, select(), config transitions
type: feature request
untriaged
Description of the problem / feature request:
--experimental_docker_image
should discard cache on actions that run inside docker.We are using this feature because our builds are not fully hermetic and efforts to do so keep increasing the complexity of our workspace/build rules, so we decided to rely on docker (for now) to do it for us.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
bazel build //...
bazel clean
bazel build //...
At this point it will reuse the same cache from the old container, but it should discard cache.
What operating system are you running Bazel on?
Any
What's the output of
bazel info release
?0.26.1
(but according to documentation happens on latest)What's the output of
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?Cannot, private repo.
Any other information, logs, or outputs that you want to share?
The current work around is to wrap the
bazel
command in a custom python script (we already do this to inject--experimental_docker_image={docker_image_id}
, so it always grabs the docker image for the checkedout build), and append--platform_suffix={my_image_hash}
to the build on behalf of the user.The down side of doing this is that we update our image about once a week, and our
bazel-out
is on the order of 100G, resulting in many hundreds of gigs of stale cache. We fix this by having our clean up the stale/old folders inbazel-out
.The text was updated successfully, but these errors were encountered: