From ee11c4a949e812b08342765b2c2d29f1228c29b3 Mon Sep 17 00:00:00 2001 From: "vitess-bot[bot]" <108069721+vitess-bot[bot]@users.noreply.github.com> Date: Tue, 16 Sep 2025 10:28:39 -0700 Subject: [PATCH 01/11] [release-22.0] Simplify workflow files. (#18649) (#18656) Signed-off-by: Arthur Schreiber Co-authored-by: Arthur Schreiber Signed-off-by: Tanjin Xu --- .../check_make_vtadmin_authz_testgen.yml | 27 ++- .../check_make_vtadmin_web_proto.yml | 29 ++- .github/workflows/cluster_endtoend_12.yml | 39 ++-- .github/workflows/cluster_endtoend_13.yml | 39 ++-- .github/workflows/cluster_endtoend_15.yml | 39 ++-- .github/workflows/cluster_endtoend_18.yml | 41 ++-- .github/workflows/cluster_endtoend_21.yml | 40 ++-- .../cluster_endtoend_backup_pitr.yml | 39 ++-- ...luster_endtoend_backup_pitr_mysqlshell.yml | 39 ++-- ...luster_endtoend_backup_pitr_xtrabackup.yml | 39 ++-- ...ter_endtoend_ers_prs_newfeatures_heavy.yml | 39 ++-- .../workflows/cluster_endtoend_mysql80.yml | 39 ++-- .../cluster_endtoend_mysql_server_vault.yml | 41 ++-- .../cluster_endtoend_onlineddl_revert.yml | 39 ++-- .../cluster_endtoend_onlineddl_scheduler.yml | 39 ++-- .../cluster_endtoend_onlineddl_vrepl.yml | 39 ++-- ...luster_endtoend_onlineddl_vrepl_stress.yml | 39 ++-- ..._endtoend_onlineddl_vrepl_stress_suite.yml | 39 ++-- ...cluster_endtoend_onlineddl_vrepl_suite.yml | 39 ++-- .../cluster_endtoend_schemadiff_vrepl.yml | 39 ++-- .../cluster_endtoend_tabletmanager_consul.yml | 41 ++-- ...cluster_endtoend_tabletmanager_tablegc.yml | 39 ++-- ..._endtoend_tabletmanager_throttler_topo.yml | 39 ++-- ...cluster_endtoend_topo_connection_cache.yml | 39 ++-- ...dtoend_vreplication_across_db_versions.yml | 39 ++-- .../cluster_endtoend_vreplication_basic.yml | 39 ++-- ...luster_endtoend_vreplication_cellalias.yml | 39 ++-- ...er_endtoend_vreplication_copy_parallel.yml | 39 ++-- ...dtoend_vreplication_foreign_key_stress.yml | 39 ++-- ...endtoend_vreplication_mariadb_to_mysql.yml | 39 ++-- .../cluster_endtoend_vreplication_migrate.yml | 39 ++-- ...ter_endtoend_vreplication_multi_tenant.yml | 39 ++-- ...ion_partial_movetables_and_materialize.yml | 39 ++-- .../cluster_endtoend_vreplication_v2.yml | 39 ++-- .../cluster_endtoend_vreplication_vdiff2.yml | 39 ++-- ...replication_vtctldclient_movetables_tz.yml | 39 ++-- .../workflows/cluster_endtoend_vstream.yml | 39 ++-- .../workflows/cluster_endtoend_vtbackup.yml | 39 ++-- ..._vtctlbackup_sharded_clustertest_heavy.yml | 39 ++-- .../cluster_endtoend_vtgate_concurrentdml.yml | 39 ++-- ...ster_endtoend_vtgate_foreignkey_stress.yml | 39 ++-- .../cluster_endtoend_vtgate_gen4.yml | 39 ++-- .../cluster_endtoend_vtgate_general_heavy.yml | 39 ++-- .../cluster_endtoend_vtgate_godriver.yml | 39 ++-- ...uster_endtoend_vtgate_partial_keyspace.yml | 39 ++-- .../cluster_endtoend_vtgate_plantests.yml | 39 ++-- .../cluster_endtoend_vtgate_queries.yml | 39 ++-- ...cluster_endtoend_vtgate_readafterwrite.yml | 39 ++-- .../cluster_endtoend_vtgate_reservedconn.yml | 39 ++-- .../cluster_endtoend_vtgate_schema.yml | 39 ++-- ...cluster_endtoend_vtgate_schema_tracker.yml | 39 ++-- ...dtoend_vtgate_tablet_healthcheck_cache.yml | 39 ++-- .../cluster_endtoend_vtgate_topo.yml | 39 ++-- .../cluster_endtoend_vtgate_topo_consul.yml | 41 ++-- .../cluster_endtoend_vtgate_topo_etcd.yml | 39 ++-- .../cluster_endtoend_vtgate_transaction.yml | 39 ++-- .../cluster_endtoend_vtgate_unsharded.yml | 39 ++-- .../cluster_endtoend_vtgate_vindex_heavy.yml | 39 ++-- .../cluster_endtoend_vtgate_vschema.yml | 39 ++-- .github/workflows/cluster_endtoend_vtorc.yml | 39 ++-- .../cluster_endtoend_vttablet_prscomplex.yml | 39 ++-- .../workflows/cluster_endtoend_xb_backup.yml | 39 ++-- .../cluster_endtoend_xb_recovery.yml | 39 ++-- .github/workflows/codecov.yml | 111 ----------- .github/workflows/docker_test_cluster.yml | 25 +-- .github/workflows/e2e_race.yml | 29 ++- .github/workflows/endtoend.yml | 31 ++- .github/workflows/java_docker_test.yml | 66 +++++++ .github/workflows/local_example.yml | 31 ++- .github/workflows/region_example.yml | 31 ++- .github/workflows/static_checks_etc.yml | 63 +++--- .github/workflows/unit_race.yml | 39 ++-- .github/workflows/unit_race_evalengine.yml | 39 ++-- .../unit_test_evalengine_mysql57.yml | 181 ++++++++++++++++++ .../unit_test_evalengine_mysql80.yml | 41 ++-- .../unit_test_evalengine_mysql84.yml | 41 ++-- .github/workflows/unit_test_mysql57.yml | 181 ++++++++++++++++++ .github/workflows/unit_test_mysql80.yml | 41 ++-- .github/workflows/unit_test_mysql84.yml | 41 ++-- .../upgrade_downgrade_test_backups_e2e.yml | 46 ++--- ...owngrade_test_backups_e2e_next_release.yml | 46 ++--- .../upgrade_downgrade_test_backups_manual.yml | 66 +++---- ...grade_test_backups_manual_next_release.yml | 66 +++---- .../upgrade_downgrade_test_onlineddl_flow.yml | 55 +++--- ...e_downgrade_test_query_serving_queries.yml | 44 ++--- ...downgrade_test_query_serving_queries_2.yml | 44 ++--- ...t_query_serving_queries_2_next_release.yml | 48 ++--- ...est_query_serving_queries_next_release.yml | 48 ++--- ...de_downgrade_test_query_serving_schema.yml | 48 ++--- ...test_query_serving_schema_next_release.yml | 48 ++--- ...rade_downgrade_test_reparent_new_vtctl.yml | 42 ++-- ...e_downgrade_test_reparent_new_vttablet.yml | 42 ++-- ...rade_downgrade_test_reparent_old_vtctl.yml | 42 ++-- ...e_downgrade_test_reparent_old_vttablet.yml | 42 ++-- .../upgrade_downgrade_test_semi_sync.yml | 42 ++-- .github/workflows/vitess_tester_vtgate.yml | 39 ++-- .github/workflows/vtadmin_web_build.yml | 19 +- .github/workflows/vtadmin_web_lint.yml | 24 +-- .github/workflows/vtadmin_web_unit_tests.yml | 19 +- .github/workflows/vtop_example.yml | 31 ++- test/templates/cluster_endtoend_test.tpl | 42 ++-- .../cluster_endtoend_test_docker.tpl | 29 ++- .../cluster_endtoend_test_mysql57.tpl | 41 ++-- test/templates/cluster_vitess_tester.tpl | 39 ++-- test/templates/unit_test.tpl | 41 ++-- 105 files changed, 2137 insertions(+), 2391 deletions(-) delete mode 100644 .github/workflows/codecov.yml create mode 100644 .github/workflows/java_docker_test.yml create mode 100644 .github/workflows/unit_test_evalengine_mysql57.yml create mode 100644 .github/workflows/unit_test_mysql57.yml diff --git a/.github/workflows/check_make_vtadmin_authz_testgen.yml b/.github/workflows/check_make_vtadmin_authz_testgen.yml index 171fbe89775..e497e31068d 100644 --- a/.github/workflows/check_make_vtadmin_authz_testgen.yml +++ b/.github/workflows/check_make_vtadmin_authz_testgen.yml @@ -1,5 +1,12 @@ name: check_make_vtadmin_authz_testgen -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' permissions: read-all @@ -15,24 +22,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -62,7 +57,7 @@ jobs: uses: ./.github/actions/tune-os - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.vtadmin_changes == 'true' + if: steps.changes.outputs.vtadmin_changes == 'true' run: | sudo apt-get update sudo apt-get install -y make unzip g++ etcd-client etcd-server curl git wget @@ -71,11 +66,11 @@ jobs: go install golang.org/x/tools/cmd/goimports@latest - name: Run make minimaltools - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.vtadmin_changes == 'true' + if: steps.changes.outputs.vtadmin_changes == 'true' run: | make minimaltools - name: check_make_vtadmin_authz_testgen - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.vtadmin_changes == 'true' + if: steps.changes.outputs.vtadmin_changes == 'true' run: | tools/check_make_vtadmin_authz_testgen.sh diff --git a/.github/workflows/check_make_vtadmin_web_proto.yml b/.github/workflows/check_make_vtadmin_web_proto.yml index 8610b5bc2f7..47b9c150892 100644 --- a/.github/workflows/check_make_vtadmin_web_proto.yml +++ b/.github/workflows/check_make_vtadmin_web_proto.yml @@ -1,5 +1,12 @@ name: check_make_vtadmin_web_proto -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' permissions: read-all @@ -15,18 +22,7 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' @@ -36,7 +32,6 @@ jobs: uses: ./.github/actions/tune-os - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -56,23 +51,23 @@ jobs: - name: Set up Go uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.proto_changes == 'true' + if: steps.changes.outputs.proto_changes == 'true' with: go-version-file: go.mod - name: Setup Node - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.proto_changes == 'true' + if: steps.changes.outputs.proto_changes == 'true' uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 with: # node-version should match package.json node-version: '22.13.1' - name: Install npm dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.proto_changes == 'true' + if: steps.changes.outputs.proto_changes == 'true' run: npm ci working-directory: ./web/vtadmin - name: check_make_vtadmin_web_proto - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.proto_changes == 'true' + if: steps.changes.outputs.proto_changes == 'true' run: | tools/check_make_vtadmin_web_proto.sh diff --git a/.github/workflows/cluster_endtoend_12.yml b/.github/workflows/cluster_endtoend_12.yml index 5a2654c0855..42fc97660a1 100644 --- a/.github/workflows/cluster_endtoend_12.yml +++ b/.github/workflows/cluster_endtoend_12.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (12) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (12)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_12.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard 12 | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_13.yml b/.github/workflows/cluster_endtoend_13.yml index ad7934357e2..c970d8a0842 100644 --- a/.github/workflows/cluster_endtoend_13.yml +++ b/.github/workflows/cluster_endtoend_13.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (13) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (13)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_13.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard 13 | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_15.yml b/.github/workflows/cluster_endtoend_15.yml index 50884c56807..934791a228a 100644 --- a/.github/workflows/cluster_endtoend_15.yml +++ b/.github/workflows/cluster_endtoend_15.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (15) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (15)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_15.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard 15 | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_18.yml b/.github/workflows/cluster_endtoend_18.yml index 1ea85299d7c..4ff0e3c16c0 100644 --- a/.github/workflows/cluster_endtoend_18.yml +++ b/.github/workflows/cluster_endtoend_18.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (18) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (18)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_18.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,12 +104,12 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Installing zookeeper and consul - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | make tools - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -126,7 +121,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -142,19 +137,19 @@ jobs: go run test.go -docker=false -follow -shard 18 | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_21.yml b/.github/workflows/cluster_endtoend_21.yml index e30a9382e7b..3937087c09a 100644 --- a/.github/workflows/cluster_endtoend_21.yml +++ b/.github/workflows/cluster_endtoend_21.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (21) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (21)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_21.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,14 +104,13 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Install Minio - if: steps.skip-workflow.outputs.skip-workflow == 'false' run: | wget https://dl.min.io/server/minio/release/linux-amd64/minio chmod +x minio mv minio /usr/local/bin - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -128,7 +122,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -144,19 +138,19 @@ jobs: go run test.go -docker=false -follow -shard 21 | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_backup_pitr.yml b/.github/workflows/cluster_endtoend_backup_pitr.yml index 021d882c149..dea03db1e39 100644 --- a/.github/workflows/cluster_endtoend_backup_pitr.yml +++ b/.github/workflows/cluster_endtoend_backup_pitr.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (backup_pitr) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (backup_pitr)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_backup_pitr.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard backup_pitr | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_backup_pitr_mysqlshell.yml b/.github/workflows/cluster_endtoend_backup_pitr_mysqlshell.yml index eb1c3871e43..f537ee8ff11 100644 --- a/.github/workflows/cluster_endtoend_backup_pitr_mysqlshell.yml +++ b/.github/workflows/cluster_endtoend_backup_pitr_mysqlshell.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (backup_pitr_mysqlshell) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (backup_pitr_mysqlshell)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_backup_pitr_mysqlshell.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard backup_pitr_mysqlshell | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup.yml b/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup.yml index 3d36ad015e5..152a020503f 100644 --- a/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup.yml +++ b/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (backup_pitr_xtrabackup) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (backup_pitr_xtrabackup)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_backup_pitr_xtrabackup.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -86,7 +81,7 @@ jobs: uses: ./.github/actions/tune-os - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -118,7 +113,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -130,7 +125,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -146,19 +141,19 @@ jobs: go run test.go -docker=false -follow -shard backup_pitr_xtrabackup | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml b/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml index 54f1ce5f029..a3b29c97342 100644 --- a/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml +++ b/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (ers_prs_newfeatures_heavy) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (ers_prs_newfeatures_heavy)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -155,19 +150,19 @@ jobs: go run test.go -docker=false -follow -shard ers_prs_newfeatures_heavy | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_mysql80.yml b/.github/workflows/cluster_endtoend_mysql80.yml index 7b1aad39731..ce33edaa3e0 100644 --- a/.github/workflows/cluster_endtoend_mysql80.yml +++ b/.github/workflows/cluster_endtoend_mysql80.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (mysql80) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (mysql80)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_mysql80.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard mysql80 | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_mysql_server_vault.yml b/.github/workflows/cluster_endtoend_mysql_server_vault.yml index 6ed11b567a6..fca18dc5dd5 100644 --- a/.github/workflows/cluster_endtoend_mysql_server_vault.yml +++ b/.github/workflows/cluster_endtoend_mysql_server_vault.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (mysql_server_vault) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (mysql_server_vault)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_mysql_server_vault.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,12 +104,12 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Installing zookeeper and consul - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | make tools - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -126,7 +121,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -142,19 +137,19 @@ jobs: go run test.go -docker=false -follow -shard mysql_server_vault | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_onlineddl_revert.yml b/.github/workflows/cluster_endtoend_onlineddl_revert.yml index 5c9df5c7d2d..16897f76fc0 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_revert.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_revert.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (onlineddl_revert) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_revert)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -69,17 +64,17 @@ jobs: - 'go/test/endtoend/onlineddl/vrepl_suite/testdata' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -93,7 +88,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -110,7 +105,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -122,7 +117,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -138,19 +133,19 @@ jobs: go run test.go -docker=false -follow -shard onlineddl_revert | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml b/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml index 142f317b167..5249ab870e7 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (onlineddl_scheduler) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_scheduler)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -69,17 +64,17 @@ jobs: - 'go/test/endtoend/onlineddl/vrepl_suite/testdata' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -93,7 +88,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -110,7 +105,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -122,7 +117,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -138,19 +133,19 @@ jobs: go run test.go -docker=false -follow -shard onlineddl_scheduler | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml index d07f9168452..ebde8fe48c4 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (onlineddl_vrepl) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -69,17 +64,17 @@ jobs: - 'go/test/endtoend/onlineddl/vrepl_suite/testdata' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -93,7 +88,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -110,7 +105,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -122,7 +117,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -146,19 +141,19 @@ jobs: go run test.go -docker=false -follow -shard onlineddl_vrepl | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml index 5c5fc4a421e..deaf6519d8c 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (onlineddl_vrepl_stress) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl_stress)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -69,17 +64,17 @@ jobs: - 'go/test/endtoend/onlineddl/vrepl_suite/testdata' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -93,7 +88,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -110,7 +105,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -122,7 +117,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -146,19 +141,19 @@ jobs: go run test.go -docker=false -follow -shard onlineddl_vrepl_stress | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml index 6b1e7dfd5fd..6653ba981d7 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (onlineddl_vrepl_stress_suite) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl_stress_suite)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -69,17 +64,17 @@ jobs: - 'go/test/endtoend/onlineddl/vrepl_suite/testdata' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -93,7 +88,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -110,7 +105,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -122,7 +117,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -146,19 +141,19 @@ jobs: go run test.go -docker=false -follow -shard onlineddl_vrepl_stress_suite | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml index ef2e9b90b5d..00a641a5853 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (onlineddl_vrepl_suite) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl_suite)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -69,17 +64,17 @@ jobs: - 'go/test/endtoend/onlineddl/vrepl_suite/testdata' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -93,7 +88,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -110,7 +105,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -122,7 +117,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -146,19 +141,19 @@ jobs: go run test.go -docker=false -follow -shard onlineddl_vrepl_suite | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml b/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml index 23940ce86e6..efc676225d3 100644 --- a/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml +++ b/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (schemadiff_vrepl) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (schemadiff_vrepl)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -69,17 +64,17 @@ jobs: - 'go/test/endtoend/onlineddl/vrepl_suite/testdata' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -93,7 +88,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -110,7 +105,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -122,7 +117,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -146,19 +141,19 @@ jobs: go run test.go -docker=false -follow -shard schemadiff_vrepl | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_tabletmanager_consul.yml b/.github/workflows/cluster_endtoend_tabletmanager_consul.yml index cf2baf559f9..f38fca25d23 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_consul.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_consul.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (tabletmanager_consul) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (tabletmanager_consul)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_tabletmanager_consul.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,12 +104,12 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Installing zookeeper and consul - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | make tools - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -126,7 +121,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -142,19 +137,19 @@ jobs: go run test.go -docker=false -follow -shard tabletmanager_consul | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml b/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml index 58a66735fd1..600ee72924f 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (tabletmanager_tablegc) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (tabletmanager_tablegc)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard tabletmanager_tablegc | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_tabletmanager_throttler_topo.yml b/.github/workflows/cluster_endtoend_tabletmanager_throttler_topo.yml index a7e641a41b5..6254e9f7d2f 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_throttler_topo.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_throttler_topo.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (tabletmanager_throttler_topo) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (tabletmanager_throttler_topo)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_tabletmanager_throttler_topo.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard tabletmanager_throttler_topo | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_topo_connection_cache.yml b/.github/workflows/cluster_endtoend_topo_connection_cache.yml index a1e8a87cac4..252670e15bd 100644 --- a/.github/workflows/cluster_endtoend_topo_connection_cache.yml +++ b/.github/workflows/cluster_endtoend_topo_connection_cache.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (topo_connection_cache) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (topo_connection_cache)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_topo_connection_cache.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard topo_connection_cache | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml b/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml index 43d8e2e6a8a..ecfe8ee22bc 100644 --- a/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml +++ b/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vreplication_across_db_versions) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vreplication_across_db_versions)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -163,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_across_db_versions | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_basic.yml b/.github/workflows/cluster_endtoend_vreplication_basic.yml index 3b96b922ac8..fdd0fef9875 100644 --- a/.github/workflows/cluster_endtoend_vreplication_basic.yml +++ b/.github/workflows/cluster_endtoend_vreplication_basic.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vreplication_basic) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vreplication_basic)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vreplication_basic.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -163,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_basic | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_cellalias.yml b/.github/workflows/cluster_endtoend_vreplication_cellalias.yml index 3c9dd3c49f7..973201af2ca 100644 --- a/.github/workflows/cluster_endtoend_vreplication_cellalias.yml +++ b/.github/workflows/cluster_endtoend_vreplication_cellalias.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vreplication_cellalias) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vreplication_cellalias)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vreplication_cellalias.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -163,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_cellalias | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_copy_parallel.yml b/.github/workflows/cluster_endtoend_vreplication_copy_parallel.yml index c6cb067ba69..38c17ae0ff1 100644 --- a/.github/workflows/cluster_endtoend_vreplication_copy_parallel.yml +++ b/.github/workflows/cluster_endtoend_vreplication_copy_parallel.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vreplication_copy_parallel) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vreplication_copy_parallel)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vreplication_copy_parallel.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -163,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_copy_parallel | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_foreign_key_stress.yml b/.github/workflows/cluster_endtoend_vreplication_foreign_key_stress.yml index 851b970e923..58a19596024 100644 --- a/.github/workflows/cluster_endtoend_vreplication_foreign_key_stress.yml +++ b/.github/workflows/cluster_endtoend_vreplication_foreign_key_stress.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vreplication_foreign_key_stress) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vreplication_foreign_key_stress)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vreplication_foreign_key_stress.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -163,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_foreign_key_stress | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_mariadb_to_mysql.yml b/.github/workflows/cluster_endtoend_vreplication_mariadb_to_mysql.yml index 55589fba198..1f31e580abd 100644 --- a/.github/workflows/cluster_endtoend_vreplication_mariadb_to_mysql.yml +++ b/.github/workflows/cluster_endtoend_vreplication_mariadb_to_mysql.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vreplication_mariadb_to_mysql) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vreplication_mariadb_to_mysql)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vreplication_mariadb_to_mysql.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -163,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_mariadb_to_mysql | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_migrate.yml b/.github/workflows/cluster_endtoend_vreplication_migrate.yml index bd6de8a4bbe..d6125ae6c0c 100644 --- a/.github/workflows/cluster_endtoend_vreplication_migrate.yml +++ b/.github/workflows/cluster_endtoend_vreplication_migrate.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vreplication_migrate) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vreplication_migrate)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vreplication_migrate.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -163,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_migrate | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_multi_tenant.yml b/.github/workflows/cluster_endtoend_vreplication_multi_tenant.yml index d01ac331ad4..8e7eeda5998 100644 --- a/.github/workflows/cluster_endtoend_vreplication_multi_tenant.yml +++ b/.github/workflows/cluster_endtoend_vreplication_multi_tenant.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vreplication_multi_tenant) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vreplication_multi_tenant)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vreplication_multi_tenant.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -163,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_multi_tenant | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" 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 e81a72ca8f0..b295ed2085b 100644 --- a/.github/workflows/cluster_endtoend_vreplication_partial_movetables_and_materialize.yml +++ b/.github/workflows/cluster_endtoend_vreplication_partial_movetables_and_materialize.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vreplication_partial_movetables_and_materialize) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vreplication_partial_movetables_and_materialize)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vreplication_partial_movetables_and_materialize.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -163,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_partial_movetables_and_materialize | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_v2.yml b/.github/workflows/cluster_endtoend_vreplication_v2.yml index 264689a7812..208c648f2d7 100644 --- a/.github/workflows/cluster_endtoend_vreplication_v2.yml +++ b/.github/workflows/cluster_endtoend_vreplication_v2.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vreplication_v2) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vreplication_v2)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vreplication_v2.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -163,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_v2 | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_vdiff2.yml b/.github/workflows/cluster_endtoend_vreplication_vdiff2.yml index e2e3fee00c5..901aa32056d 100644 --- a/.github/workflows/cluster_endtoend_vreplication_vdiff2.yml +++ b/.github/workflows/cluster_endtoend_vreplication_vdiff2.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vreplication_vdiff2) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vreplication_vdiff2)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vreplication_vdiff2.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -163,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_vdiff2 | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_vtctldclient_movetables_tz.yml b/.github/workflows/cluster_endtoend_vreplication_vtctldclient_movetables_tz.yml index df42d9d0dd4..47036cd5cf7 100644 --- a/.github/workflows/cluster_endtoend_vreplication_vtctldclient_movetables_tz.yml +++ b/.github/workflows/cluster_endtoend_vreplication_vtctldclient_movetables_tz.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vreplication_vtctldclient_movetables_tz) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vreplication_vtctldclient_movetables_tz)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vreplication_vtctldclient_movetables_tz.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -163,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_vtctldclient_movetables_tz | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vstream.yml b/.github/workflows/cluster_endtoend_vstream.yml index 623da7ae94b..16c6284ed5e 100644 --- a/.github/workflows/cluster_endtoend_vstream.yml +++ b/.github/workflows/cluster_endtoend_vstream.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vstream) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vstream)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vstream.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vstream | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtbackup.yml b/.github/workflows/cluster_endtoend_vtbackup.yml index cea50d17866..1b4113b90bd 100644 --- a/.github/workflows/cluster_endtoend_vtbackup.yml +++ b/.github/workflows/cluster_endtoend_vtbackup.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtbackup) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtbackup)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtbackup.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtbackup | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml b/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml index ccedb32382d..50d7bb7442d 100644 --- a/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml +++ b/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtctlbackup_sharded_clustertest_heavy) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtctlbackup_sharded_clustertest_heavy)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -155,19 +150,19 @@ jobs: go run test.go -docker=false -follow -shard vtctlbackup_sharded_clustertest_heavy | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml b/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml index 74b5d823668..b1d3fc1c6e8 100644 --- a/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml +++ b/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_concurrentdml) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_concurrentdml)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_concurrentdml | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_foreignkey_stress.yml b/.github/workflows/cluster_endtoend_vtgate_foreignkey_stress.yml index a80512b19a2..8b5e9843902 100644 --- a/.github/workflows/cluster_endtoend_vtgate_foreignkey_stress.yml +++ b/.github/workflows/cluster_endtoend_vtgate_foreignkey_stress.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_foreignkey_stress) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_foreignkey_stress)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_foreignkey_stress.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_foreignkey_stress | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_gen4.yml b/.github/workflows/cluster_endtoend_vtgate_gen4.yml index 883cfb439b8..dd0f342680c 100644 --- a/.github/workflows/cluster_endtoend_vtgate_gen4.yml +++ b/.github/workflows/cluster_endtoend_vtgate_gen4.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_gen4) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_gen4)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_gen4.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_gen4 | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml b/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml index 29220ef229a..da984ce1861 100644 --- a/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml +++ b/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_general_heavy) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_general_heavy)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_general_heavy.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -155,19 +150,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_general_heavy | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_godriver.yml b/.github/workflows/cluster_endtoend_vtgate_godriver.yml index 69c4e6b6245..f69c7fce7b5 100644 --- a/.github/workflows/cluster_endtoend_vtgate_godriver.yml +++ b/.github/workflows/cluster_endtoend_vtgate_godriver.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_godriver) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_godriver)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_godriver.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_godriver | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml b/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml index 483988b8640..960114979fb 100644 --- a/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml +++ b/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_partial_keyspace) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_partial_keyspace)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_partial_keyspace -partial-keyspace=true | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_plantests.yml b/.github/workflows/cluster_endtoend_vtgate_plantests.yml index ac16f6a9bc1..5dda110966c 100644 --- a/.github/workflows/cluster_endtoend_vtgate_plantests.yml +++ b/.github/workflows/cluster_endtoend_vtgate_plantests.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_plantests) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_plantests)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_plantests.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_plantests | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_queries.yml b/.github/workflows/cluster_endtoend_vtgate_queries.yml index 609318f10e9..a5f4628a627 100644 --- a/.github/workflows/cluster_endtoend_vtgate_queries.yml +++ b/.github/workflows/cluster_endtoend_vtgate_queries.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_queries) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_queries)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_queries.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_queries | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml b/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml index 177a8d013e3..1cebf185150 100644 --- a/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml +++ b/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_readafterwrite) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_readafterwrite)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_readafterwrite | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml b/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml index f3d9b0e0b08..4ad1e509fd2 100644 --- a/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml +++ b/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_reservedconn) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_reservedconn)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_reservedconn.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_reservedconn | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_schema.yml b/.github/workflows/cluster_endtoend_vtgate_schema.yml index 126087295e9..33370308018 100644 --- a/.github/workflows/cluster_endtoend_vtgate_schema.yml +++ b/.github/workflows/cluster_endtoend_vtgate_schema.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_schema) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_schema)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_schema.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_schema | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml b/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml index b3fa390bce7..459f4ddd8d5 100644 --- a/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml +++ b/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_schema_tracker) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_schema_tracker)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_schema_tracker | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml b/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml index 058f3804c55..6a2411ae0dc 100644 --- a/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml +++ b/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_tablet_healthcheck_cache) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_tablet_healthcheck_cache)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_tablet_healthcheck_cache | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_topo.yml b/.github/workflows/cluster_endtoend_vtgate_topo.yml index 947a30ec43d..04d3a11af61 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_topo) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_topo)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_topo.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_topo | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml b/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml index 7fb82421386..0ec964f080c 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_topo_consul) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_topo_consul)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_topo_consul.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,12 +104,12 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Installing zookeeper and consul - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | make tools - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -126,7 +121,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -142,19 +137,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_topo_consul | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml b/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml index 0de211c4fd4..2a9f43fbfb6 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_topo_etcd) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_topo_etcd)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_topo_etcd | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_transaction.yml b/.github/workflows/cluster_endtoend_vtgate_transaction.yml index afc338dcc16..32631262693 100644 --- a/.github/workflows/cluster_endtoend_vtgate_transaction.yml +++ b/.github/workflows/cluster_endtoend_vtgate_transaction.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_transaction) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_transaction)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_transaction.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_transaction -build-tag=debug2PC | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_unsharded.yml b/.github/workflows/cluster_endtoend_vtgate_unsharded.yml index c9fee3e908c..e586c8dd6c8 100644 --- a/.github/workflows/cluster_endtoend_vtgate_unsharded.yml +++ b/.github/workflows/cluster_endtoend_vtgate_unsharded.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_unsharded) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_unsharded)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_unsharded.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_unsharded | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml b/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml index 9ebc1a117a9..919499d0512 100644 --- a/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml +++ b/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_vindex_heavy) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_vindex_heavy)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -155,19 +150,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_vindex_heavy | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_vschema.yml b/.github/workflows/cluster_endtoend_vtgate_vschema.yml index cc14a0ea46f..67b58ade817 100644 --- a/.github/workflows/cluster_endtoend_vtgate_vschema.yml +++ b/.github/workflows/cluster_endtoend_vtgate_vschema.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtgate_vschema) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtgate_vschema)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtgate_vschema.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_vschema | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtorc.yml b/.github/workflows/cluster_endtoend_vtorc.yml index b0191f83659..dd81522cf12 100644 --- a/.github/workflows/cluster_endtoend_vtorc.yml +++ b/.github/workflows/cluster_endtoend_vtorc.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vtorc) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vtorc)') cancel-in-progress: true @@ -28,16 +35,6 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check Memory run: | totalMem=$(free -g | awk 'NR==2 {print $2}') @@ -48,13 +45,11 @@ jobs: fi - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -77,17 +72,17 @@ jobs: - '.github/workflows/cluster_endtoend_vtorc.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -101,7 +96,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -118,7 +113,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -130,7 +125,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -146,19 +141,19 @@ jobs: go run test.go -docker=false -follow -shard vtorc | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml b/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml index 26e0727b955..2fd021c97f7 100644 --- a/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml +++ b/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (vttablet_prscomplex) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (vttablet_prscomplex)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_vttablet_prscomplex.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -92,7 +87,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -137,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vttablet_prscomplex | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_xb_backup.yml b/.github/workflows/cluster_endtoend_xb_backup.yml index 29567f35d0f..17f3cef0e60 100644 --- a/.github/workflows/cluster_endtoend_xb_backup.yml +++ b/.github/workflows/cluster_endtoend_xb_backup.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (xb_backup) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (xb_backup)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_xb_backup.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -86,7 +81,7 @@ jobs: uses: ./.github/actions/tune-os - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -118,7 +113,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -130,7 +125,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -146,19 +141,19 @@ jobs: go run test.go -docker=false -follow -shard xb_backup | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_xb_recovery.yml b/.github/workflows/cluster_endtoend_xb_recovery.yml index d9ad677f026..47456594f33 100644 --- a/.github/workflows/cluster_endtoend_xb_recovery.yml +++ b/.github/workflows/cluster_endtoend_xb_recovery.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Cluster (xb_recovery) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (xb_recovery)') cancel-in-progress: true @@ -28,24 +35,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -68,17 +63,17 @@ jobs: - '.github/workflows/cluster_endtoend_xb_recovery.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -86,7 +81,7 @@ jobs: uses: ./.github/actions/tune-os - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | @@ -118,7 +113,7 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -130,7 +125,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -146,19 +141,19 @@ jobs: go run test.go -docker=false -follow -shard xb_recovery | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml deleted file mode 100644 index cea1ce13174..00000000000 --- a/.github/workflows/codecov.yml +++ /dev/null @@ -1,111 +0,0 @@ -name: Code Coverage -on: - push: - branches: - - "main" - - "release-[0-9]+.[0-9]" - tags: '**' - pull_request: - branches: '**' -concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Code Coverage') - cancel-in-progress: true - -permissions: read-all - -jobs: - test: - name: Code Coverage - runs-on: ubuntu-24.04 - - steps: - - name: Check out code - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - persist-credentials: 'false' - - - name: Check for changes in files relevant to code coverage - uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 - id: changes - with: - token: '' - filters: | - changed_files: - - .github/workflows/codecov.yml - - 'go/**' - - go.mod - - go.sum - - Makefile - - - name: Setup GitHub access token - if: steps.changes.outputs.changed_files == 'true' - run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - - - name: Set up Go - if: steps.changes.outputs.changed_files == 'true' - uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 - with: - go-version-file: go.mod - - - name: Set up python - if: steps.changes.outputs.changed_files == 'true' - uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - - - name: Tune the OS - if: steps.changes.outputs.changed_files == 'true' - uses: ./.github/actions/tune-os - - - name: Setup MySQL - if: steps.changes.outputs.changed_files == 'true' - uses: ./.github/actions/setup-mysql - with: - flavor: mysql-8.0 - - - name: Get dependencies - if: steps.changes.outputs.changed_files == 'true' - run: | - export DEBIAN_FRONTEND="noninteractive" - sudo apt-get update - - sudo apt-get install -y make unzip g++ curl git wget ant openjdk-11-jdk - - mkdir -p dist bin - curl -s -L https://github.com/coreos/etcd/releases/download/v3.5.17/etcd-v3.5.17-linux-amd64.tar.gz | tar -zxC dist - mv dist/etcd-v3.5.17-linux-amd64/{etcd,etcdctl} bin/ - - go mod download - go install golang.org/x/tools/cmd/goimports@latest - - - name: Run make tools - if: steps.changes.outputs.changed_files == 'true' - run: | - make tools - - - name: Run unit tests and generate code coverage reports - if: steps.changes.outputs.changed_files == 'true' - timeout-minutes: 45 - run: | - set -exo pipefail - # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file - # which musn't be more than 107 characters long. - export VTDATAROOT="/tmp/" - - export NOVTADMINBUILD=1 - - # Exclude endtoend tests from the coverage report. - # TODO: figure out how best to include our endtoend tests in the coverage report. - rm -rf go/test/endtoend go/*/endtoend go/vt/*/endtoend go/cmd/vttestserver - - make unit_test_cover - - # Restore the files we deleted as codecov tries to fix their paths. - git reset --hard HEAD - - - name: Upload coverage reports to codecov.io - if: steps.changes.outputs.changed_files == 'true' - uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # https://github.com/codecov/codecov-action/releases/tag/v5.0.7 - with: - fail_ci_if_error: true - verbose: true - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/docker_test_cluster.yml b/.github/workflows/docker_test_cluster.yml index b65200910b8..4d8219274b6 100644 --- a/.github/workflows/docker_test_cluster.yml +++ b/.github/workflows/docker_test_cluster.yml @@ -1,5 +1,12 @@ name: docker_test_cluster -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' permissions: read-all GOPRIVATE: github.com/slackhq/vitess-addons GH_ACCESS_TOKEN: "${{ secrets.GH_ACCESS_TOKEN }}" @@ -17,24 +24,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -56,7 +51,7 @@ jobs: - '.github/workflows/docker_test_cluster.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod @@ -70,6 +65,6 @@ jobs: uses: ./.github/actions/tune-os - name: Run tests which require docker - 2 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go run test.go -docker=true --follow -shard docker_cluster diff --git a/.github/workflows/e2e_race.yml b/.github/workflows/e2e_race.yml index bd9e7ed31f6..82b5166d798 100644 --- a/.github/workflows/e2e_race.yml +++ b/.github/workflows/e2e_race.yml @@ -1,5 +1,12 @@ name: e2e_race -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' permissions: read-all jobs: @@ -14,24 +21,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -51,7 +46,7 @@ jobs: - '.github/workflows/e2e_race.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod @@ -71,7 +66,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | sudo apt-get update @@ -83,12 +78,12 @@ jobs: go mod download - name: Run make minimaltools - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | make minimaltools - name: e2e_race - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 30 run: | NOVTADMINBUILD=1 make e2e_test_race diff --git a/.github/workflows/endtoend.yml b/.github/workflows/endtoend.yml index c9cc39adef2..9279ade9f89 100644 --- a/.github/workflows/endtoend.yml +++ b/.github/workflows/endtoend.yml @@ -1,5 +1,12 @@ name: endtoend -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' permissions: read-all jobs: @@ -14,24 +21,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -51,7 +46,7 @@ jobs: - '.github/workflows/endtoend.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod @@ -71,7 +66,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | sudo apt-get update sudo apt-get install -y make unzip g++ etcd-client etcd-server curl git wget @@ -81,17 +76,17 @@ jobs: go mod download - name: Run make minimaltools - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | make minimaltools - name: Build - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | NOVTADMINBUILD=1 make build - name: endtoend - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 30 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file diff --git a/.github/workflows/java_docker_test.yml b/.github/workflows/java_docker_test.yml new file mode 100644 index 00000000000..0d3623a7964 --- /dev/null +++ b/.github/workflows/java_docker_test.yml @@ -0,0 +1,66 @@ +name: java_docker_test +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' +permissions: read-all +jobs: + + build: + name: Java Docker Test + runs-on: ubuntu-24.04 + + steps: + - name: Skip CI + run: | + if [[ "${{contains( github.event.pull_request.labels.*.name, 'Skip CI')}}" == "true" ]]; then + echo "skipping CI due to the 'Skip CI' label" + exit 1 + fi + + - name: Check out code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: 'false' + + - name: Check for changes in relevant files + uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 + id: changes + with: + token: '' + filters: | + end_to_end: + - 'test/config.json' + - 'go/**/*.go' + - 'test.go' + - 'Makefile' + - 'build.env' + - 'go.sum' + - 'go.mod' + - 'proto/*.proto' + - 'tools/**' + - 'config/**' + - 'bootstrap.sh' + - 'docker/**' + - 'java/**' + - '.github/workflows/java_docker_test.yml' + + - name: Set up Go + if: steps.changes.outputs.end_to_end == 'true' + uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 + with: + go-version-file: go.mod + + - name: Tune the OS + if: steps.changes.outputs.end_to_end == 'true' + run: | + sudo sysctl -w net.ipv4.ip_local_port_range="22768 65535" + + - name: Run tests which require docker - 1 + if: steps.changes.outputs.end_to_end == 'true' + run: | + go run test.go -docker=true --follow -shard java diff --git a/.github/workflows/local_example.yml b/.github/workflows/local_example.yml index b864cdb7ebe..7cf5f73de33 100644 --- a/.github/workflows/local_example.yml +++ b/.github/workflows/local_example.yml @@ -1,5 +1,12 @@ name: local_example -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' permissions: read-all env: GOPRIVATE: github.com/slackhq/vitess-addons @@ -21,24 +28,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -60,7 +55,7 @@ jobs: - '.github/workflows/local_example.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.examples == 'true' + if: steps.changes.outputs.examples == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod @@ -74,22 +69,22 @@ jobs: uses: ./.github/actions/tune-os - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.examples == 'true' + if: steps.changes.outputs.examples == 'true' run: | go mod download - name: Run make minimaltools - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.examples == 'true' + if: steps.changes.outputs.examples == 'true' run: | make minimaltools - name: Build - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.examples == 'true' + if: steps.changes.outputs.examples == 'true' run: | make build - name: local_example - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.examples == 'true' + if: steps.changes.outputs.examples == 'true' timeout-minutes: 30 run: | export TOPO=${{matrix.topo}} diff --git a/.github/workflows/region_example.yml b/.github/workflows/region_example.yml index 51c4d3fe21c..286d3602103 100644 --- a/.github/workflows/region_example.yml +++ b/.github/workflows/region_example.yml @@ -1,5 +1,12 @@ name: region_example -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' permissions: read-all jobs: @@ -21,24 +28,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -60,7 +55,7 @@ jobs: - '.github/workflows/region_example.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.examples == 'true' + if: steps.changes.outputs.examples == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod @@ -74,22 +69,22 @@ jobs: uses: ./.github/actions/tune-os - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.examples == 'true' + if: steps.changes.outputs.examples == 'true' run: | go mod download - name: Run make minimaltools - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.examples == 'true' + if: steps.changes.outputs.examples == 'true' run: | make minimaltools - name: Build - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.examples == 'true' + if: steps.changes.outputs.examples == 'true' run: | make build - name: region_example - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.examples == 'true' + if: steps.changes.outputs.examples == 'true' timeout-minutes: 30 run: | export TOPO=${{matrix.topo}} diff --git a/.github/workflows/static_checks_etc.yml b/.github/workflows/static_checks_etc.yml index b0313dc721f..6bb4dcb7655 100644 --- a/.github/workflows/static_checks_etc.yml +++ b/.github/workflows/static_checks_etc.yml @@ -1,8 +1,13 @@ name: Static Code Checks, Etc. on: - - pull_request - - push + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' permissions: read-all @@ -19,18 +24,7 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Checkout code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' @@ -43,7 +37,6 @@ jobs: github-token: ${{ github.token }} - name: Check for changes in Go files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -124,7 +117,7 @@ jobs: - '.github/workflows/static_checks_etc.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && (steps.changes.outputs.go_files == 'true' || steps.changes.outputs.parser_changes == 'true' || steps.changes.outputs.proto_changes == 'true') + if: (steps.changes.outputs.go_files == 'true' || steps.changes.outputs.parser_changes == 'true' || steps.changes.outputs.proto_changes == 'true') uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod @@ -138,23 +131,23 @@ jobs: uses: ./.github/actions/tune-os - name: Run go fmt - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.go_files == 'true' + if: steps.changes.outputs.go_files == 'true' run: | gofmt -l . | grep -vF vendor/ && exit 1 || echo "All files formatted correctly" - name: Install goimports - if: steps.skip-workflow.outputs.skip-workflow == 'false' && (steps.changes.outputs.go_files == 'true' || steps.changes.outputs.visitor == 'true') + if: (steps.changes.outputs.go_files == 'true' || steps.changes.outputs.visitor == 'true') run: | go install golang.org/x/tools/cmd/goimports@latest - name: Run goimports - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.go_files == 'true' + if: steps.changes.outputs.go_files == 'true' run: | out=$(goimports -local vitess.io/vitess -l -w $(find . -name "*.go" | grep -v ".pb.go")) echo $out | grep go > /dev/null && echo -e "The following files are malformatted:\n$out" && exit 1 || echo "All the files are formatted correctly" - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && (steps.changes.outputs.parser_changes == 'true' || steps.changes.outputs.go_files == 'true') + if: (steps.changes.outputs.parser_changes == 'true' || steps.changes.outputs.go_files == 'true') run: | sudo apt-get update sudo apt-get install -y make unzip g++ etcd-client etcd-server curl git wget @@ -162,60 +155,59 @@ jobs: go mod download - name: Run make minimaltools - if: steps.skip-workflow.outputs.skip-workflow == 'false' && (steps.changes.outputs.parser_changes == 'true' || steps.changes.outputs.go_files == 'true') + if: (steps.changes.outputs.parser_changes == 'true' || steps.changes.outputs.go_files == 'true') run: | make minimaltools - name: check_go_versions - if: steps.skip-workflow.outputs.skip-workflow == 'false' run: tools/check_go_versions.sh || exit 1 - name: check_make_parser - if: steps.skip-workflow.outputs.skip-workflow == 'false' && (steps.changes.outputs.parser_changes == 'true' || steps.changes.outputs.go_files == 'true') + if: (steps.changes.outputs.parser_changes == 'true' || steps.changes.outputs.go_files == 'true') run: | tools/check_make_parser.sh || exit 1 - name: check_make_sizegen - if: steps.skip-workflow.outputs.skip-workflow == 'false' && (steps.changes.outputs.sizegen == 'true' || steps.changes.outputs.go_files == 'true') + if: (steps.changes.outputs.sizegen == 'true' || steps.changes.outputs.go_files == 'true') run: | tools/check_make_sizegen.sh || exit 1 - name: check_make_visitor - if: steps.skip-workflow.outputs.skip-workflow == 'false' && (steps.changes.outputs.visitor == 'true' || steps.changes.outputs.go_files == 'true') + if: (steps.changes.outputs.visitor == 'true' || steps.changes.outputs.go_files == 'true') run: | misc/git/hooks/asthelpers || exit 1 - name: check_ast_format_fast - if: steps.skip-workflow.outputs.skip-workflow == 'false' && (steps.changes.outputs.astfmt == 'true' || steps.changes.outputs.go_files == 'true') + if: (steps.changes.outputs.astfmt == 'true' || steps.changes.outputs.go_files == 'true') run: | ./tools/check_astfmtgen.sh || exit 1 - name: run ensure_bootstrap_version - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | make ensure_bootstrap_version git status test -z "$(git diff-index --name-only HEAD --)" || exit 1 - name: Install golangci-lint - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.go_files == 'true' + if: steps.changes.outputs.go_files == 'true' run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.0.2 - name: Clean Env - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.go_files == 'true' + if: steps.changes.outputs.go_files == 'true' run: $(go env GOPATH)/bin/golangci-lint cache clean - name: Print linter version - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.go_files == 'true' + if: steps.changes.outputs.go_files == 'true' run: $(go env GOPATH)/bin/golangci-lint --version - name: Run golangci-lint - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.go_files == 'true' + if: steps.changes.outputs.go_files == 'true' run: $(go env GOPATH)/bin/golangci-lint run go/... --timeout 10m || exit 1 - name: Run go mod tidy - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.go_files == 'true' + if: steps.changes.outputs.go_files == 'true' run: | set -e go mod tidy @@ -229,24 +221,24 @@ jobs: exit 1 - name: Setup Node - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.proto_changes == 'true' + if: steps.changes.outputs.proto_changes == 'true' uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 with: # make proto requires newer node than the pre-installed one node-version: '22.13.1' - name: check_make_proto - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.proto_changes == 'true' + if: steps.changes.outputs.proto_changes == 'true' run: | tools/check_make_proto.sh || exit 1 - name: Check test/config.json - if: steps.skip-workflow.outputs.skip-workflow == 'false' && (steps.changes.outputs.go_files == 'true' || steps.changes.outputs.ci_config == 'true') + if: (steps.changes.outputs.go_files == 'true' || steps.changes.outputs.ci_config == 'true') run: | go run ./go/tools/ci-config/main.go || exit 1 - name: Check changelog - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.release_notes == 'true' + if: steps.changes.outputs.release_notes == 'true' run: | set -e go run ./go/tools/releases/releases.go @@ -261,7 +253,6 @@ jobs: exit 1 - name: Check make generate_ci_workflows - if: steps.skip-workflow.outputs.skip-workflow == 'false' run: | set -e make generate_ci_workflows diff --git a/.github/workflows/unit_race.yml b/.github/workflows/unit_race.yml index d5cd118d76f..0887e688598 100644 --- a/.github/workflows/unit_race.yml +++ b/.github/workflows/unit_race.yml @@ -1,5 +1,12 @@ name: unit_race -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'unit_race') cancel-in-progress: true @@ -24,24 +31,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -62,7 +57,7 @@ jobs: - '.github/workflows/unit_race.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod @@ -72,7 +67,7 @@ jobs: run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -86,7 +81,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: | export DEBIAN_FRONTEND="noninteractive" sudo apt-get -qq update @@ -104,12 +99,12 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Run make tools - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: | make tools - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: unit_race - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -133,19 +128,19 @@ jobs: make unit_test_race | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/unit_race_evalengine.yml b/.github/workflows/unit_race_evalengine.yml index 4e17d7b65f6..ff446503886 100644 --- a/.github/workflows/unit_race_evalengine.yml +++ b/.github/workflows/unit_race_evalengine.yml @@ -1,5 +1,12 @@ name: unit_race_evalengine -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'unit_race_evalengine') cancel-in-progress: true @@ -24,24 +31,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -62,7 +57,7 @@ jobs: - '.github/workflows/unit_race_evalengine.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod @@ -72,7 +67,7 @@ jobs: run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -86,7 +81,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: | export DEBIAN_FRONTEND="noninteractive" sudo apt-get -qq update @@ -104,12 +99,12 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Run make tools - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: | make tools - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: unit_race_evalengine - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -133,19 +128,19 @@ jobs: make unit_test_race | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/unit_test_evalengine_mysql57.yml b/.github/workflows/unit_test_evalengine_mysql57.yml new file mode 100644 index 00000000000..415c432c4a9 --- /dev/null +++ b/.github/workflows/unit_test_evalengine_mysql57.yml @@ -0,0 +1,181 @@ +# DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" + +name: Unit Test (evalengine_mysql57) +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' +concurrency: + group: format('{0}-{1}', ${{ github.ref }}, 'Unit Test (evalengine_mysql57)') + cancel-in-progress: true + +permissions: read-all + +env: + LAUNCHABLE_ORGANIZATION: "vitess" + LAUNCHABLE_WORKSPACE: "vitess-app" + GITHUB_PR_HEAD_SHA: "${{ github.event.pull_request.head.sha }}" + +jobs: + test: + name: Unit Test (evalengine_mysql57) + runs-on: ubuntu-24.04 + + steps: + - name: Skip CI + run: | + if [[ "${{contains( github.event.pull_request.labels.*.name, 'Skip CI')}}" == "true" ]]; then + echo "skipping CI due to the 'Skip CI' label" + exit 1 + fi + + - name: Check out code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: 'false' + + - name: Check for changes in relevant files + uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 + id: changes + with: + token: '' + filters: | + unit_tests: + - 'test/config.json' + - 'go/**' + - 'test.go' + - 'Makefile' + - 'build.env' + - 'go.sum' + - 'go.mod' + - 'proto/*.proto' + - 'tools/**' + - 'config/**' + - 'bootstrap.sh' + - '.github/workflows/unit_test_evalengine_mysql57.yml' + + - name: Set up Go + if: steps.changes.outputs.unit_tests == 'true' + uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 + with: + go-version-file: go.mod + + - name: Set up python + if: steps.changes.outputs.unit_tests == 'true' + uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 + + - name: Tune the OS + if: steps.changes.outputs.unit_tests == 'true' + run: | + sudo sysctl -w net.ipv4.ip_local_port_range="22768 65535" + # Increase the asynchronous non-blocking I/O. More information at https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_use_native_aio + echo "fs.aio-max-nr = 1048576" | sudo tee -a /etc/sysctl.conf + sudo sysctl -p /etc/sysctl.conf + + - name: Get dependencies + if: steps.changes.outputs.unit_tests == 'true' + run: | + export DEBIAN_FRONTEND="noninteractive" + sudo apt-get update + + # Uninstall any previously installed MySQL first + # sudo systemctl stop apparmor + sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common + sudo apt-get -y autoremove + sudo apt-get -y autoclean + # sudo deluser mysql + sudo rm -rf /var/lib/mysql + sudo rm -rf /etc/mysql + + # Get key to latest MySQL repo + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A8D3785C + wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.33-1_all.deb + + # Bionic packages are still compatible for Jammy since there's no MySQL 5.7 + # packages for Jammy. + echo mysql-apt-config mysql-apt-config/repo-codename select bionic | sudo debconf-set-selections + echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* + sudo apt-get update + # We have to install this old version of libaio1. See also: + # https://bugs.launchpad.net/ubuntu/+source/libaio/+bug/2067501 + curl -L -O http://mirrors.kernel.org/ubuntu/pool/main/liba/libaio/libaio1_0.3.112-13build1_amd64.deb + sudo dpkg -i libaio1_0.3.112-13build1_amd64.deb + # libtinfo5 is also needed for older MySQL 5.7 builds. + curl -L -O http://mirrors.kernel.org/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb + sudo dpkg -i libtinfo5_6.3-2ubuntu0.1_amd64.deb + sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* libncurses6 + + sudo apt-get install -y make unzip g++ curl git wget ant openjdk-11-jdk eatmydata + + sudo service mysql stop + sudo bash -c "echo '/usr/sbin/mysqld { }' > /etc/apparmor.d/usr.sbin.mysqld" # https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1806263 + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld || echo "could not remove mysqld profile" + + mkdir -p dist bin + curl -s -L https://github.com/coreos/etcd/releases/download/v3.5.17/etcd-v3.5.17-linux-amd64.tar.gz | tar -zxC dist + mv dist/etcd-v3.5.17-linux-amd64/{etcd,etcdctl} bin/ + + 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 + + - name: Run make tools + if: steps.changes.outputs.unit_tests == 'true' + run: | + make tools + + - name: Setup launchable dependencies + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' + run: | + # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up + pip3 install --user launchable~=1.0 > /dev/null + + # verify that launchable setup is all correct. + launchable verify || true + + # Tell Launchable about the build you are producing and testing + launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . + + - name: Run test + if: steps.changes.outputs.unit_tests == 'true' + timeout-minutes: 30 + run: | + set -exo pipefail + # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file + # which musn't be more than 107 characters long. + export VTDATAROOT="/tmp/" + + export NOVTADMINBUILD=1 + export VTEVALENGINETEST="1" + # We sometimes need to alter the behavior based on the platform we're + # testing, e.g. MySQL 5.7 vs 8.0. + export CI_DB_PLATFORM="mysql57" + + eatmydata -- make unit_test | tee -a output.txt | go-junit-report -set-exit-code > report.xml + + - name: Record test results in launchable if PR is not a draft + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() + run: | + # send recorded tests to launchable + launchable record tests --build "$GITHUB_RUN_ID" go-test . || true + + - name: Print test output + if: steps.changes.outputs.unit_tests == 'true' && always() + run: | + # print test output + cat output.txt + + - name: Test Summary + if: steps.changes.outputs.unit_tests == 'true' && always() + uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 + with: + paths: "report.xml" + show: "fail" diff --git a/.github/workflows/unit_test_evalengine_mysql80.yml b/.github/workflows/unit_test_evalengine_mysql80.yml index 0c5ab6f0acb..97c888bb0d6 100644 --- a/.github/workflows/unit_test_evalengine_mysql80.yml +++ b/.github/workflows/unit_test_evalengine_mysql80.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Unit Test (evalengine_mysql80) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Unit Test (evalengine_mysql80)') cancel-in-progress: true @@ -27,24 +34,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -65,17 +60,17 @@ jobs: - '.github/workflows/unit_test_evalengine_mysql80.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -89,7 +84,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: | export DEBIAN_FRONTEND="noninteractive" sudo apt-get install -y make unzip g++ curl git wget ant openjdk-11-jdk @@ -105,12 +100,12 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Run make tools - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: | make tools - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -122,7 +117,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' timeout-minutes: 30 run: | set -exo pipefail @@ -139,19 +134,19 @@ jobs: make unit_test | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/unit_test_evalengine_mysql84.yml b/.github/workflows/unit_test_evalengine_mysql84.yml index 368d876af62..8caebbb94bb 100644 --- a/.github/workflows/unit_test_evalengine_mysql84.yml +++ b/.github/workflows/unit_test_evalengine_mysql84.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Unit Test (evalengine_mysql84) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Unit Test (evalengine_mysql84)') cancel-in-progress: true @@ -27,24 +34,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -65,17 +60,17 @@ jobs: - '.github/workflows/unit_test_evalengine_mysql84.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -89,7 +84,7 @@ jobs: flavor: mysql-8.4 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: | export DEBIAN_FRONTEND="noninteractive" sudo apt-get install -y make unzip g++ curl git wget ant openjdk-11-jdk @@ -105,12 +100,12 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Run make tools - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: | make tools - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -122,7 +117,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' timeout-minutes: 30 run: | set -exo pipefail @@ -139,19 +134,19 @@ jobs: make unit_test | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/unit_test_mysql57.yml b/.github/workflows/unit_test_mysql57.yml new file mode 100644 index 00000000000..6e78006c288 --- /dev/null +++ b/.github/workflows/unit_test_mysql57.yml @@ -0,0 +1,181 @@ +# DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" + +name: Unit Test (mysql57) +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' +concurrency: + group: format('{0}-{1}', ${{ github.ref }}, 'Unit Test (mysql57)') + cancel-in-progress: true + +permissions: read-all + +env: + LAUNCHABLE_ORGANIZATION: "vitess" + LAUNCHABLE_WORKSPACE: "vitess-app" + GITHUB_PR_HEAD_SHA: "${{ github.event.pull_request.head.sha }}" + +jobs: + test: + name: Unit Test (mysql57) + runs-on: ubuntu-24.04 + + steps: + - name: Skip CI + run: | + if [[ "${{contains( github.event.pull_request.labels.*.name, 'Skip CI')}}" == "true" ]]; then + echo "skipping CI due to the 'Skip CI' label" + exit 1 + fi + + - name: Check out code + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: 'false' + + - name: Check for changes in relevant files + uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 + id: changes + with: + token: '' + filters: | + unit_tests: + - 'test/config.json' + - 'go/**' + - 'test.go' + - 'Makefile' + - 'build.env' + - 'go.sum' + - 'go.mod' + - 'proto/*.proto' + - 'tools/**' + - 'config/**' + - 'bootstrap.sh' + - '.github/workflows/unit_test_mysql57.yml' + + - name: Set up Go + if: steps.changes.outputs.unit_tests == 'true' + uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 + with: + go-version-file: go.mod + + - name: Set up python + if: steps.changes.outputs.unit_tests == 'true' + uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 + + - name: Tune the OS + if: steps.changes.outputs.unit_tests == 'true' + run: | + sudo sysctl -w net.ipv4.ip_local_port_range="22768 65535" + # Increase the asynchronous non-blocking I/O. More information at https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_use_native_aio + echo "fs.aio-max-nr = 1048576" | sudo tee -a /etc/sysctl.conf + sudo sysctl -p /etc/sysctl.conf + + - name: Get dependencies + if: steps.changes.outputs.unit_tests == 'true' + run: | + export DEBIAN_FRONTEND="noninteractive" + sudo apt-get update + + # Uninstall any previously installed MySQL first + # sudo systemctl stop apparmor + sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common + sudo apt-get -y autoremove + sudo apt-get -y autoclean + # sudo deluser mysql + sudo rm -rf /var/lib/mysql + sudo rm -rf /etc/mysql + + # Get key to latest MySQL repo + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A8D3785C + wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.33-1_all.deb + + # Bionic packages are still compatible for Jammy since there's no MySQL 5.7 + # packages for Jammy. + echo mysql-apt-config mysql-apt-config/repo-codename select bionic | sudo debconf-set-selections + echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections + sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* + sudo apt-get update + # We have to install this old version of libaio1. See also: + # https://bugs.launchpad.net/ubuntu/+source/libaio/+bug/2067501 + curl -L -O http://mirrors.kernel.org/ubuntu/pool/main/liba/libaio/libaio1_0.3.112-13build1_amd64.deb + sudo dpkg -i libaio1_0.3.112-13build1_amd64.deb + # libtinfo5 is also needed for older MySQL 5.7 builds. + curl -L -O http://mirrors.kernel.org/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb + sudo dpkg -i libtinfo5_6.3-2ubuntu0.1_amd64.deb + sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* libncurses6 + + sudo apt-get install -y make unzip g++ curl git wget ant openjdk-11-jdk eatmydata + + sudo service mysql stop + sudo bash -c "echo '/usr/sbin/mysqld { }' > /etc/apparmor.d/usr.sbin.mysqld" # https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1806263 + sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld || echo "could not remove mysqld profile" + + mkdir -p dist bin + curl -s -L https://github.com/coreos/etcd/releases/download/v3.5.17/etcd-v3.5.17-linux-amd64.tar.gz | tar -zxC dist + mv dist/etcd-v3.5.17-linux-amd64/{etcd,etcdctl} bin/ + + 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 + + - name: Run make tools + if: steps.changes.outputs.unit_tests == 'true' + run: | + make tools + + - name: Setup launchable dependencies + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' + run: | + # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up + pip3 install --user launchable~=1.0 > /dev/null + + # verify that launchable setup is all correct. + launchable verify || true + + # Tell Launchable about the build you are producing and testing + launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . + + - name: Run test + if: steps.changes.outputs.unit_tests == 'true' + timeout-minutes: 30 + run: | + set -exo pipefail + # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file + # which musn't be more than 107 characters long. + export VTDATAROOT="/tmp/" + + export NOVTADMINBUILD=1 + export VTEVALENGINETEST="0" + # We sometimes need to alter the behavior based on the platform we're + # testing, e.g. MySQL 5.7 vs 8.0. + export CI_DB_PLATFORM="mysql57" + + eatmydata -- make unit_test | tee -a output.txt | go-junit-report -set-exit-code > report.xml + + - name: Record test results in launchable if PR is not a draft + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() + run: | + # send recorded tests to launchable + launchable record tests --build "$GITHUB_RUN_ID" go-test . || true + + - name: Print test output + if: steps.changes.outputs.unit_tests == 'true' && always() + run: | + # print test output + cat output.txt + + - name: Test Summary + if: steps.changes.outputs.unit_tests == 'true' && always() + uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 + with: + paths: "report.xml" + show: "fail" diff --git a/.github/workflows/unit_test_mysql80.yml b/.github/workflows/unit_test_mysql80.yml index e1c8523db04..d5cba17e186 100644 --- a/.github/workflows/unit_test_mysql80.yml +++ b/.github/workflows/unit_test_mysql80.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Unit Test (mysql80) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Unit Test (mysql80)') cancel-in-progress: true @@ -27,24 +34,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -65,17 +60,17 @@ jobs: - '.github/workflows/unit_test_mysql80.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -89,7 +84,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: | export DEBIAN_FRONTEND="noninteractive" sudo apt-get install -y make unzip g++ curl git wget ant openjdk-11-jdk @@ -105,12 +100,12 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Run make tools - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: | make tools - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -122,7 +117,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' timeout-minutes: 30 run: | set -exo pipefail @@ -139,19 +134,19 @@ jobs: make unit_test | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/unit_test_mysql84.yml b/.github/workflows/unit_test_mysql84.yml index ef351f78b13..36ef4c37876 100644 --- a/.github/workflows/unit_test_mysql84.yml +++ b/.github/workflows/unit_test_mysql84.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Unit Test (mysql84) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Unit Test (mysql84)') cancel-in-progress: true @@ -27,24 +34,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -65,17 +60,17 @@ jobs: - '.github/workflows/unit_test_mysql84.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -89,7 +84,7 @@ jobs: flavor: mysql-8.4 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: | export DEBIAN_FRONTEND="noninteractive" sudo apt-get install -y make unzip g++ curl git wget ant openjdk-11-jdk @@ -105,12 +100,12 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Run make tools - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: | make tools - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -122,7 +117,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' timeout-minutes: 30 run: | set -exo pipefail @@ -139,19 +134,19 @@ jobs: make unit_test | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/upgrade_downgrade_test_backups_e2e.yml b/.github/workflows/upgrade_downgrade_test_backups_e2e.yml index b2d2d4cc3d3..bcd4a778090 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_e2e.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_e2e.yml @@ -1,7 +1,12 @@ name: Backups - E2E - Upgrade Downgrade Testing on: push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Upgrade Downgrade Testing - Backups - E2E') @@ -26,25 +31,13 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 persist-credentials: 'false' - name: Set output with latest release branch - 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}}) @@ -52,7 +45,6 @@ jobs: echo "previous_release_ref=${previous_release_ref}" >> $GITHUB_OUTPUT - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -73,8 +65,8 @@ jobs: - 'bootstrap.sh' - '.github/workflows/upgrade_downgrade_test_backups_e2e.yml' - - name: Set up last release Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + - name: Set up Go + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.8 @@ -84,7 +76,7 @@ jobs: run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -99,7 +91,7 @@ jobs: - name: Get base dependencies timeout-minutes: 10 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | sudo DEBIAN_FRONTEND="noninteractive" apt-get update @@ -121,19 +113,19 @@ jobs: # Checkout to the last release of Vitess - name: Check out other version's code (${{ steps.output-previous-release-ref.outputs.previous_release_ref }}) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ steps.output-previous-release-ref.outputs.previous_release_ref }} persist-credentials: 'false' - name: Get dependencies for the last release - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building last release's binaries - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -154,18 +146,18 @@ jobs: # Checkout to this build's commit - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Get dependencies for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building the binaries for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -175,7 +167,7 @@ jobs: # Swap binaries, use last release's VTTablet - name: Use last release's VTTablet - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -187,7 +179,7 @@ jobs: # Run test with VTTablet at version N-1 and VTBackup at version N - name: Run backups tests (vttablet=N-1, vtbackup=N) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot @@ -197,7 +189,7 @@ jobs: # Swap binaries again, use current version's VTTablet, and last release's VTBackup - name: Use current version VTTablet, and other version VTBackup - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -211,7 +203,7 @@ jobs: # Run test again with VTTablet at version N, and VTBackup at version N-1 - name: Run backups tests (vttablet=N, vtbackup=N-1) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot 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 5756e543e44..73f7c96c6a9 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml @@ -1,7 +1,12 @@ name: Backups - E2E - Next Release - Upgrade Downgrade Testing on: push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Upgrade Downgrade Testing - Backups - E2E - Next Release') @@ -37,21 +42,8 @@ jobs: echo $next_release_ref echo "next_release_ref=${next_release_ref}" >> $GITHUB_OUTPUT - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - if [[ "${{steps.output-next-release-ref.outputs.next_release_ref}}" == "" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' + if: steps.output-next-release-ref.outputs.next_release_ref != '' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -73,7 +65,7 @@ jobs: - '.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod @@ -83,7 +75,7 @@ jobs: run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -98,7 +90,7 @@ jobs: - name: Get base dependencies timeout-minutes: 10 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | sudo DEBIAN_FRONTEND="noninteractive" apt-get update @@ -120,19 +112,19 @@ jobs: # Checkout to the next release of Vitess - name: Check out other version's code (${{ steps.output-next-release-ref.outputs.next_release_ref }}) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ steps.output-next-release-ref.outputs.next_release_ref }} persist-credentials: 'false' - name: Get dependencies for the next release - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building next release's binaries - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -143,18 +135,18 @@ jobs: # Checkout to this build's commit - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Get dependencies for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building the binaries for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -164,7 +156,7 @@ jobs: # Swap binaries, use next release's VTTablet - name: Use next release's VTTablet - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -176,7 +168,7 @@ jobs: # Run test with VTTablet at version N+1 and VTBackup at version N - name: Run backups tests (vttablet=N+1, vtbackup=N) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot @@ -186,7 +178,7 @@ jobs: # Swap binaries again, use current version's VTTablet, and next release's VTBackup - name: Use current version VTTablet, and other version VTBackup - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -200,7 +192,7 @@ jobs: # Run test again with VTTablet at version N, and VTBackup at version N+1 - name: Run backups tests (vttablet=N, vtbackup=N+1) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot diff --git a/.github/workflows/upgrade_downgrade_test_backups_manual.yml b/.github/workflows/upgrade_downgrade_test_backups_manual.yml index 4e3b1b83ea6..7e4a0a25f7f 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_manual.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_manual.yml @@ -1,7 +1,12 @@ name: Backups - Manual - Upgrade Downgrade Testing on: push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Upgrade Downgrade Testing - Backups - Manual') @@ -28,19 +33,8 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - # Checkout to this build's commit - name: Checkout to commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 @@ -48,14 +42,12 @@ jobs: - name: Set output with latest release branch 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}}) echo $previous_release_ref echo "previous_release_ref=${previous_release_ref}" >> $GITHUB_OUTPUT - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -77,8 +69,8 @@ jobs: - '.github/workflows/upgrade_downgrade_test_backups_manual.yml' - 'examples/**' - - name: Set up last release Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + - name: Set up Go + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.8 @@ -88,7 +80,7 @@ jobs: run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -103,7 +95,7 @@ jobs: - name: Get base dependencies timeout-minutes: 10 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | sudo DEBIAN_FRONTEND="noninteractive" apt-get update @@ -124,19 +116,19 @@ jobs: # Checkout to the last release of Vitess - name: Checkout to the other version's code (${{ steps.output-previous-release-ref.outputs.previous_release_ref }}) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ steps.output-previous-release-ref.outputs.previous_release_ref }} persist-credentials: 'false' - name: Get dependencies for the last release - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building last release's binaries - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 5 run: | source build.env @@ -157,23 +149,23 @@ jobs: # Checkout to this build's commit - name: Checkout to commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Get dependencies for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Run make minimaltools - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | make minimaltools - name: Building the binaries for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 5 run: | source build.env @@ -184,7 +176,7 @@ jobs: # We create a sharded Vitess cluster following the local example. # We also insert a few rows in our three tables. - name: Create the example Vitess cluster with all components using version N - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env ; cd examples/backups @@ -192,7 +184,7 @@ jobs: # Taking a backup - name: Take a backup of all the shards - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 5 run: | source build.env ; cd examples/backups @@ -206,7 +198,7 @@ jobs: # - corder: 5 # We shall see the same number of rows after restoring the backup. - name: Insert more data after the backup - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | source build.env ; cd examples; source ./common/env.sh @@ -216,7 +208,7 @@ jobs: # Stop all the tablets and remove their data - name: Stop tablets - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env ; cd examples/backups @@ -224,7 +216,7 @@ jobs: # We downgrade: we use the version N-1 of vttablet - name: Downgrade - Swap binaries, use VTTablet N-1 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -236,7 +228,7 @@ jobs: # Starting the tablets again, they will automatically start restoring the last backup. - name: Start new tablets and restore - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env ; cd examples/backups @@ -246,7 +238,7 @@ jobs: # Count the number of rows in each table to make sure the restoration is successful. - name: Assert the number of rows in every table - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | source build.env ; cd examples ; source ./common/env.sh @@ -256,7 +248,7 @@ jobs: # We insert one more row in every table. - name: Insert more rows in the tables - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | source build.env ; cd examples ; source ./common/env.sh @@ -266,7 +258,7 @@ jobs: # Taking a second backup of the cluster. - name: Take a second backup of all the shards - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env ; cd examples/backups @@ -274,7 +266,7 @@ jobs: # We upgrade: we swap binaries and use the version N of the tablet. - name: Upgrade - Swap binaries, use VTTablet N - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -286,7 +278,7 @@ jobs: # Starting the tablets again and restoring the previous backup. - name: Start new tablets and restore - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env ; cd examples/backups @@ -294,7 +286,7 @@ jobs: # We count the number of rows in every table to check that the restore step was successful. - name: Assert the number of rows in every table - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | source build.env ; cd examples ; source ./common/env.sh @@ -303,7 +295,7 @@ jobs: echo "select count(sku) from corder;" | mysql 2>&1| grep 6 - name: Stop the Vitess cluster - if: always() && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: always() && steps.changes.outputs.end_to_end == 'true' run: | source build.env ; cd examples/local ./401_teardown.sh || true 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 ef8a592378b..680c20b3ca5 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml @@ -1,7 +1,12 @@ name: Backups - Manual - Next Release - Upgrade Downgrade Testing on: push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Upgrade Downgrade Testing - Backups - Manual - Next Release') @@ -39,21 +44,8 @@ jobs: echo $next_release_ref echo "next_release_ref=${next_release_ref}" >> $GITHUB_OUTPUT - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - if [[ "${{steps.output-next-release-ref.outputs.next_release_ref}}" == "" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' + if: steps.output-next-release-ref.outputs.next_release_ref != '' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -76,7 +68,7 @@ jobs: - 'examples/**' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod @@ -86,7 +78,7 @@ jobs: run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -101,7 +93,7 @@ jobs: - name: Get base dependencies timeout-minutes: 10 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | sudo DEBIAN_FRONTEND="noninteractive" apt-get update @@ -122,19 +114,19 @@ jobs: # Checkout to the next release of Vitess - name: Checkout to the other version's code (${{ steps.output-next-release-ref.outputs.next_release_ref }}) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ steps.output-next-release-ref.outputs.next_release_ref }} persist-credentials: 'false' - name: Get dependencies for the next release - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building next release's binaries - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 5 run: | source build.env @@ -145,23 +137,23 @@ jobs: # Checkout to this build's commit - name: Checkout to commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Get dependencies for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Run make minimaltools - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | make minimaltools - name: Building the binaries for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 5 run: | source build.env @@ -172,7 +164,7 @@ jobs: # We create a sharded Vitess cluster following the local example. # We also insert a few rows in our three tables. - name: Create the example Vitess cluster with all components using version N - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env ; cd examples/backups @@ -180,7 +172,7 @@ jobs: # Taking a backup - name: Take a backup of all the shards - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 5 run: | source build.env ; cd examples/backups @@ -194,7 +186,7 @@ jobs: # - corder: 5 # We shall see the same number of rows after restoring the backup. - name: Insert more data after the backup - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | source build.env ; cd examples ; source ./common/env.sh @@ -204,7 +196,7 @@ jobs: # Stop all the tablets and remove their data - name: Stop tablets - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env ; cd examples/backups @@ -212,7 +204,7 @@ jobs: # We downgrade: we use the version N+1 of vttablet - name: Downgrade - Swap binaries, use VTTablet N+1 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -224,7 +216,7 @@ jobs: # Starting the tablets again, they will automatically start restoring the last backup. - name: Start new tablets and restore - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env ; cd examples/backups @@ -234,7 +226,7 @@ jobs: # Count the number of rows in each table to make sure the restoration is successful. - name: Assert the number of rows in every table - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | source build.env ; cd examples ; source ./common/env.sh @@ -244,7 +236,7 @@ jobs: # We insert one more row in every table. - name: Insert more rows in the tables - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | source build.env ; cd examples ; source ./common/env.sh @@ -254,7 +246,7 @@ jobs: # Taking a second backup of the cluster. - name: Take a second backup of all the shards - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env ; cd examples/backups @@ -262,7 +254,7 @@ jobs: # We upgrade: we swap binaries and use the version N of the tablet. - name: Upgrade - Swap binaries, use VTTablet N - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -274,7 +266,7 @@ jobs: # Starting the tablets again and restoring the next backup. - name: Start new tablets and restore - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env ; cd examples/backups @@ -282,7 +274,7 @@ jobs: # We count the number of rows in every table to check that the restore step was successful. - name: Assert the number of rows in every table - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | source build.env ; cd examples ; source ./common/env.sh @@ -291,7 +283,7 @@ jobs: echo "select count(sku) from corder;" | mysql 2>&1| grep 6 - name: Stop the Vitess cluster - if: always() && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: always() && steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | source build.env ; cd examples/local ./401_teardown.sh || true diff --git a/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml b/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml index 498f5abb644..fe11e62a520 100644 --- a/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml +++ b/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml @@ -1,7 +1,12 @@ name: Online DDL flow - Upgrade Downgrade Testing on: push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Upgrade Downgrade Testing Online DDL flow') @@ -30,25 +35,13 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='true' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -71,22 +64,20 @@ jobs: - name: Set output with latest release branch 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}}) echo $previous_release_ref echo "previous_release_ref=${previous_release_ref}" >> $GITHUB_OUTPUT - name: Set output with next release branch - if: steps.skip-workflow.outputs.skip-workflow == 'false' id: output-next-release-ref run: | next_release_ref=$(./tools/get_next_release.sh ${{github.base_ref}} ${{github.ref}}) echo $next_release_ref echo "next_release_ref=${next_release_ref}" >> $GITHUB_OUTPUT - - name: Set up last release Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + - name: Set up Go + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.8 @@ -96,7 +87,7 @@ jobs: run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -111,7 +102,7 @@ jobs: - name: Get base dependencies timeout-minutes: 10 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | sudo DEBIAN_FRONTEND="noninteractive" apt-get update # Install everything else we need, and configure @@ -124,19 +115,19 @@ jobs: # Checkout to the last release of Vitess - name: Check out last version's code (${{ steps.output-previous-release-ref.outputs.previous_release_ref }}) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ steps.output-previous-release-ref.outputs.previous_release_ref }} persist-credentials: 'false' - name: Get dependencies for the last release - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building last release's binaries - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | echo "building last release: $(git rev-parse HEAD)" @@ -158,19 +149,19 @@ jobs: # Checkout to the next release of Vitess - name: Check out next version's code (${{ steps.output-next-release-ref.outputs.next_release_ref }}) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ steps.output-next-release-ref.outputs.next_release_ref }} persist-credentials: 'false' - name: Get dependencies for the next release - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building next release's binaries - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | echo "building next release: $(git rev-parse HEAD)" @@ -182,18 +173,18 @@ jobs: # Checkout to this build's commit - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Get dependencies for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building the binaries for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | echo "building this SHA: $(git rev-parse HEAD)" @@ -204,7 +195,7 @@ jobs: # Copy vttablet and related binaries under new names - name: Use current version Vtctl, and other version VTTablet - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -220,7 +211,7 @@ jobs: # Running a test with primary tablet at version n (current SHA) and replica vttablet at version n-1 - name: Run Online DDL tests (primary=N, replica=N-1) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot @@ -232,7 +223,7 @@ jobs: # Running a test with primary tablet at version n-1 and replica vttablet at version n (current SHA) - name: Run Online DDL tests (primary=N-1, replica=N) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot @@ -244,7 +235,7 @@ jobs: # Running a test with primary tablet at version n+1 and replica vttablet at version n (current SHA) - name: Run Online DDL tests (primary=N+1, replica=N) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot @@ -256,7 +247,7 @@ jobs: # Running a test with primary tablet at version n (current SHA) and replica vttablet at version n+1 - name: Run Online DDL tests (primary=N, replica=N+1) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml b/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml index 6eb0b9a5f3f..0f7d92bd889 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml @@ -1,7 +1,12 @@ name: Query Serving (Queries) - Upgrade Downgrade Testing on: push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Upgrade Downgrade Testing Query Serving (Queries)') @@ -27,18 +32,7 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 @@ -46,14 +40,12 @@ jobs: - name: Set output with latest release branch 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}}) echo $previous_release_ref echo "previous_release_ref=${previous_release_ref}" >> $GITHUB_OUTPUT - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -75,7 +67,7 @@ jobs: - '.github/workflows/upgrade_downgrade_test_query_serving_queries.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.24.4 @@ -85,7 +77,7 @@ jobs: run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -100,7 +92,7 @@ jobs: - name: Get base dependencies timeout-minutes: 10 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | sudo DEBIAN_FRONTEND="noninteractive" apt-get update # Install everything else we need, and configure @@ -113,12 +105,12 @@ jobs: # Build current commit's binaries - name: Get dependencies for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building the binaries for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -135,19 +127,19 @@ jobs: # Checkout to the last release of Vitess - name: Check out other version's code (${{ steps.output-previous-release-ref.outputs.previous_release_ref }}) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ steps.output-previous-release-ref.outputs.previous_release_ref }} persist-credentials: 'false' - name: Get dependencies for the last release - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building last release's binaries - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -157,14 +149,14 @@ jobs: rm -Rf bin/* - name: Convert ErrorContains checks to Error checks - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | find ./go/test/endtoend -name '*.go' -exec sed -i 's/ErrorContains/Error/g' {} + find ./go/test/endtoend -name '*.go' -exec sed -i 's/EqualError/Error/g' {} + # Swap the binaries in the bin. Use vtgate version n-1 and keep vttablet at version n - name: Use last release's VTGate - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -175,7 +167,7 @@ jobs: # Running a test with vtgate at version n-1 and vttablet/vtctld at version n - name: Run query serving tests (vtgate=N-1, vttablet=N, vtctld=N) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot @@ -185,7 +177,7 @@ jobs: # Swap the binaries again. This time, vtgate will be at version n, and vttablet/vtctld will be at version n-1 - name: Use current version VTGate, and other version VTTablet/VTctld - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -205,7 +197,7 @@ jobs: # Running a test with vtgate at version n and vttablet/vtctld at version n-1 - name: Run query serving tests (vtgate=N, vttablet=N-1, vtctld=N-1) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_queries_2.yml b/.github/workflows/upgrade_downgrade_test_query_serving_queries_2.yml index fc850bf16fa..9ad3df3d237 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_queries_2.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_queries_2.yml @@ -1,7 +1,12 @@ name: Query Serving (Queries - 2) - Upgrade Downgrade Testing on: push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Upgrade Downgrade Testing Query Serving (Queries - 2)') @@ -27,18 +32,7 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 @@ -46,14 +40,12 @@ jobs: - name: Set output with latest release branch 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}}) echo $previous_release_ref echo "previous_release_ref=${previous_release_ref}" >> $GITHUB_OUTPUT - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -75,7 +67,7 @@ jobs: - '.github/workflows/upgrade_downgrade_test_query_serving_queries.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.24.4 @@ -85,7 +77,7 @@ jobs: run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -100,7 +92,7 @@ jobs: - name: Get base dependencies timeout-minutes: 10 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | sudo DEBIAN_FRONTEND="noninteractive" apt-get update # Install everything else we need, and configure @@ -113,12 +105,12 @@ jobs: # Build current commit's binaries - name: Get dependencies for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building the binaries for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -135,19 +127,19 @@ jobs: # Checkout to the last release of Vitess - name: Check out other version's code (${{ steps.output-previous-release-ref.outputs.previous_release_ref }}) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ steps.output-previous-release-ref.outputs.previous_release_ref }} persist-credentials: 'false' - name: Get dependencies for the last release - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building last release's binaries - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -157,14 +149,14 @@ jobs: rm -Rf bin/* - name: Convert ErrorContains checks to Error checks - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | find ./go/test/endtoend -name '*.go' -exec sed -i 's/ErrorContains/Error/g' {} + find ./go/test/endtoend -name '*.go' -exec sed -i 's/EqualError/Error/g' {} + # Swap the binaries in the bin. Use vtgate version n-1 and keep vttablet at version n - name: Use last release's VTGate - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -175,7 +167,7 @@ jobs: # Running a test with vtgate at version n-1 and vttablet/vtctld at version n - name: Run query serving tests (vtgate=N-1, vttablet=N, vtctld=N) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot @@ -185,7 +177,7 @@ jobs: # Swap the binaries again. This time, vtgate will be at version n, and vttablet/vtctld will be at version n-1 - name: Use current version VTGate, and other version VTTablet/VTctld - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -205,7 +197,7 @@ jobs: # Running a test with vtgate at version n and vttablet/vtctld at version n-1 - name: Run query serving tests (vtgate=N, vttablet=N-1, vtctld=N-1) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_queries_2_next_release.yml b/.github/workflows/upgrade_downgrade_test_query_serving_queries_2_next_release.yml index 2360a14cc60..cb791a9e82f 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_queries_2_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_queries_2_next_release.yml @@ -1,7 +1,12 @@ name: Query Serving (Queries - 2) Next Release - Upgrade Downgrade Testing on: push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Upgrade Downgrade Testing Query Serving (Queries - 2) Next Release') @@ -40,21 +45,8 @@ jobs: echo $next_release_ref echo "next_release_ref=${next_release_ref}" >> $GITHUB_OUTPUT - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - if [[ "${{steps.output-next-release-ref.outputs.next_release_ref}}" == "" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' + if: steps.output-next-release-ref.outputs.next_release_ref != '' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -76,7 +68,7 @@ jobs: - '.github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod @@ -86,7 +78,7 @@ jobs: run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -101,7 +93,7 @@ jobs: - name: Get base dependencies timeout-minutes: 10 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | sudo DEBIAN_FRONTEND="noninteractive" apt-get update # Install everything else we need, and configure @@ -114,19 +106,19 @@ jobs: # Checkout to the next release of Vitess - name: Check out other version's code (${{ steps.output-next-release-ref.outputs.next_release_ref }}) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ steps.output-next-release-ref.outputs.next_release_ref }} persist-credentials: 'false' - name: Get dependencies for the next release - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building next release's binaries - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -137,18 +129,18 @@ jobs: # Checkout to this build's commit - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Get dependencies for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building the binaries for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -157,14 +149,14 @@ jobs: cp -R bin /tmp/vitess-build-current/ - name: Convert ErrorContains checks to Error checks - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | find ./go/test/endtoend -name '*.go' -exec sed -i 's/ErrorContains/Error/g' {} + find ./go/test/endtoend -name '*.go' -exec sed -i 's/EqualError/Error/g' {} + # Swap the binaries in the bin. Use vtgate version n+1 and keep vttablet at version n - name: Use next release's VTGate - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | source build.env rm -f $PWD/bin/vtgate @@ -173,7 +165,7 @@ jobs: # Running a test with vtgate at version n+1 and vttablet at version n - name: Run query serving tests (vtgate=N+1, vttablet=N) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot @@ -183,7 +175,7 @@ jobs: # Swap the binaries again. This time, vtgate will be at version n, and vttablet will be at version n+1 - name: Use current version VTGate, and other version VTTablet - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -197,7 +189,7 @@ jobs: # Running a test with vtgate at version n and vttablet at version n+1 - name: Run query serving tests (vtgate=N, vttablet=N+1) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot 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 3844fcf8b6f..e03abae4bd8 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 @@ -1,7 +1,12 @@ name: Query Serving (Queries) Next Release - Upgrade Downgrade Testing on: push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Upgrade Downgrade Testing Query Serving (Queries) Next Release') @@ -40,21 +45,8 @@ jobs: echo $next_release_ref echo "next_release_ref=${next_release_ref}" >> $GITHUB_OUTPUT - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - if [[ "${{steps.output-next-release-ref.outputs.next_release_ref}}" == "" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' + if: steps.output-next-release-ref.outputs.next_release_ref != '' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -76,7 +68,7 @@ jobs: - '.github/workflows/upgrade_downgrade_test_query_serving_queries_next_release.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod @@ -86,7 +78,7 @@ jobs: run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -101,7 +93,7 @@ jobs: - name: Get base dependencies timeout-minutes: 10 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | sudo DEBIAN_FRONTEND="noninteractive" apt-get update # Install everything else we need, and configure @@ -114,19 +106,19 @@ jobs: # Checkout to the next release of Vitess - name: Check out other version's code (${{ steps.output-next-release-ref.outputs.next_release_ref }}) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ steps.output-next-release-ref.outputs.next_release_ref }} persist-credentials: 'false' - name: Get dependencies for the next release - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building next release's binaries - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -137,18 +129,18 @@ jobs: # Checkout to this build's commit - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Get dependencies for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building the binaries for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -157,14 +149,14 @@ jobs: cp -R bin /tmp/vitess-build-current/ - name: Convert ErrorContains checks to Error checks - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | find ./go/test/endtoend -name '*.go' -exec sed -i 's/ErrorContains/Error/g' {} + find ./go/test/endtoend -name '*.go' -exec sed -i 's/EqualError/Error/g' {} + # Swap the binaries in the bin. Use vtgate version n+1 and keep vttablet at version n - name: Use next release's VTGate - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | source build.env rm -f $PWD/bin/vtgate @@ -173,7 +165,7 @@ jobs: # Running a test with vtgate at version n+1 and vttablet at version n - name: Run query serving tests (vtgate=N+1, vttablet=N) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot @@ -183,7 +175,7 @@ jobs: # Swap the binaries again. This time, vtgate will be at version n, and vttablet will be at version n+1 - name: Use current version VTGate, and other version VTTablet - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -197,7 +189,7 @@ jobs: # Running a test with vtgate at version n and vttablet at version n+1 - name: Run query serving tests (vtgate=N, vttablet=N+1) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml b/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml index e3d72fa1f38..3d547c34156 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml @@ -1,7 +1,12 @@ name: Query Serving (Schema) - Upgrade Downgrade Testing on: push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Upgrade Downgrade Testing Query Serving (Schema)') @@ -27,18 +32,7 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='true' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 @@ -46,14 +40,12 @@ jobs: - name: Set output with latest release branch 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}}) echo $previous_release_ref echo "previous_release_ref=${previous_release_ref}" >> $GITHUB_OUTPUT - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -74,8 +66,8 @@ jobs: - 'bootstrap.sh' - '.github/workflows/upgrade_downgrade_test_query_serving_schema.yml' - - name: Set up last release Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + - name: Set up Go + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.8 @@ -85,7 +77,7 @@ jobs: run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -100,7 +92,7 @@ jobs: - name: Get base dependencies timeout-minutes: 10 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | sudo DEBIAN_FRONTEND="noninteractive" apt-get update # Install everything else we need, and configure @@ -113,19 +105,19 @@ jobs: # Checkout to the last release of Vitess - name: Check out other version's code (${{ steps.output-previous-release-ref.outputs.previous_release_ref }}) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ steps.output-previous-release-ref.outputs.previous_release_ref }} persist-credentials: 'false' - name: Get dependencies for the last release - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building last release's binaries - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -142,18 +134,18 @@ jobs: # Checkout to this build's commit - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Get dependencies for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building the binaries for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -162,14 +154,14 @@ jobs: cp -R bin /tmp/vitess-build-current/ - name: Convert ErrorContains checks to Error checks - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | find ./go/test/endtoend -name '*.go' -exec sed -i 's/ErrorContains/Error/g' {} + find ./go/test/endtoend -name '*.go' -exec sed -i 's/EqualError/Error/g' {} + # Swap the binaries in the bin. Use vtgate version n-1 and keep vttablet at version n - name: Use last release's VTGate - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -179,7 +171,7 @@ jobs: # Running a test with vtgate at version n-1 and vttablet at version n - name: Run query serving tests (vtgate=N-1, vttablet=N) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot @@ -189,7 +181,7 @@ jobs: # Swap the binaries again. This time, vtgate will be at version n, and vttablet will be at version n-1 - name: Use current version VTGate, and other version VTTablet - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -203,7 +195,7 @@ jobs: # Running a test with vtgate at version n and vttablet at version n-1 - name: Run query serving tests (vtgate=N, vttablet=N-1) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot 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 f3156a392fc..126a80085b9 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 @@ -1,7 +1,12 @@ name: Query Serving (Schema) Next Release - Upgrade Downgrade Testing on: push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Upgrade Downgrade Testing Query Serving (Schema) Next Release') @@ -40,21 +45,8 @@ jobs: echo $next_release_ref echo "next_release_ref=${next_release_ref}" >> $GITHUB_OUTPUT - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - if [[ "${{steps.output-next-release-ref.outputs.next_release_ref}}" == "" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' + if: steps.output-next-release-ref.outputs.next_release_ref != '' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -76,7 +68,7 @@ jobs: - '.github/workflows/upgrade_downgrade_test_query_serving_schema_next_release.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod @@ -86,7 +78,7 @@ jobs: run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -101,7 +93,7 @@ jobs: - name: Get base dependencies timeout-minutes: 10 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | sudo DEBIAN_FRONTEND="noninteractive" apt-get update # Install everything else we need, and configure @@ -114,19 +106,19 @@ jobs: # Checkout to the next release of Vitess - name: Check out other version's code (${{ steps.output-next-release-ref.outputs.next_release_ref }}) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ steps.output-next-release-ref.outputs.next_release_ref }} persist-credentials: 'false' - name: Get dependencies for the next release - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building next release's binaries - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -137,18 +129,18 @@ jobs: # Checkout to this build's commit - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Get dependencies for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building the binaries for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -157,14 +149,14 @@ jobs: cp -R bin /tmp/vitess-build-current/ - name: Convert ErrorContains checks to Error checks - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | find ./go/test/endtoend -name '*.go' -exec sed -i 's/ErrorContains/Error/g' {} + find ./go/test/endtoend -name '*.go' -exec sed -i 's/EqualError/Error/g' {} + # Swap the binaries in the bin. Use vtgate version n+1 and keep vttablet at version n - name: Use next release's VTGate - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -174,7 +166,7 @@ jobs: # Running a test with vtgate at version n+1 and vttablet at version n - name: Run query serving tests (vtgate=N+1, vttablet=N) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot @@ -184,7 +176,7 @@ jobs: # Swap the binaries again. This time, vtgate will be at version n, and vttablet will be at version n+1 - name: Use current version VTGate, and other version VTTablet - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -198,7 +190,7 @@ jobs: # Running a test with vtgate at version n and vttablet at version n+1 - name: Run query serving tests (vtgate=N, vttablet=N+1) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot diff --git a/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml b/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml index cdfb3c69860..ae6d0cd8bf0 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml @@ -1,7 +1,12 @@ name: Reparent New Vtctl - Upgrade Downgrade Testing on: push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Upgrade Downgrade Testing Reparent New Vtctl') @@ -40,21 +45,8 @@ jobs: echo $next_release_ref echo "next_release_ref=${next_release_ref}" >> $GITHUB_OUTPUT - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - if [[ "${{steps.output-next-release-ref.outputs.next_release_ref}}" == "" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' + if: steps.output-next-release-ref.outputs.next_release_ref != '' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -76,7 +68,7 @@ jobs: - '.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod @@ -86,7 +78,7 @@ jobs: run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -101,7 +93,7 @@ jobs: - name: Get base dependencies timeout-minutes: 10 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | sudo DEBIAN_FRONTEND="noninteractive" apt-get update # Install everything else we need, and configure @@ -114,19 +106,19 @@ jobs: # Checkout to the next release of Vitess - name: Check out other version's code (${{ steps.output-next-release-ref.outputs.next_release_ref }}) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ steps.output-next-release-ref.outputs.next_release_ref }} persist-credentials: 'false' - name: Get dependencies for the next release - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building next release's binaries - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -137,18 +129,18 @@ jobs: # Checkout to this build's commit - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Get dependencies for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building the binaries for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -158,7 +150,7 @@ jobs: # Swap the binaries in the bin. Use vtctl version n+1 and keep vttablet at version n - name: Use next release's Vtctl - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -172,7 +164,7 @@ jobs: # Running a test with vtctl at version n+1 and vttablet at version n - name: Run reparent tests (vtctl=N+1, vttablet=N) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot diff --git a/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml b/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml index 3539b208796..f88c86c569c 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml @@ -1,7 +1,12 @@ name: Reparent New VTTablet - Upgrade Downgrade Testing on: push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Upgrade Downgrade Testing Reparent New VTTablet') @@ -40,21 +45,8 @@ jobs: echo $next_release_ref echo "next_release_ref=${next_release_ref}" >> $GITHUB_OUTPUT - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - if [[ "${{steps.output-next-release-ref.outputs.next_release_ref}}" == "" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' + if: steps.output-next-release-ref.outputs.next_release_ref != '' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -76,7 +68,7 @@ jobs: - '.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod @@ -86,7 +78,7 @@ jobs: run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -101,7 +93,7 @@ jobs: - name: Get base dependencies timeout-minutes: 10 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | sudo DEBIAN_FRONTEND="noninteractive" apt-get update # Install everything else we need, and configure @@ -121,19 +113,19 @@ jobs: # Checkout to the next release of Vitess - name: Check out other version's code (${{ steps.output-next-release-ref.outputs.next_release_ref }}) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ steps.output-next-release-ref.outputs.next_release_ref }} persist-credentials: 'false' - name: Get dependencies for the next release - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building next release's binaries - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -144,18 +136,18 @@ jobs: # Checkout to this build's commit - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Get dependencies for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building the binaries for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -165,7 +157,7 @@ jobs: # Swap the binaries. Use vtctl version n and keep vttablet at version n+1 - name: Use current version Vtctl, and other version VTTablet - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -178,7 +170,7 @@ jobs: # Running a test with vtctl at version n and vttablet at version n+1 - name: Run reparent tests (vtctl=N, vttablet=N+1) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.output-next-release-ref.outputs.next_release_ref != '' && steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot diff --git a/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml b/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml index a7a5332c548..6e8e20e223b 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml @@ -1,7 +1,12 @@ name: Reparent Old Vtctl - Upgrade Downgrade Testing on: push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Upgrade Downgrade Testing Reparent Old Vtctl') @@ -27,18 +32,7 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 @@ -46,14 +40,12 @@ jobs: - name: Set output with latest release branch 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}}) echo $previous_release_ref echo "previous_release_ref=${previous_release_ref}" >> $GITHUB_OUTPUT - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -74,8 +66,8 @@ jobs: - 'bootstrap.sh' - '.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml' - - name: Set up last release Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + - name: Set up Go + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.8 @@ -85,7 +77,7 @@ jobs: run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -100,7 +92,7 @@ jobs: - name: Get base dependencies timeout-minutes: 10 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | sudo DEBIAN_FRONTEND="noninteractive" apt-get update # Install everything else we need, and configure @@ -113,19 +105,19 @@ jobs: # Checkout to the last release of Vitess - name: Check out other version's code (${{ steps.output-previous-release-ref.outputs.previous_release_ref }}) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ steps.output-previous-release-ref.outputs.previous_release_ref }} persist-credentials: 'false' - name: Get dependencies for the last release - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building last release's binaries - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -142,18 +134,18 @@ jobs: # Checkout to this build's commit - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Get dependencies for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building the binaries for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -163,7 +155,7 @@ jobs: # Swap the binaries in the bin. Use vtctl version n-1 and keep vttablet at version n - name: Use last release's Vtctl - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -177,7 +169,7 @@ jobs: # Running a test with vtctl at version n-1 and vttablet at version n - name: Run reparent tests (vtctl=N-1, vttablet=N) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot diff --git a/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml b/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml index 0755f5cb1c8..495df086141 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml @@ -1,7 +1,12 @@ name: Reparent Old VTTablet - Upgrade Downgrade Testing on: push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Upgrade Downgrade Testing Reparent Old VTTablet') @@ -27,18 +32,7 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='true' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 @@ -46,14 +40,12 @@ jobs: - name: Set output with latest release branch 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}}) echo $previous_release_ref echo "previous_release_ref=${previous_release_ref}" >> $GITHUB_OUTPUT - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -74,8 +66,8 @@ jobs: - 'bootstrap.sh' - '.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml' - - name: Set up last release Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + - name: Set up Go + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.8 @@ -85,7 +77,7 @@ jobs: run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -100,7 +92,7 @@ jobs: - name: Get base dependencies timeout-minutes: 10 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | sudo DEBIAN_FRONTEND="noninteractive" apt-get update # Install everything else we need, and configure @@ -113,19 +105,19 @@ jobs: # Checkout to the last release of Vitess - name: Check out other version's code (${{ steps.output-previous-release-ref.outputs.previous_release_ref }}) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ steps.output-previous-release-ref.outputs.previous_release_ref }} persist-credentials: 'false' - name: Get dependencies for the last release - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building last release's binaries - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -142,18 +134,18 @@ jobs: # Checkout to this build's commit - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Get dependencies for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building the binaries for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -163,7 +155,7 @@ jobs: # Swap the binaries. Use vtctl version n and keep vttablet at version n-1 - name: Use current version Vtctl, and other version VTTablet - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -176,7 +168,7 @@ jobs: # Running a test with vtctl at version n and vttablet at version n-1 - name: Run reparent tests (vtctl=N, vttablet=N-1) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot diff --git a/.github/workflows/upgrade_downgrade_test_semi_sync.yml b/.github/workflows/upgrade_downgrade_test_semi_sync.yml index 1326f3ec7b3..4016c68f6e3 100644 --- a/.github/workflows/upgrade_downgrade_test_semi_sync.yml +++ b/.github/workflows/upgrade_downgrade_test_semi_sync.yml @@ -1,7 +1,12 @@ name: Semi Sync Upgrade Downgrade Testing on: push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Semi Sync Upgrade Downgrade Testing') @@ -23,25 +28,13 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: fetch-depth: 0 persist-credentials: 'false' - name: Set output with latest release branch - 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}}) @@ -49,7 +42,6 @@ jobs: echo "previous_release_ref=${previous_release_ref}" >> $GITHUB_OUTPUT - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -70,8 +62,8 @@ jobs: - 'bootstrap.sh' - '.github/workflows/upgrade_downgrade_test_semi_sync.yml' - - name: Set up last release Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + - name: Set up Go + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.8 @@ -81,7 +73,7 @@ jobs: run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -96,7 +88,7 @@ jobs: - name: Get base dependencies timeout-minutes: 10 - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | sudo DEBIAN_FRONTEND="noninteractive" apt-get update @@ -118,19 +110,19 @@ jobs: # Checkout to the last release of Vitess - name: Check out other version's code (${{ steps.output-previous-release-ref.outputs.previous_release_ref }}) - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: ref: ${{ steps.output-previous-release-ref.outputs.previous_release_ref }} persist-credentials: 'false' - name: Get dependencies for the last release - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building last release's binaries - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -147,18 +139,18 @@ jobs: # Checkout to this build's commit - name: Check out commit's code - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Get dependencies for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | go mod download - name: Building the binaries for this commit - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | source build.env @@ -168,7 +160,7 @@ jobs: # Copy last releases vttablet - name: Copy last release's VTTablet - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | source build.env @@ -176,7 +168,7 @@ jobs: vttabletold --version - name: Run semi sync tests - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | rm -rf /tmp/vtdataroot mkdir -p /tmp/vtdataroot diff --git a/.github/workflows/vitess_tester_vtgate.yml b/.github/workflows/vitess_tester_vtgate.yml index 7a735b42a48..88da52ff805 100644 --- a/.github/workflows/vitess_tester_vtgate.yml +++ b/.github/workflows/vitess_tester_vtgate.yml @@ -1,7 +1,14 @@ # DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" name: Vitess Tester (vtgate) -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'Vitess Tester (vtgate)') cancel-in-progress: true @@ -27,24 +34,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -67,17 +62,17 @@ jobs: - '.github/workflows/vitess_tester_vtgate.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -91,7 +86,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | sudo apt-get -qq update @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/vt/go/vt@e43009309f599378504905d4b804460f47822ac5 - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -148,19 +143,19 @@ jobs: done - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat report*.xml - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report*.xml" diff --git a/.github/workflows/vtadmin_web_build.yml b/.github/workflows/vtadmin_web_build.yml index ab50c17d2bc..ea1f3b83aed 100644 --- a/.github/workflows/vtadmin_web_build.yml +++ b/.github/workflows/vtadmin_web_build.yml @@ -4,10 +4,15 @@ name: vtadmin-web build # See https://github.community/t/trigger-a-workflow-on-change-to-the-yml-file-itself/17792/4) on: push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' paths: - '.github/workflows/vtadmin_web_build.yml' - 'web/vtadmin/**' pull_request: + branches: '**' paths: - '.github/workflows/vtadmin_web_build.yml' - 'web/vtadmin/**' @@ -25,18 +30,7 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - if: steps.skip-workflow.outputs.skip-workflow == 'false' with: persist-credentials: 'false' @@ -44,17 +38,14 @@ jobs: uses: ./.github/actions/tune-os - uses: actions/setup-node@v4 - if: steps.skip-workflow.outputs.skip-workflow == 'false' with: # node-version should match package.json node-version: '22.13.1' - name: Install dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' run: cd ./web/vtadmin && npm ci - name: Build front-end - if: steps.skip-workflow.outputs.skip-workflow == 'false' run: cd ./web/vtadmin && npm run build # Cancel pending and in-progress runs of this workflow if a newer ref is pushed to CI. diff --git a/.github/workflows/vtadmin_web_lint.yml b/.github/workflows/vtadmin_web_lint.yml index 138264c2880..783ddb90834 100644 --- a/.github/workflows/vtadmin_web_lint.yml +++ b/.github/workflows/vtadmin_web_lint.yml @@ -4,10 +4,15 @@ name: vtadmin-web linting + formatting # See https://github.community/t/trigger-a-workflow-on-change-to-the-yml-file-itself/17792/4) on: push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' paths: - '.github/workflows/vtadmin_web_lint.yml' - 'web/vtadmin/**' pull_request: + branches: '**' paths: - '.github/workflows/vtadmin_web_lint.yml' - 'web/vtadmin/**' @@ -25,18 +30,7 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - if: steps.skip-workflow.outputs.skip-workflow == 'false' with: persist-credentials: 'false' @@ -44,13 +38,11 @@ jobs: uses: ./.github/actions/tune-os - uses: actions/setup-node@v4 - if: steps.skip-workflow.outputs.skip-workflow == 'false' with: # node-version should match package.json node-version: '22.13.1' - name: Install dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' run: cd ./web/vtadmin && npm ci # Using "if: always()" means each step will run, even if a previous @@ -62,15 +54,15 @@ jobs: # A nice enhancement is to parallelize these steps into jobs, with the # trade-off of more complexity around sharing npm install artifacts. - name: Run eslint - if: steps.skip-workflow.outputs.skip-workflow == 'false' && always() + if: always() run: cd ./web/vtadmin && npm run lint:eslint - name: Run stylelint - if: steps.skip-workflow.outputs.skip-workflow == 'false' && always() + if: always() run: cd ./web/vtadmin && npm run lint:stylelint -- -f verbose - name: Run prettier - if: steps.skip-workflow.outputs.skip-workflow == 'false' && always() + if: 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. diff --git a/.github/workflows/vtadmin_web_unit_tests.yml b/.github/workflows/vtadmin_web_unit_tests.yml index 59bf3400bc8..c2028c7add2 100644 --- a/.github/workflows/vtadmin_web_unit_tests.yml +++ b/.github/workflows/vtadmin_web_unit_tests.yml @@ -4,10 +4,15 @@ name: vtadmin-web unit tests # See https://github.community/t/trigger-a-workflow-on-change-to-the-yml-file-itself/17792/4) on: push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' paths: - '.github/workflows/vtadmin_web_unit_tests.yml' - 'web/vtadmin/**' pull_request: + branches: '**' paths: - '.github/workflows/vtadmin_web_unit_tests.yml' - 'web/vtadmin/**' @@ -25,18 +30,7 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - if: steps.skip-workflow.outputs.skip-workflow == 'false' with: persist-credentials: 'false' @@ -44,17 +38,14 @@ jobs: uses: ./.github/actions/tune-os - uses: actions/setup-node@v4 - if: steps.skip-workflow.outputs.skip-workflow == 'false' with: # node-version should match package.json node-version: '22.13.1' - name: Install dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' run: cd ./web/vtadmin && npm ci - 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. diff --git a/.github/workflows/vtop_example.yml b/.github/workflows/vtop_example.yml index c25bf968f2d..e7b0ee34ae4 100644 --- a/.github/workflows/vtop_example.yml +++ b/.github/workflows/vtop_example.yml @@ -1,5 +1,12 @@ name: vtop_example -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'vtop_example') cancel-in-progress: true @@ -20,24 +27,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='true' - if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -59,7 +54,7 @@ jobs: - '.github/workflows/vtop_example.yml' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod @@ -73,7 +68,7 @@ jobs: uses: ./.github/actions/tune-os - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | # Install everything we need, and configure sudo apt-get install -y make @@ -81,17 +76,17 @@ jobs: # needed for vtctldclient - name: Build vitess - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | make build - name: Install kubectl & kind - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | make install_kubectl_kind - name: vtop_example - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 60 run: | source build.env diff --git a/test/templates/cluster_endtoend_test.tpl b/test/templates/cluster_endtoend_test.tpl index 1d2580177a9..9fe4d919ea4 100644 --- a/test/templates/cluster_endtoend_test.tpl +++ b/test/templates/cluster_endtoend_test.tpl @@ -1,5 +1,12 @@ name: {{.Name}} -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{"{{"}} github.ref {{"}}"}}, '{{.Name}}') cancel-in-progress: true @@ -26,16 +33,6 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "{{"${{github.event.pull_request}}"}}" == "" ]] && [[ "{{"${{github.ref}}"}}" != "refs/heads/main" ]] && [[ ! "{{"${{github.ref}}"}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "{{"${{github.ref}}"}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - {{if .MemoryCheck}} - name: Check Memory @@ -50,13 +47,11 @@ jobs: {{end}} - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -82,19 +77,19 @@ jobs: {{- end}} - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod {{if .GoPrivate}} - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{`{{ secrets.GH_ACCESS_TOKEN }}`}}@github.com/.insteadOf https://github.com/ {{end}} - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -110,7 +105,7 @@ jobs: {{ end }} - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 10 run: | {{if .InstallXtraBackup}} @@ -150,7 +145,6 @@ jobs: {{if .NeedsMinio }} - name: Install Minio - if: steps.skip-workflow.outputs.skip-workflow == 'false' run: | wget https://dl.min.io/server/minio/release/linux-amd64/minio chmod +x minio @@ -160,14 +154,14 @@ jobs: {{if .MakeTools}} - name: Installing zookeeper and consul - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | make tools {{end}} - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -179,7 +173,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -227,19 +221,19 @@ jobs: go run test.go -docker={{if .Docker}}true -flavor={{.Platform}}{{else}}false{{end}} -follow -shard {{.Shard}}{{if .PartialKeyspace}} -partial-keyspace=true {{end}}{{if .BuildTag}} -build-tag={{.BuildTag}} {{end}} | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/test/templates/cluster_endtoend_test_docker.tpl b/test/templates/cluster_endtoend_test_docker.tpl index 91bbdf99ef1..4fcf06797b6 100644 --- a/test/templates/cluster_endtoend_test_docker.tpl +++ b/test/templates/cluster_endtoend_test_docker.tpl @@ -1,5 +1,12 @@ name: {{.Name}} -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' permissions: read-all @@ -19,24 +26,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "{{"${{github.event.pull_request}}"}}" == "" ]] && [[ "{{"${{github.ref}}"}}" != "refs/heads/main" ]] && [[ ! "{{"${{github.ref}}"}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "{{"${{github.ref}}"}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -59,24 +54,24 @@ jobs: - '.github/workflows/{{.FileName}}' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod {{if .GoPrivate}} - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{`{{ secrets.GH_ACCESS_TOKEN }}`}}@github.com/.insteadOf https://github.com/ {{end}} - name: Tune the OS - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | sudo sysctl -w net.ipv4.ip_local_port_range="22768 65535" - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 30 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file diff --git a/test/templates/cluster_endtoend_test_mysql57.tpl b/test/templates/cluster_endtoend_test_mysql57.tpl index 138f6fd1376..421d97810b0 100644 --- a/test/templates/cluster_endtoend_test_mysql57.tpl +++ b/test/templates/cluster_endtoend_test_mysql57.tpl @@ -1,5 +1,12 @@ name: {{.Name}} -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{"{{"}} github.ref {{"}}"}}, '{{.Name}}') cancel-in-progress: true @@ -30,16 +37,6 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "{{"${{github.event.pull_request}}"}}" == "" ]] && [[ "{{"${{github.ref}}"}}" != "refs/heads/main" ]] && [[ ! "{{"${{github.ref}}"}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "{{"${{github.ref}}"}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - {{if .MemoryCheck}} - name: Check Memory @@ -54,13 +51,11 @@ jobs: {{end}} - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -86,19 +81,19 @@ jobs: {{- end}} - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod {{if .GoPrivate}} - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{`{{ secrets.GH_ACCESS_TOKEN }}`}}@github.com/.insteadOf https://github.com/ {{end}} - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -112,7 +107,7 @@ jobs: flavor: mysql-5.7 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | sudo apt-get update @@ -143,14 +138,14 @@ jobs: {{if .MakeTools}} - name: Installing zookeeper and consul - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | make tools {{end}} - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -162,7 +157,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -197,19 +192,19 @@ jobs: go run test.go -docker={{if .Docker}}true -flavor={{.Platform}}{{else}}false{{end}} -follow -shard {{.Shard}}{{if .PartialKeyspace}} -partial-keyspace=true {{end}} | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/test/templates/cluster_vitess_tester.tpl b/test/templates/cluster_vitess_tester.tpl index 363691d9c75..bd6664fe4ae 100644 --- a/test/templates/cluster_vitess_tester.tpl +++ b/test/templates/cluster_vitess_tester.tpl @@ -1,5 +1,12 @@ name: {{.Name}} -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{"{{"}} github.ref {{"}}"}}, '{{.Name}}') cancel-in-progress: true @@ -25,24 +32,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "{{"${{github.event.pull_request}}"}}" == "" ]] && [[ "{{"${{github.ref}}"}}" != "refs/heads/main" ]] && [[ ! "{{"${{github.ref}}"}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "{{"${{github.ref}}"}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -65,19 +60,19 @@ jobs: - '.github/workflows/{{.FileName}}' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod {{if .GoPrivate}} - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{`{{ secrets.GH_ACCESS_TOKEN }}`}}@github.com/.insteadOf https://github.com/ {{end}} - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -91,7 +86,7 @@ jobs: flavor: mysql-8.0 - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: | sudo apt-get -qq update @@ -109,7 +104,7 @@ jobs: go install github.com/vitessio/vt/go/vt@e43009309f599378504905d4b804460f47822ac5 - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -121,7 +116,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run cluster endtoend test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' timeout-minutes: 45 run: | # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file @@ -148,19 +143,19 @@ jobs: done - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() run: | # print test output cat report*.xml - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report*.xml" diff --git a/test/templates/unit_test.tpl b/test/templates/unit_test.tpl index 41f2a157aff..8e52c724001 100644 --- a/test/templates/unit_test.tpl +++ b/test/templates/unit_test.tpl @@ -1,5 +1,12 @@ name: {{.Name}} -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + pull_request: + branches: '**' concurrency: group: format('{0}-{1}', ${{"{{"}} github.ref {{"}}"}}, '{{.Name}}') cancel-in-progress: true @@ -25,24 +32,12 @@ jobs: exit 1 fi - - name: Check if workflow needs to be skipped - id: skip-workflow - run: | - skip='false' - if [[ "{{"${{github.event.pull_request}}"}}" == "" ]] && [[ "{{"${{github.ref}}"}}" != "refs/heads/main" ]] && [[ ! "{{"${{github.ref}}"}}" =~ ^refs/heads/slack-[0-9]+\.[0-9]$ ]] && [[ ! "{{"${{github.ref}}"}}" =~ "refs/tags/.*" ]]; then - skip='true' - fi - echo Skip ${skip} - echo "skip-workflow=${skip}" >> $GITHUB_OUTPUT - - name: Check out code - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: 'false' - name: Check for changes in relevant files - if: steps.skip-workflow.outputs.skip-workflow == 'false' uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 id: changes with: @@ -63,19 +58,19 @@ jobs: - '.github/workflows/{{.FileName}}' - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version-file: go.mod {{if .GoPrivate}} - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: git config --global url.https://${{`{{ secrets.GH_ACCESS_TOKEN }}`}}@github.com/.insteadOf https://github.com/ {{end}} - name: Set up python - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - name: Tune the OS @@ -97,7 +92,7 @@ jobs: {{ end }} - name: Get dependencies - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: | export DEBIAN_FRONTEND="noninteractive" sudo apt-get install -y make unzip g++ curl git wget ant openjdk-11-jdk @@ -113,12 +108,12 @@ jobs: go install github.com/vitessio/go-junit-report@HEAD - name: Run make tools - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: | make tools - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' run: | # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up pip3 install --user launchable~=1.0 > /dev/null @@ -130,7 +125,7 @@ jobs: launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - name: Run test - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' timeout-minutes: 30 run: | set -exo pipefail @@ -147,19 +142,19 @@ jobs: make unit_test | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && always() run: | # print test output cat output.txt - name: Test Summary - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && always() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" From 005d0f3e9c474b46b4c7546f080ef20732331c32 Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Thu, 13 Nov 2025 17:02:59 -0800 Subject: [PATCH 02/11] fix token Signed-off-by: Tanjin Xu --- .github/workflows/unit_race.yml | 1 + .github/workflows/unit_race_evalengine.yml | 1 + .github/workflows/unit_test_evalengine_mysql57.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/unit_race.yml b/.github/workflows/unit_race.yml index 0887e688598..ae469784986 100644 --- a/.github/workflows/unit_race.yml +++ b/.github/workflows/unit_race.yml @@ -17,6 +17,7 @@ env: LAUNCHABLE_ORGANIZATION: "vitess" LAUNCHABLE_WORKSPACE: "vitess-app" GITHUB_PR_HEAD_SHA: "${{ github.event.pull_request.head.sha }}" + GOPRIVATE: "github.com/slackhq/vitess-addons" jobs: diff --git a/.github/workflows/unit_race_evalengine.yml b/.github/workflows/unit_race_evalengine.yml index ff446503886..2f0d3f6ecce 100644 --- a/.github/workflows/unit_race_evalengine.yml +++ b/.github/workflows/unit_race_evalengine.yml @@ -17,6 +17,7 @@ env: LAUNCHABLE_ORGANIZATION: "vitess" LAUNCHABLE_WORKSPACE: "vitess-app" GITHUB_PR_HEAD_SHA: "${{ github.event.pull_request.head.sha }}" + GOPRIVATE: "github.com/slackhq/vitess-addons" jobs: diff --git a/.github/workflows/unit_test_evalengine_mysql57.yml b/.github/workflows/unit_test_evalengine_mysql57.yml index 415c432c4a9..aaa93c3aedc 100644 --- a/.github/workflows/unit_test_evalengine_mysql57.yml +++ b/.github/workflows/unit_test_evalengine_mysql57.yml @@ -19,6 +19,7 @@ env: LAUNCHABLE_ORGANIZATION: "vitess" LAUNCHABLE_WORKSPACE: "vitess-app" GITHUB_PR_HEAD_SHA: "${{ github.event.pull_request.head.sha }}" + GOPRIVATE: "github.com/slackhq/vitess-addons" jobs: test: From 8563632ed4957fb9e3a933bfaeb60e2bef37fb5c Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Thu, 13 Nov 2025 17:07:03 -0800 Subject: [PATCH 03/11] fix token Signed-off-by: Tanjin Xu --- .github/workflows/e2e_race.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e_race.yml b/.github/workflows/e2e_race.yml index 82b5166d798..35d86752d34 100644 --- a/.github/workflows/e2e_race.yml +++ b/.github/workflows/e2e_race.yml @@ -8,8 +8,12 @@ on: pull_request: branches: '**' permissions: read-all -jobs: +env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: "${{ secrets.GH_ACCESS_TOKEN }}" + +jobs: build: name: End-to-End Test (Race) runs-on: ubuntu-24.04 From 9e7234fe523fc547ccb4c7ab72b38c63f3451c58 Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Thu, 13 Nov 2025 17:09:30 -0800 Subject: [PATCH 04/11] fix token Signed-off-by: Tanjin Xu --- .github/workflows/endtoend.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/endtoend.yml b/.github/workflows/endtoend.yml index 9279ade9f89..24fbb15e36b 100644 --- a/.github/workflows/endtoend.yml +++ b/.github/workflows/endtoend.yml @@ -8,6 +8,9 @@ on: pull_request: branches: '**' permissions: read-all +env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: "${{ secrets.GH_ACCESS_TOKEN }}" jobs: build: From 7006d5f1c5a065aade08f97cc2cbaa1d5d516cd0 Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Thu, 13 Nov 2025 17:18:20 -0800 Subject: [PATCH 05/11] fix env Signed-off-by: Tanjin Xu --- .github/workflows/check_make_vtadmin_authz_testgen.yml | 5 ++++- .github/workflows/docker_test_cluster.yml | 7 ++++--- .github/workflows/e2e_race.yml | 2 +- .github/workflows/endtoend.yml | 2 +- .github/workflows/local_example.yml | 2 +- .github/workflows/region_example.yml | 2 +- .github/workflows/static_checks_etc.yml | 2 +- .github/workflows/unit_race.yml | 2 +- .github/workflows/unit_race_evalengine.yml | 2 +- .github/workflows/upgrade_downgrade_test_backups_e2e.yml | 6 +++--- .../upgrade_downgrade_test_backups_e2e_next_release.yml | 2 +- .../workflows/upgrade_downgrade_test_backups_manual.yml | 6 +++--- .../upgrade_downgrade_test_backups_manual_next_release.yml | 2 +- .../workflows/upgrade_downgrade_test_onlineddl_flow.yml | 6 +++--- .../upgrade_downgrade_test_query_serving_queries.yml | 4 ++-- .../upgrade_downgrade_test_query_serving_queries_2.yml | 4 ++-- ...downgrade_test_query_serving_queries_2_next_release.yml | 2 +- ...e_downgrade_test_query_serving_queries_next_release.yml | 2 +- .../upgrade_downgrade_test_query_serving_schema.yml | 4 ++-- ...de_downgrade_test_query_serving_schema_next_release.yml | 2 +- .../upgrade_downgrade_test_reparent_new_vtctl.yml | 2 +- .../upgrade_downgrade_test_reparent_new_vttablet.yml | 2 +- .../upgrade_downgrade_test_reparent_old_vtctl.yml | 4 ++-- .../upgrade_downgrade_test_reparent_old_vttablet.yml | 4 ++-- .github/workflows/upgrade_downgrade_test_semi_sync.yml | 4 ++-- .github/workflows/vtop_example.yml | 2 +- 26 files changed, 44 insertions(+), 40 deletions(-) diff --git a/.github/workflows/check_make_vtadmin_authz_testgen.yml b/.github/workflows/check_make_vtadmin_authz_testgen.yml index e497e31068d..7ae3b8c12d1 100644 --- a/.github/workflows/check_make_vtadmin_authz_testgen.yml +++ b/.github/workflows/check_make_vtadmin_authz_testgen.yml @@ -14,6 +14,9 @@ jobs: build: name: Check Make vtadmin_authz_testgen runs-on: ubuntu-24.04 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} steps: - name: Skip CI run: | @@ -44,7 +47,7 @@ jobs: - '.github/workflows/check_make_vtadmin_authz_testgen.yml' - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.vtadmin_changes == 'true' + if: steps.changes.outputs.vtadmin_changes == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Tune the OS diff --git a/.github/workflows/docker_test_cluster.yml b/.github/workflows/docker_test_cluster.yml index 4d8219274b6..09968617954 100644 --- a/.github/workflows/docker_test_cluster.yml +++ b/.github/workflows/docker_test_cluster.yml @@ -8,13 +8,14 @@ on: pull_request: branches: '**' permissions: read-all -GOPRIVATE: github.com/slackhq/vitess-addons -GH_ACCESS_TOKEN: "${{ secrets.GH_ACCESS_TOKEN }}" jobs: build: name: Docker Test Cluster runs-on: ubuntu-24.04 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: "${{ secrets.GH_ACCESS_TOKEN }}" steps: - name: Skip CI @@ -57,7 +58,7 @@ jobs: go-version-file: go.mod - name: Setup github.com/slackhq/vitess-addons access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ - name: Tune the OS diff --git a/.github/workflows/e2e_race.yml b/.github/workflows/e2e_race.yml index 35d86752d34..39a6b2cf6a4 100644 --- a/.github/workflows/e2e_race.yml +++ b/.github/workflows/e2e_race.yml @@ -56,7 +56,7 @@ jobs: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Tune the OS diff --git a/.github/workflows/endtoend.yml b/.github/workflows/endtoend.yml index 24fbb15e36b..ea5c17d3a20 100644 --- a/.github/workflows/endtoend.yml +++ b/.github/workflows/endtoend.yml @@ -55,7 +55,7 @@ jobs: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Tune the OS diff --git a/.github/workflows/local_example.yml b/.github/workflows/local_example.yml index 7cf5f73de33..349571664f6 100644 --- a/.github/workflows/local_example.yml +++ b/.github/workflows/local_example.yml @@ -61,7 +61,7 @@ jobs: go-version-file: go.mod - name: Setup github.com/slackhq/vitess-addons access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.examples == 'true' + if: steps.changes.outputs.examples == 'true' run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ - name: Tune the OS diff --git a/.github/workflows/region_example.yml b/.github/workflows/region_example.yml index 286d3602103..9392e94b908 100644 --- a/.github/workflows/region_example.yml +++ b/.github/workflows/region_example.yml @@ -61,7 +61,7 @@ jobs: go-version-file: go.mod - name: Setup github.com/slackhq/vitess-addons access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.examples == 'true' + if: steps.changes.outputs.examples == 'true' run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ - name: Tune the OS diff --git a/.github/workflows/static_checks_etc.yml b/.github/workflows/static_checks_etc.yml index 6bb4dcb7655..ca2eac8bf77 100644 --- a/.github/workflows/static_checks_etc.yml +++ b/.github/workflows/static_checks_etc.yml @@ -123,7 +123,7 @@ jobs: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.go_files == 'true' + if: steps.changes.outputs.go_files == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Tune the OS diff --git a/.github/workflows/unit_race.yml b/.github/workflows/unit_race.yml index ae469784986..f16fa9488a4 100644 --- a/.github/workflows/unit_race.yml +++ b/.github/workflows/unit_race.yml @@ -64,7 +64,7 @@ jobs: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python diff --git a/.github/workflows/unit_race_evalengine.yml b/.github/workflows/unit_race_evalengine.yml index 2f0d3f6ecce..1b9822e62ca 100644 --- a/.github/workflows/unit_race_evalengine.yml +++ b/.github/workflows/unit_race_evalengine.yml @@ -64,7 +64,7 @@ jobs: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.unit_tests == 'true' + if: steps.changes.outputs.unit_tests == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python diff --git a/.github/workflows/upgrade_downgrade_test_backups_e2e.yml b/.github/workflows/upgrade_downgrade_test_backups_e2e.yml index bcd4a778090..f992fdd2b70 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_e2e.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_e2e.yml @@ -72,7 +72,7 @@ jobs: go-version: 1.22.8 - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python @@ -135,13 +135,13 @@ jobs: rm -Rf bin/* - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.24.4 - name: Setup github.com/slackhq/vitess-addons access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ # Checkout to this build's commit 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 73f7c96c6a9..d405ac0068f 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_e2e_next_release.yml @@ -71,7 +71,7 @@ jobs: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python diff --git a/.github/workflows/upgrade_downgrade_test_backups_manual.yml b/.github/workflows/upgrade_downgrade_test_backups_manual.yml index 7e4a0a25f7f..2c877074377 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_manual.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_manual.yml @@ -76,7 +76,7 @@ jobs: go-version: 1.22.8 - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python @@ -138,13 +138,13 @@ jobs: rm -Rf bin/* - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.24.4 - name: Setup github.com/slackhq/vitess-addons access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ # Checkout to this build's commit 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 680c20b3ca5..b3010d5fc9e 100644 --- a/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_backups_manual_next_release.yml @@ -74,7 +74,7 @@ jobs: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python diff --git a/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml b/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml index fe11e62a520..8927d2e16b9 100644 --- a/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml +++ b/.github/workflows/upgrade_downgrade_test_onlineddl_flow.yml @@ -83,7 +83,7 @@ jobs: go-version: 1.22.8 - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python @@ -138,13 +138,13 @@ jobs: rm -Rf bin/* - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.24.4 - name: Setup github.com/slackhq/vitess-addons access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ # Checkout to the next release of Vitess diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml b/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml index 0f7d92bd889..dd51d5ff13a 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_queries.yml @@ -73,7 +73,7 @@ jobs: go-version: 1.24.4 - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python @@ -120,7 +120,7 @@ jobs: rm -Rf bin/* - name: Set up last release Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.8 diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_queries_2.yml b/.github/workflows/upgrade_downgrade_test_query_serving_queries_2.yml index 9ad3df3d237..8ed7f2a5775 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_queries_2.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_queries_2.yml @@ -73,7 +73,7 @@ jobs: go-version: 1.24.4 - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python @@ -120,7 +120,7 @@ jobs: rm -Rf bin/* - name: Set up last release Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.8 diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_queries_2_next_release.yml b/.github/workflows/upgrade_downgrade_test_query_serving_queries_2_next_release.yml index cb791a9e82f..c58fe0cd4e4 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_queries_2_next_release.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_queries_2_next_release.yml @@ -74,7 +74,7 @@ jobs: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python 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 e03abae4bd8..805f217cf74 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 @@ -74,7 +74,7 @@ jobs: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python diff --git a/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml b/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml index 3d547c34156..e3762a67c83 100644 --- a/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml +++ b/.github/workflows/upgrade_downgrade_test_query_serving_schema.yml @@ -73,7 +73,7 @@ jobs: go-version: 1.22.8 - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python @@ -127,7 +127,7 @@ jobs: rm -Rf bin/* - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.24.4 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 126a80085b9..6bf9bbc008d 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 @@ -74,7 +74,7 @@ jobs: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python diff --git a/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml b/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml index ae6d0cd8bf0..edd37b4f834 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_new_vtctl.yml @@ -74,7 +74,7 @@ jobs: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python diff --git a/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml b/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml index f88c86c569c..013e9237f7e 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_new_vttablet.yml @@ -74,7 +74,7 @@ jobs: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python diff --git a/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml b/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml index 6e8e20e223b..3d60f027e44 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_old_vtctl.yml @@ -73,7 +73,7 @@ jobs: go-version: 1.22.8 - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python @@ -127,7 +127,7 @@ jobs: rm -Rf bin/* - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.24.4 diff --git a/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml b/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml index 495df086141..4c9c323d69b 100644 --- a/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml +++ b/.github/workflows/upgrade_downgrade_test_reparent_old_vttablet.yml @@ -73,7 +73,7 @@ jobs: go-version: 1.22.8 - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python @@ -127,7 +127,7 @@ jobs: rm -Rf bin/* - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.24.4 diff --git a/.github/workflows/upgrade_downgrade_test_semi_sync.yml b/.github/workflows/upgrade_downgrade_test_semi_sync.yml index 4016c68f6e3..c6c3782fd81 100644 --- a/.github/workflows/upgrade_downgrade_test_semi_sync.yml +++ b/.github/workflows/upgrade_downgrade_test_semi_sync.yml @@ -69,7 +69,7 @@ jobs: go-version: 1.22.8 - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Set up python @@ -132,7 +132,7 @@ jobs: rm -Rf bin/* - name: Set up Go - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.24.4 diff --git a/.github/workflows/vtop_example.yml b/.github/workflows/vtop_example.yml index e7b0ee34ae4..3e6c07cd7d6 100644 --- a/.github/workflows/vtop_example.yml +++ b/.github/workflows/vtop_example.yml @@ -60,7 +60,7 @@ jobs: go-version-file: go.mod - name: Setup GitHub access token - if: steps.skip-workflow.outputs.skip-workflow == 'false' && steps.changes.outputs.end_to_end == 'true' + if: steps.changes.outputs.end_to_end == 'true' run: git config --global url.https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/.insteadOf https://github.com/ - name: Tune the OS From ecaa7c30623fb4fd7662ecac06e2199dec689f2e Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Thu, 13 Nov 2025 17:24:52 -0800 Subject: [PATCH 06/11] fix token Signed-off-by: Tanjin Xu --- .github/workflows/java_docker_test.yml | 7 +++++++ .github/workflows/unit_test_evalengine_mysql57.yml | 5 +++++ .github/workflows/unit_test_mysql57.yml | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/.github/workflows/java_docker_test.yml b/.github/workflows/java_docker_test.yml index 0d3623a7964..6dc25c88e4e 100644 --- a/.github/workflows/java_docker_test.yml +++ b/.github/workflows/java_docker_test.yml @@ -13,6 +13,9 @@ jobs: build: name: Java Docker Test runs-on: ubuntu-24.04 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: "${{ secrets.GH_ACCESS_TOKEN }}" steps: - name: Skip CI @@ -55,6 +58,10 @@ jobs: with: go-version-file: go.mod + - name: Setup github.com/slackhq/vitess-addons access token + if: steps.changes.outputs.end_to_end == 'true' + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Tune the OS if: steps.changes.outputs.end_to_end == 'true' run: | diff --git a/.github/workflows/unit_test_evalengine_mysql57.yml b/.github/workflows/unit_test_evalengine_mysql57.yml index aaa93c3aedc..9a9c3dc426d 100644 --- a/.github/workflows/unit_test_evalengine_mysql57.yml +++ b/.github/workflows/unit_test_evalengine_mysql57.yml @@ -20,6 +20,7 @@ env: LAUNCHABLE_WORKSPACE: "vitess-app" GITHUB_PR_HEAD_SHA: "${{ github.event.pull_request.head.sha }}" GOPRIVATE: "github.com/slackhq/vitess-addons" + GH_ACCESS_TOKEN: "${{ secrets.GH_ACCESS_TOKEN }}" jobs: test: @@ -65,6 +66,10 @@ jobs: with: go-version-file: go.mod + - name: Setup github.com/slackhq/vitess-addons access token + if: steps.changes.outputs.end_to_end == 'true' + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.changes.outputs.unit_tests == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 diff --git a/.github/workflows/unit_test_mysql57.yml b/.github/workflows/unit_test_mysql57.yml index 6e78006c288..10e09075381 100644 --- a/.github/workflows/unit_test_mysql57.yml +++ b/.github/workflows/unit_test_mysql57.yml @@ -19,6 +19,8 @@ env: LAUNCHABLE_ORGANIZATION: "vitess" LAUNCHABLE_WORKSPACE: "vitess-app" GITHUB_PR_HEAD_SHA: "${{ github.event.pull_request.head.sha }}" + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: "${{ secrets.GH_ACCESS_TOKEN }}" jobs: test: @@ -64,6 +66,10 @@ jobs: with: go-version-file: go.mod + - name: Setup github.com/slackhq/vitess-addons access token + if: steps.changes.outputs.end_to_end == 'true' + run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ + - name: Set up python if: steps.changes.outputs.unit_tests == 'true' uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 From f83d070d55c87b36df6dddd9439a2fe4fcd9c689 Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Thu, 13 Nov 2025 17:27:31 -0800 Subject: [PATCH 07/11] rm mysql57 tests Signed-off-by: Tanjin Xu --- .../unit_test_evalengine_mysql57.yml | 187 ------------------ .github/workflows/unit_test_mysql57.yml | 187 ------------------ 2 files changed, 374 deletions(-) delete mode 100644 .github/workflows/unit_test_evalengine_mysql57.yml delete mode 100644 .github/workflows/unit_test_mysql57.yml diff --git a/.github/workflows/unit_test_evalengine_mysql57.yml b/.github/workflows/unit_test_evalengine_mysql57.yml deleted file mode 100644 index 9a9c3dc426d..00000000000 --- a/.github/workflows/unit_test_evalengine_mysql57.yml +++ /dev/null @@ -1,187 +0,0 @@ -# DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" - -name: Unit Test (evalengine_mysql57) -on: - push: - branches: - - "main" - - "slack-[0-9]+.[0-9]" - tags: '**' - pull_request: - branches: '**' -concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Unit Test (evalengine_mysql57)') - cancel-in-progress: true - -permissions: read-all - -env: - LAUNCHABLE_ORGANIZATION: "vitess" - LAUNCHABLE_WORKSPACE: "vitess-app" - GITHUB_PR_HEAD_SHA: "${{ github.event.pull_request.head.sha }}" - GOPRIVATE: "github.com/slackhq/vitess-addons" - GH_ACCESS_TOKEN: "${{ secrets.GH_ACCESS_TOKEN }}" - -jobs: - test: - name: Unit Test (evalengine_mysql57) - runs-on: ubuntu-24.04 - - steps: - - name: Skip CI - run: | - if [[ "${{contains( github.event.pull_request.labels.*.name, 'Skip CI')}}" == "true" ]]; then - echo "skipping CI due to the 'Skip CI' label" - exit 1 - fi - - - name: Check out code - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - persist-credentials: 'false' - - - name: Check for changes in relevant files - uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 - id: changes - with: - token: '' - filters: | - unit_tests: - - 'test/config.json' - - 'go/**' - - 'test.go' - - 'Makefile' - - 'build.env' - - 'go.sum' - - 'go.mod' - - 'proto/*.proto' - - 'tools/**' - - 'config/**' - - 'bootstrap.sh' - - '.github/workflows/unit_test_evalengine_mysql57.yml' - - - name: Set up Go - if: steps.changes.outputs.unit_tests == 'true' - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 - with: - go-version-file: go.mod - - - name: Setup github.com/slackhq/vitess-addons access token - if: steps.changes.outputs.end_to_end == 'true' - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ - - - name: Set up python - if: steps.changes.outputs.unit_tests == 'true' - uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - - - name: Tune the OS - if: steps.changes.outputs.unit_tests == 'true' - run: | - sudo sysctl -w net.ipv4.ip_local_port_range="22768 65535" - # Increase the asynchronous non-blocking I/O. More information at https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_use_native_aio - echo "fs.aio-max-nr = 1048576" | sudo tee -a /etc/sysctl.conf - sudo sysctl -p /etc/sysctl.conf - - - name: Get dependencies - if: steps.changes.outputs.unit_tests == 'true' - run: | - export DEBIAN_FRONTEND="noninteractive" - sudo apt-get update - - # Uninstall any previously installed MySQL first - # sudo systemctl stop apparmor - sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common - sudo apt-get -y autoremove - sudo apt-get -y autoclean - # sudo deluser mysql - sudo rm -rf /var/lib/mysql - sudo rm -rf /etc/mysql - - # Get key to latest MySQL repo - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A8D3785C - wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.33-1_all.deb - - # Bionic packages are still compatible for Jammy since there's no MySQL 5.7 - # packages for Jammy. - echo mysql-apt-config mysql-apt-config/repo-codename select bionic | sudo debconf-set-selections - echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections - sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* - sudo apt-get update - # We have to install this old version of libaio1. See also: - # https://bugs.launchpad.net/ubuntu/+source/libaio/+bug/2067501 - curl -L -O http://mirrors.kernel.org/ubuntu/pool/main/liba/libaio/libaio1_0.3.112-13build1_amd64.deb - sudo dpkg -i libaio1_0.3.112-13build1_amd64.deb - # libtinfo5 is also needed for older MySQL 5.7 builds. - curl -L -O http://mirrors.kernel.org/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb - sudo dpkg -i libtinfo5_6.3-2ubuntu0.1_amd64.deb - sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* libncurses6 - - sudo apt-get install -y make unzip g++ curl git wget ant openjdk-11-jdk eatmydata - - sudo service mysql stop - sudo bash -c "echo '/usr/sbin/mysqld { }' > /etc/apparmor.d/usr.sbin.mysqld" # https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1806263 - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld || echo "could not remove mysqld profile" - - mkdir -p dist bin - curl -s -L https://github.com/coreos/etcd/releases/download/v3.5.17/etcd-v3.5.17-linux-amd64.tar.gz | tar -zxC dist - mv dist/etcd-v3.5.17-linux-amd64/{etcd,etcdctl} bin/ - - 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 - - - name: Run make tools - if: steps.changes.outputs.unit_tests == 'true' - run: | - make tools - - - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' - run: | - # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up - pip3 install --user launchable~=1.0 > /dev/null - - # verify that launchable setup is all correct. - launchable verify || true - - # Tell Launchable about the build you are producing and testing - launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - - - name: Run test - if: steps.changes.outputs.unit_tests == 'true' - timeout-minutes: 30 - run: | - set -exo pipefail - # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file - # which musn't be more than 107 characters long. - export VTDATAROOT="/tmp/" - - export NOVTADMINBUILD=1 - export VTEVALENGINETEST="1" - # We sometimes need to alter the behavior based on the platform we're - # testing, e.g. MySQL 5.7 vs 8.0. - export CI_DB_PLATFORM="mysql57" - - eatmydata -- make unit_test | tee -a output.txt | go-junit-report -set-exit-code > report.xml - - - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() - run: | - # send recorded tests to launchable - launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - - - name: Print test output - if: steps.changes.outputs.unit_tests == 'true' && always() - run: | - # print test output - cat output.txt - - - name: Test Summary - if: steps.changes.outputs.unit_tests == 'true' && always() - uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 - with: - paths: "report.xml" - show: "fail" diff --git a/.github/workflows/unit_test_mysql57.yml b/.github/workflows/unit_test_mysql57.yml deleted file mode 100644 index 10e09075381..00000000000 --- a/.github/workflows/unit_test_mysql57.yml +++ /dev/null @@ -1,187 +0,0 @@ -# DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows" - -name: Unit Test (mysql57) -on: - push: - branches: - - "main" - - "slack-[0-9]+.[0-9]" - tags: '**' - pull_request: - branches: '**' -concurrency: - group: format('{0}-{1}', ${{ github.ref }}, 'Unit Test (mysql57)') - cancel-in-progress: true - -permissions: read-all - -env: - LAUNCHABLE_ORGANIZATION: "vitess" - LAUNCHABLE_WORKSPACE: "vitess-app" - GITHUB_PR_HEAD_SHA: "${{ github.event.pull_request.head.sha }}" - GOPRIVATE: github.com/slackhq/vitess-addons - GH_ACCESS_TOKEN: "${{ secrets.GH_ACCESS_TOKEN }}" - -jobs: - test: - name: Unit Test (mysql57) - runs-on: ubuntu-24.04 - - steps: - - name: Skip CI - run: | - if [[ "${{contains( github.event.pull_request.labels.*.name, 'Skip CI')}}" == "true" ]]; then - echo "skipping CI due to the 'Skip CI' label" - exit 1 - fi - - - name: Check out code - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - persist-credentials: 'false' - - - name: Check for changes in relevant files - uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a # v3.0.1 - id: changes - with: - token: '' - filters: | - unit_tests: - - 'test/config.json' - - 'go/**' - - 'test.go' - - 'Makefile' - - 'build.env' - - 'go.sum' - - 'go.mod' - - 'proto/*.proto' - - 'tools/**' - - 'config/**' - - 'bootstrap.sh' - - '.github/workflows/unit_test_mysql57.yml' - - - name: Set up Go - if: steps.changes.outputs.unit_tests == 'true' - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 - with: - go-version-file: go.mod - - - name: Setup github.com/slackhq/vitess-addons access token - if: steps.changes.outputs.end_to_end == 'true' - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ - - - name: Set up python - if: steps.changes.outputs.unit_tests == 'true' - uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 - - - name: Tune the OS - if: steps.changes.outputs.unit_tests == 'true' - run: | - sudo sysctl -w net.ipv4.ip_local_port_range="22768 65535" - # Increase the asynchronous non-blocking I/O. More information at https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_use_native_aio - echo "fs.aio-max-nr = 1048576" | sudo tee -a /etc/sysctl.conf - sudo sysctl -p /etc/sysctl.conf - - - name: Get dependencies - if: steps.changes.outputs.unit_tests == 'true' - run: | - export DEBIAN_FRONTEND="noninteractive" - sudo apt-get update - - # Uninstall any previously installed MySQL first - # sudo systemctl stop apparmor - sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-server mysql-client mysql-common - sudo apt-get -y autoremove - sudo apt-get -y autoclean - # sudo deluser mysql - sudo rm -rf /var/lib/mysql - sudo rm -rf /etc/mysql - - # Get key to latest MySQL repo - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A8D3785C - wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.33-1_all.deb - - # Bionic packages are still compatible for Jammy since there's no MySQL 5.7 - # packages for Jammy. - echo mysql-apt-config mysql-apt-config/repo-codename select bionic | sudo debconf-set-selections - echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections - sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config* - sudo apt-get update - # We have to install this old version of libaio1. See also: - # https://bugs.launchpad.net/ubuntu/+source/libaio/+bug/2067501 - curl -L -O http://mirrors.kernel.org/ubuntu/pool/main/liba/libaio/libaio1_0.3.112-13build1_amd64.deb - sudo dpkg -i libaio1_0.3.112-13build1_amd64.deb - # libtinfo5 is also needed for older MySQL 5.7 builds. - curl -L -O http://mirrors.kernel.org/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb - sudo dpkg -i libtinfo5_6.3-2ubuntu0.1_amd64.deb - sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7* libncurses6 - - sudo apt-get install -y make unzip g++ curl git wget ant openjdk-11-jdk eatmydata - - sudo service mysql stop - sudo bash -c "echo '/usr/sbin/mysqld { }' > /etc/apparmor.d/usr.sbin.mysqld" # https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1806263 - sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld || echo "could not remove mysqld profile" - - mkdir -p dist bin - curl -s -L https://github.com/coreos/etcd/releases/download/v3.5.17/etcd-v3.5.17-linux-amd64.tar.gz | tar -zxC dist - mv dist/etcd-v3.5.17-linux-amd64/{etcd,etcdctl} bin/ - - 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 - - - name: Run make tools - if: steps.changes.outputs.unit_tests == 'true' - run: | - make tools - - - name: Setup launchable dependencies - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' - run: | - # Get Launchable CLI installed. If you can, make it a part of the builder image to speed things up - pip3 install --user launchable~=1.0 > /dev/null - - # verify that launchable setup is all correct. - launchable verify || true - - # Tell Launchable about the build you are producing and testing - launchable record build --name "$GITHUB_RUN_ID" --no-commit-collection --source . - - - name: Run test - if: steps.changes.outputs.unit_tests == 'true' - timeout-minutes: 30 - run: | - set -exo pipefail - # We set the VTDATAROOT to the /tmp folder to reduce the file path of mysql.sock file - # which musn't be more than 107 characters long. - export VTDATAROOT="/tmp/" - - export NOVTADMINBUILD=1 - export VTEVALENGINETEST="0" - # We sometimes need to alter the behavior based on the platform we're - # testing, e.g. MySQL 5.7 vs 8.0. - export CI_DB_PLATFORM="mysql57" - - eatmydata -- make unit_test | tee -a output.txt | go-junit-report -set-exit-code > report.xml - - - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() - run: | - # send recorded tests to launchable - launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - - - name: Print test output - if: steps.changes.outputs.unit_tests == 'true' && always() - run: | - # print test output - cat output.txt - - - name: Test Summary - if: steps.changes.outputs.unit_tests == 'true' && always() - uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 - with: - paths: "report.xml" - show: "fail" From e3fb249162cb1a261b26174e34f9695325afa8f3 Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Thu, 13 Nov 2025 17:39:17 -0800 Subject: [PATCH 08/11] fix next release Signed-off-by: Tanjin Xu --- tools/get_next_release.sh | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/tools/get_next_release.sh b/tools/get_next_release.sh index 6001d68530a..2ce81daba26 100755 --- a/tools/get_next_release.sh +++ b/tools/get_next_release.sh @@ -16,20 +16,7 @@ # github.base_ref $1 -target_release="" +target_release="slack-23.0" -base_release_branch=$(echo "$1" | grep -E 'release-[0-9]*.0$') -if [ "$base_release_branch" == "" ]; then - base_release_branch=$(echo "$2" | grep -E 'release-[0-9]*.0$') -fi -if [ "$base_release_branch" != "" ]; then - latest_major_release=$(git show-ref | grep -E 'refs/remotes/origin/release-[0-9]*\.0$' | sed 's/[a-z0-9]* refs\/remotes\/origin\/release-//' | sed 's/\.0//' | sort -nr | head -n1) - major_release=$(echo "$base_release_branch" | sed 's/release-*//' | sed 's/\.0//') - target_major_release=$((major_release+1)) - target_release="release-$target_major_release.0" - if [ "$major_release" == "$latest_major_release" ]; then - target_release="main" - fi -fi -echo "$target_release" \ No newline at end of file +echo "$target_release" From ba422b3116f943271dda777958f61ea81a9674ce Mon Sep 17 00:00:00 2001 From: "vitess-bot[bot]" <108069721+vitess-bot[bot]@users.noreply.github.com> Date: Tue, 16 Sep 2025 21:27:02 +0100 Subject: [PATCH 09/11] [release-22.0] ci: Replace `always()` with `!cancelled()`. (#18659) (#18662) Signed-off-by: Arthur Schreiber Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> Signed-off-by: Tanjin Xu --- .github/workflows/cluster_endtoend_12.yml | 6 +++--- .github/workflows/cluster_endtoend_13.yml | 6 +++--- .github/workflows/cluster_endtoend_15.yml | 6 +++--- .github/workflows/cluster_endtoend_18.yml | 6 +++--- .github/workflows/cluster_endtoend_21.yml | 6 +++--- .github/workflows/cluster_endtoend_backup_pitr.yml | 6 +++--- .../workflows/cluster_endtoend_backup_pitr_mysqlshell.yml | 6 +++--- .../workflows/cluster_endtoend_backup_pitr_xtrabackup.yml | 6 +++--- .../cluster_endtoend_ers_prs_newfeatures_heavy.yml | 6 +++--- .github/workflows/cluster_endtoend_mysql80.yml | 6 +++--- .github/workflows/cluster_endtoend_mysql_server_vault.yml | 6 +++--- .github/workflows/cluster_endtoend_onlineddl_revert.yml | 6 +++--- .github/workflows/cluster_endtoend_onlineddl_scheduler.yml | 6 +++--- .github/workflows/cluster_endtoend_onlineddl_vrepl.yml | 6 +++--- .../workflows/cluster_endtoend_onlineddl_vrepl_stress.yml | 6 +++--- .../cluster_endtoend_onlineddl_vrepl_stress_suite.yml | 6 +++--- .../workflows/cluster_endtoend_onlineddl_vrepl_suite.yml | 6 +++--- .github/workflows/cluster_endtoend_schemadiff_vrepl.yml | 6 +++--- .github/workflows/cluster_endtoend_tabletmanager_consul.yml | 6 +++--- .../workflows/cluster_endtoend_tabletmanager_tablegc.yml | 6 +++--- .../cluster_endtoend_tabletmanager_throttler_topo.yml | 6 +++--- .../workflows/cluster_endtoend_topo_connection_cache.yml | 6 +++--- .../cluster_endtoend_vreplication_across_db_versions.yml | 6 +++--- .github/workflows/cluster_endtoend_vreplication_basic.yml | 6 +++--- .../workflows/cluster_endtoend_vreplication_cellalias.yml | 6 +++--- .../cluster_endtoend_vreplication_copy_parallel.yml | 6 +++--- .../cluster_endtoend_vreplication_foreign_key_stress.yml | 6 +++--- .../cluster_endtoend_vreplication_mariadb_to_mysql.yml | 6 +++--- .github/workflows/cluster_endtoend_vreplication_migrate.yml | 6 +++--- .../cluster_endtoend_vreplication_multi_tenant.yml | 6 +++--- ...oend_vreplication_partial_movetables_and_materialize.yml | 6 +++--- .github/workflows/cluster_endtoend_vreplication_v2.yml | 6 +++--- .github/workflows/cluster_endtoend_vreplication_vdiff2.yml | 6 +++--- ...ter_endtoend_vreplication_vtctldclient_movetables_tz.yml | 6 +++--- .github/workflows/cluster_endtoend_vstream.yml | 6 +++--- .github/workflows/cluster_endtoend_vtbackup.yml | 6 +++--- ...uster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml | 6 +++--- .github/workflows/cluster_endtoend_vtgate_concurrentdml.yml | 6 +++--- .../workflows/cluster_endtoend_vtgate_foreignkey_stress.yml | 6 +++--- .github/workflows/cluster_endtoend_vtgate_gen4.yml | 6 +++--- .github/workflows/cluster_endtoend_vtgate_general_heavy.yml | 6 +++--- .github/workflows/cluster_endtoend_vtgate_godriver.yml | 6 +++--- .../workflows/cluster_endtoend_vtgate_partial_keyspace.yml | 6 +++--- .github/workflows/cluster_endtoend_vtgate_plantests.yml | 6 +++--- .github/workflows/cluster_endtoend_vtgate_queries.yml | 6 +++--- .../workflows/cluster_endtoend_vtgate_readafterwrite.yml | 6 +++--- .github/workflows/cluster_endtoend_vtgate_reservedconn.yml | 6 +++--- .github/workflows/cluster_endtoend_vtgate_schema.yml | 6 +++--- .../workflows/cluster_endtoend_vtgate_schema_tracker.yml | 6 +++--- .../cluster_endtoend_vtgate_tablet_healthcheck_cache.yml | 6 +++--- .github/workflows/cluster_endtoend_vtgate_topo.yml | 6 +++--- .github/workflows/cluster_endtoend_vtgate_topo_consul.yml | 6 +++--- .github/workflows/cluster_endtoend_vtgate_topo_etcd.yml | 6 +++--- .github/workflows/cluster_endtoend_vtgate_transaction.yml | 6 +++--- .github/workflows/cluster_endtoend_vtgate_unsharded.yml | 6 +++--- .github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml | 6 +++--- .github/workflows/cluster_endtoend_vtgate_vschema.yml | 6 +++--- .github/workflows/cluster_endtoend_vtorc.yml | 6 +++--- .github/workflows/cluster_endtoend_vttablet_prscomplex.yml | 6 +++--- .github/workflows/cluster_endtoend_xb_backup.yml | 6 +++--- .github/workflows/cluster_endtoend_xb_recovery.yml | 6 +++--- .github/workflows/unit_race.yml | 6 +++--- .github/workflows/unit_race_evalengine.yml | 6 +++--- .github/workflows/unit_test_evalengine_mysql80.yml | 6 +++--- .github/workflows/unit_test_evalengine_mysql84.yml | 6 +++--- .github/workflows/unit_test_mysql80.yml | 6 +++--- .github/workflows/unit_test_mysql84.yml | 6 +++--- .github/workflows/vitess_tester_vtgate.yml | 6 +++--- test/templates/cluster_endtoend_test.tpl | 6 +++--- test/templates/cluster_endtoend_test_mysql57.tpl | 6 +++--- test/templates/cluster_vitess_tester.tpl | 6 +++--- test/templates/unit_test.tpl | 6 +++--- 72 files changed, 216 insertions(+), 216 deletions(-) diff --git a/.github/workflows/cluster_endtoend_12.yml b/.github/workflows/cluster_endtoend_12.yml index 42fc97660a1..14bf71ad885 100644 --- a/.github/workflows/cluster_endtoend_12.yml +++ b/.github/workflows/cluster_endtoend_12.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard 12 | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_13.yml b/.github/workflows/cluster_endtoend_13.yml index c970d8a0842..14cd5e6e307 100644 --- a/.github/workflows/cluster_endtoend_13.yml +++ b/.github/workflows/cluster_endtoend_13.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard 13 | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_15.yml b/.github/workflows/cluster_endtoend_15.yml index 934791a228a..85c7a6251ac 100644 --- a/.github/workflows/cluster_endtoend_15.yml +++ b/.github/workflows/cluster_endtoend_15.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard 15 | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_18.yml b/.github/workflows/cluster_endtoend_18.yml index 4ff0e3c16c0..2c0ba0dc447 100644 --- a/.github/workflows/cluster_endtoend_18.yml +++ b/.github/workflows/cluster_endtoend_18.yml @@ -137,19 +137,19 @@ jobs: go run test.go -docker=false -follow -shard 18 | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_21.yml b/.github/workflows/cluster_endtoend_21.yml index 3937087c09a..d35866888e1 100644 --- a/.github/workflows/cluster_endtoend_21.yml +++ b/.github/workflows/cluster_endtoend_21.yml @@ -138,19 +138,19 @@ jobs: go run test.go -docker=false -follow -shard 21 | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_backup_pitr.yml b/.github/workflows/cluster_endtoend_backup_pitr.yml index dea03db1e39..9a99b8a3e39 100644 --- a/.github/workflows/cluster_endtoend_backup_pitr.yml +++ b/.github/workflows/cluster_endtoend_backup_pitr.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard backup_pitr | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_backup_pitr_mysqlshell.yml b/.github/workflows/cluster_endtoend_backup_pitr_mysqlshell.yml index f537ee8ff11..85093c0f0b5 100644 --- a/.github/workflows/cluster_endtoend_backup_pitr_mysqlshell.yml +++ b/.github/workflows/cluster_endtoend_backup_pitr_mysqlshell.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard backup_pitr_mysqlshell | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup.yml b/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup.yml index 152a020503f..92f9521b892 100644 --- a/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup.yml +++ b/.github/workflows/cluster_endtoend_backup_pitr_xtrabackup.yml @@ -141,19 +141,19 @@ jobs: go run test.go -docker=false -follow -shard backup_pitr_xtrabackup | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml b/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml index a3b29c97342..080119e1ab6 100644 --- a/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml +++ b/.github/workflows/cluster_endtoend_ers_prs_newfeatures_heavy.yml @@ -150,19 +150,19 @@ jobs: go run test.go -docker=false -follow -shard ers_prs_newfeatures_heavy | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_mysql80.yml b/.github/workflows/cluster_endtoend_mysql80.yml index ce33edaa3e0..29ab8036a24 100644 --- a/.github/workflows/cluster_endtoend_mysql80.yml +++ b/.github/workflows/cluster_endtoend_mysql80.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard mysql80 | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_mysql_server_vault.yml b/.github/workflows/cluster_endtoend_mysql_server_vault.yml index fca18dc5dd5..fe0e281c61e 100644 --- a/.github/workflows/cluster_endtoend_mysql_server_vault.yml +++ b/.github/workflows/cluster_endtoend_mysql_server_vault.yml @@ -137,19 +137,19 @@ jobs: go run test.go -docker=false -follow -shard mysql_server_vault | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_onlineddl_revert.yml b/.github/workflows/cluster_endtoend_onlineddl_revert.yml index 16897f76fc0..06f8688b677 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_revert.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_revert.yml @@ -133,19 +133,19 @@ jobs: go run test.go -docker=false -follow -shard onlineddl_revert | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml b/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml index 5249ab870e7..5b767645b84 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_scheduler.yml @@ -133,19 +133,19 @@ jobs: go run test.go -docker=false -follow -shard onlineddl_scheduler | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml index ebde8fe48c4..ddfc6fc0ecd 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl.yml @@ -141,19 +141,19 @@ jobs: go run test.go -docker=false -follow -shard onlineddl_vrepl | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml index deaf6519d8c..47e9e719a67 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress.yml @@ -141,19 +141,19 @@ jobs: go run test.go -docker=false -follow -shard onlineddl_vrepl_stress | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml index 6653ba981d7..a7a147af2e7 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_stress_suite.yml @@ -141,19 +141,19 @@ jobs: go run test.go -docker=false -follow -shard onlineddl_vrepl_stress_suite | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml b/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml index 00a641a5853..dddea0eb432 100644 --- a/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml +++ b/.github/workflows/cluster_endtoend_onlineddl_vrepl_suite.yml @@ -141,19 +141,19 @@ jobs: go run test.go -docker=false -follow -shard onlineddl_vrepl_suite | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml b/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml index efc676225d3..0a2e05788a6 100644 --- a/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml +++ b/.github/workflows/cluster_endtoend_schemadiff_vrepl.yml @@ -141,19 +141,19 @@ jobs: go run test.go -docker=false -follow -shard schemadiff_vrepl | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_tabletmanager_consul.yml b/.github/workflows/cluster_endtoend_tabletmanager_consul.yml index f38fca25d23..df4ee8e1850 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_consul.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_consul.yml @@ -137,19 +137,19 @@ jobs: go run test.go -docker=false -follow -shard tabletmanager_consul | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml b/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml index 600ee72924f..695bdcc4d35 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_tablegc.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard tabletmanager_tablegc | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_tabletmanager_throttler_topo.yml b/.github/workflows/cluster_endtoend_tabletmanager_throttler_topo.yml index 6254e9f7d2f..cf16a55121a 100644 --- a/.github/workflows/cluster_endtoend_tabletmanager_throttler_topo.yml +++ b/.github/workflows/cluster_endtoend_tabletmanager_throttler_topo.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard tabletmanager_throttler_topo | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_topo_connection_cache.yml b/.github/workflows/cluster_endtoend_topo_connection_cache.yml index 252670e15bd..ec2ae7aef40 100644 --- a/.github/workflows/cluster_endtoend_topo_connection_cache.yml +++ b/.github/workflows/cluster_endtoend_topo_connection_cache.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard topo_connection_cache | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml b/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml index ecfe8ee22bc..a5a8ade47e0 100644 --- a/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml +++ b/.github/workflows/cluster_endtoend_vreplication_across_db_versions.yml @@ -158,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_across_db_versions | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_basic.yml b/.github/workflows/cluster_endtoend_vreplication_basic.yml index fdd0fef9875..73af6cad6ec 100644 --- a/.github/workflows/cluster_endtoend_vreplication_basic.yml +++ b/.github/workflows/cluster_endtoend_vreplication_basic.yml @@ -158,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_basic | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_cellalias.yml b/.github/workflows/cluster_endtoend_vreplication_cellalias.yml index 973201af2ca..bc3331b51d4 100644 --- a/.github/workflows/cluster_endtoend_vreplication_cellalias.yml +++ b/.github/workflows/cluster_endtoend_vreplication_cellalias.yml @@ -158,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_cellalias | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_copy_parallel.yml b/.github/workflows/cluster_endtoend_vreplication_copy_parallel.yml index 38c17ae0ff1..5d96b7846a0 100644 --- a/.github/workflows/cluster_endtoend_vreplication_copy_parallel.yml +++ b/.github/workflows/cluster_endtoend_vreplication_copy_parallel.yml @@ -158,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_copy_parallel | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_foreign_key_stress.yml b/.github/workflows/cluster_endtoend_vreplication_foreign_key_stress.yml index 58a19596024..485cbe48f46 100644 --- a/.github/workflows/cluster_endtoend_vreplication_foreign_key_stress.yml +++ b/.github/workflows/cluster_endtoend_vreplication_foreign_key_stress.yml @@ -158,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_foreign_key_stress | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_mariadb_to_mysql.yml b/.github/workflows/cluster_endtoend_vreplication_mariadb_to_mysql.yml index 1f31e580abd..85e9da8ef8c 100644 --- a/.github/workflows/cluster_endtoend_vreplication_mariadb_to_mysql.yml +++ b/.github/workflows/cluster_endtoend_vreplication_mariadb_to_mysql.yml @@ -158,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_mariadb_to_mysql | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_migrate.yml b/.github/workflows/cluster_endtoend_vreplication_migrate.yml index d6125ae6c0c..9d1425549d1 100644 --- a/.github/workflows/cluster_endtoend_vreplication_migrate.yml +++ b/.github/workflows/cluster_endtoend_vreplication_migrate.yml @@ -158,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_migrate | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_multi_tenant.yml b/.github/workflows/cluster_endtoend_vreplication_multi_tenant.yml index 8e7eeda5998..14549dd4329 100644 --- a/.github/workflows/cluster_endtoend_vreplication_multi_tenant.yml +++ b/.github/workflows/cluster_endtoend_vreplication_multi_tenant.yml @@ -158,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_multi_tenant | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" 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 b295ed2085b..95a1813119a 100644 --- a/.github/workflows/cluster_endtoend_vreplication_partial_movetables_and_materialize.yml +++ b/.github/workflows/cluster_endtoend_vreplication_partial_movetables_and_materialize.yml @@ -158,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_partial_movetables_and_materialize | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_v2.yml b/.github/workflows/cluster_endtoend_vreplication_v2.yml index 208c648f2d7..a3f8450b5b0 100644 --- a/.github/workflows/cluster_endtoend_vreplication_v2.yml +++ b/.github/workflows/cluster_endtoend_vreplication_v2.yml @@ -158,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_v2 | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_vdiff2.yml b/.github/workflows/cluster_endtoend_vreplication_vdiff2.yml index 901aa32056d..eb5613af8ac 100644 --- a/.github/workflows/cluster_endtoend_vreplication_vdiff2.yml +++ b/.github/workflows/cluster_endtoend_vreplication_vdiff2.yml @@ -158,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_vdiff2 | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vreplication_vtctldclient_movetables_tz.yml b/.github/workflows/cluster_endtoend_vreplication_vtctldclient_movetables_tz.yml index 47036cd5cf7..4fc48875736 100644 --- a/.github/workflows/cluster_endtoend_vreplication_vtctldclient_movetables_tz.yml +++ b/.github/workflows/cluster_endtoend_vreplication_vtctldclient_movetables_tz.yml @@ -158,19 +158,19 @@ jobs: go run test.go -docker=false -follow -shard vreplication_vtctldclient_movetables_tz | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vstream.yml b/.github/workflows/cluster_endtoend_vstream.yml index 16c6284ed5e..193735d0bc0 100644 --- a/.github/workflows/cluster_endtoend_vstream.yml +++ b/.github/workflows/cluster_endtoend_vstream.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vstream | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtbackup.yml b/.github/workflows/cluster_endtoend_vtbackup.yml index 1b4113b90bd..fbc29bb5fbe 100644 --- a/.github/workflows/cluster_endtoend_vtbackup.yml +++ b/.github/workflows/cluster_endtoend_vtbackup.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtbackup | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml b/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml index 50d7bb7442d..2161c137c66 100644 --- a/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml +++ b/.github/workflows/cluster_endtoend_vtctlbackup_sharded_clustertest_heavy.yml @@ -150,19 +150,19 @@ jobs: go run test.go -docker=false -follow -shard vtctlbackup_sharded_clustertest_heavy | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml b/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml index b1d3fc1c6e8..a0727a7897a 100644 --- a/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml +++ b/.github/workflows/cluster_endtoend_vtgate_concurrentdml.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_concurrentdml | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_foreignkey_stress.yml b/.github/workflows/cluster_endtoend_vtgate_foreignkey_stress.yml index 8b5e9843902..37c02df0ba3 100644 --- a/.github/workflows/cluster_endtoend_vtgate_foreignkey_stress.yml +++ b/.github/workflows/cluster_endtoend_vtgate_foreignkey_stress.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_foreignkey_stress | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_gen4.yml b/.github/workflows/cluster_endtoend_vtgate_gen4.yml index dd0f342680c..4464479c220 100644 --- a/.github/workflows/cluster_endtoend_vtgate_gen4.yml +++ b/.github/workflows/cluster_endtoend_vtgate_gen4.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_gen4 | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml b/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml index da984ce1861..91d4008075e 100644 --- a/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml +++ b/.github/workflows/cluster_endtoend_vtgate_general_heavy.yml @@ -150,19 +150,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_general_heavy | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_godriver.yml b/.github/workflows/cluster_endtoend_vtgate_godriver.yml index f69c7fce7b5..d4777872f56 100644 --- a/.github/workflows/cluster_endtoend_vtgate_godriver.yml +++ b/.github/workflows/cluster_endtoend_vtgate_godriver.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_godriver | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml b/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml index 960114979fb..003f27dfd03 100644 --- a/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml +++ b/.github/workflows/cluster_endtoend_vtgate_partial_keyspace.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_partial_keyspace -partial-keyspace=true | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_plantests.yml b/.github/workflows/cluster_endtoend_vtgate_plantests.yml index 5dda110966c..91c7368382f 100644 --- a/.github/workflows/cluster_endtoend_vtgate_plantests.yml +++ b/.github/workflows/cluster_endtoend_vtgate_plantests.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_plantests | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_queries.yml b/.github/workflows/cluster_endtoend_vtgate_queries.yml index a5f4628a627..55f6456d506 100644 --- a/.github/workflows/cluster_endtoend_vtgate_queries.yml +++ b/.github/workflows/cluster_endtoend_vtgate_queries.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_queries | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml b/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml index 1cebf185150..24029a9a1e4 100644 --- a/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml +++ b/.github/workflows/cluster_endtoend_vtgate_readafterwrite.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_readafterwrite | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml b/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml index 4ad1e509fd2..4ef47eb3e37 100644 --- a/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml +++ b/.github/workflows/cluster_endtoend_vtgate_reservedconn.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_reservedconn | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_schema.yml b/.github/workflows/cluster_endtoend_vtgate_schema.yml index 33370308018..f0be7e0b141 100644 --- a/.github/workflows/cluster_endtoend_vtgate_schema.yml +++ b/.github/workflows/cluster_endtoend_vtgate_schema.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_schema | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml b/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml index 459f4ddd8d5..3c6ad2f2b4b 100644 --- a/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml +++ b/.github/workflows/cluster_endtoend_vtgate_schema_tracker.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_schema_tracker | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml b/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml index 6a2411ae0dc..98ba56c1e76 100644 --- a/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml +++ b/.github/workflows/cluster_endtoend_vtgate_tablet_healthcheck_cache.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_tablet_healthcheck_cache | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_topo.yml b/.github/workflows/cluster_endtoend_vtgate_topo.yml index 04d3a11af61..351456de503 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_topo | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml b/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml index 0ec964f080c..ebf8ef002fe 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo_consul.yml @@ -137,19 +137,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_topo_consul | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml b/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml index 2a9f43fbfb6..0e5393239ff 100644 --- a/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml +++ b/.github/workflows/cluster_endtoend_vtgate_topo_etcd.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_topo_etcd | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_transaction.yml b/.github/workflows/cluster_endtoend_vtgate_transaction.yml index 32631262693..efdff8e6d10 100644 --- a/.github/workflows/cluster_endtoend_vtgate_transaction.yml +++ b/.github/workflows/cluster_endtoend_vtgate_transaction.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_transaction -build-tag=debug2PC | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_unsharded.yml b/.github/workflows/cluster_endtoend_vtgate_unsharded.yml index e586c8dd6c8..58a6e55a7b3 100644 --- a/.github/workflows/cluster_endtoend_vtgate_unsharded.yml +++ b/.github/workflows/cluster_endtoend_vtgate_unsharded.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_unsharded | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml b/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml index 919499d0512..560d3231890 100644 --- a/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml +++ b/.github/workflows/cluster_endtoend_vtgate_vindex_heavy.yml @@ -150,19 +150,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_vindex_heavy | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtgate_vschema.yml b/.github/workflows/cluster_endtoend_vtgate_vschema.yml index 67b58ade817..2a8a6d140ff 100644 --- a/.github/workflows/cluster_endtoend_vtgate_vschema.yml +++ b/.github/workflows/cluster_endtoend_vtgate_vschema.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vtgate_vschema | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vtorc.yml b/.github/workflows/cluster_endtoend_vtorc.yml index dd81522cf12..660dc4377fc 100644 --- a/.github/workflows/cluster_endtoend_vtorc.yml +++ b/.github/workflows/cluster_endtoend_vtorc.yml @@ -141,19 +141,19 @@ jobs: go run test.go -docker=false -follow -shard vtorc | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml b/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml index 2fd021c97f7..ff337e5311d 100644 --- a/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml +++ b/.github/workflows/cluster_endtoend_vttablet_prscomplex.yml @@ -132,19 +132,19 @@ jobs: go run test.go -docker=false -follow -shard vttablet_prscomplex | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_xb_backup.yml b/.github/workflows/cluster_endtoend_xb_backup.yml index 17f3cef0e60..f33ea3e8aad 100644 --- a/.github/workflows/cluster_endtoend_xb_backup.yml +++ b/.github/workflows/cluster_endtoend_xb_backup.yml @@ -141,19 +141,19 @@ jobs: go run test.go -docker=false -follow -shard xb_backup | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/cluster_endtoend_xb_recovery.yml b/.github/workflows/cluster_endtoend_xb_recovery.yml index 47456594f33..e3c0766a998 100644 --- a/.github/workflows/cluster_endtoend_xb_recovery.yml +++ b/.github/workflows/cluster_endtoend_xb_recovery.yml @@ -141,19 +141,19 @@ jobs: go run test.go -docker=false -follow -shard xb_recovery | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/unit_race.yml b/.github/workflows/unit_race.yml index f16fa9488a4..4df3a8d6efa 100644 --- a/.github/workflows/unit_race.yml +++ b/.github/workflows/unit_race.yml @@ -129,19 +129,19 @@ jobs: make unit_test_race | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/unit_race_evalengine.yml b/.github/workflows/unit_race_evalengine.yml index 1b9822e62ca..6315734dc94 100644 --- a/.github/workflows/unit_race_evalengine.yml +++ b/.github/workflows/unit_race_evalengine.yml @@ -129,19 +129,19 @@ jobs: make unit_test_race | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/unit_test_evalengine_mysql80.yml b/.github/workflows/unit_test_evalengine_mysql80.yml index 97c888bb0d6..35b4cb584e5 100644 --- a/.github/workflows/unit_test_evalengine_mysql80.yml +++ b/.github/workflows/unit_test_evalengine_mysql80.yml @@ -134,19 +134,19 @@ jobs: make unit_test | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/unit_test_evalengine_mysql84.yml b/.github/workflows/unit_test_evalengine_mysql84.yml index 8caebbb94bb..68a0356b466 100644 --- a/.github/workflows/unit_test_evalengine_mysql84.yml +++ b/.github/workflows/unit_test_evalengine_mysql84.yml @@ -134,19 +134,19 @@ jobs: make unit_test | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/unit_test_mysql80.yml b/.github/workflows/unit_test_mysql80.yml index d5cba17e186..dc657aede09 100644 --- a/.github/workflows/unit_test_mysql80.yml +++ b/.github/workflows/unit_test_mysql80.yml @@ -134,19 +134,19 @@ jobs: make unit_test | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/unit_test_mysql84.yml b/.github/workflows/unit_test_mysql84.yml index 36ef4c37876..aa178b71b6e 100644 --- a/.github/workflows/unit_test_mysql84.yml +++ b/.github/workflows/unit_test_mysql84.yml @@ -134,19 +134,19 @@ jobs: make unit_test | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/.github/workflows/vitess_tester_vtgate.yml b/.github/workflows/vitess_tester_vtgate.yml index 88da52ff805..68a9eac32ed 100644 --- a/.github/workflows/vitess_tester_vtgate.yml +++ b/.github/workflows/vitess_tester_vtgate.yml @@ -143,19 +143,19 @@ jobs: done - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat report*.xml - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report*.xml" diff --git a/test/templates/cluster_endtoend_test.tpl b/test/templates/cluster_endtoend_test.tpl index 9fe4d919ea4..35431974b88 100644 --- a/test/templates/cluster_endtoend_test.tpl +++ b/test/templates/cluster_endtoend_test.tpl @@ -221,19 +221,19 @@ jobs: go run test.go -docker={{if .Docker}}true -flavor={{.Platform}}{{else}}false{{end}} -follow -shard {{.Shard}}{{if .PartialKeyspace}} -partial-keyspace=true {{end}}{{if .BuildTag}} -build-tag={{.BuildTag}} {{end}} | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/test/templates/cluster_endtoend_test_mysql57.tpl b/test/templates/cluster_endtoend_test_mysql57.tpl index 421d97810b0..168d672edf4 100644 --- a/test/templates/cluster_endtoend_test_mysql57.tpl +++ b/test/templates/cluster_endtoend_test_mysql57.tpl @@ -192,19 +192,19 @@ jobs: go run test.go -docker={{if .Docker}}true -flavor={{.Platform}}{{else}}false{{end}} -follow -shard {{.Shard}}{{if .PartialKeyspace}} -partial-keyspace=true {{end}} | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" diff --git a/test/templates/cluster_vitess_tester.tpl b/test/templates/cluster_vitess_tester.tpl index bd6664fe4ae..28bb96188ee 100644 --- a/test/templates/cluster_vitess_tester.tpl +++ b/test/templates/cluster_vitess_tester.tpl @@ -143,19 +143,19 @@ jobs: done - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.end_to_end == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() run: | # print test output cat report*.xml - name: Test Summary - if: steps.changes.outputs.end_to_end == 'true' && always() + if: steps.changes.outputs.end_to_end == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report*.xml" diff --git a/test/templates/unit_test.tpl b/test/templates/unit_test.tpl index 8e52c724001..a9a3d5e3a7d 100644 --- a/test/templates/unit_test.tpl +++ b/test/templates/unit_test.tpl @@ -142,19 +142,19 @@ jobs: make unit_test | tee -a output.txt | go-junit-report -set-exit-code > report.xml - name: Record test results in launchable if PR is not a draft - if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && always() + if: github.event_name == 'pull_request' && github.event.pull_request.draft == 'false' && steps.changes.outputs.unit_tests == 'true' && github.base_ref == 'main' && !cancelled() run: | # send recorded tests to launchable launchable record tests --build "$GITHUB_RUN_ID" go-test . || true - name: Print test output - if: steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && !cancelled() run: | # print test output cat output.txt - name: Test Summary - if: steps.changes.outputs.unit_tests == 'true' && always() + if: steps.changes.outputs.unit_tests == 'true' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" From de5096ade8783500d5601ce78830710843fa0fe3 Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Thu, 13 Nov 2025 21:11:46 -0800 Subject: [PATCH 10/11] fix env Signed-off-by: Tanjin Xu --- .github/workflows/vtop_example.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/vtop_example.yml b/.github/workflows/vtop_example.yml index 3e6c07cd7d6..1acfb3614df 100644 --- a/.github/workflows/vtop_example.yml +++ b/.github/workflows/vtop_example.yml @@ -11,14 +11,14 @@ concurrency: group: format('{0}-{1}', ${{ github.ref }}, 'vtop_example') cancel-in-progress: true +env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} + jobs: build: name: VTop Example runs-on: vitess-ubuntu24-16cpu-1 - env: - GOPRIVATE: github.com/slackhq/vitess-addons - GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} - steps: - name: Skip CI run: | From 81199cf9fb6ea7104396d230bfd7d9eee9a2c706 Mon Sep 17 00:00:00 2001 From: Tanjin Xu Date: Thu, 13 Nov 2025 21:20:45 -0800 Subject: [PATCH 11/11] fix test Signed-off-by: Tanjin Xu --- go/test/endtoend/vtgate/queries/misc/misc_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/test/endtoend/vtgate/queries/misc/misc_test.go b/go/test/endtoend/vtgate/queries/misc/misc_test.go index 49edb14d0b5..a4088f9e019 100644 --- a/go/test/endtoend/vtgate/queries/misc/misc_test.go +++ b/go/test/endtoend/vtgate/queries/misc/misc_test.go @@ -496,7 +496,7 @@ func TestTransactionModeVar(t *testing.T) { // TestAliasesInOuterJoinQueries tests that aliases work in queries that have outer join clauses. func TestAliasesInOuterJoinQueries(t *testing.T) { // skip the test for v19 vtgates - utils.SkipIfBinaryIsBelowVersion(t, 20, "vtgate") + utils.SkipIfBinaryIsBelowVersion(t, 22, "vtgate") mcmp, closer := start(t) defer closer()