dashboard: set GOPROXY=off for the "go" repo to catch more network usage

Updates golang/go#30612
Updates golang/go#30760

Change-Id: I296f4f7a163c1bdd59e839229c0961b21f26da89
Reviewed-on: https://go-review.googlesource.com/c/build/+/167039
Reviewed-by: Bryan C. Mills <bcmills@google.com>
This commit is contained in:
Brad Fitzpatrick 2019-03-13 04:44:17 +00:00
Родитель 9e52fcec6f
Коммит 1b471b8bf2
1 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -749,6 +749,10 @@ func (c *BuildConfig) ModulesEnv(repo string) (env []string) {
env = append(env, "GO_BUILDER_SET_GOPROXY=coordinator")
}
switch repo {
case "go":
if !c.OutboundNetworkAllowed() {
env = append(env, "GOPROXY=off")
}
case "oauth2", "build", "website":
env = append(env, "GO111MODULE=on")
}
@ -844,6 +848,13 @@ func (c *BuildConfig) IsLongTest() bool {
return strings.HasSuffix(c.Name, "-longtest")
}
// OutboundNetworkAllowed reports whether this builder should be
// allowed to make outbound network requests. This is only enforced
// on some builders. (Currently most Linux ones)
func (c *BuildConfig) OutboundNetworkAllowed() bool {
return c.Name == "misc-vet-vetall" || c.IsLongTest()
}
func (c *BuildConfig) GoInstallRacePackages() []string {
if c.InstallRacePackages != nil {
return append([]string(nil), c.InstallRacePackages...)