Skip to content

Commit 208db0b

Browse files
rscgopherbot
authored andcommitted
dashboard: make website be linux-amd64-only, like vulndb
Also make vulndb run linux-amd64-race. (Everyone should run the race detector!) Also make mobile run on linux-amd64 trybot. It already runs on linux-amd64 post-commit. Also make mobile run on linux-amd64-race trybot. (Everyone should run the race detector!) Also run linux-amd64-longtest-race post-commit on every repo, just like linux-amd64-longtest does. Change-Id: I959d8cc2128ae4050b63451ed1e1cf047df172a8 Reviewed-on: https://go-review.googlesource.com/c/build/+/480935 Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]> Run-TryBot: Russ Cox <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Reviewed-by: David Chase <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 57dc67d commit 208db0b

File tree

2 files changed

+52
-23
lines changed

2 files changed

+52
-23
lines changed

dashboard/builders.go

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,9 +1263,7 @@ func buildRepoByDefault(repo string) bool {
12631263
case "go":
12641264
// Build the main Go repository by default.
12651265
return true
1266-
case "mobile", "exp", "build", "vulndb", "pkgsite-metrics":
1267-
// Don't build the above repos by default.
1268-
//
1266+
case "build", "exp", "mobile", "pkgsite-metrics", "vulndb", "website":
12691267
// Builders need to explicitly opt-in to build these repos.
12701268
return false
12711269
default:
@@ -1275,11 +1273,21 @@ func buildRepoByDefault(repo string) bool {
12751273
}
12761274

12771275
var (
1278-
defaultPlusExp = defaultPlus("exp")
1279-
defaultPlusExpBuild = defaultPlus("exp", "build")
1280-
defaultPlusExpBuildVulnDB = defaultPlus("exp", "build", "vulndb")
1276+
defaultPlusExp = defaultPlus("exp")
1277+
defaultPlusExpBuild = defaultPlus("exp", "build")
12811278
)
12821279

1280+
// linux-amd64 and linux-amd64-race build all the repos.
1281+
// Many team repos are disabled on other builders because
1282+
// we only run them on servers and don't need to test the
1283+
// many different architectures that Go supports (like ios).
1284+
func linuxAmd64Repos(repo, branch, goBranch string) bool {
1285+
if repo == "pkgsite-metrics" {
1286+
return atLeastGo1(goBranch, 20)
1287+
}
1288+
return true
1289+
}
1290+
12831291
// defaultPlus returns a buildsRepo policy function that returns true for all
12841292
// all the repos listed, plus the default repos.
12851293
func defaultPlus(repos ...string) func(repo, branch, goBranch string) bool {
@@ -1560,16 +1568,10 @@ func init() {
15601568
env: []string{"GOARCH=386", "GOHOSTARCH=386", "GO386=softfloat"},
15611569
})
15621570
addBuilder(BuildConfig{
1563-
Name: "linux-amd64",
1564-
HostType: "host-linux-amd64-bullseye",
1565-
tryBot: defaultTrySet(),
1566-
buildsRepo: func(repo, branch, goBranch string) bool {
1567-
b := defaultPlusExpBuildVulnDB(repo, branch, goBranch)
1568-
if repo == "pkgsite-metrics" {
1569-
b = atLeastGo1(goBranch, 20)
1570-
}
1571-
return b
1572-
},
1571+
Name: "linux-amd64",
1572+
HostType: "host-linux-amd64-bullseye",
1573+
tryBot: defaultTrySet(),
1574+
buildsRepo: linuxAmd64Repos,
15731575
env: []string{
15741576
"GO_DISABLE_OUTBOUND_NETWORK=1",
15751577
},
@@ -1779,7 +1781,7 @@ func init() {
17791781
Name: "linux-amd64-race",
17801782
HostType: "host-linux-amd64-bullseye",
17811783
tryBot: defaultTrySet(),
1782-
buildsRepo: defaultPlusExpBuild,
1784+
buildsRepo: linuxAmd64Repos,
17831785
distTestAdjust: fasterTrybots,
17841786
numTestHelpers: 1,
17851787
numTryTestHelpers: 5,
@@ -1916,12 +1918,9 @@ func init() {
19161918
HostType: "host-linux-amd64-bullseye",
19171919
Notes: "Debian Bullseye with the race detector enabled and go test -short=false",
19181920
buildsRepo: func(repo, branch, goBranch string) bool {
1919-
b := buildRepoByDefault(repo)
1920-
if repo != "go" && !(branch == "master" && goBranch == "master") {
1921-
// For golang.org/x repos, don't test non-latest versions.
1922-
b = false
1923-
}
1924-
return b
1921+
// Test all repos, ignoring buildRepoByDefault.
1922+
// For golang.org/x repos, don't test non-latest versions.
1923+
return repo == "go" || (branch == "master" && goBranch == "master")
19251924
},
19261925
env: []string{
19271926
"GO_TEST_TIMEOUT_SCALE=5", // Inherited from the longtest builder.

dashboard/builders_test.go

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ func TestTrybots(t *testing.T) {
316316
want: []string{
317317
"android-amd64-emu",
318318
"linux-amd64-androidemu",
319+
"linux-amd64",
320+
"linux-amd64-race",
319321
},
320322
},
321323
{
@@ -379,6 +381,22 @@ func TestTrybots(t *testing.T) {
379381
"windows-amd64-2016",
380382
},
381383
},
384+
{
385+
repo: "vulndb",
386+
branch: "master",
387+
want: []string{
388+
"linux-amd64",
389+
"linux-amd64-race",
390+
},
391+
},
392+
{
393+
repo: "website",
394+
branch: "master",
395+
want: []string{
396+
"linux-amd64",
397+
"linux-amd64-race",
398+
},
399+
},
382400
}
383401
for i, tt := range tests {
384402
if tt.branch == "" || tt.repo == "" {
@@ -431,6 +449,18 @@ func TestPostSubmit(t *testing.T) {
431449
want: []string{
432450
"linux-amd64",
433451
"linux-amd64-longtest",
452+
"linux-amd64-race",
453+
"linux-amd64-longtest-race",
454+
},
455+
},
456+
{
457+
repo: "website",
458+
branch: "master",
459+
want: []string{
460+
"linux-amd64",
461+
"linux-amd64-longtest",
462+
"linux-amd64-race",
463+
"linux-amd64-longtest-race",
434464
},
435465
},
436466
}

0 commit comments

Comments
 (0)