Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bazelisk version fails to use HTTP proxy settings on linux #617

Open
rdelfin opened this issue Oct 1, 2024 · 0 comments
Open

bazelisk version fails to use HTTP proxy settings on linux #617

rdelfin opened this issue Oct 1, 2024 · 0 comments
Labels
help wanted Needs help from external contributors

Comments

@rdelfin
Copy link

rdelfin commented Oct 1, 2024

I'm currently working from a server that requires using an HTTP proxy to access resources on the public internet. This means that to use bazelisk successfully, I need to make sure all traffic goes through that proxy. However, when running a basic bazelisk command, I get the following error:

$ bazelisk version
2024/10/01 10:50:58 could not download Bazel: 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=/: unable to complete request to https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/ within 30s

This suggests that the HTTP proxy is not being respected in the google storage APIs, as I'm able to CURL that URL just fine:

$ curl https://www.googleapis.com/storage/v1/b/bazel/o\?delimiter\=/
{
  "kind": "storage#objects",
  "prefixes": [
    "0.1.0/",
    "0.1.1/",
    "0.1.2/",
    "0.1.3/",
    [...]

But unsetting the http_proxy and https_proxy environment variables fails the same way. If on the other hand I specify the bazel version (or add a .bazelversion file), it downloads the bazel version without issue and runs:

$ USE_BAZEL_VERSION=7.3.1 bazelisk version
2024/10/01 10:47:33 Downloading https://releases.bazel.build/7.3.1/release/bazel-7.3.1-linux-x86_64...
Downloading: 68 MB out of 68 MB (100%)
Bazelisk version: v1.21.0
WARNING: Invoking Bazel in batch mode since it is not invoked from within a workspace (below a directory having a WORKSPACE file).
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
Build label: 7.3.1
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Mon Aug 19 16:12:50 2024 (1724083970)
Build timestamp: 1724083970
Build timestamp as int: 1724083970

``
@meteorcloudy meteorcloudy added the help wanted Needs help from external contributors label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Needs help from external contributors
Projects
None yet
Development

No branches or pull requests

2 participants