Skip to content

Commit

Permalink
dashboard: disable outbound network restriction on builders
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
dmitshur authored and codebien committed Nov 13, 2019
1 parent 3222335 commit 5e0d1ba
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions dashboard/builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand All @@ -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,
Expand All @@ -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{
Expand All @@ -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
Expand All @@ -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{
Expand Down Expand Up @@ -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":
Expand All @@ -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{
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit 5e0d1ba

Please sign in to comment.