Skip to content

Commit

Permalink
dashboard, cmd/release: remove what's unused as of Go 1.16 release
Browse files Browse the repository at this point in the history
We can drop the 32-bit and 10.11 macOS builders, they're unused.

Remove FreeBSD 11.1 builder, it's unused.
Update freebsd-amd64-race to use the latest available FreeBSD builder.

Simplify build policy and comments, removing anything that mentioned
Go version 1.14 or older, since they're not relevant anymore.

Drop Go 1.14 support from minSupportedMacOSVersion, and add support
for the future Go 1.17 release, which will increase minimum macOS
version requirement to macOS 10.13.

Fixes golang/go#40562.

Change-Id: I7beeec0952a516afe99a5154b22c7f25ceeb3da1
Reviewed-on: https://go-review.googlesource.com/c/build/+/293771
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
  • Loading branch information
dmitshur committed Feb 19, 2021
1 parent 9156cb5 commit 43ea694
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 161 deletions.
37 changes: 11 additions & 26 deletions cmd/release/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,19 +260,6 @@ var builds = []*Build{
Arch: "arm64",
Builder: "linux-arm64-packet",
},
{
GoQuery: "< go1.15",
OS: "freebsd",
Arch: "386",
Builder: "freebsd-386-11_1",
},
{
GoQuery: "< go1.15",
OS: "freebsd",
Arch: "amd64",
Race: true,
Builder: "freebsd-amd64-11_1",
},

// Test-only builds.
{
Expand Down Expand Up @@ -864,7 +851,7 @@ func (b *Build) writeFile(name string, r io.Reader) error {
}

// checkRelocations runs readelf on pkg/linux_amd64/runtime/cgo.a and makes sure
// we don't see R_X86_64_REX_GOTPCRELX in new Go 1.15 and Go 1.14 minor releases.
// we don't see R_X86_64_REX_GOTPCRELX in new Go 1.15 minor releases.
// See golang.org/issue/31293 and golang.org/issue/40561#issuecomment-731482962.
func (b *Build) checkRelocations(client *buildlet.Client) error {
if b.OS != "linux" || b.Arch != "amd64" || b.TestOnly {
Expand Down Expand Up @@ -895,8 +882,7 @@ func (b *Build) checkRelocations(client *buildlet.Client) error {
if !strings.Contains(got, "R_X86_64_REX_GOTPCRELX") {
return fmt.Errorf("%s did not contain a R_X86_64_REX_GOTPCRELX relocation; remoteErr=%v, %s", file, remoteErr, got)
}
case strings.HasPrefix(*version, "go1.15"),
strings.HasPrefix(*version, "go1.14"):
case strings.HasPrefix(*version, "go1.15"):
if strings.Contains(got, "R_X86_64_REX_GOTPCRELX") {
return fmt.Errorf("%s contained a R_X86_64_REX_GOTPCRELX relocation", file)
}
Expand Down Expand Up @@ -1012,12 +998,12 @@ func minSupportedMacOSVersion(goVer string) string {
// TODO(amedee,dmitshur,golang.org/issue/40558): Use a version package to compare versions of Go.

// The minimum supported version of macOS with each version of go:
// go1.14 - macOS 10.11
// go1.15 - macOS 10.12
// go1.16 - macOS 10.12
minMacVersion := "10.12"
if match("< go1.15", goVer) {
minMacVersion = "10.11"
// go1.17 - macOS 10.13
minMacVersion := "10.13"
if match("< go1.17beta1", goVer) {
minMacVersion = "10.12"
return minMacVersion
}
return minMacVersion
Expand All @@ -1031,18 +1017,17 @@ func match(query, goVer string) bool {
switch query {
case "": // A special case to make the zero Build.GoQuery value useful.
return true
case "< go1.17beta1":
return strings.HasPrefix(goVer, "go1.16") || strings.HasPrefix(goVer, "go1.15")
case ">= go1.16beta1":
return !strings.HasPrefix(goVer, "go1.15") && !strings.HasPrefix(goVer, "go1.14")
return !strings.HasPrefix(goVer, "go1.15")
case "< go1.16beta1":
return strings.HasPrefix(goVer, "go1.15") || strings.HasPrefix(goVer, "go1.14")
return strings.HasPrefix(goVer, "go1.15")
case ">= go1.15rc2":
// By the time this code is added, Go 1.15 RC 1 has already been released and
// won't be modified, that's why we only care about matching RC 2 and onwards.
// (We could've just done ">= go1.15", but that could be misleading in future.)
return goVer != "go1.15rc1" && !strings.HasPrefix(goVer, "go1.15beta") &&
!strings.HasPrefix(goVer, "go1.14")
case "< go1.15":
return strings.HasPrefix(goVer, "go1.14")
return goVer != "go1.15rc1" && !strings.HasPrefix(goVer, "go1.15beta")
default:
panic(fmt.Errorf("match: query %q is not supported", query))
}
Expand Down
17 changes: 7 additions & 10 deletions cmd/release/release_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestAllQueriesSupported(t *testing.T) {
t.Errorf("build %v uses an unsupported version query:\n%v", b, err)
}
}()
match(b.GoQuery, "go1.14.6") // Shouldn't panic for any b.GoQuery.
match(b.GoQuery, "go1.15.6") // Shouldn't panic for any b.GoQuery.
})
}
}
Expand All @@ -45,14 +45,16 @@ func TestMinSupportedMacOSVersion(t *testing.T) {
goVer string
wantMacOS string
}{
{"go1.14", "10.11"},
{"go1.14.14", "10.11"},
{"go1.15", "10.12"},
{"go1.15.7", "10.12"},
{"go1.16beta1", "10.12"},
{"go1.16rc1", "10.12"},
{"go1.16", "10.12"},
{"go1.16.1", "10.12"},
{"go1.17beta1", "10.13"},
{"go1.17rc1", "10.13"},
{"go1.17", "10.13"},
{"go1.17.2", "10.13"},
}
for _, tc := range testCases {
t.Run(tc.goVer, func(t *testing.T) {
Expand Down Expand Up @@ -80,23 +82,18 @@ func TestBuilderSelectionPerGoVersion(t *testing.T) {
target string
wantBuilder string
}{
// Go 1.15.x and 1.14.x still use the Jessie builders.
{"go1.14.55", "linux-amd64", "linux-amd64-jessie"},
// Go 1.15.x still uses the Jessie builders.
{"go1.15.55", "linux-386", "linux-386-jessie"},
// Go 1.16 starts to use the the Stretch builders.
{"go1.16", "linux-amd64", "linux-amd64-stretch"},
{"go1.16", "linux-386", "linux-386-stretch"},

// Go 1.15.x and 1.14.x still use the Packet and Scaleway builders.
{"go1.14.55", "linux-arm64", "linux-arm64-packet"},
// Go 1.15.x still uses the Packet and Scaleway builders.
{"go1.15.55", "linux-armv6l", "linux-arm"},
// Go 1.16 starts to use the the AWS builders.
{"go1.16", "linux-arm64", "linux-arm64-aws"},
{"go1.16", "linux-armv6l", "linux-arm-aws"},

// Go 1.14.x still use the FreeBSD 11.1 builder.
{"go1.14.55", "freebsd-amd64", "freebsd-amd64-11_1"},
{"go1.14.55", "freebsd-386", "freebsd-386-11_1"},
// Go 1.15 RC 2+ starts to use the the FreeBSD 11.2 builder.
{"go1.15rc2", "freebsd-amd64", "freebsd-amd64-11_2"},
{"go1.15rc2", "freebsd-386", "freebsd-386-11_2"},
Expand Down
108 changes: 17 additions & 91 deletions dashboard/builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
// syntax entirely. This is a first draft.
var slowBotAliases = map[string]string{
// Known missing builders:
"darwin-arm": "", // TODO(golang.org/issue/37611): Remove once port is removed.
"ios-amd64": "", // There is no builder for the iOS Simulator. See issues 42100 and 42177.
"windows-arm64": "", // TODO(golang.org/issue/42604): Add builder for windows/arm64.

Expand All @@ -40,7 +39,6 @@ var slowBotAliases = map[string]string{
"arm": "linux-arm",
"arm64": "linux-arm64-packet",
"darwin": "darwin-amd64-10_14",
"darwin-386": "darwin-386-10_14", // TODO(golang.org/issue/37610): Remove when Go 1.14 is no longer supported.
"darwin-amd64": "darwin-amd64-10_14",
"darwin-arm64": "darwin-arm64-11_0-toothrot",
"ios-arm64": "ios-arm64-corellium",
Expand Down Expand Up @@ -298,24 +296,6 @@ var Hosts = map[string]*HostConfig{
env: []string{"GOROOT_BOOTSTRAP=/usr/local/go"},
OwnerGithub: "4a6f656c",
},
"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",
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-11_1-big": &HostConfig{
VMImage: "freebsd-amd64-111-b",
Notes: "Same as host-freebsd-11_1, but on n1-highcpu-16",
machineType: "n1-highcpu-16", // 16 vCPUs, 14.4 GB mem
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-11_2": &HostConfig{
VMImage: "freebsd-amd64-112",
Notes: "FreeBSD 11.2; GCE VM is built from script in build/env/freebsd-amd64",
Expand All @@ -332,6 +312,14 @@ var Hosts = map[string]*HostConfig{
goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/go1.4-freebsd-amd64.tar.gz",
SSHUsername: "gopher",
},
"host-freebsd-12_0-big": &HostConfig{
VMImage: "freebsd-amd64-120-v1",
Notes: "Same as host-freebsd-12_0, but on n1-highcpu-16",
machineType: "n1-highcpu-16", // 16 vCPUs, 14.4 GB mem
buildletURLTmpl: "https://storage.googleapis.com/$BUCKET/buildlet.freebsd-amd64",
goBootstrapURLTmpl: "https://storage.googleapis.com/$BUCKET/go1.4-freebsd-amd64.tar.gz",
SSHUsername: "gopher",
},
"host-netbsd-amd64-9_0": &HostConfig{
VMImage: "netbsd-amd64-9-0-2019q4",
Notes: "NetBSD 9.0; GCE VM is built from script in build/env/netbsd-amd64",
Expand Down Expand Up @@ -472,19 +460,9 @@ var Hosts = map[string]*HostConfig{
OwnerGithub: "zx2c4",
env: []string{"GOROOT_BOOTSTRAP=C:\\Program Files (Arm)\\Go"},
},
"host-darwin-10_11": &HostConfig{
IsReverse: true,
ExpectNum: 3,
Notes: "MacStadium OS X 10.11 VM under VMWare ESXi",
env: []string{
"GOROOT_BOOTSTRAP=/Users/gopher/go1.4",
},
SSHUsername: "gopher",
HermeticReverse: false, // TODO: make it so, like 10.12
},
"host-darwin-10_12": &HostConfig{
IsReverse: true,
ExpectNum: 4,
ExpectNum: 5,
Notes: "MacStadium OS X 10.12 VM under VMWare ESXi",
env: []string{
"GOROOT_BOOTSTRAP=/Users/gopher/go1.4",
Expand All @@ -494,7 +472,7 @@ var Hosts = map[string]*HostConfig{
},
"host-darwin-10_14": &HostConfig{
IsReverse: true,
ExpectNum: 6,
ExpectNum: 7,
Notes: "MacStadium macOS Mojave (10.14) VM under VMWare ESXi",
env: []string{
"GOROOT_BOOTSTRAP=/Users/gopher/goboot", // Go 1.12.1
Expand All @@ -504,7 +482,7 @@ var Hosts = map[string]*HostConfig{
},
"host-darwin-10_15": &HostConfig{
IsReverse: true,
ExpectNum: 6,
ExpectNum: 7,
Notes: "MacStadium macOS Catalina (10.15) VM under VMWare ESXi",
env: []string{
"GOROOT_BOOTSTRAP=/Users/gopher/goboot", // Go 1.12.1
Expand Down Expand Up @@ -1488,19 +1466,6 @@ func explicitTrySet(projs ...string) func(proj, branch, goBranch string) bool {
}

func init() {
addBuilder(BuildConfig{
Name: "freebsd-amd64-11_1",
HostType: "host-freebsd-11_1",
tryBot: nil,
buildsRepo: func(repo, branch, goBranch string) bool {
// This builder is unfortunately still used by Go 1.14 and 1.13,
// so keep it around a bit longer. See golang.org/issue/40563.
// Test relevant Go versions so that we're better informed.
return atMostGo1(goBranch, 14) && buildRepoByDefault(repo)
},
distTestAdjust: fasterTrybots,
numTryTestHelpers: 4,
})
addBuilder(BuildConfig{
Name: "freebsd-amd64-11_2",
HostType: "host-freebsd-11_2",
Expand All @@ -1526,19 +1491,7 @@ func init() {
})
addBuilder(BuildConfig{
Name: "freebsd-amd64-race",
HostType: "host-freebsd-11_1-big", // TODO(golang.org/issue/40562): Update to newer FreeBSD.
})
addBuilder(BuildConfig{
Name: "freebsd-386-11_1",
HostType: "host-freebsd-11_1",
distTestAdjust: noTestDirAndNoReboot,
buildsRepo: func(repo, branch, goBranch string) bool {
// This builder is unfortunately still used by Go 1.14 and 1.13,
// so keep it around a bit longer. See golang.org/issue/40563.
// Test relevant Go versions so that we're better informed.
return atMostGo1(goBranch, 14) && buildRepoByDefault(repo)
},
env: []string{"GOARCH=386", "GOHOSTARCH=386"},
HostType: "host-freebsd-12_0-big",
})
addBuilder(BuildConfig{
Name: "freebsd-386-11_2",
Expand Down Expand Up @@ -1578,7 +1531,7 @@ func init() {
Notes: "GO386=387",
buildsRepo: func(repo, branch, goBranch string) bool {
// GO386=387 is removed in Go 1.16 (golang.org/issue/40255).
// It's still supported in Go 1.15 and 1.14.
// It's still supported in Go 1.15.
return atMostGo1(goBranch, 15) && (repo == "go" || repo == "crypto")
},
HostType: "host-linux-jessie",
Expand Down Expand Up @@ -1645,7 +1598,7 @@ func init() {
addMiscCompile := func(suffix, rx string) { addMiscCompileGo1(0, suffix, rx) }

addMiscCompile("-linuxarm", "^linux-arm") // 2: arm, arm64
addMiscCompile("-darwin", "^darwin-(386|amd64)$") // 1: amd64 (in Go 1.14: 386, amd64)
addMiscCompile("-darwin", "^darwin-(386|amd64)$") // 1: amd64
addMiscCompileGo1(16, "-darwinarm64", "^darwin-arm64$") // 1: arm64 (for Go 1.16 and newer)
addMiscCompile("-mips", "^linux-mips") // 4: mips, mipsle, mips64, mips64le
addMiscCompile("-ppc", "^(linux-ppc64|aix-)") // 3: linux-ppc64{,le}, aix-ppc64
Expand Down Expand Up @@ -2014,7 +1967,7 @@ func init() {
HostType: "host-openbsd-386-62",
distTestAdjust: noTestDirAndNoReboot,
buildsRepo: func(repo, branch, goBranch string) bool {
// This builder is unfortunately still used by Go 1.15 and 1.14,
// This builder is unfortunately still used by Go 1.15,
// so keep it around a bit longer. See golang.org/issue/42426.
return atMostGo1(goBranch, 15) && buildRepoByDefault(repo)
},
Expand All @@ -2031,7 +1984,7 @@ func init() {
HostType: "host-openbsd-amd64-62",
distTestAdjust: noTestDirAndNoReboot,
buildsRepo: func(repo, branch, goBranch string) bool {
// This builder is unfortunately still used by Go 1.15 and 1.14,
// This builder is unfortunately still used by Go 1.15,
// so keep it around a bit longer. See golang.org/issue/42426.
return atMostGo1(goBranch, 15) && buildRepoByDefault(repo)
},
Expand Down Expand Up @@ -2265,29 +2218,6 @@ func init() {
"GOARM=7",
"GO_TEST_TIMEOUT_SCALE=3"},
})
addBuilder(BuildConfig{
Name: "darwin-amd64-10_11",
HostType: "host-darwin-10_11",
tryBot: nil, // disabled until Macs fixed; https://golang.org/issue/23859
buildsRepo: func(repo, branch, goBranch string) bool {
// Go 1.14 is the last release that will run on macOS 10.11 El Capitan.
// (See https://golang.org/doc/go1.14#darwin.)
return repo == "go" && atMostGo1(branch, 14)
},
distTestAdjust: macTestPolicy,
numTryTestHelpers: 3,
})
addBuilder(BuildConfig{
Name: "darwin-386-10_14",
HostType: "host-darwin-10_14",
distTestAdjust: macTestPolicy,
buildsRepo: func(repo, branch, goBranch string) bool {
// Go 1.14 is the last release that will support 32-bit binaries on macOS (darwin/386).
// (See https://golang.org/doc/go1.14#darwin.)
return repo == "go" && atMostGo1(branch, 14)
},
env: []string{"GOARCH=386", "GOHOSTARCH=386"},
})
addBuilder(BuildConfig{
Name: "darwin-amd64-10_12",
HostType: "host-darwin-10_12",
Expand Down Expand Up @@ -2664,18 +2594,14 @@ func init() {
},
buildsRepo: func(repo, branch, goBranch string) bool {
switch repo {
case "net":
// The x/net package wasn't working in Go 1.12; AIX folk plan to have
// it ready by Go 1.13. See https://golang.org/issue/31564#issuecomment-484786144
return atLeastGo1(branch, 13) && atLeastGo1(goBranch, 13)
case "tools", "tour", "website":
// The PATH on this builder is misconfigured in a way that causes
// any test that executes a 'go' command as a subprocess to fail.
// (https://golang.org/issue/31567).
// Skip affected repos until the builder is fixed.
return false
}
return atLeastGo1(branch, 12) && atLeastGo1(goBranch, 12) && buildRepoByDefault(repo)
return buildRepoByDefault(repo)
},
})
addBuilder(BuildConfig{
Expand Down
Loading

0 comments on commit 43ea694

Please sign in to comment.