Repository navigation
workflow: download Bazelisk and Bazel with retries and mirror fallback - #4325
Merged
Merged
Conversation
`bazel-contrib/setup-bazel` resolves `bazelisk-version` by querying the GitHub Releases API without retries—which intermittently returns an empty `[]` response—and downloads the binary without retries or SHA-256 verification. Additionally, Bazelisk does not retry mid-stream transfer failures when downloading the Bazel binary. Replace the `bazelisk-version` input and shell retry script with a Python download script in the `setup-bazel` composite action. The script downloads Bazelisk directly from GitHub Releases with an npm registry tarball fallback, verifies SHA-256 checksums, caches the binary under the Bazelisk cache directory, and retries `bazel --version` with exponential backoff. * Also updates agent style rules to allow long string literals (such as URLs and hashes) to exceed line length limits.
aignas
approved these changes
Oct 23, 2026
aignas
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, but we should switch to latest bazelisk version either in this PR or later.
Comment on lines
+45
to
+46
| ("https://github.com/bazelbuild/bazelisk/releases/download/v1.28.1/bazelisk-darwin-amd64", "023225736cea5dc88f2b0807d5b1af4eb0f69a4ed45e3994b2c18c263bc80e48"), | ||
| ("https://registry.npmjs.org/@bazel/bazelisk/-/bazelisk-1.28.1.tgz", "023225736cea5dc88f2b0807d5b1af4eb0f69a4ed45e3994b2c18c263bc80e48"), |
Collaborator
There was a problem hiding this comment.
Latest bazelisk is 1.30.0, could we switch to that? https://github.com/bazelbuild/bazelisk/releases/tag/v1.30.0
Collaborator
Author
|
Good idea. I should have thought to check that the version it was picking was latest. |
rickeylev
added a commit
that referenced
this pull request
Oct 23, 2026
PR #4325 pinned the Bazelisk download URLs to v1.28.1 to match the latest version available on the npm registry mirror, inadvertently downgrading the primary GitHub Releases download from 1.29.0. Update the primary GitHub Releases URLs and SHA-256 checksums in the `setup-bazel` download script to v1.30.0 (the latest GitHub release), while retaining 1.28.1 for the npm registry fallback.
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.
bazel-contrib/setup-bazelresolvesbazelisk-versionby querying theGitHub Releases API without retries—which intermittently returns an
empty
[]response—and downloads the binary without retries or SHA-256verification. Additionally, Bazelisk does not retry mid-stream transfer
failures when downloading the Bazel binary.
Replace the
bazelisk-versioninput and shell retry script with aPython download script in the
setup-bazelcomposite action. Thescript downloads Bazelisk directly from GitHub Releases with an npm
registry tarball fallback, verifies SHA-256 checksums, caches the
binary under the Bazelisk cache directory, and retries
bazel --versionwith exponential backoff.
URLs and hashes) to exceed line length limits.