From 5e0d1babc364d9d8c422eb2fde0f2544a49e6888 Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Thu, 29 Aug 2019 08:53:17 -0400 Subject: [PATCH] dashboard: disable outbound network restriction on builders Issue golang.org/issue/30612 implemented a restriction on outbound network access to help catch unintended uses of internet in tests. We're currently relying on GOPROXY=https://proxy.golang.org for running tests in module mode in Go 1.13+, but proxy.golang.org can serve some module zip files by 302 redirecting to other URLs. Those URLs may not be accessible due to this builder network restriction. Disable the outbound network restriction as the first step to return builders to a working state. The next step will be implement a long term solution, then we can re-enable the network restriction again. Updates golang/go#33928 Updates golang/go#30612 Change-Id: I1a87b8d107df8806753117fc60a3e795e1e1b182 Reviewed-on: https://go-review.googlesource.com/c/build/+/192317 Reviewed-by: Alexander Rakoczy --- dashboard/builders.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/dashboard/builders.go b/dashboard/builders.go index 3f6aaf052c..43246ce12c 100644 --- a/dashboard/builders.go +++ b/dashboard/builders.go @@ -1355,7 +1355,7 @@ func init() { env: []string{ "GOARCH=386", "GOHOSTARCH=386", - "GO_DISABLE_OUTBOUND_NETWORK=1", + "GO_DISABLE_OUTBOUND_NETWORK=0", // TODO(golang.org/issue/33928): Temporarily disabled to let GCS through; change back to 1. }, numTestHelpers: 1, numTryTestHelpers: 3, @@ -1375,7 +1375,7 @@ func init() { tryBot: defaultTrySet(), buildsRepo: defaultPlusExp, env: []string{ - "GO_DISABLE_OUTBOUND_NETWORK=1", + "GO_DISABLE_OUTBOUND_NETWORK=0", // TODO(golang.org/issue/33928): Temporarily disabled to let GCS through; change back to 1. }, MaxAtOnce: 3, numTestHelpers: 1, @@ -1408,7 +1408,7 @@ func init() { HostType: "host-linux-jessie", tryBot: defaultTrySet(), env: []string{ - "GO_DISABLE_OUTBOUND_NETWORK=1", + "GO_DISABLE_OUTBOUND_NETWORK=0", // TODO(golang.org/issue/33928): Temporarily disabled to let GCS through; change back to 1. }, tryOnly: true, CompileOnly: true, @@ -1452,7 +1452,7 @@ func init() { }, env: []string{ "CGO_ENABLED=0", - "GO_DISABLE_OUTBOUND_NETWORK=1", + "GO_DISABLE_OUTBOUND_NETWORK=0", // TODO(golang.org/issue/33928): Temporarily disabled to let GCS through; change back to 1. // This USER=root was required for Docker-based builds but probably isn't required // in the VM anymore, since the buildlet probably already has this in its environment. // (It was required because without cgo, it couldn't find the username) @@ -1465,7 +1465,7 @@ func init() { HostType: "host-linux-jessie", buildsRepo: onlyGo, env: []string{ - "GO_DISABLE_OUTBOUND_NETWORK=1", + "GO_DISABLE_OUTBOUND_NETWORK=0", // TODO(golang.org/issue/33928): Temporarily disabled to let GCS through; change back to 1. "GO_GCFLAGS=-N -l", }, MaxAtOnce: 1, @@ -1479,7 +1479,7 @@ func init() { CompileOnly: true, Notes: "SSA internal checks enabled", env: []string{ - "GO_DISABLE_OUTBOUND_NETWORK=1", + "GO_DISABLE_OUTBOUND_NETWORK=0", // TODO(golang.org/issue/33928): Temporarily disabled to let GCS through; change back to 1. "GO_GCFLAGS=-d=ssa/check/on,dclstack", }, GoDeps: []string{ @@ -1497,7 +1497,7 @@ func init() { InstallRacePackages: []string{"cmd/compile"}, Notes: "race-enabled cmd/compile", env: []string{ - "GO_DISABLE_OUTBOUND_NETWORK=1", + "GO_DISABLE_OUTBOUND_NETWORK=0", // TODO(golang.org/issue/33928): Temporarily disabled to let GCS through; change back to 1. }, GoDeps: []string{ "22f1b56dab29d397d2bdbdd603d85e60fb678089", // adds cmd/compile -c; Issue 20222 @@ -1513,7 +1513,7 @@ func init() { numTestHelpers: 1, numTryTestHelpers: 5, env: []string{ - "GO_DISABLE_OUTBOUND_NETWORK=1", + "GO_DISABLE_OUTBOUND_NETWORK=0", // TODO(golang.org/issue/33928): Temporarily disabled to let GCS through; change back to 1. }, }) addBuilder(BuildConfig{ @@ -1556,7 +1556,7 @@ func init() { "GOARCH=amd64", "GOOS=linux", "CGO_ENABLED=1", - "GO_DISABLE_OUTBOUND_NETWORK=1", + "GO_DISABLE_OUTBOUND_NETWORK=0", // TODO(golang.org/issue/33928): Temporarily disabled to let GCS through; change back to 1. }, tryBot: func(repo, branch, goBranch string) bool { // Only for mobile repo for now, not "go": @@ -1573,7 +1573,7 @@ func init() { MaxAtOnce: 5, Notes: "Debian Jessie. The normal 'linux-amd64' builder is stretch. We use Jessie for our release builds due to https://golang.org/issue/31293", env: []string{ - "GO_DISABLE_OUTBOUND_NETWORK=1", + "GO_DISABLE_OUTBOUND_NETWORK=0", // TODO(golang.org/issue/33928): Temporarily disabled to let GCS through; change back to 1. }, }) addBuilder(BuildConfig{ @@ -1688,7 +1688,7 @@ func init() { env: []string{ "GOOS=js", "GOARCH=wasm", "GOHOSTOS=linux", "GOHOSTARCH=amd64", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/workdir/go/misc/wasm", - "GO_DISABLE_OUTBOUND_NETWORK=1", + "GO_DISABLE_OUTBOUND_NETWORK=0", // TODO(golang.org/issue/33928): Temporarily disabled to let GCS through; change back to 1. }, }) addBuilder(BuildConfig{