remote_download_minimal: downloaded inputs shouldn't be deleted after the build
See original GitHub issueDescription of the problem / feature request:
When using --remote_download_minimal
, downloaded inputs shouldn’t be deleted after the build.
Feature requests: what underlying problem are you trying to solve with this feature?
Currently, when bazel needs to download inputs for a locally run action while using --remote_download_minimal
, it deletes these inputs after the build: https://github.com/bazelbuild/bazel/blob/570f01968093d943b1f878f2cf57da4c20ba5355/src/main/java/com/google/devtools/build/lib/remote/RemoteModule.java#L788-L810
This makes incremental compilation less efficient.
For example, if we set a bundling rule to run locally, bazel will download all of the various artifacts that need to be bundled together, and if we incrementally only change a single artifact in that bundle, bazel will have to re-download all of the artifacts, even though they didn’t change since the last build. The fact that disk_cache doesn’t work with remote builds ensure that this is a slow download as well.
What operating system are you running Bazel on?
macOS 10.15.7
What’s the output of bazel info release
?
release 4.0.0rc10
Have you found anything relevant by searching the web?
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (4 by maintainers)
Can you please create a new issue and maybe include a repro there?
I’m running into an issue on HEAD (though it probably existed since this was fixed), where even though the inputs are no longer deleted, they aren’t used on subsequent runs, causing them to be downloaded again. If I generate the inputs locally, so they aren’t downloaded for the local action, they aren’t downloaded on subsequent runs.
Of note for this, the inputs being downloaded are outputs (though not all the outputs) from previous actions in the graph.