bazelbuild / bazelisk

A user-friendly launcher for Bazel.
Apache License 2.0
2.05k stars 316 forks source link

Cannot download Bazel 6.2.0 on macos-latest #450

Closed stephane-caron closed 1 year ago

stephane-caron commented 1 year ago

The bazelisk step in the GitHub Actions of this project does not work on macos-latest: for some reason it tries to download Bazel 6.2.0 (while on ubuntu-latest it goes rightly for 6.1.2):

Run tools/bazelisk build //...
+ /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//bazelisk version
2023/04/26 12:35:59 Falling back to GCS due to GitHub error: could not get releases from github.com/bazelbuild/bazel: could not download list of Bazel releases from github.com/bazelbuild: unexpected status code while reading https://api.github.com/repos/bazelbuild/bazel/releases: 403
2023/04/26 12:36:00 Downloading https://releases.bazel.build/6.2.0/release/bazel-6.2.0-darwin-x86_64...
2023/04/26 12:36:00 could not download Bazel: HTTP GET https://releases.bazel.build/6.2.0/release/bazel-6.2.0-darwin-x86_64 failed with error 404

Why does Bazelisk go for 6.2.0 (does not exist) on macos-latest? If it tried 6.1.2 it would find https://releases.bazel.build/6.1.2/release/bazel-6.1.2-darwin-x86_64 which does exist today.

Same on ubuntu-latest

The same step works on ubuntu-latest:

Run tools/bazelisk build //...
+ /tmp/bazelisk version
2023/05/01 18:00:36 Downloading https://releases.bazel.build/6.1.2/release/bazel-6.1.2-linux-x86_64...
Bazelisk version: v1.6.1
Extracting Bazel installation...
Starting local Bazel server and connecting to it...

Note how it goes for Bazel 6.1.2 here.

Same on macos-latest (2 weeks ago)

In this job from two weeks ago, Bazelisk used to work on macos-latest (from that time):

Run tools/bazelisk build //...
+ /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//bazelisk version
2023/04/20 08:50:28 Falling back to GCS due to GitHub error: could not get releases from github.com/bazelbuild/bazel: could not download list of Bazel releases from github.com/bazelbuild: unexpected status code while reading https://api.github.com/repos/bazelbuild/bazel/releases: 403
2023/04/20 08:50:28 Downloading https://releases.bazel.build/6.1.2/release/bazel-6.1.2-darwin-x86_64...
Bazelisk version: v1.6.1
Extracting Bazel installation...
Starting local Bazel server and connecting to it...

It went for Bazel 6.1.2 as well.

stephane-caron commented 1 year ago

Updated the issue description, hopefully a bit less confusing:

stephane-caron commented 1 year ago

No feedback here but I tested again today and Bazelisk on macos-latest correctly fetched Bazel 6.1.2. Then I guess we can close this issue.