bazel-contrib / bazel-contrib/rules_go

Please add a way to disable fetch_sdks_by_version

Open
#4,527 3 comments 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.5k
Forks
760
Avg merge
1d 11h
Merged PRs (30d)
12

Description

I'm working in an organization where our only access to the Internet is via Artifactory. As of now, Artifactory cannot provide a generic remote mirror that will preserve the functionality of calling `HTTP GET` on `https://go.dev/dl/?mode=json&include=all` and `https://golang.google.cn/dl/?mode=json&include=all`. Until JFrog considers to implement this, we're stuck on rules_go 0.52.0. Newer versions do not exactly behave the way we configure them, thus breaking predictability. Our code only defines the host SDK as the only Go toolchain to use. Our code clearly communicates that we want to use host SDK and nothing else, so disobeying the intent of our configuration by growing an autonomous mind of its own really breaks the idea of declarative and predictable outcomes in Bazel. We have no idea where does rules_go get the idea to perform `fetch_sdks_by_version` without being asked by us to do so. This unsolicited, unwanted and undesirable communication breaks our pipelines and prevents us from upgrading to any version of rules_go that may support Go 1.25, which is another breaking point for us, as rules_go <0.56.0 insists on adding `nocoveragesomething` to `GOEXPERIMENTS`, which also causes breakage on Go 1.25.

Please make rules_go not perform this call without being explicitly asked to do it, or a way to disable this unsolicited communication.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the fetch_sdks_by_version entry point and how host SDK configuration is selected. Determine where an explicit opt-out can be added without changing the existing host-SDK behavior; done means the network calls can be disabled and the behavior is covered by appropriate tests or documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.