Closed mauriciogg closed 1 month ago
I'm observing the same issue, is there an alternative way to overwrite https://proxy.golang.org with an internal url, since downloader config doesn't help?
You can set GOPROXY
to your internal URL via --repo_env
.
The proper fix is to resolve https://github.com/bazelbuild/bazel-gazelle/issues/1936 and have fetching use the Bazel downloader. Happy to review PRs that do this, it doesn't looks hard.
What version of gazelle are you using?
v0.29.0
What version of rules_go are you using?
N/A
What version of Bazel are you using?
6.5
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
Linux / arm64 and x86_64
What did you do?
I'm trying to build a bazel target that depends on the
bazel-gazelle
repo using the--experimental_downloader_config
bazel flagWhat did you expect to see?
the build to succeed
What did you see instead?
the build fails due to a timeout when fetching a
go_repository
dependency becausego mod download
is trying to talk toproxy.golang.org
. with the following errorThis is technically not a bug in
bazel-gazelle
but it results in a surprising behavior when a downloader config is used for the build, since there is an expectation that all public urls will be rewritten to internal only hosts, but becausego_repository
in this instance does not use the bazel mechanisms to download artifacts, the download configuration is completely ignored here. I'm not sure what the resolution is here, but at least it should be documentedsee https://github.com/golang/go/issues/63562