From 4a5d2d0099bf57b1e3bedaa86beba65b05c7df20 Mon Sep 17 00:00:00 2001 From: Michael Anthony Knyszek Date: Thu, 2 Feb 2023 19:15:56 +0000 Subject: [PATCH] dashboard: make post-submit subrepo misc-compile builders into trybots This change turns the experimental post-submit subrepo misc-compile builders into proper misc-compile trybots. Fixes golang/go#58163. Change-Id: I4ca68ea89bb26370e7da3baa104a12f3f063399f Reviewed-on: https://go-review.googlesource.com/c/build/+/464958 Reviewed-by: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov TryBot-Result: Gopher Robot Run-TryBot: Michael Knyszek --- dashboard/builders.go | 55 ++++--------------------------- dashboard/builders_test.go | 66 ++++++++++++++++++++------------------ 2 files changed, 41 insertions(+), 80 deletions(-) diff --git a/dashboard/builders.go b/dashboard/builders.go index 84faf703ba..1f3a747c6a 100644 --- a/dashboard/builders.go +++ b/dashboard/builders.go @@ -1461,14 +1461,10 @@ func explicitTrySet(projs ...string) func(proj, branch, goBranch string) bool { // should use trybots based on the platform. func crossCompileBuildSet(goos, goarch string) func(proj, branch, goBranch string) bool { return func(proj, branch, goBranch string) bool { - if branch != "master" { - // TODO(#58163): Remove this once we finish testing misc-compile builders for subrepos. - return false + if proj != "go" && branch != "master" { + return false // #58311 } switch proj { - case "go": - // TODO(#58163): Remove this once we finish testing misc-compile builders for subrepos. - return false case "benchmarks": return goarch != "loong64" // #58306 case "build": @@ -1606,13 +1602,13 @@ func init() { addBuilder(BuildConfig{ Name: "misc-compile-" + platform, HostType: "host-linux-amd64-bullseye", - tryBot: onlyGo, + tryBot: crossCompileBuildSet(goos, goarch), env: append(extraEnv, "GO_DISABLE_OUTBOUND_NETWORK=1", "GOOS="+goos, "GOARCH="+goarch), tryOnly: true, MinimumGoVersion: v, CompileOnly: true, SkipSnapshot: true, - Notes: "Runs make.bash for " + platform + ", but doesn't run any tests." + alsoNote, + Notes: "Runs make.bash (or compile-only go test) for " + platform + ", but doesn't run any tests." + alsoNote, }) } // addMiscCompile adds a misc-compile TryBot @@ -1662,39 +1658,6 @@ func init() { addMiscCompileGo1(0, "linux", "arm", "-arm5", "GOARM=5") addMiscCompileGo1(20, "freebsd", "riscv64", "-go1.20") - tryNewMiscCompileForSubrepos("windows", "arm", "", 58163, nil) - tryNewMiscCompileForSubrepos("windows", "arm64", "", 58163, nil) - tryNewMiscCompileForSubrepos("darwin", "amd64", "", 58163, nil) - tryNewMiscCompileForSubrepos("darwin", "arm64", "", 58163, nil) - tryNewMiscCompileForSubrepos("linux", "mips", "", 58163, nil) - tryNewMiscCompileForSubrepos("linux", "mips64", "", 58163, nil) - tryNewMiscCompileForSubrepos("linux", "mipsle", "", 58163, nil) - tryNewMiscCompileForSubrepos("linux", "mips64le", "", 58163, nil) - tryNewMiscCompileForSubrepos("linux", "ppc64", "", 58163, nil) - tryNewMiscCompileForSubrepos("linux", "ppc64le", "", 58163, nil) - tryNewMiscCompileForSubrepos("aix", "ppc64", "", 58163, nil) - tryNewMiscCompileForSubrepos("freebsd", "386", "", 58163, nil) - tryNewMiscCompileForSubrepos("freebsd", "arm", "", 58163, nil) - tryNewMiscCompileForSubrepos("freebsd", "arm64", "", 58163, nil) - tryNewMiscCompileForSubrepos("netbsd", "386", "", 58163, nil) - tryNewMiscCompileForSubrepos("netbsd", "amd64", "", 58163, nil) - tryNewMiscCompileForSubrepos("netbsd", "arm", "", 58163, nil) - tryNewMiscCompileForSubrepos("netbsd", "arm64", "", 58163, nil) - tryNewMiscCompileForSubrepos("openbsd", "386", "", 58163, nil) - tryNewMiscCompileForSubrepos("openbsd", "arm", "", 58163, nil) - tryNewMiscCompileForSubrepos("openbsd", "arm64", "", 58163, nil) - tryNewMiscCompileForSubrepos("plan9", "386", "", 58163, nil) - tryNewMiscCompileForSubrepos("plan9", "amd64", "", 58163, nil) - tryNewMiscCompileForSubrepos("plan9", "arm", "", 58163, nil) - tryNewMiscCompileForSubrepos("solaris", "amd64", "", 58163, nil) - tryNewMiscCompileForSubrepos("illumos", "amd64", "", 58163, nil) - tryNewMiscCompileForSubrepos("dragonfly", "amd64", "", 58163, nil) - tryNewMiscCompileForSubrepos("linux", "loong64", "", 58163, nil) - tryNewMiscCompileForSubrepos("linux", "riscv64", "", 58163, nil) - tryNewMiscCompileForSubrepos("linux", "s390x", "", 58163, nil) - tryNewMiscCompileForSubrepos("linux", "arm", "", 58163, nil) - tryNewMiscCompileForSubrepos("linux", "arm", "-arm5", 58163, nil, "GOARM=5") - // TODO: Issue 25963, get the misc-compile trybots for Android/iOS. // Then consider subrepos too, so "mobile" can at least be included // as a misc-compile for ^android- and ^ios-. @@ -3103,22 +3066,18 @@ func addBuilder(c BuildConfig) { Builders[c.Name] = &c } -// tryNewMiscCompileForSubrepos is an intermediate step towards adding a real addMiscCompile TryBot -// for only subrepos. +// tryNewMiscCompile is an intermediate step towards adding a real addMiscCompile TryBot. // // It adds a post-submit-only builder with KnownIssue, GoDeps set to the provided values, // and runs on a limited set of branches to get test results without potential disruption // for contributors. It can be modified as needed when onboarding a misc-compile builder. -// -// TODO(#58163): This function is supposed to be for all repos, but while we set up misc-compile -// builders for subrepos we first only want to add it as a post-submit builder. -func tryNewMiscCompileForSubrepos(goos, goarch, extraSuffix string, knownIssue int, goDeps []string, extraEnv ...string) { +func tryNewMiscCompile(goos, goarch, extraSuffix string, knownIssue int, goDeps []string, extraEnv ...string) { if knownIssue == 0 { panic("tryNewMiscCompile: knownIssue parameter must be non-zero") } platform := goos + "-" + goarch + extraSuffix addBuilder(BuildConfig{ - Name: "misc-compile-" + platform + "-subrepo", + Name: "misc-compile-" + platform, HostType: "host-linux-amd64-bullseye", buildsRepo: crossCompileBuildSet(goos, goarch), KnownIssues: []int{knownIssue}, diff --git a/dashboard/builders_test.go b/dashboard/builders_test.go index 395d32d3e3..3a87a098fd 100644 --- a/dashboard/builders_test.go +++ b/dashboard/builders_test.go @@ -336,6 +336,40 @@ func TestTrybots(t *testing.T) { "openbsd-386-72", "openbsd-amd64-72", "windows-amd64-2016", + + "misc-compile-windows-arm", + "misc-compile-windows-arm64", + "misc-compile-darwin-amd64", + "misc-compile-darwin-arm64", + "misc-compile-linux-mips", + "misc-compile-linux-mips64", + "misc-compile-linux-mipsle", + "misc-compile-linux-mips64le", + "misc-compile-linux-ppc64", + "misc-compile-linux-ppc64le", + "misc-compile-aix-ppc64", + "misc-compile-freebsd-386", + "misc-compile-freebsd-arm", + "misc-compile-freebsd-arm64", + "misc-compile-netbsd-386", + "misc-compile-netbsd-amd64", + "misc-compile-netbsd-arm", + "misc-compile-netbsd-arm64", + "misc-compile-openbsd-386", + "misc-compile-openbsd-arm", + "misc-compile-openbsd-arm64", + "misc-compile-plan9-386", + "misc-compile-plan9-amd64", + "misc-compile-plan9-arm", + "misc-compile-solaris-amd64", + "misc-compile-illumos-amd64", + "misc-compile-dragonfly-amd64", + "misc-compile-linux-loong64", + "misc-compile-linux-riscv64", + "misc-compile-linux-s390x", + "misc-compile-linux-arm", + "misc-compile-linux-arm-arm5", + "misc-compile-freebsd-riscv64-go1.20", }, }, { @@ -397,38 +431,6 @@ func TestPostSubmit(t *testing.T) { want: []string{ "linux-amd64", "linux-amd64-longtest", - - "misc-compile-windows-arm-subrepo", - "misc-compile-windows-arm64-subrepo", - "misc-compile-darwin-amd64-subrepo", - "misc-compile-darwin-arm64-subrepo", - "misc-compile-linux-mips-subrepo", - "misc-compile-linux-mips64-subrepo", - "misc-compile-linux-mipsle-subrepo", - "misc-compile-linux-mips64le-subrepo", - "misc-compile-linux-ppc64-subrepo", - "misc-compile-linux-ppc64le-subrepo", - "misc-compile-freebsd-386-subrepo", - "misc-compile-freebsd-arm-subrepo", - "misc-compile-freebsd-arm64-subrepo", - "misc-compile-netbsd-386-subrepo", - "misc-compile-netbsd-amd64-subrepo", - "misc-compile-netbsd-arm-subrepo", - "misc-compile-netbsd-arm64-subrepo", - "misc-compile-openbsd-386-subrepo", - "misc-compile-openbsd-arm-subrepo", - "misc-compile-openbsd-arm64-subrepo", - "misc-compile-plan9-386-subrepo", - "misc-compile-plan9-amd64-subrepo", - "misc-compile-plan9-arm-subrepo", - "misc-compile-solaris-amd64-subrepo", - "misc-compile-illumos-amd64-subrepo", - "misc-compile-dragonfly-amd64-subrepo", - "misc-compile-linux-loong64-subrepo", - "misc-compile-linux-riscv64-subrepo", - "misc-compile-linux-s390x-subrepo", - "misc-compile-linux-arm-subrepo", - "misc-compile-linux-arm-arm5-subrepo", }, }, }