Skip to content

Commit

Permalink
dashboard: remove x/build special case for Go 1.20
Browse files Browse the repository at this point in the history
CL 556455 incurred some complexity to opt x/build out of testing with
Go 1.20 sooner than it would've happened automatically. This complexity
is no longer needed since Go 1.20 is fully unsupported now. Remove it.

Updates golang/go#64169.

Change-Id: I99128b9294c50439ed95a91b968a65f18d8fec03
Reviewed-on: https://go-review.googlesource.com/c/build/+/564134
Commit-Queue: Dmitri Shuralyov <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Jonathan Amsterdam <[email protected]>
Auto-Submit: Dmitri Shuralyov <[email protected]>
  • Loading branch information
dmitshur authored and gopherbot committed Feb 14, 2024
1 parent 3d1fda8 commit eec8b23
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 29 deletions.
12 changes: 1 addition & 11 deletions dashboard/builders.go
Original file line number Diff line number Diff line change
Expand Up @@ -1299,24 +1299,14 @@ func buildRepoByDefault(repo string) bool {

var (
defaultPlusExp = defaultPlus("exp")
defaultPlusExpBuild = func(repo, branch, goBranch string) bool {
if repo == "build" && !atLeastGo1(goBranch, 21) {
// x/build stopped supporting Go 1.20 sooner.
return false
}
return defaultPlus("exp", "build")(repo, branch, goBranch)
}
defaultPlusExpBuild = defaultPlus("exp", "build")
)

// linux-amd64 and linux-amd64-race build all the repos.
// Many team repos are disabled on other builders because
// we only run them on servers and don't need to test the
// many different architectures that Go supports (like ios).
func linuxAmd64Repos(repo, branch, goBranch string) bool {
if repo == "build" && !atLeastGo1(goBranch, 21) {
// x/build stopped supporting Go 1.20 sooner.
return false
}
return true
}

Expand Down
20 changes: 7 additions & 13 deletions dashboard/builders_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -722,13 +722,10 @@ func TestBuilderConfig(t *testing.T) {
// and darwin-amd64 and perhaps windows-amd64 (for stuff like gomote).
// No need for any other operating systems to use it.
{b("linux-amd64", "build"), both},
{b("[email protected]", "build"), none},
{b("linux-amd64-longtest", "build"), onlyPost},
{b("[email protected]", "build"), none},
{b("windows-amd64-2016", "build"), both},
{b("darwin-amd64-10_14", "build"), none},
{b("darwin-amd64-10_15", "build"), onlyPost},
{b("[email protected]", "build"), none},
{b("linux-amd64-fedora", "build"), none},
{b("linux-amd64-clang", "build"), none},
{b("linux-amd64-sid", "build"), none},
Expand Down Expand Up @@ -1216,18 +1213,15 @@ func TestHostConfigIsVM(t *testing.T) {

func TestDefaultPlusExpBuild(t *testing.T) {
for _, tc := range []struct {
repo string
goBranch string
want bool
repo string
want bool
}{
{"exp", "master", true},
{"build", "master", true},
{"build", "release-branch.go1.21", true},
{"build", "release-branch.go1.20", false},
{"anything", "master", true},
{"vulndb", "master", false},
{"exp", true},
{"build", true},
{"anything", true},
{"vulndb", false},
} {
got := defaultPlusExpBuild(tc.repo, "", tc.goBranch)
got := defaultPlusExpBuild(tc.repo, "", "")
if got != tc.want {
t.Errorf("%s: got %t, want %t", tc.repo, got, tc.want)
}
Expand Down
5 changes: 0 additions & 5 deletions maintner/maintnerd/maintapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,6 @@ func tryWorkItem(
w.GoBranch = []string{"master"}
w.GoVersion = []*apipb.MajorMinor{&develVersion}
for _, r := range supportedReleases {
if r.BranchName == "release-branch.go1.20" && w.Project == "build" {
// x/build stopped supporting Go 1.20 sooner.
continue
}

w.GoCommit = append(w.GoCommit, r.BranchCommit)
w.GoBranch = append(w.GoBranch, r.BranchName)
w.GoVersion = append(w.GoVersion, &apipb.MajorMinor{Major: r.Major, Minor: r.Minor})
Expand Down

0 comments on commit eec8b23

Please sign in to comment.