From 7a96f5ce2398a49c8dab4590b42d0b69bd6a2247 Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Thu, 28 Jul 2022 18:45:51 -0700 Subject: [PATCH 01/17] patch PR 4660 from upstream --- go/sqltypes/result.go | 7 ++--- go/sqltypes/result_test.go | 55 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 3 deletions(-) diff --git a/go/sqltypes/result.go b/go/sqltypes/result.go index 09518215986..c9dfac04171 100644 --- a/go/sqltypes/result.go +++ b/go/sqltypes/result.go @@ -245,13 +245,14 @@ func hashCodeForRow(val []Value) string { // Every place this function is called, a comment is needed that explains // why it's justified. func MakeRowTrusted(fields []*querypb.Field, row *querypb.Row) []Value { - sqlRow := make([]Value, len(row.Lengths)) + sqlRow := make([]Value, len(fields)) var offset int64 - for i, length := range row.Lengths { + for i, fld := range fields { + length := row.Lengths[i] if length < 0 { continue } - sqlRow[i] = MakeTrusted(fields[i].Type, row.Values[offset:offset+length]) + sqlRow[i] = MakeTrusted(fld.Type, row.Values[offset:offset+length]) offset += length } return sqlRow diff --git a/go/sqltypes/result_test.go b/go/sqltypes/result_test.go index c0525f8dc03..f14b6e15629 100644 --- a/go/sqltypes/result_test.go +++ b/go/sqltypes/result_test.go @@ -25,6 +25,61 @@ import ( querypb "vitess.io/vitess/go/vt/proto/query" ) +func TestMakeRowTrusted(t *testing.T) { + fields := MakeTestFields( + "some_int|some_text|another_int", + "int8|varchar|int8", + ) + + values := []byte{} + hw := []byte("hello, world") + values = append(values, hw...) + values = append(values, byte(42)) + + row := &querypb.Row{ + Lengths: []int64{-1, int64(len(hw)), 1}, + Values: values, + } + + want := []Value{ + MakeTrusted(querypb.Type_NULL_TYPE, nil), + MakeTrusted(querypb.Type_VARCHAR, []byte("hello, world")), + MakeTrusted(querypb.Type_INT8, []byte{byte(42)}), + } + + result := MakeRowTrusted(fields, row) + if !reflect.DeepEqual(result, want) { + t.Errorf("MakeRowTrusted:\ngot: %#v\nwant: %#v", result, want) + } +} + +func TestMakeRowTrustedDoesNotPanicOnNewColumns(t *testing.T) { + fields := MakeTestFields( + "some_int|some_text", + "int8|varchar", + ) + + values := []byte{byte(123)} + hw := []byte("hello, world") + values = append(values, hw...) + values = append(values, byte(42)) + + row := &querypb.Row{ + Lengths: []int64{1, int64(len(hw)), 1}, + Values: values, + } + + want := []Value{ + MakeTrusted(querypb.Type_INT8, []byte{byte(123)}), + MakeTrusted(querypb.Type_VARCHAR, []byte("hello, world")), + } + + result := MakeRowTrusted(fields, row) + if !reflect.DeepEqual(result, want) { + t.Errorf("MakeRowTrusted:\ngot: %#v\nwant: %#v", result, want) + } +} + func TestRepair(t *testing.T) { fields := []*querypb.Field{{ Type: Int64, From 47adb7c8fc720cb4cb7a090530b3e88d310ff6d3 Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Thu, 28 Jul 2022 20:09:40 -0700 Subject: [PATCH 02/17] cherrypick pr 5894 from upstream --- go/vt/vtgate/discoverygateway.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/go/vt/vtgate/discoverygateway.go b/go/vt/vtgate/discoverygateway.go index 3b4ef2c068f..7d7afa06e1b 100644 --- a/go/vt/vtgate/discoverygateway.go +++ b/go/vt/vtgate/discoverygateway.go @@ -17,6 +17,7 @@ limitations under the License. package vtgate import ( + "flag" "context" "fmt" "math/rand" @@ -39,6 +40,10 @@ import ( vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" ) +var ( + routeReplicaToRdonly = flag.Bool("gateway_route_replica_to_rdonly", false, "route REPLICA queries to RDONLY tablets as well as REPLICA tablets") +) + const ( // GatewayImplementationDiscovery defines the string value used as the implementation key for DiscoveryGateway GatewayImplementationDiscovery = "discoverygateway" @@ -291,6 +296,13 @@ func (dg *DiscoveryGateway) withRetry(ctx context.Context, target *querypb.Targe } tablets := dg.tsc.GetHealthyTabletStats(target.Keyspace, target.Shard, target.TabletType) + + // temporary hack to enable REPLICA type queries to address both REPLICA tablets and RDONLY tablets + // original commit - https://github.com/tinyspeck/vitess/pull/166/commits/2552b4ce25a9fdb41ff07fa69f2ccf485fea83ac + if *routeReplicaToRdonly && target.TabletType == topodatapb.TabletType_REPLICA { + tablets = append(tablets, dg.tsc.GetHealthyTabletStats(target.Keyspace, target.Shard, topodatapb.TabletType_RDONLY)...) + } + if len(tablets) == 0 { // fail fast if there is no tablet err = vterrors.Errorf(vtrpcpb.Code_UNAVAILABLE, "no healthy tablet available for '%s'", target.String()) From 979684caabae1196f387b6183ecccd1e4cd2681d Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Thu, 28 Jul 2022 20:19:44 -0700 Subject: [PATCH 03/17] patch PR 4660 from upstream --- go/sqltypes/result.go | 7 ++--- go/sqltypes/result_test.go | 55 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 3 deletions(-) diff --git a/go/sqltypes/result.go b/go/sqltypes/result.go index 09518215986..c9dfac04171 100644 --- a/go/sqltypes/result.go +++ b/go/sqltypes/result.go @@ -245,13 +245,14 @@ func hashCodeForRow(val []Value) string { // Every place this function is called, a comment is needed that explains // why it's justified. func MakeRowTrusted(fields []*querypb.Field, row *querypb.Row) []Value { - sqlRow := make([]Value, len(row.Lengths)) + sqlRow := make([]Value, len(fields)) var offset int64 - for i, length := range row.Lengths { + for i, fld := range fields { + length := row.Lengths[i] if length < 0 { continue } - sqlRow[i] = MakeTrusted(fields[i].Type, row.Values[offset:offset+length]) + sqlRow[i] = MakeTrusted(fld.Type, row.Values[offset:offset+length]) offset += length } return sqlRow diff --git a/go/sqltypes/result_test.go b/go/sqltypes/result_test.go index c0525f8dc03..f14b6e15629 100644 --- a/go/sqltypes/result_test.go +++ b/go/sqltypes/result_test.go @@ -25,6 +25,61 @@ import ( querypb "vitess.io/vitess/go/vt/proto/query" ) +func TestMakeRowTrusted(t *testing.T) { + fields := MakeTestFields( + "some_int|some_text|another_int", + "int8|varchar|int8", + ) + + values := []byte{} + hw := []byte("hello, world") + values = append(values, hw...) + values = append(values, byte(42)) + + row := &querypb.Row{ + Lengths: []int64{-1, int64(len(hw)), 1}, + Values: values, + } + + want := []Value{ + MakeTrusted(querypb.Type_NULL_TYPE, nil), + MakeTrusted(querypb.Type_VARCHAR, []byte("hello, world")), + MakeTrusted(querypb.Type_INT8, []byte{byte(42)}), + } + + result := MakeRowTrusted(fields, row) + if !reflect.DeepEqual(result, want) { + t.Errorf("MakeRowTrusted:\ngot: %#v\nwant: %#v", result, want) + } +} + +func TestMakeRowTrustedDoesNotPanicOnNewColumns(t *testing.T) { + fields := MakeTestFields( + "some_int|some_text", + "int8|varchar", + ) + + values := []byte{byte(123)} + hw := []byte("hello, world") + values = append(values, hw...) + values = append(values, byte(42)) + + row := &querypb.Row{ + Lengths: []int64{1, int64(len(hw)), 1}, + Values: values, + } + + want := []Value{ + MakeTrusted(querypb.Type_INT8, []byte{byte(123)}), + MakeTrusted(querypb.Type_VARCHAR, []byte("hello, world")), + } + + result := MakeRowTrusted(fields, row) + if !reflect.DeepEqual(result, want) { + t.Errorf("MakeRowTrusted:\ngot: %#v\nwant: %#v", result, want) + } +} + func TestRepair(t *testing.T) { fields := []*querypb.Field{{ Type: Int64, From 6ebd89adcc83ae72ea44f6e4affc00a6a74ee5f7 Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Tue, 16 Aug 2022 14:20:27 -0700 Subject: [PATCH 04/17] fix the linter error --- go/vt/vtgate/discoverygateway.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/vt/vtgate/discoverygateway.go b/go/vt/vtgate/discoverygateway.go index 7d7afa06e1b..c473aff69f0 100644 --- a/go/vt/vtgate/discoverygateway.go +++ b/go/vt/vtgate/discoverygateway.go @@ -17,8 +17,8 @@ limitations under the License. package vtgate import ( - "flag" "context" + "flag" "fmt" "math/rand" "sort" From 0df772ca785b66ffdb96a8ee7160e27377d9b727 Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Tue, 16 Aug 2022 14:30:16 -0700 Subject: [PATCH 05/17] move test to run on ubuntu-latest --- test/templates/unit_test.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/templates/unit_test.tpl b/test/templates/unit_test.tpl index 4a0c1f28b95..9bef9a3b5ed 100644 --- a/test/templates/unit_test.tpl +++ b/test/templates/unit_test.tpl @@ -6,7 +6,7 @@ concurrency: jobs: test: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - name: Set up Go From e6ef09db5c63bc21008e5c3e0d258cc693453f0b Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Tue, 16 Aug 2022 14:35:54 -0700 Subject: [PATCH 06/17] move tests to run on ubuntu-latest --- .github/workflows/unit_test_mariadb102.yml | 2 +- .github/workflows/unit_test_mysql80.yml | 2 +- .github/workflows/unit_test_percona56.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit_test_mariadb102.yml b/.github/workflows/unit_test_mariadb102.yml index 788be42ed26..5d9ada8345b 100644 --- a/.github/workflows/unit_test_mariadb102.yml +++ b/.github/workflows/unit_test_mariadb102.yml @@ -8,7 +8,7 @@ concurrency: jobs: test: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - name: Set up Go diff --git a/.github/workflows/unit_test_mysql80.yml b/.github/workflows/unit_test_mysql80.yml index 4df2a435b46..8e6f180c483 100644 --- a/.github/workflows/unit_test_mysql80.yml +++ b/.github/workflows/unit_test_mysql80.yml @@ -8,7 +8,7 @@ concurrency: jobs: test: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - name: Set up Go diff --git a/.github/workflows/unit_test_percona56.yml b/.github/workflows/unit_test_percona56.yml index fe13df50da1..683b9f3efe2 100644 --- a/.github/workflows/unit_test_percona56.yml +++ b/.github/workflows/unit_test_percona56.yml @@ -8,7 +8,7 @@ concurrency: jobs: test: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - name: Set up Go From 5b8fff52b4db0573001b16d89a7f7b8cc3a14f6d Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Tue, 16 Aug 2022 14:43:25 -0700 Subject: [PATCH 07/17] Revert "move tests to run on ubuntu-latest" This reverts commit e6ef09db5c63bc21008e5c3e0d258cc693453f0b. --- .github/workflows/unit_test_mariadb102.yml | 2 +- .github/workflows/unit_test_mysql80.yml | 2 +- .github/workflows/unit_test_percona56.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit_test_mariadb102.yml b/.github/workflows/unit_test_mariadb102.yml index 5d9ada8345b..788be42ed26 100644 --- a/.github/workflows/unit_test_mariadb102.yml +++ b/.github/workflows/unit_test_mariadb102.yml @@ -8,7 +8,7 @@ concurrency: jobs: test: - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - name: Set up Go diff --git a/.github/workflows/unit_test_mysql80.yml b/.github/workflows/unit_test_mysql80.yml index 8e6f180c483..4df2a435b46 100644 --- a/.github/workflows/unit_test_mysql80.yml +++ b/.github/workflows/unit_test_mysql80.yml @@ -8,7 +8,7 @@ concurrency: jobs: test: - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - name: Set up Go diff --git a/.github/workflows/unit_test_percona56.yml b/.github/workflows/unit_test_percona56.yml index 683b9f3efe2..fe13df50da1 100644 --- a/.github/workflows/unit_test_percona56.yml +++ b/.github/workflows/unit_test_percona56.yml @@ -8,7 +8,7 @@ concurrency: jobs: test: - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - name: Set up Go From dc6b8f9c88e128bc7d952333106253b53f6b1c6d Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Tue, 16 Aug 2022 14:44:09 -0700 Subject: [PATCH 08/17] Revert "move test to run on ubuntu-latest" This reverts commit 0df772ca785b66ffdb96a8ee7160e27377d9b727. --- test/templates/unit_test.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/templates/unit_test.tpl b/test/templates/unit_test.tpl index 9bef9a3b5ed..4a0c1f28b95 100644 --- a/test/templates/unit_test.tpl +++ b/test/templates/unit_test.tpl @@ -6,7 +6,7 @@ concurrency: jobs: test: - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - name: Set up Go From d4a39333937d4ee2b4df73dd7dda964d564385ea Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Tue, 16 Aug 2022 15:23:21 -0700 Subject: [PATCH 09/17] cherry pick 11015 from upstream --- .github/workflows/unit_test_mariadb102.yml | 2 +- test/templates/unit_test.tpl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unit_test_mariadb102.yml b/.github/workflows/unit_test_mariadb102.yml index 788be42ed26..77bbdca82ab 100644 --- a/.github/workflows/unit_test_mariadb102.yml +++ b/.github/workflows/unit_test_mariadb102.yml @@ -48,7 +48,7 @@ jobs: # mariadb102 sudo apt-get install -y software-properties-common sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 - sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.2/ubuntu bionic main' + sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] https://mirror.rackspace.com/mariadb/repo/10.2/ubuntu sudo apt update sudo DEBIAN_FRONTEND="noninteractive" apt install -y mariadb-server diff --git a/test/templates/unit_test.tpl b/test/templates/unit_test.tpl index 4a0c1f28b95..40c5740e1a4 100644 --- a/test/templates/unit_test.tpl +++ b/test/templates/unit_test.tpl @@ -80,7 +80,7 @@ jobs: # mariadb101 sudo apt-get install -y software-properties-common sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 - sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu bionic main' + sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] https://mirror.rackspace.com/mariadb/repo/10.1/ubuntu sudo apt update sudo DEBIAN_FRONTEND="noninteractive" apt install -y mariadb-server @@ -91,7 +91,7 @@ jobs: # mariadb102 sudo apt-get install -y software-properties-common sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 - sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.2/ubuntu bionic main' + sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] https://mirror.rackspace.com/mariadb/repo/10.2/ubuntu sudo apt update sudo DEBIAN_FRONTEND="noninteractive" apt install -y mariadb-server @@ -102,7 +102,7 @@ jobs: # mariadb103 sudo apt-get install -y software-properties-common sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 - sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.3/ubuntu bionic main' + sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] https://mirror.rackspace.com/mariadb/repo/10.3/ubuntu bionic main' sudo apt update sudo DEBIAN_FRONTEND="noninteractive" apt install -y mariadb-server From 2d903d8a4cf3ba9294c11ee04ae929ba4e1aaf60 Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Tue, 16 Aug 2022 15:30:23 -0700 Subject: [PATCH 10/17] disable mariadb102 --- test/ci_workflow_gen.go | 2 +- test/templates/unit_test.tpl | 22 ---------------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/test/ci_workflow_gen.go b/test/ci_workflow_gen.go index 74a7b396a58..36742d0e257 100644 --- a/test/ci_workflow_gen.go +++ b/test/ci_workflow_gen.go @@ -30,7 +30,7 @@ const ( workflowConfigDir = "../.github/workflows" unitTestTemplate = "templates/unit_test.tpl" - unitTestDatabases = "percona56, mysql80, mariadb102" + unitTestDatabases = "percona56, mysql80" clusterTestTemplate = "templates/cluster_endtoend_test.tpl" diff --git a/test/templates/unit_test.tpl b/test/templates/unit_test.tpl index 40c5740e1a4..b57cdac57d9 100644 --- a/test/templates/unit_test.tpl +++ b/test/templates/unit_test.tpl @@ -75,28 +75,6 @@ jobs: {{end}} - {{if (eq .Platform "mariadb101")}} - - # mariadb101 - sudo apt-get install -y software-properties-common - sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 - sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] https://mirror.rackspace.com/mariadb/repo/10.1/ubuntu - sudo apt update - sudo DEBIAN_FRONTEND="noninteractive" apt install -y mariadb-server - - {{end}} - - {{if (eq .Platform "mariadb102")}} - - # mariadb102 - sudo apt-get install -y software-properties-common - sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 - sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] https://mirror.rackspace.com/mariadb/repo/10.2/ubuntu - sudo apt update - sudo DEBIAN_FRONTEND="noninteractive" apt install -y mariadb-server - - {{end}} - {{if (eq .Platform "mariadb103")}} # mariadb103 From d2dc3e72e0be9662916caa3096cf390db6a3c5f9 Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Tue, 16 Aug 2022 15:33:31 -0700 Subject: [PATCH 11/17] disable mariadb102 --- .github/workflows/unit_test_mariadb102.yml | 75 ---------------------- 1 file changed, 75 deletions(-) delete mode 100644 .github/workflows/unit_test_mariadb102.yml diff --git a/.github/workflows/unit_test_mariadb102.yml b/.github/workflows/unit_test_mariadb102.yml deleted file mode 100644 index 77bbdca82ab..00000000000 --- a/.github/workflows/unit_test_mariadb102.yml +++ /dev/null @@ -1,75 +0,0 @@ -# DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" - -name: Unit Test (mariadb102) -on: [push, pull_request] -concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Unit Test (mariadb102)') - cancel-in-progress: true - -jobs: - test: - runs-on: ubuntu-18.04 - - steps: - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.17.12 - - - name: Tune the OS - run: | - echo '1024 65535' | sudo tee -a /proc/sys/net/ipv4/ip_local_port_range - - # TEMPORARY WHILE GITHUB FIXES THIS https://github.com/actions/virtual-environments/issues/3185 - - name: Add the current IP address, long hostname and short hostname record to /etc/hosts file - run: | - echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts - # DON'T FORGET TO REMOVE CODE ABOVE WHEN ISSUE IS ADRESSED! - - - name: Check out code - uses: actions/checkout@v2 - - - name: Get dependencies - run: | - export DEBIAN_FRONTEND="noninteractive" - sudo apt-get update - - # !mysql57 - - # Uninstall any previously installed MySQL first - sudo systemctl stop apparmor - sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common - sudo apt-get -y autoremove - sudo apt-get -y autoclean - sudo deluser mysql - sudo rm -rf /var/lib/mysql - sudo rm -rf /etc/mysql - - # mariadb102 - sudo apt-get install -y software-properties-common - sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 - sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] https://mirror.rackspace.com/mariadb/repo/10.2/ubuntu - sudo apt update - sudo DEBIAN_FRONTEND="noninteractive" apt install -y mariadb-server - - sudo apt-get install -y make unzip g++ curl git wget ant openjdk-8-jdk eatmydata - sudo service mysql stop - sudo bash -c "echo '/usr/sbin/mysqld { }' > /etc/apparmor.d/usr.sbin.mysqld" # https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1806263 - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld || echo "could not remove mysqld profile" - - mkdir -p dist bin - curl -L https://github.com/coreos/etcd/releases/download/v3.3.10/etcd-v3.3.10-linux-amd64.tar.gz | tar -zxC dist - mv dist/etcd-v3.3.10-linux-amd64/{etcd,etcdctl} bin/ - - go mod download - go install golang.org/x/tools/cmd/goimports@latest - - - name: Run make tools - run: | - make tools - - - name: Run test - timeout-minutes: 30 - run: | - eatmydata -- make unit_test From e03c0c0f8df3685a2e990281faa22a642034b621 Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Tue, 16 Aug 2022 20:33:14 -0700 Subject: [PATCH 12/17] convert self-hosted CI tests --- .../cluster_endtoend_vreplication_basic.yml | 68 +++++++++------- ...luster_endtoend_vreplication_cellalias.yml | 68 +++++++++------- ...luster_endtoend_vreplication_multicell.yml | 68 +++++++++------- .../cluster_endtoend_vreplication_v2.yml | 68 +++++++++------- .github/workflows/unit_race.yml | 2 +- .github/workflows/unit_test_mariadb103.yml | 79 +++++++++++++------ .github/workflows/unit_test_mysql57.yml | 76 +++++++++++------- test/ci_workflow_gen.go | 20 +++-- 8 files changed, 280 insertions(+), 169 deletions(-) diff --git a/.github/workflows/cluster_endtoend_vreplication_basic.yml b/.github/workflows/cluster_endtoend_vreplication_basic.yml index 9a33774ed52..d505346b0fd 100644 --- a/.github/workflows/cluster_endtoend_vreplication_basic.yml +++ b/.github/workflows/cluster_endtoend_vreplication_basic.yml @@ -9,33 +9,45 @@ concurrency: jobs: build: name: Run endtoend tests on Cluster (vreplication_basic) - runs-on: self-hosted + runs-on: ubuntu-18.04 steps: - - name: Check out code - uses: actions/checkout@v2 - - - name: Build Docker Image - run: docker build -f ./.github/docker/cluster_test_vreplication_basic/Dockerfile -t cluster_test_vreplication_basic:$GITHUB_SHA . - - - name: Run test - timeout-minutes: 30 - run: docker run --name "cluster_test_vreplication_basic_$GITHUB_SHA" cluster_test_vreplication_basic:$GITHUB_SHA /bin/bash -c 'source build.env && go run test.go -keep-data=true -docker=false -print-log -follow -shard vreplication_basic -- -- --keep-data=true' - - - name: Print Volume Used - if: ${{ always() }} - run: | - docker inspect -f '{{ (index .Mounts 0).Name }}' cluster_test_vreplication_basic_$GITHUB_SHA - - - name: Cleanup Docker Volume - run: | - docker rm -v cluster_test_vreplication_basic_$GITHUB_SHA - - - name: Cleanup Docker Container - if: ${{ always() }} - run: | - docker rm -f cluster_test_vreplication_basic_$GITHUB_SHA - - - name: Cleanup Docker Image - run: | - docker image rm cluster_test_vreplication_basic:$GITHUB_SHA + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17.12 + + - name: Tune the OS + run: | + echo '1024 65535' | sudo tee -a /proc/sys/net/ipv4/ip_local_port_range + + # TEMPORARY WHILE GITHUB FIXES THIS https://github.com/actions/virtual-environments/issues/3185 + - name: Add the current IP address, long hostname and short hostname record to /etc/hosts file + run: | + echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts + # DON'T FORGET TO REMOVE CODE ABOVE WHEN ISSUE IS ADRESSED! + + - name: Check out code + uses: actions/checkout@v2 + + - name: Get dependencies + run: | + sudo apt-get update + sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo service mysql stop + sudo service etcd stop + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + go mod download + + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo apt-get install -y gnupg2 + sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo apt-get update + sudo apt-get install percona-xtrabackup-24 + + - name: Run cluster endtoend test + timeout-minutes: 30 + run: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vreplication_basic diff --git a/.github/workflows/cluster_endtoend_vreplication_cellalias.yml b/.github/workflows/cluster_endtoend_vreplication_cellalias.yml index 05514699043..12d51772ed5 100644 --- a/.github/workflows/cluster_endtoend_vreplication_cellalias.yml +++ b/.github/workflows/cluster_endtoend_vreplication_cellalias.yml @@ -9,33 +9,45 @@ concurrency: jobs: build: name: Run endtoend tests on Cluster (vreplication_cellalias) - runs-on: self-hosted + runs-on: ubuntu-18.04 steps: - - name: Check out code - uses: actions/checkout@v2 - - - name: Build Docker Image - run: docker build -f ./.github/docker/cluster_test_vreplication_cellalias/Dockerfile -t cluster_test_vreplication_cellalias:$GITHUB_SHA . - - - name: Run test - timeout-minutes: 30 - run: docker run --name "cluster_test_vreplication_cellalias_$GITHUB_SHA" cluster_test_vreplication_cellalias:$GITHUB_SHA /bin/bash -c 'source build.env && go run test.go -keep-data=true -docker=false -print-log -follow -shard vreplication_cellalias -- -- --keep-data=true' - - - name: Print Volume Used - if: ${{ always() }} - run: | - docker inspect -f '{{ (index .Mounts 0).Name }}' cluster_test_vreplication_cellalias_$GITHUB_SHA - - - name: Cleanup Docker Volume - run: | - docker rm -v cluster_test_vreplication_cellalias_$GITHUB_SHA - - - name: Cleanup Docker Container - if: ${{ always() }} - run: | - docker rm -f cluster_test_vreplication_cellalias_$GITHUB_SHA - - - name: Cleanup Docker Image - run: | - docker image rm cluster_test_vreplication_cellalias:$GITHUB_SHA + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17.12 + + - name: Tune the OS + run: | + echo '1024 65535' | sudo tee -a /proc/sys/net/ipv4/ip_local_port_range + + # TEMPORARY WHILE GITHUB FIXES THIS https://github.com/actions/virtual-environments/issues/3185 + - name: Add the current IP address, long hostname and short hostname record to /etc/hosts file + run: | + echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts + # DON'T FORGET TO REMOVE CODE ABOVE WHEN ISSUE IS ADRESSED! + + - name: Check out code + uses: actions/checkout@v2 + + - name: Get dependencies + run: | + sudo apt-get update + sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo service mysql stop + sudo service etcd stop + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + go mod download + + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo apt-get install -y gnupg2 + sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo apt-get update + sudo apt-get install percona-xtrabackup-24 + + - name: Run cluster endtoend test + timeout-minutes: 30 + run: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vreplication_cellalias diff --git a/.github/workflows/cluster_endtoend_vreplication_multicell.yml b/.github/workflows/cluster_endtoend_vreplication_multicell.yml index 8714f4ec902..5025835610d 100644 --- a/.github/workflows/cluster_endtoend_vreplication_multicell.yml +++ b/.github/workflows/cluster_endtoend_vreplication_multicell.yml @@ -9,33 +9,45 @@ concurrency: jobs: build: name: Run endtoend tests on Cluster (vreplication_multicell) - runs-on: self-hosted + runs-on: ubuntu-18.04 steps: - - name: Check out code - uses: actions/checkout@v2 - - - name: Build Docker Image - run: docker build -f ./.github/docker/cluster_test_vreplication_multicell/Dockerfile -t cluster_test_vreplication_multicell:$GITHUB_SHA . - - - name: Run test - timeout-minutes: 30 - run: docker run --name "cluster_test_vreplication_multicell_$GITHUB_SHA" cluster_test_vreplication_multicell:$GITHUB_SHA /bin/bash -c 'source build.env && go run test.go -keep-data=true -docker=false -print-log -follow -shard vreplication_multicell -- -- --keep-data=true' - - - name: Print Volume Used - if: ${{ always() }} - run: | - docker inspect -f '{{ (index .Mounts 0).Name }}' cluster_test_vreplication_multicell_$GITHUB_SHA - - - name: Cleanup Docker Volume - run: | - docker rm -v cluster_test_vreplication_multicell_$GITHUB_SHA - - - name: Cleanup Docker Container - if: ${{ always() }} - run: | - docker rm -f cluster_test_vreplication_multicell_$GITHUB_SHA - - - name: Cleanup Docker Image - run: | - docker image rm cluster_test_vreplication_multicell:$GITHUB_SHA + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17.12 + + - name: Tune the OS + run: | + echo '1024 65535' | sudo tee -a /proc/sys/net/ipv4/ip_local_port_range + + # TEMPORARY WHILE GITHUB FIXES THIS https://github.com/actions/virtual-environments/issues/3185 + - name: Add the current IP address, long hostname and short hostname record to /etc/hosts file + run: | + echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts + # DON'T FORGET TO REMOVE CODE ABOVE WHEN ISSUE IS ADRESSED! + + - name: Check out code + uses: actions/checkout@v2 + + - name: Get dependencies + run: | + sudo apt-get update + sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo service mysql stop + sudo service etcd stop + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + go mod download + + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo apt-get install -y gnupg2 + sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo apt-get update + sudo apt-get install percona-xtrabackup-24 + + - name: Run cluster endtoend test + timeout-minutes: 30 + run: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vreplication_multicell diff --git a/.github/workflows/cluster_endtoend_vreplication_v2.yml b/.github/workflows/cluster_endtoend_vreplication_v2.yml index 3ab8d2bb2ad..139c046c5ec 100644 --- a/.github/workflows/cluster_endtoend_vreplication_v2.yml +++ b/.github/workflows/cluster_endtoend_vreplication_v2.yml @@ -9,33 +9,45 @@ concurrency: jobs: build: name: Run endtoend tests on Cluster (vreplication_v2) - runs-on: self-hosted + runs-on: ubuntu-18.04 steps: - - name: Check out code - uses: actions/checkout@v2 - - - name: Build Docker Image - run: docker build -f ./.github/docker/cluster_test_vreplication_v2/Dockerfile -t cluster_test_vreplication_v2:$GITHUB_SHA . - - - name: Run test - timeout-minutes: 30 - run: docker run --name "cluster_test_vreplication_v2_$GITHUB_SHA" cluster_test_vreplication_v2:$GITHUB_SHA /bin/bash -c 'source build.env && go run test.go -keep-data=true -docker=false -print-log -follow -shard vreplication_v2 -- -- --keep-data=true' - - - name: Print Volume Used - if: ${{ always() }} - run: | - docker inspect -f '{{ (index .Mounts 0).Name }}' cluster_test_vreplication_v2_$GITHUB_SHA - - - name: Cleanup Docker Volume - run: | - docker rm -v cluster_test_vreplication_v2_$GITHUB_SHA - - - name: Cleanup Docker Container - if: ${{ always() }} - run: | - docker rm -f cluster_test_vreplication_v2_$GITHUB_SHA - - - name: Cleanup Docker Image - run: | - docker image rm cluster_test_vreplication_v2:$GITHUB_SHA + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17.12 + + - name: Tune the OS + run: | + echo '1024 65535' | sudo tee -a /proc/sys/net/ipv4/ip_local_port_range + + # TEMPORARY WHILE GITHUB FIXES THIS https://github.com/actions/virtual-environments/issues/3185 + - name: Add the current IP address, long hostname and short hostname record to /etc/hosts file + run: | + echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts + # DON'T FORGET TO REMOVE CODE ABOVE WHEN ISSUE IS ADRESSED! + + - name: Check out code + uses: actions/checkout@v2 + + - name: Get dependencies + run: | + sudo apt-get update + sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata + sudo service mysql stop + sudo service etcd stop + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + go mod download + + wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb + sudo apt-get install -y gnupg2 + sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb + sudo apt-get update + sudo apt-get install percona-xtrabackup-24 + + - name: Run cluster endtoend test + timeout-minutes: 30 + run: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vreplication_v2 diff --git a/.github/workflows/unit_race.yml b/.github/workflows/unit_race.yml index e9cb4d79f76..bdfb5849b9c 100644 --- a/.github/workflows/unit_race.yml +++ b/.github/workflows/unit_race.yml @@ -8,7 +8,7 @@ jobs: build: name: Unit Test (Race) - runs-on: self-hosted + runs-on: ubuntu-latest steps: - name: Check out code diff --git a/.github/workflows/unit_test_mariadb103.yml b/.github/workflows/unit_test_mariadb103.yml index 59e0ac8e7a8..6d4c908c3f6 100644 --- a/.github/workflows/unit_test_mariadb103.yml +++ b/.github/workflows/unit_test_mariadb103.yml @@ -8,33 +8,68 @@ concurrency: jobs: test: - runs-on: self-hosted + runs-on: ubuntu-18.04 steps: - - name: Check out code - uses: actions/checkout@v2 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17.12 - - name: Build Docker Image - run: docker build -f ./.github/docker/unit_test_mariadb103/Dockerfile -t unit_test_mariadb103:$GITHUB_SHA . + - name: Tune the OS + run: | + echo '1024 65535' | sudo tee -a /proc/sys/net/ipv4/ip_local_port_range - - name: Run test - timeout-minutes: 30 - run: docker run --name "unit_test_mariadb103_$GITHUB_SHA" unit_test_mariadb103:$GITHUB_SHA /bin/bash -c 'make unit_test' + # TEMPORARY WHILE GITHUB FIXES THIS https://github.com/actions/virtual-environments/issues/3185 + - name: Add the current IP address, long hostname and short hostname record to /etc/hosts file + run: | + echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts + # DON'T FORGET TO REMOVE CODE ABOVE WHEN ISSUE IS ADRESSED! - - name: Print Volume Used - if: ${{ always() }} - run: | - docker inspect -f '{{ (index .Mounts 0).Name }}' unit_test_mariadb103_$GITHUB_SHA + - name: Check out code + uses: actions/checkout@v2 - - name: Cleanup Docker Volume - run: | - docker rm -v unit_test_mariadb103_$GITHUB_SHA + - name: Get dependencies + run: | + export DEBIAN_FRONTEND="noninteractive" + sudo apt-get update - - name: Cleanup Docker Container - if: ${{ always() }} - run: | - docker rm -f unit_test_mariadb103_$GITHUB_SHA + # !mysql57 - - name: Cleanup Docker Image - run: | - docker image rm unit_test_mariadb103:$GITHUB_SHA + # Uninstall any previously installed MySQL first + sudo systemctl stop apparmor + sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common + sudo apt-get -y autoremove + sudo apt-get -y autoclean + sudo deluser mysql + sudo rm -rf /var/lib/mysql + sudo rm -rf /etc/mysql + + # mariadb103 + sudo apt-get install -y software-properties-common + sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 + sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] https://mirror.rackspace.com/mariadb/repo/10.3/ubuntu bionic main' + sudo apt update + sudo DEBIAN_FRONTEND="noninteractive" apt install -y mariadb-server + + sudo apt-get install -y make unzip g++ curl git wget ant openjdk-8-jdk eatmydata + sudo service mysql stop + sudo bash -c "echo '/usr/sbin/mysqld { }' > /etc/apparmor.d/usr.sbin.mysqld" # https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1806263 + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld || echo "could not remove mysqld profile" + + mkdir -p dist bin + curl -L https://github.com/coreos/etcd/releases/download/v3.3.10/etcd-v3.3.10-linux-amd64.tar.gz | tar -zxC dist + mv dist/etcd-v3.3.10-linux-amd64/{etcd,etcdctl} bin/ + + go mod download + go install golang.org/x/tools/cmd/goimports@latest + + - name: Run make tools + run: | + make tools + + - name: Run test + timeout-minutes: 30 + run: | + eatmydata -- make unit_test diff --git a/.github/workflows/unit_test_mysql57.yml b/.github/workflows/unit_test_mysql57.yml index 2d0e74573a8..9d5f6344b18 100644 --- a/.github/workflows/unit_test_mysql57.yml +++ b/.github/workflows/unit_test_mysql57.yml @@ -8,33 +8,53 @@ concurrency: jobs: test: - runs-on: self-hosted + runs-on: ubuntu-18.04 steps: - - name: Check out code - uses: actions/checkout@v2 - - - name: Build Docker Image - run: docker build -f ./.github/docker/unit_test_mysql57/Dockerfile -t unit_test_mysql57:$GITHUB_SHA . - - - name: Run test - timeout-minutes: 30 - run: docker run --name "unit_test_mysql57_$GITHUB_SHA" unit_test_mysql57:$GITHUB_SHA /bin/bash -c 'make unit_test' - - - name: Print Volume Used - if: ${{ always() }} - run: | - docker inspect -f '{{ (index .Mounts 0).Name }}' unit_test_mysql57_$GITHUB_SHA - - - name: Cleanup Docker Volume - run: | - docker rm -v unit_test_mysql57_$GITHUB_SHA - - - name: Cleanup Docker Container - if: ${{ always() }} - run: | - docker rm -f unit_test_mysql57_$GITHUB_SHA - - - name: Cleanup Docker Image - run: | - docker image rm unit_test_mysql57:$GITHUB_SHA + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17.12 + + - name: Tune the OS + run: | + echo '1024 65535' | sudo tee -a /proc/sys/net/ipv4/ip_local_port_range + + # TEMPORARY WHILE GITHUB FIXES THIS https://github.com/actions/virtual-environments/issues/3185 + - name: Add the current IP address, long hostname and short hostname record to /etc/hosts file + run: | + echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts + # DON'T FORGET TO REMOVE CODE ABOVE WHEN ISSUE IS ADRESSED! + + - name: Check out code + uses: actions/checkout@v2 + + - name: Get dependencies + run: | + export DEBIAN_FRONTEND="noninteractive" + sudo apt-get update + + # mysql57 + sudo apt-get install -y mysql-server mysql-client + + sudo apt-get install -y make unzip g++ curl git wget ant openjdk-8-jdk eatmydata + sudo service mysql stop + sudo bash -c "echo '/usr/sbin/mysqld { }' > /etc/apparmor.d/usr.sbin.mysqld" # https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1806263 + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld || echo "could not remove mysqld profile" + + mkdir -p dist bin + curl -L https://github.com/coreos/etcd/releases/download/v3.3.10/etcd-v3.3.10-linux-amd64.tar.gz | tar -zxC dist + mv dist/etcd-v3.3.10-linux-amd64/{etcd,etcdctl} bin/ + + go mod download + go install golang.org/x/tools/cmd/goimports@latest + + - name: Run make tools + run: | + make tools + + - name: Run test + timeout-minutes: 30 + run: | + eatmydata -- make unit_test diff --git a/test/ci_workflow_gen.go b/test/ci_workflow_gen.go index 36742d0e257..771f10bb854 100644 --- a/test/ci_workflow_gen.go +++ b/test/ci_workflow_gen.go @@ -30,12 +30,13 @@ const ( workflowConfigDir = "../.github/workflows" unitTestTemplate = "templates/unit_test.tpl" - unitTestDatabases = "percona56, mysql80" + unitTestDatabases = "percona56, mysql80, mysql57, mariadb103" clusterTestTemplate = "templates/cluster_endtoend_test.tpl" - unitTestSelfHostedTemplate = "templates/unit_test_self_hosted.tpl" - unitTestSelfHostedDatabases = "mysql57, mariadb103" + unitTestSelfHostedTemplate = "templates/unit_test_self_hosted.tpl" + //unitTestSelfHostedDatabases = "mysql57, mariadb103" + unitTestSelfHostedDatabases = "" dockerFileTemplate = "templates/dockerfile.tpl" clusterTestSelfHostedTemplate = "templates/cluster_endtoend_test_self_hosted.tpl" ) @@ -96,14 +97,21 @@ var ( "resharding", "resharding_bytes", "mysql80", - } - - clusterSelfHostedList = []string{ "vreplication_basic", "vreplication_multicell", "vreplication_cellalias", "vreplication_v2", } + + // we don't have self-hosted runners configured, moving these back to the regular cluster list + clusterSelfHostedList = []string{ + /* + "vreplication_basic", + "vreplication_multicell", + "vreplication_cellalias", + "vreplication_v2", + */ + } // TODO: currently some percona tools including xtrabackup are installed on all clusters, we can possibly optimize // this by only installing them in the required clusters clustersRequiringXtraBackup = append(clusterList, clusterSelfHostedList...) From 395aee3bc842d153a7d25329cdb91e5044a08a6f Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Wed, 17 Aug 2022 08:09:39 -0700 Subject: [PATCH 13/17] add retry on error for CI tests --- test/templates/cluster_endtoend_test.tpl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/templates/cluster_endtoend_test.tpl b/test/templates/cluster_endtoend_test.tpl index 77f84635004..adea14b5066 100644 --- a/test/templates/cluster_endtoend_test.tpl +++ b/test/templates/cluster_endtoend_test.tpl @@ -57,7 +57,11 @@ jobs: {{end}} - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard {{.Shard}} + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard {{.Shard}} From e284627f723b03364cb6c5a7fb7a8877179c1496 Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Wed, 17 Aug 2022 08:10:09 -0700 Subject: [PATCH 14/17] add retry on error for CI tests --- .github/workflows/cluster_endtoend_11.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_12.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_13.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_14.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_15.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_16.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_17.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_18.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_19.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_20.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_21.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_22.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_23.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_24.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_26.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_mysql80.yml | 12 ++++++++---- .../cluster_endtoend_onlineddl_declarative.yml | 12 ++++++++---- .../workflows/cluster_endtoend_onlineddl_ghost.yml | 12 ++++++++---- .../workflows/cluster_endtoend_onlineddl_revert.yml | 12 ++++++++---- .../cluster_endtoend_onlineddl_singleton.yml | 12 ++++++++---- .../workflows/cluster_endtoend_onlineddl_vrepl.yml | 12 ++++++++---- .../cluster_endtoend_onlineddl_vrepl_stress.yml | 12 ++++++++---- ...cluster_endtoend_onlineddl_vrepl_stress_suite.yml | 12 ++++++++---- .../cluster_endtoend_onlineddl_vrepl_suite.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_resharding.yml | 12 ++++++++---- .../workflows/cluster_endtoend_resharding_bytes.yml | 12 ++++++++---- .../cluster_endtoend_tabletmanager_consul.yml | 12 ++++++++---- .../cluster_endtoend_tabletmanager_tablegc.yml | 12 ++++++++---- .../cluster_endtoend_tabletmanager_throttler.yml | 12 ++++++++---- ...ndtoend_tabletmanager_throttler_custom_config.yml | 12 ++++++++---- .../cluster_endtoend_vreplication_basic.yml | 12 ++++++++---- .../cluster_endtoend_vreplication_cellalias.yml | 12 ++++++++---- .../cluster_endtoend_vreplication_migrate.yml | 12 ++++++++---- .../cluster_endtoend_vreplication_multicell.yml | 12 ++++++++---- .../workflows/cluster_endtoend_vreplication_v2.yml | 12 ++++++++---- .../workflows/cluster_endtoend_vstream_failover.yml | 12 ++++++++---- .../cluster_endtoend_vstream_stoponreshard_false.yml | 12 ++++++++---- .../cluster_endtoend_vstream_stoponreshard_true.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_vtgate_buffer.yml | 12 ++++++++---- .../cluster_endtoend_vtgate_concurrentdml.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_vtgate_gen4.yml | 12 ++++++++---- .../workflows/cluster_endtoend_vtgate_queries.yml | 12 ++++++++---- .../cluster_endtoend_vtgate_readafterwrite.yml | 12 ++++++++---- .../cluster_endtoend_vtgate_reservedconn.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_vtgate_schema.yml | 12 ++++++++---- .../cluster_endtoend_vtgate_schema_tracker.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_vtgate_topo.yml | 12 ++++++++---- .../cluster_endtoend_vtgate_topo_consul.yml | 12 ++++++++---- .../workflows/cluster_endtoend_vtgate_topo_etcd.yml | 12 ++++++++---- .../cluster_endtoend_vtgate_transaction.yml | 12 ++++++++---- .../workflows/cluster_endtoend_vtgate_unsharded.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_vtgate_v3.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_vtgate_vindex.yml | 12 ++++++++---- .../workflows/cluster_endtoend_vtgate_vschema.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_vtorc.yml | 12 ++++++++---- .github/workflows/cluster_endtoend_xb_recovery.yml | 12 ++++++++---- 56 files changed, 448 insertions(+), 224 deletions(-) diff --git a/.github/workflows/cluster_endtoend_11.yml b/.github/workflows/cluster_endtoend_11.yml index 197c8a25c64..2fda7169809 100644 --- a/.github/workflows/cluster_endtoend_11.yml +++ b/.github/workflows/cluster_endtoend_11.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard 11 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard 11 diff --git a/.github/workflows/cluster_endtoend_12.yml b/.github/workflows/cluster_endtoend_12.yml index 8d97c4f838d..55c4baad8f9 100644 --- a/.github/workflows/cluster_endtoend_12.yml +++ b/.github/workflows/cluster_endtoend_12.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard 12 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard 12 diff --git a/.github/workflows/cluster_endtoend_13.yml b/.github/workflows/cluster_endtoend_13.yml index fa7e4052f52..ba25c8729ea 100644 --- a/.github/workflows/cluster_endtoend_13.yml +++ b/.github/workflows/cluster_endtoend_13.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard 13 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard 13 diff --git a/.github/workflows/cluster_endtoend_14.yml b/.github/workflows/cluster_endtoend_14.yml index 598dba92dfb..748ed6a4de1 100644 --- a/.github/workflows/cluster_endtoend_14.yml +++ b/.github/workflows/cluster_endtoend_14.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard 14 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard 14 diff --git a/.github/workflows/cluster_endtoend_15.yml b/.github/workflows/cluster_endtoend_15.yml index e96113519d4..23924f4fd47 100644 --- a/.github/workflows/cluster_endtoend_15.yml +++ b/.github/workflows/cluster_endtoend_15.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard 15 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard 15 diff --git a/.github/workflows/cluster_endtoend_16.yml b/.github/workflows/cluster_endtoend_16.yml index 02fca5c083e..ba42db79132 100644 --- a/.github/workflows/cluster_endtoend_16.yml +++ b/.github/workflows/cluster_endtoend_16.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard 16 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard 16 diff --git a/.github/workflows/cluster_endtoend_17.yml b/.github/workflows/cluster_endtoend_17.yml index b2aac116426..6455b7fd5b1 100644 --- a/.github/workflows/cluster_endtoend_17.yml +++ b/.github/workflows/cluster_endtoend_17.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard 17 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard 17 diff --git a/.github/workflows/cluster_endtoend_18.yml b/.github/workflows/cluster_endtoend_18.yml index fcb05bf952e..33533495b48 100644 --- a/.github/workflows/cluster_endtoend_18.yml +++ b/.github/workflows/cluster_endtoend_18.yml @@ -51,7 +51,11 @@ jobs: make tools - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard 18 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard 18 diff --git a/.github/workflows/cluster_endtoend_19.yml b/.github/workflows/cluster_endtoend_19.yml index 2d5a3e2c326..ef82a4aed0b 100644 --- a/.github/workflows/cluster_endtoend_19.yml +++ b/.github/workflows/cluster_endtoend_19.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard 19 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard 19 diff --git a/.github/workflows/cluster_endtoend_20.yml b/.github/workflows/cluster_endtoend_20.yml index 153162ecb0e..21078ae61f1 100644 --- a/.github/workflows/cluster_endtoend_20.yml +++ b/.github/workflows/cluster_endtoend_20.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard 20 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard 20 diff --git a/.github/workflows/cluster_endtoend_21.yml b/.github/workflows/cluster_endtoend_21.yml index b6361cbe398..2ba32e4da8e 100644 --- a/.github/workflows/cluster_endtoend_21.yml +++ b/.github/workflows/cluster_endtoend_21.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard 21 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard 21 diff --git a/.github/workflows/cluster_endtoend_22.yml b/.github/workflows/cluster_endtoend_22.yml index 1c9fe2b332f..81bb8f02220 100644 --- a/.github/workflows/cluster_endtoend_22.yml +++ b/.github/workflows/cluster_endtoend_22.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard 22 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard 22 diff --git a/.github/workflows/cluster_endtoend_23.yml b/.github/workflows/cluster_endtoend_23.yml index 74643816be1..1e0cddbc8e0 100644 --- a/.github/workflows/cluster_endtoend_23.yml +++ b/.github/workflows/cluster_endtoend_23.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard 23 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard 23 diff --git a/.github/workflows/cluster_endtoend_24.yml b/.github/workflows/cluster_endtoend_24.yml index 1eb784629b9..317fcc25a84 100644 --- a/.github/workflows/cluster_endtoend_24.yml +++ b/.github/workflows/cluster_endtoend_24.yml @@ -51,7 +51,11 @@ jobs: make tools - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard 24 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard 24 diff --git a/.github/workflows/cluster_endtoend_26.yml b/.github/workflows/cluster_endtoend_26.yml index e32c2a7e97c..c7313cce975 100644 --- a/.github/workflows/cluster_endtoend_26.yml +++ b/.github/workflows/cluster_endtoend_26.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard 26 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard 26 diff --git a/.github/workflows/cluster_endtoend_mysql80.yml b/.github/workflows/cluster_endtoend_mysql80.yml index f8c5f8b6782..81d4156620f 100644 --- a/.github/workflows/cluster_endtoend_mysql80.yml +++ b/.github/workflows/cluster_endtoend_mysql80.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard mysql80 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard mysql80 diff --git a/.github/workflows/cluster_endtoend_onlineddl_declarative.yml b/.github/workflows/cluster_endtoend_onlineddl_declarative.yml index e2f94ccec4d..36aa2bb67c4 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_declarative.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_declarative.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard onlineddl_declarative + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard onlineddl_declarative diff --git a/.github/workflows/cluster_endtoend_onlineddl_ghost.yml b/.github/workflows/cluster_endtoend_onlineddl_ghost.yml index 451b19111fc..9962f373825 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_ghost.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_ghost.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard onlineddl_ghost + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard onlineddl_ghost diff --git a/.github/workflows/cluster_endtoend_onlineddl_revert.yml b/.github/workflows/cluster_endtoend_onlineddl_revert.yml index af3e26717b4..99f2679f686 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_revert.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_revert.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard onlineddl_revert + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard onlineddl_revert diff --git a/.github/workflows/cluster_endtoend_onlineddl_singleton.yml b/.github/workflows/cluster_endtoend_onlineddl_singleton.yml index 2bf621498e5..e8b0904d28f 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_singleton.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_singleton.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard onlineddl_singleton + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard onlineddl_singleton diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml index a409e8f293d..4bc2deeebe0 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard onlineddl_vrepl + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard onlineddl_vrepl diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml index b5289b006b5..c85f3109da8 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard onlineddl_vrepl_stress + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard onlineddl_vrepl_stress diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml index 0162572669d..3c1983f97de 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard onlineddl_vrepl_stress_suite + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard onlineddl_vrepl_stress_suite diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml index 53b5cb0353e..50fd7d0a7f1 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard onlineddl_vrepl_suite + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard onlineddl_vrepl_suite diff --git a/.github/workflows/cluster_endtoend_resharding.yml b/.github/workflows/cluster_endtoend_resharding.yml index 29c7329c1e1..9788710f219 100644 --- a/.github/workflows/cluster_endtoend_resharding.yml +++ b/.github/workflows/cluster_endtoend_resharding.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard resharding + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard resharding diff --git a/.github/workflows/cluster_endtoend_resharding_bytes.yml b/.github/workflows/cluster_endtoend_resharding_bytes.yml index f260549fdc1..6734021e71c 100644 --- a/.github/workflows/cluster_endtoend_resharding_bytes.yml +++ b/.github/workflows/cluster_endtoend_resharding_bytes.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard resharding_bytes + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard resharding_bytes diff --git a/.github/workflows/cluster_endtoend_tabletmanager_consul.yml b/.github/workflows/cluster_endtoend_tabletmanager_consul.yml index e54ee9171ba..7fe6c53008f 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_consul.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_consul.yml @@ -51,7 +51,11 @@ jobs: make tools - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard tabletmanager_consul + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard tabletmanager_consul diff --git a/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml b/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml index cae2c280727..48a0c660a01 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard tabletmanager_tablegc + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard tabletmanager_tablegc diff --git a/.github/workflows/cluster_endtoend_tabletmanager_throttler.yml b/.github/workflows/cluster_endtoend_tabletmanager_throttler.yml index 51f7026b8c0..ffd150bc9a5 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_throttler.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_throttler.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard tabletmanager_throttler + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard tabletmanager_throttler diff --git a/.github/workflows/cluster_endtoend_tabletmanager_throttler_custom_config.yml b/.github/workflows/cluster_endtoend_tabletmanager_throttler_custom_config.yml index acdbb4fb8a3..b8bd8faa169 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_throttler_custom_config.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_throttler_custom_config.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard tabletmanager_throttler_custom_config + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard tabletmanager_throttler_custom_config diff --git a/.github/workflows/cluster_endtoend_vreplication_basic.yml b/.github/workflows/cluster_endtoend_vreplication_basic.yml index d505346b0fd..01a22b9905b 100644 --- a/.github/workflows/cluster_endtoend_vreplication_basic.yml +++ b/.github/workflows/cluster_endtoend_vreplication_basic.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vreplication_basic + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vreplication_basic diff --git a/.github/workflows/cluster_endtoend_vreplication_cellalias.yml b/.github/workflows/cluster_endtoend_vreplication_cellalias.yml index 12d51772ed5..a49e6f7a5b7 100644 --- a/.github/workflows/cluster_endtoend_vreplication_cellalias.yml +++ b/.github/workflows/cluster_endtoend_vreplication_cellalias.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vreplication_cellalias + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vreplication_cellalias diff --git a/.github/workflows/cluster_endtoend_vreplication_migrate.yml b/.github/workflows/cluster_endtoend_vreplication_migrate.yml index 1e7e26d7c08..f3b658cd70d 100644 --- a/.github/workflows/cluster_endtoend_vreplication_migrate.yml +++ b/.github/workflows/cluster_endtoend_vreplication_migrate.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vreplication_migrate + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vreplication_migrate diff --git a/.github/workflows/cluster_endtoend_vreplication_multicell.yml b/.github/workflows/cluster_endtoend_vreplication_multicell.yml index 5025835610d..da0c0dde998 100644 --- a/.github/workflows/cluster_endtoend_vreplication_multicell.yml +++ b/.github/workflows/cluster_endtoend_vreplication_multicell.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vreplication_multicell + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vreplication_multicell diff --git a/.github/workflows/cluster_endtoend_vreplication_v2.yml b/.github/workflows/cluster_endtoend_vreplication_v2.yml index 139c046c5ec..7ac1627963a 100644 --- a/.github/workflows/cluster_endtoend_vreplication_v2.yml +++ b/.github/workflows/cluster_endtoend_vreplication_v2.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vreplication_v2 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vreplication_v2 diff --git a/.github/workflows/cluster_endtoend_vstream_failover.yml b/.github/workflows/cluster_endtoend_vstream_failover.yml index dd173a0800d..d81f18faca6 100644 --- a/.github/workflows/cluster_endtoend_vstream_failover.yml +++ b/.github/workflows/cluster_endtoend_vstream_failover.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vstream_failover + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vstream_failover diff --git a/.github/workflows/cluster_endtoend_vstream_stoponreshard_false.yml b/.github/workflows/cluster_endtoend_vstream_stoponreshard_false.yml index 51627532263..553b211f40b 100644 --- a/.github/workflows/cluster_endtoend_vstream_stoponreshard_false.yml +++ b/.github/workflows/cluster_endtoend_vstream_stoponreshard_false.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vstream_stoponreshard_false + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vstream_stoponreshard_false diff --git a/.github/workflows/cluster_endtoend_vstream_stoponreshard_true.yml b/.github/workflows/cluster_endtoend_vstream_stoponreshard_true.yml index 2fd2751b0c2..c71e4ba5152 100644 --- a/.github/workflows/cluster_endtoend_vstream_stoponreshard_true.yml +++ b/.github/workflows/cluster_endtoend_vstream_stoponreshard_true.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vstream_stoponreshard_true + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vstream_stoponreshard_true diff --git a/.github/workflows/cluster_endtoend_vtgate_buffer.yml b/.github/workflows/cluster_endtoend_vtgate_buffer.yml index ac4dd115421..065dc4aa051 100644 --- a/.github/workflows/cluster_endtoend_vtgate_buffer.yml +++ b/.github/workflows/cluster_endtoend_vtgate_buffer.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_buffer + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_buffer diff --git a/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml b/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml index 74bfed6d1d6..6d042817e75 100644 --- a/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml +++ b/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_concurrentdml + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_concurrentdml diff --git a/.github/workflows/cluster_endtoend_vtgate_gen4.yml b/.github/workflows/cluster_endtoend_vtgate_gen4.yml index 1c9e567aabc..be1ac80e8fb 100644 --- a/.github/workflows/cluster_endtoend_vtgate_gen4.yml +++ b/.github/workflows/cluster_endtoend_vtgate_gen4.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_gen4 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_gen4 diff --git a/.github/workflows/cluster_endtoend_vtgate_queries.yml b/.github/workflows/cluster_endtoend_vtgate_queries.yml index fffc22b3206..c51353a8c1e 100644 --- a/.github/workflows/cluster_endtoend_vtgate_queries.yml +++ b/.github/workflows/cluster_endtoend_vtgate_queries.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_queries + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_queries diff --git a/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml b/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml index 44439036e1e..4515e9d8541 100644 --- a/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml +++ b/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_readafterwrite + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_readafterwrite diff --git a/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml b/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml index ae7b6556b98..a0fae95af6d 100644 --- a/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml +++ b/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_reservedconn + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_reservedconn diff --git a/.github/workflows/cluster_endtoend_vtgate_schema.yml b/.github/workflows/cluster_endtoend_vtgate_schema.yml index 5c2f6c1149c..889b7dd8325 100644 --- a/.github/workflows/cluster_endtoend_vtgate_schema.yml +++ b/.github/workflows/cluster_endtoend_vtgate_schema.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_schema + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_schema diff --git a/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml b/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml index 787206b81e7..a47a57afbf5 100644 --- a/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml +++ b/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_schema_tracker + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_schema_tracker diff --git a/.github/workflows/cluster_endtoend_vtgate_topo.yml b/.github/workflows/cluster_endtoend_vtgate_topo.yml index 748b3ae6a55..aa27abc9fe6 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_topo + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_topo diff --git a/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml b/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml index bb6a84c3892..c92eea8b18d 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml @@ -51,7 +51,11 @@ jobs: make tools - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_topo_consul + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_topo_consul diff --git a/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml b/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml index 39aaef6af96..b5ebf3aa335 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_topo_etcd + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_topo_etcd diff --git a/.github/workflows/cluster_endtoend_vtgate_transaction.yml b/.github/workflows/cluster_endtoend_vtgate_transaction.yml index c6a3ee4e787..6dff3503ea6 100644 --- a/.github/workflows/cluster_endtoend_vtgate_transaction.yml +++ b/.github/workflows/cluster_endtoend_vtgate_transaction.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_transaction + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_transaction diff --git a/.github/workflows/cluster_endtoend_vtgate_unsharded.yml b/.github/workflows/cluster_endtoend_vtgate_unsharded.yml index 999cdc47225..f6c614f5068 100644 --- a/.github/workflows/cluster_endtoend_vtgate_unsharded.yml +++ b/.github/workflows/cluster_endtoend_vtgate_unsharded.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_unsharded + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_unsharded diff --git a/.github/workflows/cluster_endtoend_vtgate_v3.yml b/.github/workflows/cluster_endtoend_vtgate_v3.yml index 18367730163..abaae22cfb1 100644 --- a/.github/workflows/cluster_endtoend_vtgate_v3.yml +++ b/.github/workflows/cluster_endtoend_vtgate_v3.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_v3 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_v3 diff --git a/.github/workflows/cluster_endtoend_vtgate_vindex.yml b/.github/workflows/cluster_endtoend_vtgate_vindex.yml index b2bb3c1948f..67498a0c358 100644 --- a/.github/workflows/cluster_endtoend_vtgate_vindex.yml +++ b/.github/workflows/cluster_endtoend_vtgate_vindex.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_vindex + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_vindex diff --git a/.github/workflows/cluster_endtoend_vtgate_vschema.yml b/.github/workflows/cluster_endtoend_vtgate_vschema.yml index 0c001aedc88..3144c8d3804 100644 --- a/.github/workflows/cluster_endtoend_vtgate_vschema.yml +++ b/.github/workflows/cluster_endtoend_vtgate_vschema.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_vschema + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vtgate_vschema diff --git a/.github/workflows/cluster_endtoend_vtorc.yml b/.github/workflows/cluster_endtoend_vtorc.yml index d89f4625e08..400b916aaa5 100644 --- a/.github/workflows/cluster_endtoend_vtorc.yml +++ b/.github/workflows/cluster_endtoend_vtorc.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard vtorc + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard vtorc diff --git a/.github/workflows/cluster_endtoend_xb_recovery.yml b/.github/workflows/cluster_endtoend_xb_recovery.yml index 9882ee86c09..0d4aea0bd3c 100644 --- a/.github/workflows/cluster_endtoend_xb_recovery.yml +++ b/.github/workflows/cluster_endtoend_xb_recovery.yml @@ -47,7 +47,11 @@ jobs: sudo apt-get install percona-xtrabackup-24 - name: Run cluster endtoend test - timeout-minutes: 30 - run: | - source build.env - eatmydata -- go run test.go -docker=false -print-log -follow -shard xb_recovery + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + source build.env + eatmydata -- go run test.go -docker=false -print-log -follow -shard xb_recovery From af679dff0298ca1aacf8121f2fa8ec1c0df3f29f Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Wed, 17 Aug 2022 11:44:07 -0700 Subject: [PATCH 15/17] add retry on error for CI tests --- test/templates/cluster_endtoend_test_self_hosted.tpl | 9 +++++++-- test/templates/unit_test.tpl | 10 +++++++--- test/templates/unit_test_self_hosted.tpl | 9 +++++++-- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/test/templates/cluster_endtoend_test_self_hosted.tpl b/test/templates/cluster_endtoend_test_self_hosted.tpl index 3e113cd37cf..dd8ebcba8f0 100644 --- a/test/templates/cluster_endtoend_test_self_hosted.tpl +++ b/test/templates/cluster_endtoend_test_self_hosted.tpl @@ -17,8 +17,13 @@ jobs: run: docker build -f {{.Dockerfile}} -t {{.ImageName}}:$GITHUB_SHA . - name: Run test - timeout-minutes: 30 - run: docker run --name "{{.ImageName}}_$GITHUB_SHA" {{.ImageName}}:$GITHUB_SHA /bin/bash -c 'source build.env && go run test.go -keep-data=true -docker=false -print-log -follow -shard {{.Shard}} -- -- --keep-data=true' + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + docker run --name "{{.ImageName}}_$GITHUB_SHA" {{.ImageName}}:$GITHUB_SHA /bin/bash -c 'source build.env && go run test.go -keep-data=true -docker=false -print-log -follow -shard {{.Shard}} -- -- --keep-data=true' - name: Print Volume Used if: ${{"{{ always() }}"}} diff --git a/test/templates/unit_test.tpl b/test/templates/unit_test.tpl index b57cdac57d9..1ef28bb04ff 100644 --- a/test/templates/unit_test.tpl +++ b/test/templates/unit_test.tpl @@ -106,6 +106,10 @@ jobs: make tools - name: Run test - timeout-minutes: 30 - run: | - eatmydata -- make unit_test + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + eatmydata -- make unit_test diff --git a/test/templates/unit_test_self_hosted.tpl b/test/templates/unit_test_self_hosted.tpl index b3306d4bb19..0af1a673248 100644 --- a/test/templates/unit_test_self_hosted.tpl +++ b/test/templates/unit_test_self_hosted.tpl @@ -16,8 +16,13 @@ jobs: run: docker build -f {{.Dockerfile}} -t {{.ImageName}}:$GITHUB_SHA . - name: Run test - timeout-minutes: 30 - run: docker run --name "{{.ImageName}}_$GITHUB_SHA" {{.ImageName}}:$GITHUB_SHA /bin/bash -c 'make unit_test' + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + docker run --name "{{.ImageName}}_$GITHUB_SHA" {{.ImageName}}:$GITHUB_SHA /bin/bash -c 'make unit_test' - name: Print Volume Used if: ${{"{{ always() }}"}} From d6e893353b875e2ad551584a76efecea853be0f2 Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Wed, 17 Aug 2022 11:48:56 -0700 Subject: [PATCH 16/17] add retry on error for CI tests --- .github/workflows/unit_race.yml | 9 +++++++-- .github/workflows/unit_test_mariadb103.yml | 10 +++++++--- .github/workflows/unit_test_mysql57.yml | 10 +++++++--- .github/workflows/unit_test_mysql80.yml | 10 +++++++--- .github/workflows/unit_test_percona56.yml | 10 +++++++--- 5 files changed, 35 insertions(+), 14 deletions(-) diff --git a/.github/workflows/unit_race.yml b/.github/workflows/unit_race.yml index bdfb5849b9c..36f5f45677d 100644 --- a/.github/workflows/unit_race.yml +++ b/.github/workflows/unit_race.yml @@ -18,8 +18,13 @@ jobs: run: docker build -f ./.github/docker/unit_test_race/Dockerfile -t unit_test_race:$GITHUB_SHA . - name: Run test - timeout-minutes: 30 - run: docker run --name "unit_test_race_$GITHUB_SHA" unit_test_race:$GITHUB_SHA /bin/bash -c 'make unit_test_race' + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + docker run --name "unit_test_race_$GITHUB_SHA" unit_test_race:$GITHUB_SHA /bin/bash -c 'make unit_test_race' - name: Print Volume Used if: ${{ always() }} diff --git a/.github/workflows/unit_test_mariadb103.yml b/.github/workflows/unit_test_mariadb103.yml index 6d4c908c3f6..a7c880bffc9 100644 --- a/.github/workflows/unit_test_mariadb103.yml +++ b/.github/workflows/unit_test_mariadb103.yml @@ -70,6 +70,10 @@ jobs: make tools - name: Run test - timeout-minutes: 30 - run: | - eatmydata -- make unit_test + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + eatmydata -- make unit_test diff --git a/.github/workflows/unit_test_mysql57.yml b/.github/workflows/unit_test_mysql57.yml index 9d5f6344b18..891551169bf 100644 --- a/.github/workflows/unit_test_mysql57.yml +++ b/.github/workflows/unit_test_mysql57.yml @@ -55,6 +55,10 @@ jobs: make tools - name: Run test - timeout-minutes: 30 - run: | - eatmydata -- make unit_test + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + eatmydata -- make unit_test diff --git a/.github/workflows/unit_test_mysql80.yml b/.github/workflows/unit_test_mysql80.yml index 4df2a435b46..8c25b802065 100644 --- a/.github/workflows/unit_test_mysql80.yml +++ b/.github/workflows/unit_test_mysql80.yml @@ -73,6 +73,10 @@ jobs: make tools - name: Run test - timeout-minutes: 30 - run: | - eatmydata -- make unit_test + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + eatmydata -- make unit_test diff --git a/.github/workflows/unit_test_percona56.yml b/.github/workflows/unit_test_percona56.yml index fe13df50da1..e5a6ac42c53 100644 --- a/.github/workflows/unit_test_percona56.yml +++ b/.github/workflows/unit_test_percona56.yml @@ -71,6 +71,10 @@ jobs: make tools - name: Run test - timeout-minutes: 30 - run: | - eatmydata -- make unit_test + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + eatmydata -- make unit_test From 6d9b11955f518be98e48d8013499785e93598f4a Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Wed, 17 Aug 2022 13:26:32 -0700 Subject: [PATCH 17/17] add retry on error for CI tests --- .github/workflows/docker_test_cluster_10.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_test_cluster_10.yml b/.github/workflows/docker_test_cluster_10.yml index 4787dbcc2e3..b70d81c5acc 100644 --- a/.github/workflows/docker_test_cluster_10.yml +++ b/.github/workflows/docker_test_cluster_10.yml @@ -27,5 +27,10 @@ jobs: uses: actions/checkout@v2 - name: Run tests which require docker - 1 - run: | - go run test.go -docker=true --follow -shard 10 + uses: nick-fields/retry@v2 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + command: | + go run test.go -docker=true --follow -shard 10