Skip to content

Commit 5f4836d

Browse files
dmitshurgopherbot
authored andcommitted
dashboard: stop running remaining ported builders
The gradual shutdown has gone smoothly and can be applied to a couple more remaining builders that have been ported. Fixes golang/go#67761. Change-Id: I0d772073ade99a0a55d4020432d56d9bd41aef12 Reviewed-on: https://go-review.googlesource.com/c/build/+/601237 Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Cherry Mui <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]>
1 parent 84fee16 commit 5f4836d

File tree

3 files changed

+13
-35
lines changed

3 files changed

+13
-35
lines changed

dashboard/builders.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2902,7 +2902,7 @@ func addBuilder(c BuildConfig) {
29022902
panic(fmt.Sprintf("build config %q host type inconsistent (must be Reverse, Image, or VM)", c.Name))
29032903
}
29042904

2905-
if migration.BuildersPortedToLUCI[c.Name] && migration.StopPortedBuilder(c.Name) {
2905+
if migration.BuildersPortedToLUCI[c.Name] && migration.StopPortedBuilder {
29062906
c.buildsRepo = func(_, _, _ string) bool { return false }
29072907
c.Notes = "Unavailable in the coordinator. Use LUCI (https://go.dev/wiki/LUCI) instead."
29082908
}

dashboard/builders_test.go

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ func TestTrybots(t *testing.T) {
100100
//"linux-amd64-newinliner",
101101
//"linux-amd64-race",
102102
//"linux-arm64",
103-
"openbsd-amd64-72",
104-
// Stopped.
103+
//"openbsd-amd64-72",
105104
//"windows-386-2016",
106105
//"windows-amd64-2016",
107106
},
@@ -117,8 +116,7 @@ func TestTrybots(t *testing.T) {
117116
//"linux-amd64-boringcrypto",
118117
//"linux-amd64-race",
119118
//"linux-arm64",
120-
"openbsd-amd64-72",
121-
// Stopped.
119+
//"openbsd-amd64-72",
122120
//"windows-386-2016",
123121
//"windows-amd64-2016",
124122

@@ -141,8 +139,7 @@ func TestTrybots(t *testing.T) {
141139
//"linux-amd64-boringcrypto",
142140
//"linux-amd64-race",
143141
//"linux-arm64",
144-
"openbsd-amd64-72",
145-
// Stopped.
142+
//"openbsd-amd64-72",
146143
//"windows-386-2016",
147144
//"windows-amd64-2016",
148145

@@ -180,8 +177,8 @@ func TestTrybots(t *testing.T) {
180177
//"linux-arm64",
181178
"netbsd-amd64-9_3",
182179
"openbsd-386-72",
183-
"openbsd-amd64-72",
184180
// Stopped.
181+
//"openbsd-amd64-72",
185182
//"windows-386-2016",
186183
//"windows-amd64-2016",
187184
},
@@ -673,7 +670,7 @@ func TestBuilderConfig(t *testing.T) {
673670
}
674671
gotPost := bc.BuildsRepoPostSubmit(tt.br.repo, tt.br.branch, tt.br.goBranch)
675672
if tt.want&isBuilder != 0 && !gotPost {
676-
if stopped := migration.BuildersPortedToLUCI[bc.Name] && migration.StopPortedBuilder(bc.Name); stopped {
673+
if stopped := migration.BuildersPortedToLUCI[bc.Name] && migration.StopPortedBuilder; stopped {
677674
t.Logf("not a post-submit builder because it's intentionally stopped")
678675
} else {
679676
t.Errorf("not a post-submit builder, but expected")
@@ -685,7 +682,7 @@ func TestBuilderConfig(t *testing.T) {
685682

686683
gotTry := bc.BuildsRepoTryBot(tt.br.repo, tt.br.branch, tt.br.goBranch)
687684
if tt.want&isTrybot != 0 && !gotTry {
688-
if stopped := migration.BuildersPortedToLUCI[bc.Name] && migration.StopPortedBuilder(bc.Name); stopped {
685+
if stopped := migration.BuildersPortedToLUCI[bc.Name] && migration.StopPortedBuilder; stopped {
689686
t.Logf("not a trybot builder because it's intentionally stopped")
690687
} else {
691688
t.Errorf("not trybot, but expected")
@@ -740,7 +737,7 @@ func TestBuildsRepoAtAllImplicitGoBranch(t *testing.T) {
740737
}
741738

742739
func TestShouldRunDistTest(t *testing.T) {
743-
if stopped := migration.BuildersPortedToLUCI["linux-amd64"] && migration.StopPortedBuilder("linux-amd64"); stopped {
740+
if stopped := migration.BuildersPortedToLUCI["linux-amd64"] && migration.StopPortedBuilder; stopped {
744741
t.Skip("test can't be used because linux builders are stopped")
745742
}
746743

internal/migration/migration.go

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,19 @@
66
// now-legacy build infrastructure to the new LUCI build infrastructure.
77
package migration
88

9-
import "strings"
10-
119
const (
1210
StopLegacyMiscCompileTryBots = true
1311
StopInternalModuleProxy = true
12+
13+
// StopPortedBuilder controls whether ported builders should be stopped,
14+
// instead of just made invisible in the web UI.
15+
StopPortedBuilder = true
1416
)
1517

1618
// BuildersPortedToLUCI lists coordinator builders that have been ported
1719
// over to LUCI and don't need to continue to run. Their results will be
1820
// hidden from the build.golang.org page and new builds won't be started
19-
// if StopPortedBuilder (below) returns true.
21+
// if StopPortedBuilder (above) is true.
2022
//
2123
// See go.dev/issue/65913
2224
// and go.dev/issue/63471.
@@ -87,24 +89,3 @@ var BuildersPortedToLUCI = map[string]bool{
8789
"wasip1-wasm-wasmtime": true, // Available as https://ci.chromium.org/p/golang/builders/ci/gotip-wasip1-wasm_wasmtime.
8890
"wasip1-wasm-wazero": true, // Available as https://ci.chromium.org/p/golang/builders/ci/gotip-wasip1-wasm_wazero.
8991
}
90-
91-
// StopPortedBuilder reports whether the named ported builder should be stopped,
92-
// instead of just made invisible in the web UI.
93-
func StopPortedBuilder(builderName string) (stop bool) {
94-
nameKeyList := []string{
95-
"darwin-",
96-
"linux-",
97-
"windows-",
98-
"linux-loong64",
99-
"linux-ppc64",
100-
"-wasm-",
101-
}
102-
103-
for _, key := range nameKeyList {
104-
if strings.Contains(builderName, key) {
105-
return true
106-
}
107-
}
108-
109-
return false
110-
}

0 commit comments

Comments
 (0)