bazelbuild / bazelbuild/bazelisk

Bazelisk fails with TLS handshake timeout on WSL2

Open
#476 2 comments 0 reactions 0 assignees View on GitHub
P2 type:bug
Dominant language
Go
Stars
2.7k
Forks
424
PR merge metrics
No merged PRs in 30d

Description

Whenever I run `bazel` through `bazelisk` (I tried 1.16.0 and 1.17.0), I get the following error:

> 2023/06/26 15:03:56 could not resolve the version 'latest' to an actual version number: unable to determine latest version: could not list Bazel versions in GCS bucket: could not list GCS objects at https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/: could not fetch https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/: Get "https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/": net/http: TLS handshake timeout

even, if I just try to execute `bazel clean`.

I am on WSL2 on a Windows machine, which accesses the web through a ZScaler proxy. As `wget https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/` just works fine without any issues, I do not think it is a general proxy issue.

I am rather suspecting a certificate issue. While my system has the necessary root certificate for ZScaler middleman in `/etc/ssl/cert` (as witnessed by the wget-command), I doubt whether `bazelisk` uses this certificate. But I am not enough of a golang programmer to really know.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure by running `bazel` or `bazel clean` with Bazelisk 1.16.0 or 1.17.0 on WSL2, then compare its GCS request with the working `wget` command. Inspect how the launcher resolves `latest` and handles the ZScaler certificate or proxy; done means the TLS cause is confirmed and the behavior is fixed or clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system, networking, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.