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 <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
diff --git a/dashboard/builders.go b/dashboard/builders.go
index d500082..6184bfe 100644
--- a/dashboard/builders.go
+++ b/dashboard/builders.go
@@ -2902,7 +2902,7 @@
 		panic(fmt.Sprintf("build config %q host type inconsistent (must be Reverse, Image, or VM)", c.Name))
 	}
 
-	if migration.BuildersPortedToLUCI[c.Name] && migration.StopPortedBuilder(c.Name) {
+	if migration.BuildersPortedToLUCI[c.Name] && migration.StopPortedBuilder {
 		c.buildsRepo = func(_, _, _ string) bool { return false }
 		c.Notes = "Unavailable in the coordinator. Use LUCI (https://go.dev/wiki/LUCI) instead."
 	}
diff --git a/dashboard/builders_test.go b/dashboard/builders_test.go
index e2d74f5..5314d4b 100644
--- a/dashboard/builders_test.go
+++ b/dashboard/builders_test.go
@@ -100,8 +100,7 @@
 				//"linux-amd64-newinliner",
 				//"linux-amd64-race",
 				//"linux-arm64",
-				"openbsd-amd64-72",
-				// Stopped.
+				//"openbsd-amd64-72",
 				//"windows-386-2016",
 				//"windows-amd64-2016",
 			},
@@ -117,8 +116,7 @@
 				//"linux-amd64-boringcrypto",
 				//"linux-amd64-race",
 				//"linux-arm64",
-				"openbsd-amd64-72",
-				// Stopped.
+				//"openbsd-amd64-72",
 				//"windows-386-2016",
 				//"windows-amd64-2016",
 
@@ -141,8 +139,7 @@
 				//"linux-amd64-boringcrypto",
 				//"linux-amd64-race",
 				//"linux-arm64",
-				"openbsd-amd64-72",
-				// Stopped.
+				//"openbsd-amd64-72",
 				//"windows-386-2016",
 				//"windows-amd64-2016",
 
@@ -180,8 +177,8 @@
 				//"linux-arm64",
 				"netbsd-amd64-9_3",
 				"openbsd-386-72",
-				"openbsd-amd64-72",
 				// Stopped.
+				//"openbsd-amd64-72",
 				//"windows-386-2016",
 				//"windows-amd64-2016",
 			},
@@ -673,7 +670,7 @@
 			}
 			gotPost := bc.BuildsRepoPostSubmit(tt.br.repo, tt.br.branch, tt.br.goBranch)
 			if tt.want&isBuilder != 0 && !gotPost {
-				if stopped := migration.BuildersPortedToLUCI[bc.Name] && migration.StopPortedBuilder(bc.Name); stopped {
+				if stopped := migration.BuildersPortedToLUCI[bc.Name] && migration.StopPortedBuilder; stopped {
 					t.Logf("not a post-submit builder because it's intentionally stopped")
 				} else {
 					t.Errorf("not a post-submit builder, but expected")
@@ -685,7 +682,7 @@
 
 			gotTry := bc.BuildsRepoTryBot(tt.br.repo, tt.br.branch, tt.br.goBranch)
 			if tt.want&isTrybot != 0 && !gotTry {
-				if stopped := migration.BuildersPortedToLUCI[bc.Name] && migration.StopPortedBuilder(bc.Name); stopped {
+				if stopped := migration.BuildersPortedToLUCI[bc.Name] && migration.StopPortedBuilder; stopped {
 					t.Logf("not a trybot builder because it's intentionally stopped")
 				} else {
 					t.Errorf("not trybot, but expected")
@@ -740,7 +737,7 @@
 }
 
 func TestShouldRunDistTest(t *testing.T) {
-	if stopped := migration.BuildersPortedToLUCI["linux-amd64"] && migration.StopPortedBuilder("linux-amd64"); stopped {
+	if stopped := migration.BuildersPortedToLUCI["linux-amd64"] && migration.StopPortedBuilder; stopped {
 		t.Skip("test can't be used because linux builders are stopped")
 	}
 
diff --git a/internal/migration/migration.go b/internal/migration/migration.go
index ab6b87a..5adfe01 100644
--- a/internal/migration/migration.go
+++ b/internal/migration/migration.go
@@ -6,17 +6,19 @@
 // now-legacy build infrastructure to the new LUCI build infrastructure.
 package migration
 
-import "strings"
-
 const (
 	StopLegacyMiscCompileTryBots = true
 	StopInternalModuleProxy      = true
+
+	// StopPortedBuilder controls whether ported builders should be stopped,
+	// instead of just made invisible in the web UI.
+	StopPortedBuilder = true
 )
 
 // BuildersPortedToLUCI lists coordinator builders that have been ported
 // over to LUCI and don't need to continue to run. Their results will be
 // hidden from the build.golang.org page and new builds won't be started
-// if StopPortedBuilder (below) returns true.
+// if StopPortedBuilder (above) is true.
 //
 // See go.dev/issue/65913
 // and go.dev/issue/63471.
@@ -87,24 +89,3 @@
 	"wasip1-wasm-wasmtime": true, // Available as https://ci.chromium.org/p/golang/builders/ci/gotip-wasip1-wasm_wasmtime.
 	"wasip1-wasm-wazero":   true, // Available as https://ci.chromium.org/p/golang/builders/ci/gotip-wasip1-wasm_wazero.
 }
-
-// StopPortedBuilder reports whether the named ported builder should be stopped,
-// instead of just made invisible in the web UI.
-func StopPortedBuilder(builderName string) (stop bool) {
-	nameKeyList := []string{
-		"darwin-",
-		"linux-",
-		"windows-",
-		"linux-loong64",
-		"linux-ppc64",
-		"-wasm-",
-	}
-
-	for _, key := range nameKeyList {
-		if strings.Contains(builderName, key) {
-			return true
-		}
-	}
-
-	return false
-}