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

cmd/go: GONOPROXY is undocumented #32056

Closed
bcmills opened this issue May 15, 2019 · 10 comments
Closed

cmd/go: GONOPROXY is undocumented #32056

bcmills opened this issue May 15, 2019 · 10 comments
Labels
Documentation FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented May 15, 2019

GOSUMDB, GONOSUMDB, and GONOPROXY variables were added in CL 173951.

Documentation for GOSUMDB and GONOSUMDB was added to https://tip.golang.org/cmd/go/#hdr-Module_authentication_failures, but I don't see any mention of GONOPROXY in the cmd/go docs at all.

CC @jayconrod @rsc

@bcmills bcmills added Documentation NeedsFix The path to resolution is known, but the work has not been done. release-blocker modules labels May 15, 2019
@bcmills bcmills added this to the Go1.13 milestone May 15, 2019
@bcmills
Copy link
Contributor Author

bcmills commented May 15, 2019

Some specific questions:

  • Should GOPROXY=off with GONOPROXY=*/x disable all fetches, or allow (only) */x to be fetched directly?
  • What should happen if GOPROXY includes off explicitly in the fallback chain, such as GOPROXY=https://my.proxy,https://other.proxy,off? (In that case, should fetches of the GONOPROXY paths be disabled?)

@ianlancetaylor
Copy link
Contributor

Also note that all environment variables should be documented at https://golang.org/cmd/go/#hdr-Environment_variables. These new variables are not mentioned there.

@bcmills
Copy link
Contributor Author

bcmills commented May 15, 2019

One more question to document:

  • If GOPROXY does not include direct as a fallback, should GONOPROXY fall back to direct implicitly, or behave as if GOPROXY were set to off for that module?

@rogpeppe
Copy link
Contributor

I find it a bit odd that GONOPROXY is using sh-style globs anyway, given that GONOPROXY holds a set of package paths (AIUI) not URLs, and package paths are almost always matched with patterns as documented in go help packages.

That is, I'd expect:

GONOPROXY=myorg.com/...

to avoid the proxy for all modules under myorg.com.

@rsc
Copy link
Contributor

rsc commented May 16, 2019

If GOPROXY=off and GONOPROXY=* (say), then I think GONOPROXY wins. No matter what GOPROXY is set to, GONOPROXY matching the module means don't pay attention to that.

@rsc
Copy link
Contributor

rsc commented May 16, 2019

@rogpeppe, I see your point but I was trying to line up a bit with the standard NO_PROXY (for example https://www.gnu.org/software/emacs/manual/html_node/url/Proxies.html). Also I think it would be just too hard to write something like GONOPROXY=*.corp.yourcompany.com using ... (its not actually possible at all).

@rogpeppe
Copy link
Contributor

I guess I don't understand the GONOPROXY semantics (the whole point of this thread, and probably why I can't get it to work for me); how is GONOPROXY=*.corp.yourcompany.com different from GONOPROXY=....corp.yourcompany.com ?

@bcmills
Copy link
Contributor Author

bcmills commented May 20, 2019

how is GONOPROXY=*.corp.yourcompany.com different from GONOPROXY=....corp.yourcompany.com ?

The have different behavior for packages such as contrived.example.com/not.your.corp.yourcompany.com.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/178179 mentions this issue: cmd/go: default to GOPROXY=https://proxy.golang.org and GOSUMDB=sum.golang.org

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/179219 mentions this issue: cmd/go: document GO{NO}SUMDB in 'go help environment' and 'go help modules'

gopherbot pushed a commit that referenced this issue Jun 4, 2019
…dules'

GOSUMDB and GONOSUMDB are described in detail by
'go help module-auth'. So, this change mentions the two
variables and says to see 'go help module-auth'.

This also adds GONOPROXY to 'go help environment'.

Fixes #32292 and updates #32056.

Change-Id: I2eae0f906a3fbfcb88ad5c8fb4870917d0d7bbcd
Reviewed-on: https://go-review.googlesource.com/c/go/+/179219
Reviewed-by: Russ Cox <rsc@golang.org>
@golang golang locked and limited conversation to collaborators May 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

5 participants