Skip to content

Commit

Permalink
dashboard: remove obsolete disabled builders
Browse files Browse the repository at this point in the history
FreeBSD 9.3, FreeBSD 10.x, and OpenBSD 6.0 have
reached end-of-life and are no longer supported.
Go 1.12 was the last release¹ that ran on FreeBSD 10.x.
Go 1.10 was the last release² that ran on OpenBSD 6.0.

These builders have long since been disabled and won't be needed in
the future, so remove them. This work helped detect golang/go#40563.

Modify TestHostConfigsAllUsed to report errors instead of warnings
when it finds unused host configs. Make a map of known exceptions
with rationale or a linked issue for each entry.

¹ https://golang.org/doc/go1.12#ports
² https://golang.org/doc/go1.10#ports

Updates golang/go#36841.
Updates golang/go#19938.

Change-Id: Id7fcdc671bfacf7e70174f4168c9c9cc46ba53d7
Reviewed-on: https://go-review.googlesource.com/c/build/+/246639
Reviewed-by: Alexander Rakoczy <alex@golang.org>
  • Loading branch information
dmitshur committed Aug 4, 2020
1 parent f08b3ea commit 0768812
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 126 deletions.
104 changes: 2 additions & 102 deletions dashboard/builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,24 +223,6 @@ var Hosts = map[string]*HostConfig{
OwnerGithub: "bradfitz", // at home
env: []string{"GOROOT_BOOTSTRAP=/usr/local/goboot"},
},
"host-openbsd-amd64-60": &HostConfig{
VMImage: "openbsd-amd64-60",
machineType: "n1-highcpu-4",
// OpenBSD 6.0 requires binaries built with Go 1.10, per https://golang.org/wiki/OpenBSD
buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.openbsd-amd64.go1.10",
goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/gobootstrap-openbsd-amd64-60.tar.gz",
Notes: "OpenBSD 6.0; GCE VM is built from script in build/env/openbsd-amd64",
SSHUsername: "gopher",
},
"host-openbsd-386-60": &HostConfig{
VMImage: "openbsd-386-60",
machineType: "n1-highcpu-4",
// OpenBSD 6.0 requires binaries built with Go 1.10, per https://golang.org/wiki/OpenBSD
buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.openbsd-386.go1.10",
goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/gobootstrap-openbsd-386-60.tar.gz",
Notes: "OpenBSD 6.0; GCE VM is built from script in build/env/openbsd-386",
SSHUsername: "gopher",
},
"host-openbsd-amd64-62": &HostConfig{
VMImage: "openbsd-amd64-62",
machineType: "n1-highcpu-4",
Expand Down Expand Up @@ -280,30 +262,6 @@ var Hosts = map[string]*HostConfig{
env: []string{"GOROOT_BOOTSTRAP=/usr/local/go"},
OwnerGithub: "4a6f656c",
},
"host-freebsd-93-gce": &HostConfig{
VMImage: "freebsd-amd64-gce93",
machineType: "n1-highcpu-4",
buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.freebsd-amd64",
goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/go1.4-freebsd-amd64.tar.gz",
SSHUsername: "gopher",
},
"host-freebsd-10_3": &HostConfig{
VMImage: "freebsd-amd64-103-b",
Notes: "FreeBSD 10.3; GCE VM is built from script in build/env/freebsd-amd64",
machineType: "n1-highcpu-4",
buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.freebsd-amd64",
goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/go1.4-freebsd-amd64.tar.gz",
env: []string{"CC=clang"},
SSHUsername: "gopher",
},
"host-freebsd-10_4": &HostConfig{
VMImage: "freebsd-amd64-104",
Notes: "FreeBSD 10.4; GCE VM is built from script in build/env/freebsd-amd64",
machineType: "n1-highcpu-4",
buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.freebsd-amd64",
goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/go1.4-freebsd-amd64.tar.gz",
SSHUsername: "gopher",
},
"host-freebsd-11_1": &HostConfig{
VMImage: "freebsd-amd64-111-b",
Notes: "FreeBSD 11.1; GCE VM is built from script in build/env/freebsd-amd64",
Expand Down Expand Up @@ -1442,29 +1400,6 @@ func explicitTrySet(projs ...string) func(proj, branch, goBranch string) bool {
}

func init() {
addBuilder(BuildConfig{
Name: "freebsd-amd64-gce93",
HostType: "host-freebsd-93-gce",
buildsRepo: disabledBuilder,
})
addBuilder(BuildConfig{
Name: "freebsd-amd64-10_3",
HostType: "host-freebsd-10_3",
buildsRepo: func(repo, branch, goBranch string) bool {
return goBranch == "release-branch.go1.12" && buildRepoByDefault(repo)
},
tryBot: func(repo, branch, goBranch string) bool {
return branch == "release-branch.go1.12"
},
})
addBuilder(BuildConfig{
Name: "freebsd-amd64-10_4",
HostType: "host-freebsd-10_4",
buildsRepo: func(repo, branch, goBranch string) bool {
return goBranch == "release-branch.go1.12" && buildRepoByDefault(repo)
},
tryBot: nil,
})
addBuilder(BuildConfig{
Name: "freebsd-amd64-11_1",
HostType: "host-freebsd-11_1",
Expand Down Expand Up @@ -1505,22 +1440,6 @@ func init() {
Name: "freebsd-amd64-race",
HostType: "host-freebsd-11_1-big", // TODO(golang.org/issue/40562): Update to newer FreeBSD.
})
addBuilder(BuildConfig{
Name: "freebsd-386-10_3",
HostType: "host-freebsd-10_3",
buildsRepo: func(repo, branch, goBranch string) bool {
return goBranch == "release-branch.go1.12" && buildRepoByDefault(repo)
},
env: []string{"GOARCH=386", "GOHOSTARCH=386"},
})
addBuilder(BuildConfig{
Name: "freebsd-386-10_4",
HostType: "host-freebsd-10_4",
buildsRepo: func(repo, branch, goBranch string) bool {
return goBranch == "release-branch.go1.12" && buildRepoByDefault(repo)
},
env: []string{"GOARCH=386", "GOHOSTARCH=386"},
})
addBuilder(BuildConfig{
Name: "freebsd-386-11_1",
HostType: "host-freebsd-11_1",
Expand Down Expand Up @@ -1883,6 +1802,7 @@ func init() {
HostType: "host-nacl",
buildsRepo: func(repo, branch, goBranch string) bool {
// nacl support is removed in Go 1.14.
// TODO: Remove builder after Go 1.15 is out.
return repo == "go" && !atLeastGo1(goBranch, 14) && !strings.HasPrefix(goBranch, "dev.")
},
numTryTestHelpers: 3,
Expand All @@ -1893,6 +1813,7 @@ func init() {
HostType: "host-nacl",
buildsRepo: func(repo, branch, goBranch string) bool {
// nacl support is removed in Go 1.14.
// TODO: Remove builder after Go 1.15 is out.
return repo == "go" && !atLeastGo1(goBranch, 14) && !strings.HasPrefix(goBranch, "dev.")
},
tryBot: explicitTrySet("go"),
Expand Down Expand Up @@ -1933,27 +1854,6 @@ func init() {
"GO_DISABLE_OUTBOUND_NETWORK=1",
},
})
addBuilder(BuildConfig{
Name: "openbsd-amd64-60",
HostType: "host-openbsd-amd64-60",
distTestAdjust: noTestDirAndNoReboot,
buildsRepo: disabledBuilder,
numTestHelpers: 2,
numTryTestHelpers: 5,
})
addBuilder(BuildConfig{
Name: "openbsd-386-60",
HostType: "host-openbsd-386-60",
distTestAdjust: noTestDirAndNoReboot,
buildsRepo: disabledBuilder,
env: []string{
// cmd/go takes ~192 seconds on openbsd-386
// now, which is over the 180 second default
// dist test timeout. So, bump this builder
// up:
"GO_TEST_TIMEOUT_SCALE=2",
},
})
addBuilder(BuildConfig{
Name: "openbsd-386-62",
HostType: "host-openbsd-386-62",
Expand Down
43 changes: 19 additions & 24 deletions dashboard/builders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,21 +356,9 @@ func TestBuilderConfig(t *testing.T) {
// go1.12.html: "Go 1.12 is the last release that is
// supported on FreeBSD 10.x [... and 11.1]"
// But golang.org/issue/40563 happened.
{b("freebsd-386-10_3", "go"), none},
{b("freebsd-386-10_3", "net"), none},
{b("freebsd-386-10_3", "mobile"), none},
{b("freebsd-amd64-10_3", "go"), none},
{b("freebsd-amd64-10_3", "net"), none},
{b("freebsd-amd64-10_3", "mobile"), none},
{b("freebsd-amd64-11_1", "go"), none},
{b("freebsd-amd64-11_1", "net"), none},
{b("freebsd-amd64-11_1", "mobile"), none},
{b("freebsd-amd64-10_3@go1.12", "go"), both},
{b("freebsd-amd64-10_3@go1.12", "net@1.12"), both},
{b("freebsd-amd64-10_3@go1.12", "mobile"), none},
{b("freebsd-amd64-10_4@go1.12", "go"), isBuilder},
{b("freebsd-amd64-10_4@go1.12", "net"), isBuilder},
{b("freebsd-amd64-10_4@go1.12", "mobile"), none},
{b("freebsd-amd64-11_1@go1.14", "go"), isBuilder},
{b("freebsd-amd64-11_1@go1.14", "net"), isBuilder},
{b("freebsd-amd64-11_1@go1.14", "mobile"), none},
Expand Down Expand Up @@ -425,6 +413,8 @@ func TestBuilderConfig(t *testing.T) {
{b("android-amd64-emu", "go"), isBuilder},
{b("android-386-emu", "go"), isBuilder},

// golang.org/doc/go1.13: "Go 1.13 is the last release
// that will run on Native Client (NaCl)."
{b("nacl-386", "go"), none},
{b("nacl-386@dev.link", "go"), none},
{b("nacl-386@go1.13", "go"), onlyPost},
Expand Down Expand Up @@ -487,13 +477,9 @@ func TestBuilderConfig(t *testing.T) {
{b("darwin-amd64-10_15", "exp"), onlyPost},
// ... but not on most others:
{b("darwin-amd64-10_12", "exp"), none},
{b("freebsd-386-10_3@go1.12", "exp"), none},
{b("freebsd-386-10_4@go1.12", "exp"), none},
{b("freebsd-386-11_1@go1.14", "exp"), none},
{b("freebsd-386-11_2", "exp"), none},
{b("freebsd-386-12_0", "exp"), none},
{b("freebsd-amd64-10_3@go1.12", "exp"), none},
{b("freebsd-amd64-10_4@go1.12", "exp"), none},
{b("freebsd-amd64-11_1@go1.14", "exp"), none},
{b("freebsd-amd64-11_2", "exp"), none},
{b("freebsd-amd64-12_0", "exp"), none},
Expand All @@ -519,8 +505,6 @@ func TestBuilderConfig(t *testing.T) {
{b("linux-amd64-sid", "build"), none},
{b("linux-amd64-nocgo", "build"), none},
{b("linux-386-longtest", "build"), none},
{b("freebsd-386-10_3", "build"), none},
{b("freebsd-386-10_4", "build"), none},
{b("freebsd-386-11_1", "build"), none},
{b("js-wasm", "build"), none},
{b("android-386-emu", "build"), none},
Expand Down Expand Up @@ -606,16 +590,27 @@ func TestBuilderConfig(t *testing.T) {
}

func TestHostConfigsAllUsed(t *testing.T) {
used := map[string]bool{}
knownUnused := map[string]bool{
// Currently host-linux-armhf-cross and host-linux-armel-cross aren't
// referenced, but the coordinator hard-codes them, so don't make
// these two an error for now.
"host-linux-armhf-cross": true,
"host-linux-armel-cross": true,

"host-linux-x86-alpine": true, // TODO(golang.org/issue/19938): Fix the Alpine builder, or remove it.
"host-linux-arm64-aws": true, // TODO(golang.org/issue/36841): Add a builder that uses this host, or remove it.
}

used := make(map[string]bool)
for _, conf := range Builders {
used[conf.HostType] = true
}
for hostType := range Hosts {
if !used[hostType] {
// Currently host-linux-armhf-cross and host-linux-armel-cross aren't
// referenced, but the coordinator hard-codes them, so don't make
// this an error for now.
t.Logf("warning: host type %q is not referenced from any build config", hostType)
if !used[hostType] && !knownUnused[hostType] {
t.Errorf("host type %q is not referenced from any build config", hostType)
}
if used[hostType] && knownUnused[hostType] {
t.Errorf("host type %q should not be listed in knownUnused since it's in use", hostType)
}
}
}
Expand Down

0 comments on commit 0768812

Please sign in to comment.