-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
Description of the bug:
We use the Remote Downloader (the --experimental_remote_downloader flag) to enforce security invariants in our builds and reduce dependencies on external hosts.
We also occasionally run builds with --noremote_accept_cached.
This flag is documented as:
Whether to accept remotely cached action results.
This means we still expect to be able to use the CAS (which underlies the remote downloader service), but we do not want actions themselves to be cached.
As of Bazel 5.0 (specifically, #13769, from the git bisect I did), this fails with an error that Bazel retrieved an empty file (the e3b0c... hash), rather than the one specified in the WORKSPACE file.
Error in download_and_extract: com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException:
Checksum was e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
but wanted bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
We're using a different implementation of the remote cache and downloader internally, but this repo shows the same issue occurs with the open source implementation at https://github.com/buchgr/bazel-remote.
(This repro doesn't have Bazel run with --incompatible_remote_results_ignore_disk, which was added in that CL, but it does not change the behavior here either.)
Which operating system are you running Bazel on?
darwin, linux
What is the output of bazel info release?
release 5.0.0
If bazel info release returns development version or (@non-git), tell us how you built Bazel.
No response
What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response