From efa30d4f1a7a56ba81dc5be6fcd684e52703108a Mon Sep 17 00:00:00 2001 From: Tim Vaillancourt Date: Fri, 14 Feb 2025 01:28:53 +0100 Subject: [PATCH] Simply changing GH Actions runner (#17788) Signed-off-by: Tim Vaillancourt --- test/ci_workflow_gen.go | 16 +++++++++++----- test/templates/cluster_endtoend_test.tpl | 2 +- test/templates/cluster_endtoend_test_docker.tpl | 2 +- test/templates/cluster_endtoend_test_mysql57.tpl | 2 +- test/templates/cluster_vitess_tester.tpl | 2 +- test/templates/unit_test.tpl | 2 +- 6 files changed, 16 insertions(+), 10 deletions(-) diff --git a/test/ci_workflow_gen.go b/test/ci_workflow_gen.go index bf42825d73c..a8f1a82e56f 100644 --- a/test/ci_workflow_gen.go +++ b/test/ci_workflow_gen.go @@ -33,6 +33,8 @@ const ( mysql80 mysqlVersion = "mysql80" mysql84 mysqlVersion = "mysql84" + cores16RunnerName = "gh-hosted-runners-16cores-1-24.04" + defaultRunnerName = "ubuntu-24.04" defaultMySQLVersion = mysql80 ) @@ -164,13 +166,14 @@ var ( ) type unitTest struct { - Name, Platform, FileName, Evalengine string + Name, RunsOn, Platform, FileName, Evalengine string } type clusterTest struct { Name, Shard, Platform string FileName string BuildTag string + RunsOn string MemoryCheck bool MakeTools, InstallXtraBackup bool Docker bool @@ -178,13 +181,13 @@ type clusterTest struct { EnableBinlogTransactionCompression bool EnablePartialJSON bool PartialKeyspace bool - Cores16 bool NeedsMinio bool } type vitessTesterTest struct { FileName string Name string + RunsOn string Path string } @@ -241,8 +244,9 @@ func canonnizeList(list []string) []string { func generateVitessTesterWorkflows(mp map[string]string, tpl string) { for test, testPath := range mp { tt := &vitessTesterTest{ - Name: fmt.Sprintf("Vitess Tester (%v)", test), - Path: testPath, + Name: fmt.Sprintf("Vitess Tester (%v)", test), + RunsOn: defaultRunnerName, + Path: testPath, } templateFileName := tpl @@ -263,11 +267,12 @@ func generateClusterWorkflows(list []string, tpl string) { Name: fmt.Sprintf("Cluster (%s)", cluster), Shard: cluster, BuildTag: buildTag[cluster], + RunsOn: defaultRunnerName, } cores16Clusters := canonnizeList(clusterRequiring16CoresMachines) for _, cores16Cluster := range cores16Clusters { if cores16Cluster == cluster { - test.Cores16 = true + test.RunsOn = cores16RunnerName break } } @@ -339,6 +344,7 @@ func generateUnitTestWorkflows() { for _, evalengine := range []string{"1", "0"} { test := &unitTest{ Name: fmt.Sprintf("Unit Test (%s%s)", evalengineToString(evalengine), platform), + RunsOn: defaultRunnerName, Platform: string(platform), Evalengine: evalengine, } diff --git a/test/templates/cluster_endtoend_test.tpl b/test/templates/cluster_endtoend_test.tpl index c5129805126..632bda5e407 100644 --- a/test/templates/cluster_endtoend_test.tpl +++ b/test/templates/cluster_endtoend_test.tpl @@ -15,7 +15,7 @@ jobs: build: timeout-minutes: 60 name: Run endtoend tests on {{.Name}} - runs-on: {{if .Cores16}}gh-hosted-runners-16cores-1-24.04{{else}}ubuntu-24.04{{end}} + runs-on: {{.RunsOn}} steps: - name: Skip CI diff --git a/test/templates/cluster_endtoend_test_docker.tpl b/test/templates/cluster_endtoend_test_docker.tpl index 39a36b88c89..619413391c5 100644 --- a/test/templates/cluster_endtoend_test_docker.tpl +++ b/test/templates/cluster_endtoend_test_docker.tpl @@ -6,7 +6,7 @@ permissions: read-all jobs: build: name: Run endtoend tests on {{.Name}} - runs-on: {{if .Cores16}}gh-hosted-runners-16cores-1-24.04{{else}}ubuntu-24.04{{end}} + runs-on: {{.RunsOn}} steps: - name: Skip CI diff --git a/test/templates/cluster_endtoend_test_mysql57.tpl b/test/templates/cluster_endtoend_test_mysql57.tpl index a6cbc969c1a..39932816c9b 100644 --- a/test/templates/cluster_endtoend_test_mysql57.tpl +++ b/test/templates/cluster_endtoend_test_mysql57.tpl @@ -19,7 +19,7 @@ env: jobs: build: name: Run endtoend tests on {{.Name}} - runs-on: {{if .Cores16}}gh-hosted-runners-16cores-1-24.04{{else}}ubuntu-24.04{{end}} + runs-on: {{.RunsOn}} steps: - name: Skip CI diff --git a/test/templates/cluster_vitess_tester.tpl b/test/templates/cluster_vitess_tester.tpl index 508824dde87..db8eb7d75ff 100644 --- a/test/templates/cluster_vitess_tester.tpl +++ b/test/templates/cluster_vitess_tester.tpl @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on {{.Name}} - runs-on: ubuntu-24.04 + runs-on: {{.RunsOn}} steps: - name: Skip CI diff --git a/test/templates/unit_test.tpl b/test/templates/unit_test.tpl index be71af987ed..3f6ab44bacd 100644 --- a/test/templates/unit_test.tpl +++ b/test/templates/unit_test.tpl @@ -14,7 +14,7 @@ env: jobs: test: name: {{.Name}} - runs-on: ubuntu-24.04 + runs-on: {{.RunsOn}} steps: - name: Skip CI