-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dashboard,cmd/coordinator: unify and simplify GOPROXY setting behavior
The existing behavior for setting GOPROXY is rather hard to follow, and doesn't work correctly in many cases. For example, longtest on a reverse builder gets the GKE proxy. Before CL 479837 there were no longtest builders outside of GCE, so this case was never covered. Fixing this is the motivation of this CL. They way configuration works today is: 1. buildstatus.go unconditionally sets GOPROXY to the GKE proxy [1]. 2. st.conf.ModuleEnv potentially overrides GOPROXY with a more reasonable setting, with a bunch of complex conditions. Unify and simplify this process by moving it into buildstatus.go, where their is now a strict ordering of possible GOPROXY values. Notable changes: * The GKE proxy is never used outside of GCE. * There is a consistent default/fallback of proxy.golang.org. I initially tried to split this into two CLs: one unifying the implementation and the next changing the behavior, but the old behavior is so mind-boggling that the first CL doesn't really make much sense. The annoying part of this CL is that tests move from dashboard to cmd/coordinator, requiring us to export additional fields so cmd/coordinator tests can configure the builders. The test cases themselves are unchanged except for the addition of a non-GCE longtest builder case. [1] Except in runSubrepoTests, which avoids doing so for reverse builders. This was a workaround for private proxy builders in CL 275412, but wasn't extended to other callers because only subrepo tests were seeing a regression. More strangeness. For golang/go#35678. Change-Id: I6090c8c5e91ce6be9bfc07c16f36ed339c9d27ae Reviewed-on: https://go-review.googlesource.com/c/build/+/482339 Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Carlos Amedee <carlos@golang.org> Run-TryBot: Michael Pratt <mpratt@google.com>
- Loading branch information
Showing
6 changed files
with
220 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.