Skip to content

Commit 1b471b8

Browse files
committed
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 <[email protected]>
1 parent 9e52fce commit 1b471b8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: dashboard/builders.go

+11
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,10 @@ func (c *BuildConfig) ModulesEnv(repo string) (env []string) {
749749
env = append(env, "GO_BUILDER_SET_GOPROXY=coordinator")
750750
}
751751
switch repo {
752+
case "go":
753+
if !c.OutboundNetworkAllowed() {
754+
env = append(env, "GOPROXY=off")
755+
}
752756
case "oauth2", "build", "website":
753757
env = append(env, "GO111MODULE=on")
754758
}
@@ -844,6 +848,13 @@ func (c *BuildConfig) IsLongTest() bool {
844848
return strings.HasSuffix(c.Name, "-longtest")
845849
}
846850

851+
// OutboundNetworkAllowed reports whether this builder should be
852+
// allowed to make outbound network requests. This is only enforced
853+
// on some builders. (Currently most Linux ones)
854+
func (c *BuildConfig) OutboundNetworkAllowed() bool {
855+
return c.Name == "misc-vet-vetall" || c.IsLongTest()
856+
}
857+
847858
func (c *BuildConfig) GoInstallRacePackages() []string {
848859
if c.InstallRacePackages != nil {
849860
return append([]string(nil), c.InstallRacePackages...)

0 commit comments

Comments
 (0)