dashboard: limit darwin-amd64-10_14 to build at most Go 1.20

For golang/go#58008.

Change-Id: Iadd360a5cf5efa7e978c0267dacc0f38594ef607
Reviewed-on: https://go-review.googlesource.com/c/build/+/463577
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
diff --git a/dashboard/builders.go b/dashboard/builders.go
index 8dd6d13..17658ef 100644
--- a/dashboard/builders.go
+++ b/dashboard/builders.go
@@ -2433,7 +2433,9 @@
 		Name:           "darwin-amd64-10_14",
 		HostType:       "host-darwin-amd64-10_14-aws",
 		distTestAdjust: macTestPolicy,
-		buildsRepo:     defaultPlusExp,
+		buildsRepo: func(repo, branch, goBranch string) bool {
+			return defaultPlusExp(repo, branch, goBranch) && atMostGo1(goBranch, 20)
+		},
 	})
 	addBuilder(BuildConfig{
 		Name:           "darwin-amd64-10_15",
diff --git a/dashboard/builders_test.go b/dashboard/builders_test.go
index 0ab7ab4..cad0624 100644
--- a/dashboard/builders_test.go
+++ b/dashboard/builders_test.go
@@ -513,7 +513,7 @@
 		{b("linux-amd64-longtest", "exp"), onlyPost},
 		{b("windows-386-2008", "exp"), both},
 		{b("windows-amd64-2016", "exp"), both},
-		{b("darwin-amd64-10_14", "exp"), onlyPost},
+		{b("darwin-amd64-10_14", "exp"), none},
 		{b("darwin-amd64-10_15", "exp"), onlyPost},
 		// ... but not on most others:
 		{b("freebsd-386-12_3", "exp"), none},
@@ -545,11 +545,15 @@
 		{b("android-386-emu", "build"), none},
 		{b("android-amd64-emu", "build"), none},
 
-		// Only use latest macOS for subrepos, and only amd64:
-		{b("darwin-amd64-10_14", "net"), onlyPost},
-
 		{b("darwin-amd64-10_15", "go"), onlyPost},
-		{b("darwin-amd64-10_14", "go"), onlyPost},
+
+		// Go 1.20 is the last release with macOS 10.14 support:
+		{b("darwin-amd64-10_14", "go"), none},
+		{b("darwin-amd64-10_14@go1.21", "go"), none},
+		{b("darwin-amd64-10_14@go1.20", "go"), onlyPost},
+		{b("darwin-amd64-10_14", "net"), none},
+		{b("darwin-amd64-10_14@go1.21", "net"), none},
+		{b("darwin-amd64-10_14@go1.20", "net"), onlyPost},
 
 		// plan9 only lived at master. We didn't support any past releases.
 		// But it's off for now as it's always failing.