Closed illicitonion closed 1 year ago
@fweikert could you take a look? Thanks!
Nice, thank you for this PR!
Bazelisk postsubmit is now failing with
INFO: Starting clean (this may take a while). Consider using --async if the clean takes more than several minutes.
2023/11/10 00:08:53 Downloading https://downloads.sourceforge.net/project/bazel.mirror/6.2.0/bazel-6.2.0-linux-x86_64...
2023/11/10 00:08:53 could not download Bazel: failed to download bazel: failed to download bazel: HTTP GET https://downloads.sourceforge.net/project/bazel.mirror/6.2.0/bazel-6.2.0-linux-x86_64 failed with error 404
Any idea how to fix the test?
Looks like sourceforge dropped 6.2.0. We can switch to 6.2.1, but that will lead to the same error in the future.
Before this change, changing which mirror you were downloading from would change the $PATH environment variable bazel is run with, even though the bazel binaries being pointed to are identical. This can cause repository rules to invalidate and re-run.
Instead, store downloaded bazels in directories keyed off of the sha256 of the bazel binary itself, and track the metadata of a mirror+version -> sha256.
This avoid spurious rebuilds when only changing the URL bazelisk would use to download bazel.