Open
Conversation
Due to a bug Bazelisk never read any binaries from the cache, thus resulting in severe runtime penalties.
The new BAZELISK_VERIFY_SHA256 variable can be set to the expected SHA256 hash of the downloaded Bazel binary. If set, then the binary is required to match the hash before it is used. This is important for cases where provenance of the artifact cannot be asserted purely via the HTTPS trust chain (such as what happens in a mutable artifact repository with lax access controls).
…azelbuild#451) * Support bisecting Bazel to find which Bazel change breaks your build - Use --bisect=<BASE>..<HEAD> to specify the bisecting range, Bazelisk uses the GitHub API to get the list of commits to bisect. You may need to set `BAZELISK_GITHUB_TOKEN` to get around GitHub rate limit. - BAZELISK_SHUTDOWN, BAZELISK_CLEAN can be used to run `bazel shutdown` or `bazel clean --expunge` between builds. * Add doc * Remove unused struct * small fixes * Fix --strict
* Retry fetching GCS URL * Sleep
…#447) Bumps [github.com/bazelbuild/rules_go](https://github.com/bazelbuild/rules_go) from 0.38.1 to 0.39.1. - [Release notes](https://github.com/bazelbuild/rules_go/releases) - [Commits](bazel-contrib/rules_go@v0.38.1...v0.39.1) --- updated-dependencies: - dependency-name: github.com/bazelbuild/rules_go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This new configuration setting provides a format-like string to compute the URL from which to fetch Bazel. Takes precedence over BAZELISK_BASE_URL as this is a more general concept. Fixes bazelbuild#423.
Duplicated `go_tests` can result in compilation actions failing due to bazel-contrib/rules_go#3558.
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.
My goal here is to be able to pass my own config implementation when calling RunBazelisk from code without setting environment variables, because they cause repository rule cache invalidations. As a side-effect, it helps towards the TODO in core.go to split functionality into packages.
3b8682f to
2e46381
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When BAZELISK_BASE_URL is set and bazelisk fails to download Bazel from that URL, it would either throw an HTTPError or exit with 22. It should instead fallback to the default releases.bazel.build url.
Fixes bazelbuild#431