diff --git a/.github/workflows/check_make_vtadmin_authz_testgen.yml b/.github/workflows/check_make_vtadmin_authz_testgen.yml index 3502c973632..c6deee2f112 100644 --- a/.github/workflows/check_make_vtadmin_authz_testgen.yml +++ b/.github/workflows/check_make_vtadmin_authz_testgen.yml @@ -19,7 +19,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/check_make_vtadmin_web_proto.yml b/.github/workflows/check_make_vtadmin_web_proto.yml index 244e7e77f87..d430163cf26 100644 --- a/.github/workflows/check_make_vtadmin_web_proto.yml +++ b/.github/workflows/check_make_vtadmin_web_proto.yml @@ -19,7 +19,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_12.yml b/.github/workflows/cluster_endtoend_12.yml index b5671da2748..c575f4650c9 100644 --- a/.github/workflows/cluster_endtoend_12.yml +++ b/.github/workflows/cluster_endtoend_12.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (12) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_13.yml b/.github/workflows/cluster_endtoend_13.yml index 6fb174f3984..a6dd7f3183d 100644 --- a/.github/workflows/cluster_endtoend_13.yml +++ b/.github/workflows/cluster_endtoend_13.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (13) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_15.yml b/.github/workflows/cluster_endtoend_15.yml index 7113acfef81..d847d6a626d 100644 --- a/.github/workflows/cluster_endtoend_15.yml +++ b/.github/workflows/cluster_endtoend_15.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (15) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_18.yml b/.github/workflows/cluster_endtoend_18.yml index a981a9998e0..eab73700647 100644 --- a/.github/workflows/cluster_endtoend_18.yml +++ b/.github/workflows/cluster_endtoend_18.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (18) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_21.yml b/.github/workflows/cluster_endtoend_21.yml index 3a85196843a..c4f53b610fa 100644 --- a/.github/workflows/cluster_endtoend_21.yml +++ b/.github/workflows/cluster_endtoend_21.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (21) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_22.yml b/.github/workflows/cluster_endtoend_22.yml index b3aea60aec5..a5c9502fbb5 100644 --- a/.github/workflows/cluster_endtoend_22.yml +++ b/.github/workflows/cluster_endtoend_22.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (22) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_backup_pitr.yml b/.github/workflows/cluster_endtoend_backup_pitr.yml index e4715cfa9a6..6c01fce5cbf 100644 --- a/.github/workflows/cluster_endtoend_backup_pitr.yml +++ b/.github/workflows/cluster_endtoend_backup_pitr.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (backup_pitr) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_backup_pitr_mysql57.yml b/.github/workflows/cluster_endtoend_backup_pitr_mysql57.yml index 7c7de8a8ea0..7aba81b9fbb 100644 --- a/.github/workflows/cluster_endtoend_backup_pitr_mysql57.yml +++ b/.github/workflows/cluster_endtoend_backup_pitr_mysql57.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (backup_pitr) mysql57 - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup.yml b/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup.yml index 7f205ecb5d8..904cb0c4659 100644 --- a/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup.yml +++ b/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (backup_pitr_xtrabackup) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup_mysql57.yml b/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup_mysql57.yml index bb0b0a7edc0..7ccad8d57fe 100644 --- a/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup_mysql57.yml +++ b/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup_mysql57.yml @@ -20,7 +20,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (backup_pitr_xtrabackup) mysql57 - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -34,7 +34,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml b/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml index 3f86385755d..342ed80d0a4 100644 --- a/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml +++ b/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (ers_prs_newfeatures_heavy) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_mysql80.yml b/.github/workflows/cluster_endtoend_mysql80.yml index c9bc33735fb..12652a1d1ca 100644 --- a/.github/workflows/cluster_endtoend_mysql80.yml +++ b/.github/workflows/cluster_endtoend_mysql80.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (mysql80) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_mysql_server_vault.yml b/.github/workflows/cluster_endtoend_mysql_server_vault.yml index e90a7297cf5..c2d74965f87 100644 --- a/.github/workflows/cluster_endtoend_mysql_server_vault.yml +++ b/.github/workflows/cluster_endtoend_mysql_server_vault.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (mysql_server_vault) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_onlineddl_ghost.yml b/.github/workflows/cluster_endtoend_onlineddl_ghost.yml index de85131aeb6..50dcccf3eaf 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_ghost.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_ghost.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_ghost) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_onlineddl_ghost_mysql57.yml b/.github/workflows/cluster_endtoend_onlineddl_ghost_mysql57.yml index 68cc1ac7fd8..23ac990f0e4 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_ghost_mysql57.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_ghost_mysql57.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_ghost) mysql57 - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_onlineddl_revert.yml b/.github/workflows/cluster_endtoend_onlineddl_revert.yml index bb559fe6f9f..92b9e2b1947 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_revert.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_revert.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_revert) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_onlineddl_revert_mysql57.yml b/.github/workflows/cluster_endtoend_onlineddl_revert_mysql57.yml index 9f311847a13..4cb6bf9b65e 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_revert_mysql57.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_revert_mysql57.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_revert) mysql57 - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml b/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml index 51142d5d936..e441fa654b3 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_scheduler) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_onlineddl_scheduler_mysql57.yml b/.github/workflows/cluster_endtoend_onlineddl_scheduler_mysql57.yml index e23679ac237..4b85d6ba00f 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_scheduler_mysql57.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_scheduler_mysql57.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_scheduler) mysql57 - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml index 9761fb19877..60f19b137b5 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_vrepl) - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_mysql57.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_mysql57.yml index 070bc17dd35..67776d81465 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_mysql57.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_mysql57.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_vrepl) mysql57 - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml index e969e214a17..0338e7aee0b 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_vrepl_stress) - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_mysql57.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_mysql57.yml index 9157028dfaa..454e387b856 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_mysql57.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_mysql57.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_vrepl_stress) mysql57 - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml index c7343a35459..01166933dfe 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_vrepl_stress_suite) - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite_mysql57.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite_mysql57.yml index 32155c73db8..47f8b56ec96 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite_mysql57.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite_mysql57.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_vrepl_stress_suite) mysql57 - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml index 854b56b2175..84d780e05b1 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_vrepl_suite) - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite_mysql57.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite_mysql57.yml index 7e8d09b0cc8..4c96cf8b0cb 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite_mysql57.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite_mysql57.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (onlineddl_vrepl_suite) mysql57 - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml b/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml index f0edbbbe54f..ec232fc5f88 100644 --- a/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml +++ b/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (schemadiff_vrepl) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_schemadiff_vrepl_mysql57.yml b/.github/workflows/cluster_endtoend_schemadiff_vrepl_mysql57.yml index f51d509d4c1..c3d719d4b86 100644 --- a/.github/workflows/cluster_endtoend_schemadiff_vrepl_mysql57.yml +++ b/.github/workflows/cluster_endtoend_schemadiff_vrepl_mysql57.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (schemadiff_vrepl) mysql57 - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_tabletmanager_consul.yml b/.github/workflows/cluster_endtoend_tabletmanager_consul.yml index c6efe2c0a12..80ab860581a 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_consul.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_consul.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (tabletmanager_consul) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml b/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml index 0bfd152e454..b8cca7701a8 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (tabletmanager_tablegc) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_tabletmanager_tablegc_mysql57.yml b/.github/workflows/cluster_endtoend_tabletmanager_tablegc_mysql57.yml index d7f6aae6e16..b784a6d52af 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_tablegc_mysql57.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_tablegc_mysql57.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (tabletmanager_tablegc) mysql57 - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_tabletmanager_throttler_topo.yml b/.github/workflows/cluster_endtoend_tabletmanager_throttler_topo.yml index d33db24b6cd..bb7756c0005 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_throttler_topo.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_throttler_topo.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (tabletmanager_throttler_topo) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_topo_connection_cache.yml b/.github/workflows/cluster_endtoend_topo_connection_cache.yml index 75d893a62fb..f17210dd963 100644 --- a/.github/workflows/cluster_endtoend_topo_connection_cache.yml +++ b/.github/workflows/cluster_endtoend_topo_connection_cache.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (topo_connection_cache) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml b/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml index 02b15144b00..14af9f22dc1 100644 --- a/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml +++ b/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vreplication_across_db_versions) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vreplication_basic.yml b/.github/workflows/cluster_endtoend_vreplication_basic.yml index 72b8a162979..560c952dc4c 100644 --- a/.github/workflows/cluster_endtoend_vreplication_basic.yml +++ b/.github/workflows/cluster_endtoend_vreplication_basic.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vreplication_basic) - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vreplication_cellalias.yml b/.github/workflows/cluster_endtoend_vreplication_cellalias.yml index 75a4f9bfe62..5f9b8a7654d 100644 --- a/.github/workflows/cluster_endtoend_vreplication_cellalias.yml +++ b/.github/workflows/cluster_endtoend_vreplication_cellalias.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vreplication_cellalias) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vreplication_foreign_key_stress.yml b/.github/workflows/cluster_endtoend_vreplication_foreign_key_stress.yml index 860629d3b9b..28702823875 100644 --- a/.github/workflows/cluster_endtoend_vreplication_foreign_key_stress.yml +++ b/.github/workflows/cluster_endtoend_vreplication_foreign_key_stress.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vreplication_foreign_key_stress) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vreplication_migrate_vdiff2_convert_tz.yml b/.github/workflows/cluster_endtoend_vreplication_migrate_vdiff2_convert_tz.yml index 653e1ea3924..c2de2b6980b 100644 --- a/.github/workflows/cluster_endtoend_vreplication_migrate_vdiff2_convert_tz.yml +++ b/.github/workflows/cluster_endtoend_vreplication_migrate_vdiff2_convert_tz.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vreplication_migrate_vdiff2_convert_tz) - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vreplication_partial_movetables_and_materialize.yml b/.github/workflows/cluster_endtoend_vreplication_partial_movetables_and_materialize.yml index d17d0677242..dc47deab15b 100644 --- a/.github/workflows/cluster_endtoend_vreplication_partial_movetables_and_materialize.yml +++ b/.github/workflows/cluster_endtoend_vreplication_partial_movetables_and_materialize.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vreplication_partial_movetables_and_materialize) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vreplication_v2.yml b/.github/workflows/cluster_endtoend_vreplication_v2.yml index 76c6c11207f..1bf4da012d7 100644 --- a/.github/workflows/cluster_endtoend_vreplication_v2.yml +++ b/.github/workflows/cluster_endtoend_vreplication_v2.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vreplication_v2) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vstream.yml b/.github/workflows/cluster_endtoend_vstream.yml index 0b2c727fe4f..5fd0841f700 100644 --- a/.github/workflows/cluster_endtoend_vstream.yml +++ b/.github/workflows/cluster_endtoend_vstream.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vstream) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtbackup.yml b/.github/workflows/cluster_endtoend_vtbackup.yml index 00f10fec26d..a21e71cc3f9 100644 --- a/.github/workflows/cluster_endtoend_vtbackup.yml +++ b/.github/workflows/cluster_endtoend_vtbackup.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtbackup) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml b/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml index 0cf8667acf0..e215e86a7b4 100644 --- a/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml +++ b/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtctlbackup_sharded_clustertest_heavy) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml b/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml index 23bf8d613f0..f6e524e49c5 100644 --- a/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml +++ b/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtgate_concurrentdml) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtgate_foreignkey_stress.yml b/.github/workflows/cluster_endtoend_vtgate_foreignkey_stress.yml index 9672dc48328..cec27705066 100644 --- a/.github/workflows/cluster_endtoend_vtgate_foreignkey_stress.yml +++ b/.github/workflows/cluster_endtoend_vtgate_foreignkey_stress.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtgate_foreignkey_stress) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtgate_gen4.yml b/.github/workflows/cluster_endtoend_vtgate_gen4.yml index 7c436f415ee..4a9fdc80740 100644 --- a/.github/workflows/cluster_endtoend_vtgate_gen4.yml +++ b/.github/workflows/cluster_endtoend_vtgate_gen4.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtgate_gen4) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml b/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml index 9f67cfb4270..73f038facd1 100644 --- a/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml +++ b/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtgate_general_heavy) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtgate_godriver.yml b/.github/workflows/cluster_endtoend_vtgate_godriver.yml index 43ca7c5f468..47ae9679887 100644 --- a/.github/workflows/cluster_endtoend_vtgate_godriver.yml +++ b/.github/workflows/cluster_endtoend_vtgate_godriver.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtgate_godriver) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml b/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml index 76927b73cad..7fb669b5de4 100644 --- a/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml +++ b/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtgate_partial_keyspace) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtgate_queries.yml b/.github/workflows/cluster_endtoend_vtgate_queries.yml index 6e3113c7d5e..403f5976923 100644 --- a/.github/workflows/cluster_endtoend_vtgate_queries.yml +++ b/.github/workflows/cluster_endtoend_vtgate_queries.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtgate_queries) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml b/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml index a514f88b299..6c30949b360 100644 --- a/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml +++ b/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtgate_readafterwrite) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml b/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml index a9271999da2..748120be491 100644 --- a/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml +++ b/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtgate_reservedconn) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtgate_schema.yml b/.github/workflows/cluster_endtoend_vtgate_schema.yml index f7e1392c30f..c04c787b7e9 100644 --- a/.github/workflows/cluster_endtoend_vtgate_schema.yml +++ b/.github/workflows/cluster_endtoend_vtgate_schema.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtgate_schema) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml b/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml index d1fb6206539..06a99b16d8b 100644 --- a/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml +++ b/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtgate_schema_tracker) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml b/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml index b73df1f1e62..3b1293f87fd 100644 --- a/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml +++ b/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtgate_tablet_healthcheck_cache) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtgate_topo.yml b/.github/workflows/cluster_endtoend_vtgate_topo.yml index c50b248d0ca..81360a9d488 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtgate_topo) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml b/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml index 17d82942488..fcf00112a46 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtgate_topo_consul) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml b/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml index a01a29271ee..1a52d5cf673 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtgate_topo_etcd) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtgate_transaction.yml b/.github/workflows/cluster_endtoend_vtgate_transaction.yml index 219dc781528..036a96eab2f 100644 --- a/.github/workflows/cluster_endtoend_vtgate_transaction.yml +++ b/.github/workflows/cluster_endtoend_vtgate_transaction.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtgate_transaction) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtgate_unsharded.yml b/.github/workflows/cluster_endtoend_vtgate_unsharded.yml index 24e4784e899..8b518be0a87 100644 --- a/.github/workflows/cluster_endtoend_vtgate_unsharded.yml +++ b/.github/workflows/cluster_endtoend_vtgate_unsharded.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtgate_unsharded) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml b/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml index 76ed3fbbab4..aec0a846326 100644 --- a/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml +++ b/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtgate_vindex_heavy) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtgate_vschema.yml b/.github/workflows/cluster_endtoend_vtgate_vschema.yml index 0683e8bfb02..bcae905fdc0 100644 --- a/.github/workflows/cluster_endtoend_vtgate_vschema.yml +++ b/.github/workflows/cluster_endtoend_vtgate_vschema.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtgate_vschema) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtorc.yml b/.github/workflows/cluster_endtoend_vtorc.yml index 051182e4f23..cee3fc273ba 100644 --- a/.github/workflows/cluster_endtoend_vtorc.yml +++ b/.github/workflows/cluster_endtoend_vtorc.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtorc) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vtorc_mysql57.yml b/.github/workflows/cluster_endtoend_vtorc_mysql57.yml index 48ac1fb9370..e5d352bd980 100644 --- a/.github/workflows/cluster_endtoend_vtorc_mysql57.yml +++ b/.github/workflows/cluster_endtoend_vtorc_mysql57.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vtorc) mysql57 - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml b/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml index 1e8cf1c51c8..eb5aec45868 100644 --- a/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml +++ b/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (vttablet_prscomplex) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_xb_backup.yml b/.github/workflows/cluster_endtoend_xb_backup.yml index 785930e4aac..7ad9812cc7f 100644 --- a/.github/workflows/cluster_endtoend_xb_backup.yml +++ b/.github/workflows/cluster_endtoend_xb_backup.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (xb_backup) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_xb_backup_mysql57.yml b/.github/workflows/cluster_endtoend_xb_backup_mysql57.yml index 128d94b6cd6..33492c4ff82 100644 --- a/.github/workflows/cluster_endtoend_xb_backup_mysql57.yml +++ b/.github/workflows/cluster_endtoend_xb_backup_mysql57.yml @@ -20,7 +20,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (xb_backup) mysql57 - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -34,7 +34,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_xb_recovery.yml b/.github/workflows/cluster_endtoend_xb_recovery.yml index 8feb30c7eb7..4d5bafa543c 100644 --- a/.github/workflows/cluster_endtoend_xb_recovery.yml +++ b/.github/workflows/cluster_endtoend_xb_recovery.yml @@ -16,7 +16,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (xb_recovery) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/cluster_endtoend_xb_recovery_mysql57.yml b/.github/workflows/cluster_endtoend_xb_recovery_mysql57.yml index be73e7e2908..9474b10d8ac 100644 --- a/.github/workflows/cluster_endtoend_xb_recovery_mysql57.yml +++ b/.github/workflows/cluster_endtoend_xb_recovery_mysql57.yml @@ -20,7 +20,7 @@ env: jobs: build: name: Run endtoend tests on Cluster (xb_recovery) mysql57 - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -34,7 +34,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 3015309d2c2..eba36c0952c 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -9,7 +9,8 @@ permissions: read-all jobs: test: name: Code Coverage - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 + if: github.repository == 'vitessio/vitess' steps: - name: Check out code diff --git a/.github/workflows/docker_test_cluster_10.yml b/.github/workflows/docker_test_cluster_10.yml index 2a1c1050461..74903b0558e 100644 --- a/.github/workflows/docker_test_cluster_10.yml +++ b/.github/workflows/docker_test_cluster_10.yml @@ -5,7 +5,7 @@ jobs: build: name: Docker Test Cluster 10 - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -19,7 +19,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip $skip diff --git a/.github/workflows/docker_test_cluster_25.yml b/.github/workflows/docker_test_cluster_25.yml index ba73f50252b..4c4f2a38507 100644 --- a/.github/workflows/docker_test_cluster_25.yml +++ b/.github/workflows/docker_test_cluster_25.yml @@ -5,7 +5,7 @@ jobs: build: name: Docker Test Cluster 25 - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -19,7 +19,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/e2e_race.yml b/.github/workflows/e2e_race.yml index cef0ea4d583..25fe3e71c4d 100644 --- a/.github/workflows/e2e_race.yml +++ b/.github/workflows/e2e_race.yml @@ -5,7 +5,7 @@ jobs: build: name: End-to-End Test (Race) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI run: | @@ -18,7 +18,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} @@ -69,7 +69,7 @@ jobs: echo mysql-apt-config mysql-apt-config/select-server select mysql-8.0 | sudo debconf-set-selections sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* sudo apt-get update - + # Install everything else we need, and configure sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata xz-utils sudo service mysql stop diff --git a/.github/workflows/endtoend.yml b/.github/workflows/endtoend.yml index 783d3305fc8..59057e51355 100644 --- a/.github/workflows/endtoend.yml +++ b/.github/workflows/endtoend.yml @@ -5,7 +5,7 @@ jobs: build: name: End-to-End Test - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI run: | @@ -18,7 +18,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/local_example.yml b/.github/workflows/local_example.yml index a6745340027..06067a00db9 100644 --- a/.github/workflows/local_example.yml +++ b/.github/workflows/local_example.yml @@ -5,7 +5,7 @@ jobs: build: name: Local example using ${{ matrix.topo }} on ubuntu-22.04 - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 strategy: matrix: topo: [consul,etcd,zk2] @@ -22,7 +22,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} @@ -81,7 +81,7 @@ jobs: echo mysql-apt-config mysql-apt-config/select-server select mysql-8.0 | sudo debconf-set-selections sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* sudo apt-get update - + # Install everything else we need, and configure sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget eatmydata sudo service mysql stop diff --git a/.github/workflows/region_example.yml b/.github/workflows/region_example.yml index 34881c2057c..cf4c8dc023c 100644 --- a/.github/workflows/region_example.yml +++ b/.github/workflows/region_example.yml @@ -5,7 +5,7 @@ jobs: build: name: Region Sharding example using ${{ matrix.topo }} on ubuntu-22.04 - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 strategy: matrix: topo: [etcd] @@ -22,7 +22,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/static_checks_etc.yml b/.github/workflows/static_checks_etc.yml index 699d2a56ac8..bd2495114b4 100644 --- a/.github/workflows/static_checks_etc.yml +++ b/.github/workflows/static_checks_etc.yml @@ -23,11 +23,11 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT + echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - name: Checkout code if: steps.skip-workflow.outputs.skip-workflow == 'false' diff --git a/.github/workflows/unit_race.yml b/.github/workflows/unit_race.yml index 909d35059d0..58cd3b7cc37 100644 --- a/.github/workflows/unit_race.yml +++ b/.github/workflows/unit_race.yml @@ -10,7 +10,7 @@ jobs: build: name: Unit Test (Race) - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI run: | @@ -23,7 +23,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/.github/workflows/unit_test_mysql57.yml b/.github/workflows/unit_test_mysql57.yml index f5c49d6439f..d9b63850abd 100644 --- a/.github/workflows/unit_test_mysql57.yml +++ b/.github/workflows/unit_test_mysql57.yml @@ -16,7 +16,7 @@ env: jobs: test: name: Unit Test (mysql57) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} @@ -125,7 +125,7 @@ jobs: go mod download go install golang.org/x/tools/cmd/goimports@latest - + # install JUnit report formatter go install github.com/vitessio/go-junit-report@HEAD diff --git a/.github/workflows/unit_test_mysql80.yml b/.github/workflows/unit_test_mysql80.yml index 459e3ec6e9d..2ae3fcee56e 100644 --- a/.github/workflows/unit_test_mysql80.yml +++ b/.github/workflows/unit_test_mysql80.yml @@ -16,7 +16,7 @@ env: jobs: test: name: Unit Test (mysql80) - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +30,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} @@ -122,7 +122,7 @@ jobs: go mod download go install golang.org/x/tools/cmd/goimports@latest - + # install JUnit report formatter go install github.com/vitessio/go-junit-report@HEAD diff --git a/.github/workflows/upgrade_downgrade_test_backups_e2e.yml b/.github/workflows/upgrade_downgrade_test_backups_e2e.yml index e8b8a688879..816a275e08b 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_e2e.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_e2e.yml @@ -13,7 +13,7 @@ jobs: upgrade_downgrade_test_e2e: timeout-minutes: 60 name: Run Upgrade Downgrade Test - Backups - E2E - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -27,7 +27,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} @@ -43,7 +43,7 @@ jobs: if: steps.skip-workflow.outputs.skip-workflow == 'false' id: output-previous-release-ref run: | - previous_release_ref=$(./tools/get_previous_release.sh ${{github.base_ref}} ${{github.ref}}) + previous_release_ref=$(./tools/get_previous_release_shopify.sh) echo $previous_release_ref echo "previous_release_ref=${previous_release_ref}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml b/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml index 0e24c534057..ade7f1d3c0b 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml @@ -10,11 +10,10 @@ concurrency: permissions: read-all jobs: - upgrade_downgrade_test_e2e: timeout-minutes: 60 name: Run Upgrade Downgrade Test - Backups - E2E - Next Release - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -32,7 +31,7 @@ jobs: - name: Set output with latest release branch id: output-next-release-ref run: | - next_release_ref=$(./tools/get_next_release.sh ${{github.base_ref}} ${{github.ref}}) + next_release_ref=$(./tools/get_next_release_shopify.sh) echo $next_release_ref echo "next_release_ref=${next_release_ref}" >> $GITHUB_OUTPUT @@ -40,7 +39,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi if [[ "${{steps.output-next-release-ref.outputs.next_release_ref}}" == "" ]]; then diff --git a/.github/workflows/upgrade_downgrade_test_backups_manual.yml b/.github/workflows/upgrade_downgrade_test_backups_manual.yml index 3f25e2c8663..e0754b6491f 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_manual.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_manual.yml @@ -10,12 +10,11 @@ concurrency: permissions: read-all jobs: - # This job usually execute in ± 20 minutes upgrade_downgrade_test_manual: timeout-minutes: 40 name: Run Upgrade Downgrade Test - Backups - Manual - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -29,7 +28,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} @@ -46,7 +45,7 @@ jobs: id: output-previous-release-ref if: steps.skip-workflow.outputs.skip-workflow == 'false' run: | - previous_release_ref=$(./tools/get_previous_release.sh ${{github.base_ref}} ${{github.ref}}) + previous_release_ref=$(./tools/get_previous_release_shopify.sh) echo $previous_release_ref echo "previous_release_ref=${previous_release_ref}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml b/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml index 83a678fc065..6e54e987b8a 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml @@ -10,12 +10,11 @@ concurrency: permissions: read-all jobs: - # This job usually execute in ± 20 minutes upgrade_downgrade_test_manual: timeout-minutes: 40 name: Run Upgrade Downgrade Test - Backups - Manual - Next Release - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -34,7 +33,7 @@ jobs: - name: Set output with latest release branch id: output-next-release-ref run: | - next_release_ref=$(./tools/get_next_release.sh ${{github.base_ref}} ${{github.ref}}) + next_release_ref=$(./tools/get_next_release_shopify.sh) echo $next_release_ref echo "next_release_ref=${next_release_ref}" >> $GITHUB_OUTPUT @@ -42,7 +41,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi if [[ "${{steps.output-next-release-ref.outputs.next_release_ref}}" == "" ]]; then diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml b/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml index 20dc7e4732f..715b3170f1b 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml @@ -13,10 +13,9 @@ permissions: read-all # (vtgate, vttablet, etc) built on different versions. jobs: - upgrade_downgrade_test: name: Run Upgrade Downgrade Test - Query Serving (Queries) - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +29,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} @@ -46,7 +45,7 @@ jobs: id: output-previous-release-ref if: steps.skip-workflow.outputs.skip-workflow == 'false' run: | - previous_release_ref=$(./tools/get_previous_release.sh ${{github.base_ref}} ${{github.ref}}) + previous_release_ref=$(./tools/get_previous_release_shopify.sh) echo $previous_release_ref echo "previous_release_ref=${previous_release_ref}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml b/.github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml index 74db54cd9b4..63f55d3e96a 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml @@ -13,10 +13,9 @@ permissions: read-all # (vtgate, vttablet, etc) built on different versions. jobs: - upgrade_downgrade_test: name: Run Upgrade Downgrade Test - Query Serving (Queries) Next Release - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -34,7 +33,7 @@ jobs: - name: Set output with latest release branch id: output-next-release-ref run: | - next_release_ref=$(./tools/get_next_release.sh ${{github.base_ref}} ${{github.ref}}) + next_release_ref=$(./tools/get_next_release_shopify.sh) echo $next_release_ref echo "next_release_ref=${next_release_ref}" >> $GITHUB_OUTPUT @@ -42,7 +41,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi if [[ "${{steps.output-next-release-ref.outputs.next_release_ref}}" == "" ]]; then diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml b/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml index 12041575cd9..b9ffa6e8264 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml @@ -13,10 +13,9 @@ permissions: read-all # (vtgate, vttablet, etc) built on different versions. jobs: - upgrade_downgrade_test: name: Run Upgrade Downgrade Test - Query Serving (Schema) - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +29,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} @@ -46,7 +45,7 @@ jobs: id: output-previous-release-ref if: steps.skip-workflow.outputs.skip-workflow == 'false' run: | - previous_release_ref=$(./tools/get_previous_release.sh ${{github.base_ref}} ${{github.ref}}) + previous_release_ref=$(./tools/get_previous_release_shopify.sh) echo $previous_release_ref echo "previous_release_ref=${previous_release_ref}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_schema_next_release.yml b/.github/workflows/upgrade_downgrade_test_query_serving_schema_next_release.yml index 10c6ff49dac..d7ae14d7c50 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_schema_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_schema_next_release.yml @@ -13,10 +13,9 @@ permissions: read-all # (vtgate, vttablet, etc) built on different versions. jobs: - upgrade_downgrade_test: name: Run Upgrade Downgrade Test - Query Serving (Schema) Next Release - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -34,7 +33,7 @@ jobs: - name: Set output with latest release branch id: output-next-release-ref run: | - next_release_ref=$(./tools/get_next_release.sh ${{github.base_ref}} ${{github.ref}}) + next_release_ref=$(./tools/get_next_release_shopify.sh ${{github.base_ref}} ${{github.ref}}) echo $next_release_ref echo "next_release_ref=${next_release_ref}" >> $GITHUB_OUTPUT @@ -42,7 +41,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi if [[ "${{steps.output-next-release-ref.outputs.next_release_ref}}" == "" ]]; then diff --git a/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml b/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml index 66033484ce3..bcd1ff3548a 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml @@ -13,10 +13,9 @@ permissions: read-all # (vtctl, vttablet, etc) built on different versions. jobs: - upgrade_downgrade_test: name: Run Upgrade Downgrade Test - Reparent New Vtctl - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -34,7 +33,7 @@ jobs: - name: Set output with latest release branch id: output-next-release-ref run: | - next_release_ref=$(./tools/get_next_release.sh ${{github.base_ref}} ${{github.ref}}) + next_release_ref=$(./tools/get_next_release_shopify.sh ${{github.base_ref}} ${{github.ref}}) echo $next_release_ref echo "next_release_ref=${next_release_ref}" >> $GITHUB_OUTPUT @@ -42,7 +41,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi if [[ "${{steps.output-next-release-ref.outputs.next_release_ref}}" == "" ]]; then diff --git a/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml b/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml index d937bc7bc11..17367517d57 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml @@ -13,10 +13,9 @@ permissions: read-all # (vtctl, vttablet, etc) built on different versions. jobs: - upgrade_downgrade_test: name: Run Upgrade Downgrade Test - Reparent New VTTablet - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -34,7 +33,7 @@ jobs: - name: Set output with latest release branch id: output-next-release-ref run: | - next_release_ref=$(./tools/get_next_release.sh ${{github.base_ref}} ${{github.ref}}) + next_release_ref=$(./tools/get_next_release_shopify.sh ${{github.base_ref}} ${{github.ref}}) echo $next_release_ref echo "next_release_ref=${next_release_ref}" >> $GITHUB_OUTPUT @@ -42,7 +41,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi if [[ "${{steps.output-next-release-ref.outputs.next_release_ref}}" == "" ]]; then diff --git a/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml b/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml index ac6ef068654..fc427870d75 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml @@ -13,10 +13,9 @@ permissions: read-all # (vtctl, vttablet, etc) built on different versions. jobs: - upgrade_downgrade_test: name: Run Upgrade Downgrade Test - Reparent Old Vtctl - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +29,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} @@ -46,7 +45,7 @@ jobs: id: output-previous-release-ref if: steps.skip-workflow.outputs.skip-workflow == 'false' run: | - previous_release_ref=$(./tools/get_previous_release.sh ${{github.base_ref}} ${{github.ref}}) + previous_release_ref=$(./tools/get_previous_release_shopify.sh) echo $previous_release_ref echo "previous_release_ref=${previous_release_ref}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml b/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml index df0cdb9c7c9..3f74103823f 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml @@ -13,10 +13,9 @@ permissions: read-all # (vtctl, vttablet, etc) built on different versions. jobs: - upgrade_downgrade_test: name: Run Upgrade Downgrade Test - Reparent Old VTTablet - runs-on: gh-hosted-runners-16cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -30,7 +29,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} @@ -46,7 +45,7 @@ jobs: id: output-previous-release-ref if: steps.skip-workflow.outputs.skip-workflow == 'false' run: | - previous_release_ref=$(./tools/get_previous_release.sh ${{github.base_ref}} ${{github.ref}}) + previous_release_ref=$(./tools/get_previous_release_shopify.sh ${{github.base_ref}} ${{github.ref}}) echo $previous_release_ref echo "previous_release_ref=${previous_release_ref}" >> $GITHUB_OUTPUT diff --git a/.github/workflows/vtadmin_web_build.yml b/.github/workflows/vtadmin_web_build.yml index 8d6dddc9d81..1b8b084fe9a 100644 --- a/.github/workflows/vtadmin_web_build.yml +++ b/.github/workflows/vtadmin_web_build.yml @@ -1,6 +1,6 @@ name: vtadmin-web build -# In specifying the 'paths' property, we need to include the path to this workflow .yml file. +# In specifying the 'paths' property, we need to include the path to this workflow .yml file. # See https://github.community/t/trigger-a-workflow-on-change-to-the-yml-file-itself/17792/4) on: push: @@ -16,7 +16,7 @@ permissions: read-all jobs: build: - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI run: | @@ -29,7 +29,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} @@ -53,6 +53,6 @@ jobs: run: cd ./web/vtadmin && npm run build # Cancel pending and in-progress runs of this workflow if a newer ref is pushed to CI. - concurrency: + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/vtadmin_web_lint.yml b/.github/workflows/vtadmin_web_lint.yml index a7fe7927bf9..7c5bd996cd2 100644 --- a/.github/workflows/vtadmin_web_lint.yml +++ b/.github/workflows/vtadmin_web_lint.yml @@ -1,6 +1,6 @@ name: vtadmin-web linting + formatting -# In specifying the 'paths' property, we need to include the path to this workflow .yml file. +# In specifying the 'paths' property, we need to include the path to this workflow .yml file. # See https://github.community/t/trigger-a-workflow-on-change-to-the-yml-file-itself/17792/4) on: push: @@ -29,7 +29,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} @@ -49,13 +49,13 @@ jobs: run: cd ./web/vtadmin && npm ci # Using "if: always()" means each step will run, even if a previous - # step fails. This is nice because, for example, we want stylelint and - # prettier to run even if eslint fails. + # step fails. This is nice because, for example, we want stylelint and + # prettier to run even if eslint fails. # # An undesirable secondary effect of this is these steps # will run even if the install, etc. steps fail, which is... weird. # A nice enhancement is to parallelize these steps into jobs, with the - # trade-off of more complexity around sharing npm install artifacts. + # trade-off of more complexity around sharing npm install artifacts. - name: Run eslint if: steps.skip-workflow.outputs.skip-workflow == 'false' && always() run: cd ./web/vtadmin && npm run lint:eslint @@ -63,12 +63,12 @@ jobs: - name: Run stylelint if: steps.skip-workflow.outputs.skip-workflow == 'false' && always() run: cd ./web/vtadmin && npm run lint:stylelint -- -f verbose - + - name: Run prettier if: steps.skip-workflow.outputs.skip-workflow == 'false' && always() run: cd ./web/vtadmin && npm run lint:prettier # Cancel pending and in-progress runs of this workflow if a newer ref is pushed to CI. - concurrency: + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/.github/workflows/vtadmin_web_unit_tests.yml b/.github/workflows/vtadmin_web_unit_tests.yml index 9c0fb3e9fdc..66c485407c1 100644 --- a/.github/workflows/vtadmin_web_unit_tests.yml +++ b/.github/workflows/vtadmin_web_unit_tests.yml @@ -1,6 +1,6 @@ name: vtadmin-web unit tests -# In specifying the 'paths' property, we need to include the path to this workflow .yml file. +# In specifying the 'paths' property, we need to include the path to this workflow .yml file. # See https://github.community/t/trigger-a-workflow-on-change-to-the-yml-file-itself/17792/4) on: push: @@ -16,7 +16,7 @@ permissions: read-all jobs: unit-tests: - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI run: | @@ -29,7 +29,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then + if [[ "${{github.event.pull_request}}" == "" ]]; then skip='true' fi echo Skip ${skip} @@ -51,8 +51,8 @@ jobs: - name: Run unit tests if: steps.skip-workflow.outputs.skip-workflow == 'false' run: cd ./web/vtadmin && CI=true npm run test - + # Cancel pending and in-progress runs of this workflow if a newer ref is pushed to CI. - concurrency: + concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true diff --git a/go/test/endtoend/vtcombo/vttest_sample_test.go b/go/test/endtoend/vtcombo/vttest_sample_test.go index daeb5e8deb9..4895c1195b0 100644 --- a/go/test/endtoend/vtcombo/vttest_sample_test.go +++ b/go/test/endtoend/vtcombo/vttest_sample_test.go @@ -130,6 +130,8 @@ func TestStandalone(t *testing.T) { tmp, _ := cmd.([]any) require.Contains(t, tmp[0], "vtcombo") + assertVSchemaExists(t, grpcAddress) + ctx := context.Background() conn, err := vtgateconn.Dial(ctx, grpcAddress) require.NoError(t, err) @@ -160,6 +162,17 @@ func TestStandalone(t *testing.T) { assertTransactionalityAndRollbackObeyed(ctx, t, conn, idStart) } +func assertVSchemaExists(t *testing.T, grpcAddress string) { + tmpCmd := exec.Command("vtctldclient", "--server", grpcAddress, "--compact", "GetVSchema", "routed") + + log.Infof("Running vtctldclient with command: %v", tmpCmd.Args) + + output, err := tmpCmd.CombinedOutput() + require.NoError(t, err, fmt.Sprintf("Output:\n%v", string(output))) + + assert.Equal(t, "{}\n", string(output)) +} + func assertInsertedRowsExist(ctx context.Context, t *testing.T, conn *vtgateconn.VTGateConn, idStart, rowCount int) { cur := conn.Session(ks1+":-80@rdonly", nil) bindVariables := map[string]*querypb.BindVariable{ diff --git a/go/vt/vtcombo/tablet_map.go b/go/vt/vtcombo/tablet_map.go index 369a8138b5a..84ffa10fd3a 100644 --- a/go/vt/vtcombo/tablet_map.go +++ b/go/vt/vtcombo/tablet_map.go @@ -301,6 +301,11 @@ func CreateKs( return 0, fmt.Errorf("CreateKeyspace(%v) failed: %v", keyspace, err) } + // make sure a valid vschema has been loaded + if err := ts.EnsureVSchema(ctx, keyspace); err != nil { + return 0, fmt.Errorf("EnsureVSchema(%v) failed: %v", keyspace, err) + } + // iterate through the shards for _, spb := range kpb.Shards { shard := spb.Name diff --git a/go/vt/vtgate/vindexes/cached_size.go b/go/vt/vtgate/vindexes/cached_size.go index a97411a6ac8..2051876895d 100644 --- a/go/vt/vtgate/vindexes/cached_size.go +++ b/go/vt/vtgate/vindexes/cached_size.go @@ -416,6 +416,42 @@ func (cached *NumericStaticMap) CachedSize(alloc bool) int64 { } return size } + +//go:nocheckptr +func (cached *Placement) CachedSize(alloc bool) int64 { + if cached == nil { + return int64(0) + } + size := int64(0) + if alloc { + size += int64(80) + } + // field name string + size += hack.RuntimeAllocSize(int64(len(cached.name))) + // field placementMap vitess.io/vitess/go/vt/vtgate/vindexes.PlacementMap + if cached.placementMap != nil { + size += int64(48) + hmap := reflect.ValueOf(cached.placementMap) + numBuckets := int(math.Pow(2, float64((*(*uint8)(unsafe.Pointer(hmap.Pointer() + uintptr(9))))))) + numOldBuckets := (*(*uint16)(unsafe.Pointer(hmap.Pointer() + uintptr(10)))) + size += hack.RuntimeAllocSize(int64(numOldBuckets * 208)) + if len(cached.placementMap) > 0 || numBuckets > 1 { + size += hack.RuntimeAllocSize(int64(numBuckets * 208)) + } + for k := range cached.placementMap { + size += hack.RuntimeAllocSize(int64(len(k))) + } + } + // field subVindex vitess.io/vitess/go/vt/vtgate/vindexes.Vindex + if cc, ok := cached.subVindex.(cachedObject); ok { + size += cc.CachedSize(true) + } + // field subVindexType string + size += hack.RuntimeAllocSize(int64(len(cached.subVindexType))) + // field subVindexName string + size += hack.RuntimeAllocSize(int64(len(cached.subVindexName))) + return size +} func (cached *RegionExperimental) CachedSize(alloc bool) int64 { if cached == nil { return int64(0) diff --git a/go/vt/vtgate/vindexes/placement.go b/go/vt/vtgate/vindexes/placement.go new file mode 100644 index 00000000000..4382bc95c83 --- /dev/null +++ b/go/vt/vtgate/vindexes/placement.go @@ -0,0 +1,224 @@ +/* +Copyright 2022 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +/* + +A Vindex which uses a mapping lookup table `placement_map` to set the first `placement_prefix_bytes` of the Keyspace ID +and another Vindex type `placement_sub_vindex_type` (which must support Hashing) as a sub-Vindex to set the rest. +This is suitable for regional sharding (like region_json or region_experimental) but does not require a mapping file, +and can support non-integer types for the sharding column. All parameters are prefixed with `placement_` so as to avoid +conflict, because the `params` map is passed to the sub-Vindex as well. + +*/ + +package vindexes + +import ( + "bytes" + "context" + "encoding/binary" + "fmt" + "strconv" + "strings" + + vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/vterrors" + + "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/vt/key" +) + +var ( + _ MultiColumn = (*Placement)(nil) + + PlacementRequiredParams = []string{ + "placement_map", + "placement_prefix_bytes", + "placement_sub_vindex_type", + } +) + +func init() { + Register("placement", NewPlacement) +} + +type PlacementMap map[string]uint64 + +type Placement struct { + name string + placementMap PlacementMap + subVindex Vindex + subVindexType string + subVindexName string + prefixBytes int +} + +// Parse a string containing a list of delimited string:integer key-value pairs, e.g. "foo:1,bar:2". +func parsePlacementMap(s string) (*PlacementMap, error) { + placementMap := make(PlacementMap) + for _, entry := range strings.Split(s, ",") { + if entry == "" { + continue + } + + kv := strings.Split(entry, ":") + if len(kv) != 2 { + return nil, fmt.Errorf("entry: %v; expected key:value", entry) + } + if kv[0] == "" { + return nil, fmt.Errorf("entry: %v; unexpected empty key", entry) + } + if kv[1] == "" { + return nil, fmt.Errorf("entry: %v; unexpected empty value", entry) + } + + value, err := strconv.ParseUint(kv[1], 0, 64) + if err != nil { + return nil, fmt.Errorf("entry: %v; %v", entry, err) + } + placementMap[kv[0]] = value + } + return &placementMap, nil +} + +func NewPlacement(name string, params map[string]string) (Vindex, error) { + var missingParams []string + for _, param := range PlacementRequiredParams { + if params[param] == "" { + missingParams = append(missingParams, param) + } + } + + if len(missingParams) > 0 { + return nil, fmt.Errorf("missing params: %s", strings.Join(missingParams, ", ")) + } + + placementMap, parseError := parsePlacementMap(params["placement_map"]) + if parseError != nil { + return nil, fmt.Errorf("malformed placement_map; %v", parseError) + } + + prefixBytes, prefixError := strconv.Atoi(params["placement_prefix_bytes"]) + if prefixError != nil { + return nil, prefixError + } + + if prefixBytes < 1 || prefixBytes > 7 { + return nil, fmt.Errorf("invalid placement_prefix_bytes: %v; expected integer between 1 and 7", prefixBytes) + } + + subVindexType := params["placement_sub_vindex_type"] + subVindexName := fmt.Sprintf("%s_sub_vindex", name) + subVindex, createVindexError := CreateVindex(subVindexType, subVindexName, params) + if createVindexError != nil { + return nil, fmt.Errorf("invalid placement_sub_vindex_type: %v", createVindexError) + } + + // TODO: Should we support MultiColumn Vindex? + if _, subVindexSupportsHashing := subVindex.(Hashing); !subVindexSupportsHashing { + return nil, fmt.Errorf("invalid placement_sub_vindex_type: %v; does not support the Hashing interface", createVindexError) + } + + return &Placement{ + name: name, + placementMap: *placementMap, + subVindex: subVindex, + subVindexType: subVindexType, + subVindexName: subVindexName, + prefixBytes: prefixBytes, + }, nil +} + +func (p *Placement) String() string { + return p.name +} + +func (p *Placement) Cost() int { + return 1 +} + +func (p *Placement) IsUnique() bool { + return true +} + +func (p *Placement) NeedsVCursor() bool { + return false +} + +func (p *Placement) PartialVindex() bool { + return true +} + +func makeDestinationPrefix(value uint64, prefixBytes int) []byte { + destinationPrefix := make([]byte, 8) + binary.BigEndian.PutUint64(destinationPrefix, value) + if prefixBytes < 8 { + // Shorten the prefix to the desired length. + destinationPrefix = destinationPrefix[(8 - prefixBytes):] + } + + return destinationPrefix +} + +func (p *Placement) Map(ctx context.Context, vcursor VCursor, rowsColValues [][]sqltypes.Value) ([]key.Destination, error) { + destinations := make([]key.Destination, 0, len(rowsColValues)) + + for _, row := range rowsColValues { + if len(row) != 1 && len(row) != 2 { + return nil, vterrors.Errorf(vtrpcpb.Code_INTERNAL, "wrong number of column values were passed: expected 1-2, got %d", len(row)) + } + + // Calculate the destination prefix from the placement key which will be the same whether this is a partial + // or full usage of the Vindex. + placementKey := row[0].ToString() + placementDestinationValue, placementMappingFound := p.placementMap[placementKey] + if !placementMappingFound { + destinations = append(destinations, key.DestinationNone{}) + continue + } + + placementDestinationPrefix := makeDestinationPrefix(placementDestinationValue, p.prefixBytes) + + if len(row) == 1 { // Partial Vindex usage with only the placement column provided. + destinations = append(destinations, NewKeyRangeFromPrefix(placementDestinationPrefix)) + } else if len(row) == 2 { // Full Vindex usage with the placement column and subVindex column provided. + subVindexValue, hashingError := p.subVindex.(Hashing).Hash(row[1]) + if hashingError != nil { + return nil, hashingError // TODO: Should we be less fatal here and use DestinationNone? + } + + // Concatenate and add to destinations. + rowDestination := append(placementDestinationPrefix, subVindexValue...) + destinations = append(destinations, key.DestinationKeyspaceID(rowDestination[0:8])) + } + } + + return destinations, nil +} + +func (p *Placement) Verify(ctx context.Context, vcursor VCursor, rowsColValues [][]sqltypes.Value, keyspaceIDs [][]byte) ([]bool, error) { + result := make([]bool, len(rowsColValues)) + destinations, _ := p.Map(ctx, vcursor, rowsColValues) + for i, destination := range destinations { + switch d := destination.(type) { + case key.DestinationKeyspaceID: + result[i] = bytes.Equal(d, keyspaceIDs[i]) + default: + result[i] = false + } + } + return result, nil +} diff --git a/go/vt/vtgate/vindexes/placement_test.go b/go/vt/vtgate/vindexes/placement_test.go new file mode 100644 index 00000000000..c590f1de3e8 --- /dev/null +++ b/go/vt/vtgate/vindexes/placement_test.go @@ -0,0 +1,354 @@ +/* +Copyright 2022 The Vitess Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package vindexes + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "vitess.io/vitess/go/sqltypes" + "vitess.io/vitess/go/vt/key" +) + +func createBasicPlacementVindex(t *testing.T) (Vindex, error) { + return CreateVindex("placement", "placement", map[string]string{ + "table": "t", + "from": "f1,f2", + "to": "toc", + "placement_prefix_bytes": "1", + "placement_map": "foo:1,bar:2", + "placement_sub_vindex_type": "xxhash", + }) +} + +func TestPlacementName(t *testing.T) { + vindex, err := createBasicPlacementVindex(t) + require.NoError(t, err) + assert.Equal(t, "placement", vindex.String()) +} + +func TestPlacementCost(t *testing.T) { + vindex, err := createBasicPlacementVindex(t) + require.NoError(t, err) + assert.Equal(t, 1, vindex.Cost()) +} + +func TestPlacementIsUnique(t *testing.T) { + vindex, err := createBasicPlacementVindex(t) + require.NoError(t, err) + assert.True(t, vindex.IsUnique()) +} + +func TestPlacementNeedsVCursor(t *testing.T) { + vindex, err := createBasicPlacementVindex(t) + require.NoError(t, err) + assert.False(t, vindex.NeedsVCursor()) +} + +func TestPlacementNoParams(t *testing.T) { + _, err := CreateVindex("placement", "placement", nil) + assert.EqualError(t, err, "missing params: placement_map, placement_prefix_bytes, placement_sub_vindex_type") +} + +func TestPlacementPlacementMapMissing(t *testing.T) { + _, err := CreateVindex("placement", "placement", map[string]string{ + "placement_prefix_bytes": "1", + "placement_sub_vindex_type": "hash", + }) + assert.EqualError(t, err, "missing params: placement_map") +} + +func TestPlacementPlacementMapMalformedMap(t *testing.T) { + _, err := CreateVindex("placement", "placement", map[string]string{ + "placement_map": "xyz", + "placement_prefix_bytes": "1", + "placement_sub_vindex_type": "hash", + }) + assert.EqualError(t, err, "malformed placement_map; entry: xyz; expected key:value") +} + +func TestPlacementPlacementMapMissingKey(t *testing.T) { + _, err := CreateVindex("placement", "placement", map[string]string{ + "placement_map": "abc:1,:2,ghi:3", + "placement_prefix_bytes": "1", + "placement_sub_vindex_type": "hash", + }) + assert.EqualError(t, err, "malformed placement_map; entry: :2; unexpected empty key") +} + +func TestPlacementPlacementMapMissingValue(t *testing.T) { + _, err := CreateVindex("placement", "placement", map[string]string{ + "placement_map": "abc:1,def:,ghi:3", + "placement_prefix_bytes": "1", + "placement_sub_vindex_type": "hash", + }) + assert.EqualError(t, err, "malformed placement_map; entry: def:; unexpected empty value") +} + +func TestPlacementPlacementMapMalformedValue(t *testing.T) { + _, err := CreateVindex("placement", "placement", map[string]string{ + "placement_map": "abc:xyz", + "placement_prefix_bytes": "1", + "placement_sub_vindex_type": "hash", + }) + assert.EqualError(t, err, "malformed placement_map; entry: abc:xyz; strconv.ParseUint: parsing \"xyz\": invalid syntax") +} + +func TestPlacementPrefixBytesMissing(t *testing.T) { + _, err := CreateVindex("placement", "placement", map[string]string{ + "placement_map": "foo:1,bar:2", + "placement_sub_vindex_type": "hash", + }) + assert.EqualError(t, err, "missing params: placement_prefix_bytes") +} + +func TestPlacementPrefixBytesTooLow(t *testing.T) { + _, err := CreateVindex("placement", "placement", map[string]string{ + "placement_map": "foo:1,bar:2", + "placement_prefix_bytes": "0", + "placement_sub_vindex_type": "hash", + }) + assert.EqualError(t, err, "invalid placement_prefix_bytes: 0; expected integer between 1 and 7") +} + +func TestPlacementPrefixBytesTooHigh(t *testing.T) { + _, err := CreateVindex("placement", "placement", map[string]string{ + "placement_map": "foo:1,bar:2", + "placement_prefix_bytes": "17", + "placement_sub_vindex_type": "hash", + }) + assert.EqualError(t, err, "invalid placement_prefix_bytes: 17; expected integer between 1 and 7") +} + +func TestPlacementSubVindexTypeMissing(t *testing.T) { + _, err := CreateVindex("placement", "placement", map[string]string{ + "placement_map": "foo:1,bar:2", + "placement_prefix_bytes": "1", + }) + assert.EqualError(t, err, "missing params: placement_sub_vindex_type") +} + +func TestPlacementSubVindexTypeIncorrect(t *testing.T) { + _, err := CreateVindex("placement", "placement", map[string]string{ + "placement_map": "foo:1,bar:2", + "placement_prefix_bytes": "1", + "placement_sub_vindex_type": "doesnotexist", + }) + assert.EqualError(t, err, "invalid placement_sub_vindex_type: vindexType \"doesnotexist\" not found") +} + +func TestPlacementMapSqlTypeVarChar(t *testing.T) { + vindex, err := CreateVindex("placement", "placement", map[string]string{ + "table": "t", + "from": "f1,f2", + "to": "toc", + "placement_prefix_bytes": "1", + "placement_map": "foo:1,bar:2", + "placement_sub_vindex_type": "xxhash", + }) + assert.NoError(t, err) + actualDestinations, err := vindex.(MultiColumn).Map(context.Background(), nil, [][]sqltypes.Value{{ + sqltypes.NewVarChar("foo"), sqltypes.NewVarChar("hello world"), + }, { + sqltypes.NewVarChar("bar"), sqltypes.NewVarChar("hello world"), + }, { + sqltypes.NewVarChar("xyz"), sqltypes.NewVarChar("hello world"), + }}) + assert.NoError(t, err) + + expectedDestinations := []key.Destination{ + key.DestinationKeyspaceID{0x01, 0x68, 0x69, 0x1e, 0xb2, 0x34, 0x67, 0xab}, + key.DestinationKeyspaceID{0x02, 0x68, 0x69, 0x1e, 0xb2, 0x34, 0x67, 0xab}, + key.DestinationNone{}, + } + assert.Equal(t, expectedDestinations, actualDestinations) +} + +func TestPlacementMapSqlTypeInt64(t *testing.T) { + vindex, err := CreateVindex("placement", "placement", map[string]string{ + "table": "t", + "from": "f1,f2", + "to": "toc", + "placement_prefix_bytes": "1", + "placement_map": "foo:1,bar:2", + "placement_sub_vindex_type": "xxhash", + }) + assert.NoError(t, err) + actualDestinations, err := vindex.(MultiColumn).Map(context.Background(), nil, [][]sqltypes.Value{{ + sqltypes.NewVarChar("foo"), sqltypes.NewInt64(1), + }, { + sqltypes.NewVarChar("bar"), sqltypes.NewInt64(1), + }, { + sqltypes.NewVarChar("xyz"), sqltypes.NewInt64(1), + }}) + assert.NoError(t, err) + + expectedDestinations := []key.Destination{ + key.DestinationKeyspaceID{0x01, 0xd4, 0x64, 0x05, 0x36, 0x76, 0x12, 0xb4}, + key.DestinationKeyspaceID{0x02, 0xd4, 0x64, 0x05, 0x36, 0x76, 0x12, 0xb4}, + key.DestinationNone{}, + } + assert.Equal(t, expectedDestinations, actualDestinations) +} + +func TestPlacementMapWithHexValues(t *testing.T) { + vindex, err := CreateVindex("placement", "placement", map[string]string{ + "table": "t", + "from": "f1,f2", + "to": "toc", + "placement_prefix_bytes": "1", + "placement_map": "foo:0x01,bar:0x02", + "placement_sub_vindex_type": "xxhash", + }) + assert.NoError(t, err) + actualDestinations, err := vindex.(MultiColumn).Map(context.Background(), nil, [][]sqltypes.Value{{ + sqltypes.NewVarChar("foo"), sqltypes.NewInt64(1), + }, { + sqltypes.NewVarChar("bar"), sqltypes.NewInt64(1), + }, { + sqltypes.NewVarChar("xyz"), sqltypes.NewInt64(1), + }}) + assert.NoError(t, err) + + expectedDestinations := []key.Destination{ + key.DestinationKeyspaceID{0x01, 0xd4, 0x64, 0x05, 0x36, 0x76, 0x12, 0xb4}, + key.DestinationKeyspaceID{0x02, 0xd4, 0x64, 0x05, 0x36, 0x76, 0x12, 0xb4}, + key.DestinationNone{}, + } + assert.Equal(t, expectedDestinations, actualDestinations) +} + +func TestPlacementMapMultiplePrefixBytes(t *testing.T) { + vindex, err := CreateVindex("placement", "placement", map[string]string{ + "table": "t", + "from": "f1,f2", + "to": "toc", + "placement_prefix_bytes": "4", + "placement_map": "foo:1,bar:2", + "placement_sub_vindex_type": "xxhash", + }) + assert.NoError(t, err) + actualDestinations, err := vindex.(MultiColumn).Map(context.Background(), nil, [][]sqltypes.Value{{ + sqltypes.NewVarChar("foo"), sqltypes.NewInt64(1), + }, { + sqltypes.NewVarChar("bar"), sqltypes.NewInt64(1), + }, { + sqltypes.NewVarChar("xyz"), sqltypes.NewInt64(1), + }}) + assert.NoError(t, err) + + expectedDestinations := []key.Destination{ + key.DestinationKeyspaceID{0x00, 0x00, 0x00, 0x01, 0xd4, 0x64, 0x05, 0x36}, + key.DestinationKeyspaceID{0x00, 0x00, 0x00, 0x02, 0xd4, 0x64, 0x05, 0x36}, + key.DestinationNone{}, + } + assert.Equal(t, expectedDestinations, actualDestinations) +} + +func TestPlacementSubVindexNumeric(t *testing.T) { + vindex, err := CreateVindex("placement", "placement", map[string]string{ + "table": "t", + "from": "f1,f2", + "to": "toc", + "placement_prefix_bytes": "1", + "placement_map": "foo:1,bar:2", + "placement_sub_vindex_type": "numeric", + }) + assert.NoError(t, err) + actualDestinations, err := vindex.(MultiColumn).Map(context.Background(), nil, [][]sqltypes.Value{{ + sqltypes.NewVarChar("foo"), sqltypes.NewInt64(0x01234567deadbeef), + }, { + sqltypes.NewVarChar("bar"), sqltypes.NewInt64(0x01234567deadbeef), + }, { + sqltypes.NewVarChar("xyz"), sqltypes.NewInt64(0x01234567deadbeef), + }}) + assert.NoError(t, err) + + expectedDestinations := []key.Destination{ + key.DestinationKeyspaceID{0x01, 0x01, 0x23, 0x45, 0x67, 0xde, 0xad, 0xbe}, + key.DestinationKeyspaceID{0x02, 0x01, 0x23, 0x45, 0x67, 0xde, 0xad, 0xbe}, + key.DestinationNone{}, + } + assert.Equal(t, expectedDestinations, actualDestinations) +} + +func TestPlacementMapPrefixOnly(t *testing.T) { + vindex, err := CreateVindex("placement", "placement", map[string]string{ + "table": "t", + "from": "f1,f2", + "to": "toc", + "placement_prefix_bytes": "1", + "placement_map": "foo:1,bar:2", + "placement_sub_vindex_type": "xxhash", + }) + assert.NoError(t, err) + actualDestinations, err := vindex.(MultiColumn).Map(context.Background(), nil, [][]sqltypes.Value{{ + sqltypes.NewVarChar("foo"), + }, { + sqltypes.NewVarChar("bar"), + }, { + sqltypes.NewVarChar("xyz"), + }}) + assert.NoError(t, err) + + expectedDestinations := []key.Destination{ + NewKeyRangeFromPrefix([]byte{0x01}), + NewKeyRangeFromPrefix([]byte{0x02}), + key.DestinationNone{}, + } + assert.Equal(t, expectedDestinations, actualDestinations) +} + +func TestPlacementMapTooManyColumns(t *testing.T) { + vindex, err := CreateVindex("placement", "placement", map[string]string{ + "table": "t", + "from": "f1,f2", + "to": "toc", + "placement_prefix_bytes": "1", + "placement_map": "foo:1,bar:2", + "placement_sub_vindex_type": "xxhash", + }) + assert.NoError(t, err) + actualDestinations, err := vindex.(MultiColumn).Map(context.Background(), nil, [][]sqltypes.Value{{ + // Too many columns; expecting two, providing three. + sqltypes.NewVarChar("a"), sqltypes.NewVarChar("b"), sqltypes.NewVarChar("c"), + }}) + assert.EqualError(t, err, "wrong number of column values were passed: expected 1-2, got 3") + + assert.Nil(t, actualDestinations) +} + +func TestPlacementMapNoColumns(t *testing.T) { + vindex, err := CreateVindex("placement", "placement", map[string]string{ + "table": "t", + "from": "f1,f2", + "to": "toc", + "placement_prefix_bytes": "1", + "placement_map": "foo:1,bar:2", + "placement_sub_vindex_type": "xxhash", + }) + assert.NoError(t, err) + actualDestinations, err := vindex.(MultiColumn).Map(context.Background(), nil, [][]sqltypes.Value{{ + // Empty column list. + }}) + assert.EqualError(t, err, "wrong number of column values were passed: expected 1-2, got 0") + + assert.Nil(t, actualDestinations) +} diff --git a/test/templates/cluster_endtoend_test.tpl b/test/templates/cluster_endtoend_test.tpl index 34f67c2aa34..30dae57ae22 100644 --- a/test/templates/cluster_endtoend_test.tpl +++ b/test/templates/cluster_endtoend_test.tpl @@ -14,7 +14,7 @@ env: jobs: build: name: Run endtoend tests on {{.Name}} - runs-on: {{if .Cores16}}gh-hosted-runners-16cores-1{{else}}gh-hosted-runners-4cores-1{{end}} + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -28,7 +28,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "{{"${{github.event.pull_request}}"}}" == "" ]] && [[ "{{"${{github.ref}}"}}" != "refs/heads/main" ]] && [[ ! "{{"${{github.ref}}"}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "{{"${{github.ref}}"}}" =~ "refs/tags/.*" ]]; then + if [[ "{{"${{github.event.pull_request}}"}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/test/templates/cluster_endtoend_test_docker.tpl b/test/templates/cluster_endtoend_test_docker.tpl index 2b63e6d3516..bdf9f8f12bc 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{{else}}gh-hosted-runners-4cores-1{{end}} + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -20,7 +20,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "{{"${{github.event.pull_request}}"}}" == "" ]] && [[ "{{"${{github.ref}}"}}" != "refs/heads/main" ]] && [[ ! "{{"${{github.ref}}"}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "{{"${{github.ref}}"}}" =~ "refs/tags/.*" ]]; then + if [[ "{{"${{github.event.pull_request}}"}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/test/templates/cluster_endtoend_test_mysql57.tpl b/test/templates/cluster_endtoend_test_mysql57.tpl index 74f3b3e5fc2..ffa825d42cb 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{{else}}gh-hosted-runners-4cores-1{{end}} + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -33,7 +33,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "{{"${{github.event.pull_request}}"}}" == "" ]] && [[ "{{"${{github.ref}}"}}" != "refs/heads/main" ]] && [[ ! "{{"${{github.ref}}"}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "{{"${{github.ref}}"}}" =~ "refs/tags/.*" ]]; then + if [[ "{{"${{github.event.pull_request}}"}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/test/templates/cluster_endtoend_test_self_hosted.tpl b/test/templates/cluster_endtoend_test_self_hosted.tpl index e28de83004e..848608f120d 100644 --- a/test/templates/cluster_endtoend_test_self_hosted.tpl +++ b/test/templates/cluster_endtoend_test_self_hosted.tpl @@ -23,7 +23,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "{{"${{github.event.pull_request}}"}}" == "" ]] && [[ "{{"${{github.ref}}"}}" != "refs/heads/main" ]] && [[ ! "{{"${{github.ref}}"}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "{{"${{github.ref}}"}}" =~ "refs/tags/.*" ]]; then + if [[ "{{"${{github.event.pull_request}}"}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/test/templates/unit_test.tpl b/test/templates/unit_test.tpl index 82ecbc5c270..6dc114dbb25 100644 --- a/test/templates/unit_test.tpl +++ b/test/templates/unit_test.tpl @@ -14,7 +14,7 @@ env: jobs: test: name: {{.Name}} - runs-on: gh-hosted-runners-4cores-1 + runs-on: ubuntu-22.04 steps: - name: Skip CI @@ -28,7 +28,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "{{"${{github.event.pull_request}}"}}" == "" ]] && [[ "{{"${{github.ref}}"}}" != "refs/heads/main" ]] && [[ ! "{{"${{github.ref}}"}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "{{"${{github.ref}}"}}" =~ "refs/tags/.*" ]]; then + if [[ "{{"${{github.event.pull_request}}"}}" == "" ]]; then skip='true' fi echo Skip ${skip} @@ -139,7 +139,7 @@ jobs: go mod download go install golang.org/x/tools/cmd/goimports@latest - + # install JUnit report formatter go install github.com/vitessio/go-junit-report@HEAD diff --git a/test/templates/unit_test_self_hosted.tpl b/test/templates/unit_test_self_hosted.tpl index c6d6790fbfb..2b638676145 100644 --- a/test/templates/unit_test_self_hosted.tpl +++ b/test/templates/unit_test_self_hosted.tpl @@ -22,7 +22,7 @@ jobs: id: skip-workflow run: | skip='false' - if [[ "{{"${{github.event.pull_request}}"}}" == "" ]] && [[ "{{"${{github.ref}}"}}" != "refs/heads/main" ]] && [[ ! "{{"${{github.ref}}"}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "{{"${{github.ref}}"}}" =~ "refs/tags/.*" ]]; then + if [[ "{{"${{github.event.pull_request}}"}}" == "" ]]; then skip='true' fi echo Skip ${skip} diff --git a/tools/get_next_release_shopify.sh b/tools/get_next_release_shopify.sh new file mode 100755 index 00000000000..38cc78784a0 --- /dev/null +++ b/tools/get_next_release_shopify.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +# Copyright 2022 The Vitess Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# github.base_ref $1 +git fetch --tags origin + +target_release="" + +latest_major_release=$(git show-ref --tags | grep -E 'refs/tags/v[0-9]*\.[0-9]*\.[0-9]*$' | sed 's/[a-z0-9]* refs\/tags\/v//' | awk -v FS=. '{print $1}' | sort -Vr | head -n1) +major_release=$(cat ./go/vt/servenv/version.go| grep versionName | awk -v 'FS= ' '{print $4}' | tr -d '"' | sed 's/\..*//') +target_major_release=$((major_release+1)) + +# Try to get the latest shopify release +target_release_number=$(git show-ref | grep -E 'refs/remotes/origin/v[0-9]*\.[0-9]*\.[0-9]*-shopify-[0-9]*$' | sed 's/[a-z0-9]* refs\/remotes\/origin\/v//' | awk -v FS=. -v RELEASE="$target_major_release" '{if ($1 == RELEASE) print; }' | sort -Vr | head -n1) +if [ -z "$target_release_number" ]; then + # Fallback to upstream release if shopify release doesn't exist + target_release_number=$(git show-ref --tags | grep -E 'refs/tags/v[0-9]*\.[0-9]*\.[0-9]*$' | sed 's/[a-z0-9]* refs\/tags\/v//' | awk -v FS=. -v RELEASE="$target_major_release" '{if ($1 == RELEASE) print; }' | sort -Vr | head -n1) +fi +target_release="v$target_release_number" + +if [ "$major_release" == "$latest_major_release" ]; then + target_release="main" +fi + +echo "$target_release" diff --git a/tools/get_previous_release_shopify.sh b/tools/get_previous_release_shopify.sh new file mode 100755 index 00000000000..74ad558648b --- /dev/null +++ b/tools/get_previous_release_shopify.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# Copyright 2022 The Vitess Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This script is used to build and copy the Angular 2 based vtctld UI +# into the release folder (app) for checkin. Prior to running this script, +# bootstrap.sh and bootstrap_web.sh should already have been run. + +# github.base_ref $1 + +target_release="" + +major_release=$(cat ./go/vt/servenv/version.go| grep versionName | awk -v 'FS= ' '{print $4}' | tr -d '"' | sed 's/\..*//') +target_major_release=$((major_release-1)) +target_release_number=$(git show-ref | grep -E 'refs/remotes/origin/v[0-9]*.[0-9]*.[0-9]*-shopify-[0-9]*$' | sed 's/[a-z0-9]* refs\/remotes\/origin\/v//' | awk -v FS=. -v RELEASE="$target_major_release" '{if ($1 == RELEASE) print; }' | sort -Vr | head -n1) +if [ ! -z "$target_release_number" ] +then + target_release="v$target_release_number" +fi + +echo "$target_release"