diff --git a/.github/workflows/check_make_vtadmin_authz_testgen.yml b/.github/workflows/check_make_vtadmin_authz_testgen.yml index 171fbe89775..7ae3b8c12d1 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 @@ -7,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: | @@ -15,24 +25,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: @@ -49,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 @@ -62,7 +60,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 +69,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..14bf71ad885 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' && !cancelled() 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' && !cancelled() 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' && !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 ad7934357e2..14cd5e6e307 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' && !cancelled() 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' && !cancelled() 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' && !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 50884c56807..85c7a6251ac 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' && !cancelled() 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' && !cancelled() 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' && !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 1ea85299d7c..2c0ba0dc447 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' && !cancelled() 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' && !cancelled() 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' && !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 e30a9382e7b..d35866888e1 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' && !cancelled() 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' && !cancelled() 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' && !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 021d882c149..9a99b8a3e39 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' && !cancelled() 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' && !cancelled() 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' && !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 eb1c3871e43..85093c0f0b5 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' && !cancelled() 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' && !cancelled() 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' && !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 3d36ad015e5..92f9521b892 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' && !cancelled() 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' && !cancelled() 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' && !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 54f1ce5f029..080119e1ab6 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' && !cancelled() 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' && !cancelled() 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' && !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 7b1aad39731..29ab8036a24 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' && !cancelled() 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' && !cancelled() 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' && !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 6ed11b567a6..fe0e281c61e 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' && !cancelled() 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' && !cancelled() 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' && !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 5c9df5c7d2d..06f8688b677 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' && !cancelled() 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' && !cancelled() 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' && !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 142f317b167..5b767645b84 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' && !cancelled() 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' && !cancelled() 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' && !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 d07f9168452..ddfc6fc0ecd 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' && !cancelled() 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' && !cancelled() 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' && !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 5c5fc4a421e..47e9e719a67 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' && !cancelled() 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' && !cancelled() 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' && !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 6b1e7dfd5fd..a7a147af2e7 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' && !cancelled() 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' && !cancelled() 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' && !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 ef2e9b90b5d..dddea0eb432 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' && !cancelled() 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' && !cancelled() 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' && !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 23940ce86e6..0a2e05788a6 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' && !cancelled() 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' && !cancelled() 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' && !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 cf2baf559f9..df4ee8e1850 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' && !cancelled() 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' && !cancelled() 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' && !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 58a66735fd1..695bdcc4d35 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' && !cancelled() 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' && !cancelled() 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' && !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 a7e641a41b5..cf16a55121a 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' && !cancelled() 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' && !cancelled() 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' && !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 a1e8a87cac4..ec2ae7aef40 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' && !cancelled() 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' && !cancelled() 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' && !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 43d8e2e6a8a..a5a8ade47e0 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' && !cancelled() 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' && !cancelled() 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' && !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 3b96b922ac8..73af6cad6ec 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' && !cancelled() 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' && !cancelled() 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' && !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 3c9dd3c49f7..bc3331b51d4 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' && !cancelled() 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' && !cancelled() 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' && !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 c6cb067ba69..5d96b7846a0 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' && !cancelled() 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' && !cancelled() 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' && !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 851b970e923..485cbe48f46 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' && !cancelled() 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' && !cancelled() 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' && !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 55589fba198..85e9da8ef8c 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' && !cancelled() 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' && !cancelled() 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' && !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 bd6de8a4bbe..9d1425549d1 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' && !cancelled() 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' && !cancelled() 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' && !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 d01ac331ad4..14549dd4329 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' && !cancelled() 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' && !cancelled() 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' && !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 e81a72ca8f0..95a1813119a 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' && !cancelled() 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' && !cancelled() 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' && !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 264689a7812..a3f8450b5b0 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' && !cancelled() 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' && !cancelled() 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' && !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 e2e3fee00c5..eb5613af8ac 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' && !cancelled() 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' && !cancelled() 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' && !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 df42d9d0dd4..4fc48875736 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' && !cancelled() 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' && !cancelled() 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' && !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 623da7ae94b..193735d0bc0 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' && !cancelled() 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' && !cancelled() 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' && !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 cea50d17866..fbc29bb5fbe 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' && !cancelled() 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' && !cancelled() 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' && !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 ccedb32382d..2161c137c66 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' && !cancelled() 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' && !cancelled() 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' && !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 74b5d823668..a0727a7897a 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' && !cancelled() 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' && !cancelled() 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' && !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 a80512b19a2..37c02df0ba3 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' && !cancelled() 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' && !cancelled() 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' && !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 883cfb439b8..4464479c220 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' && !cancelled() 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' && !cancelled() 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' && !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 29220ef229a..91d4008075e 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' && !cancelled() 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' && !cancelled() 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' && !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 69c4e6b6245..d4777872f56 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' && !cancelled() 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' && !cancelled() 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' && !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 483988b8640..003f27dfd03 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' && !cancelled() 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' && !cancelled() 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' && !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 ac16f6a9bc1..91c7368382f 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' && !cancelled() 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' && !cancelled() 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' && !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 609318f10e9..55f6456d506 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' && !cancelled() 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' && !cancelled() 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' && !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 177a8d013e3..24029a9a1e4 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' && !cancelled() 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' && !cancelled() 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' && !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 f3d9b0e0b08..4ef47eb3e37 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' && !cancelled() 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' && !cancelled() 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' && !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 126087295e9..f0be7e0b141 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' && !cancelled() 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' && !cancelled() 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' && !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 b3fa390bce7..3c6ad2f2b4b 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' && !cancelled() 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' && !cancelled() 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' && !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 058f3804c55..98ba56c1e76 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' && !cancelled() 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' && !cancelled() 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' && !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 947a30ec43d..351456de503 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' && !cancelled() 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' && !cancelled() 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' && !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 7fb82421386..ebf8ef002fe 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' && !cancelled() 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' && !cancelled() 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' && !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 0de211c4fd4..0e5393239ff 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' && !cancelled() 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' && !cancelled() 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' && !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 afc338dcc16..efdff8e6d10 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' && !cancelled() 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' && !cancelled() 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' && !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 c9fee3e908c..58a6e55a7b3 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' && !cancelled() 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' && !cancelled() 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' && !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 9ebc1a117a9..560d3231890 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' && !cancelled() 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' && !cancelled() 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' && !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 cc14a0ea46f..2a8a6d140ff 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' && !cancelled() 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' && !cancelled() 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' && !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 b0191f83659..660dc4377fc 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' && !cancelled() 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' && !cancelled() 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' && !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 26e0727b955..ff337e5311d 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' && !cancelled() 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' && !cancelled() 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' && !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 29567f35d0f..f33ea3e8aad 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' && !cancelled() 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' && !cancelled() 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' && !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 d9ad677f026..e3c0766a998 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' && !cancelled() 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' && !cancelled() 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' && !cancelled() 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..09968617954 100644 --- a/.github/workflows/docker_test_cluster.yml +++ b/.github/workflows/docker_test_cluster.yml @@ -1,13 +1,21 @@ 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 }}" 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 @@ -17,24 +25,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,13 +52,13 @@ 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 - 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 @@ -70,6 +66,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..39a6b2cf6a4 100644 --- a/.github/workflows/e2e_race.yml +++ b/.github/workflows/e2e_race.yml @@ -1,8 +1,19 @@ name: e2e_race -on: [push, pull_request] +on: + push: + branches: + - "main" + - "slack-[0-9]+.[0-9]" + tags: '**' + 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 @@ -14,24 +25,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,13 +50,13 @@ 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 - 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 @@ -71,7 +70,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 +82,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..ea5c17d3a20 100644 --- a/.github/workflows/endtoend.yml +++ b/.github/workflows/endtoend.yml @@ -1,6 +1,16 @@ name: endtoend -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 + GH_ACCESS_TOKEN: "${{ secrets.GH_ACCESS_TOKEN }}" jobs: build: @@ -14,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: @@ -51,13 +49,13 @@ 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 - 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 @@ -71,7 +69,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 +79,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..6dc25c88e4e --- /dev/null +++ b/.github/workflows/java_docker_test.yml @@ -0,0 +1,73 @@ +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 + env: + GOPRIVATE: github.com/slackhq/vitess-addons + GH_ACCESS_TOKEN: "${{ secrets.GH_ACCESS_TOKEN }}" + + 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: 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: | + 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..349571664f6 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,13 +55,13 @@ 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 - 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 @@ -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..9392e94b908 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,13 +55,13 @@ 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 - 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 @@ -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..ca2eac8bf77 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,13 +117,13 @@ 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 - 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 @@ -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..4df3a8d6efa 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 @@ -10,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: @@ -24,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: @@ -62,17 +58,17 @@ 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 - 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 @@ -86,7 +82,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 +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 @@ -121,7 +117,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 +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.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' && !cancelled() 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' && !cancelled() 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' && !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 4e17d7b65f6..6315734dc94 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 @@ -10,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: @@ -24,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: @@ -62,17 +58,17 @@ 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 - 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 @@ -86,7 +82,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 +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 @@ -121,7 +117,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 +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.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' && !cancelled() 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' && !cancelled() 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' && !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 0c5ab6f0acb..35b4cb584e5 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' && !cancelled() 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' && !cancelled() 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' && !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 368d876af62..68a0356b466 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' && !cancelled() 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' && !cancelled() 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' && !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 e1c8523db04..dc657aede09 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' && !cancelled() 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' && !cancelled() 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' && !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 ef351f78b13..aa178b71b6e 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' && !cancelled() 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' && !cancelled() 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' && !cancelled() 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..f992fdd2b70 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,18 +65,18 @@ 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 - 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 @@ -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 @@ -143,29 +135,29 @@ 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 - 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..d405ac0068f 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,17 +65,17 @@ 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 - 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.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..2c877074377 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,18 +69,18 @@ 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 - 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 @@ -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 @@ -146,34 +138,34 @@ 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 - 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..b3010d5fc9e 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,17 +68,17 @@ 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 - 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.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..8927d2e16b9 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,32 +64,30 @@ 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 - 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 @@ -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)" @@ -147,30 +138,30 @@ 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 - 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..dd51d5ff13a 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,17 +67,17 @@ 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 - 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 @@ -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 @@ -128,26 +120,26 @@ 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 # 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..8ed7f2a5775 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,17 +67,17 @@ 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 - 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 @@ -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 @@ -128,26 +120,26 @@ 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 # 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..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 @@ -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,17 +68,17 @@ 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 - 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.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..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 @@ -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,17 +68,17 @@ 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 - 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.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..e3762a67c83 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,18 +66,18 @@ 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 - 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 @@ -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 @@ -135,25 +127,25 @@ 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 # 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..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 @@ -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,17 +68,17 @@ 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 - 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.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..edd37b4f834 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,17 +68,17 @@ 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 - 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.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..013e9237f7e 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,17 +68,17 @@ 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 - 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.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..3d60f027e44 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,18 +66,18 @@ 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 - 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 @@ -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 @@ -135,25 +127,25 @@ 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 # 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..4c9c323d69b 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,18 +66,18 @@ 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 - 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 @@ -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 @@ -135,25 +127,25 @@ 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 # 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..c6c3782fd81 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,18 +62,18 @@ 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 - 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 @@ -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 @@ -140,25 +132,25 @@ 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 # 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..68a9eac32ed 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' && !cancelled() 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' && !cancelled() 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' && !cancelled() 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..1acfb3614df 100644 --- a/.github/workflows/vtop_example.yml +++ b/.github/workflows/vtop_example.yml @@ -1,17 +1,24 @@ 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 +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: | @@ -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,13 +54,13 @@ 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 - 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 @@ -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/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() diff --git a/test/templates/cluster_endtoend_test.tpl b/test/templates/cluster_endtoend_test.tpl index 1d2580177a9..35431974b88 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' && !cancelled() 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' && !cancelled() 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' && !cancelled() 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..168d672edf4 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' && !cancelled() 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' && !cancelled() 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' && !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 363691d9c75..28bb96188ee 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' && !cancelled() 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' && !cancelled() 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' && !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 41f2a157aff..a9a3d5e3a7d 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' && !cancelled() 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' && !cancelled() 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' && !cancelled() uses: test-summary/action@31493c76ec9e7aa675f1585d3ed6f1da69269a86 # v2.4 with: paths: "report.xml" 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"