From bcc57ec765c166a2478215552442a914ec38ff28 Mon Sep 17 00:00:00 2001 From: Mateusz Wiktor Date: Thu, 5 Nov 2026 08:22:23 +0100 Subject: [PATCH 1/2] ci: cancel only the runs of the failing workflow The "Cancel workflow runs for commit on error" step in run-tests.yml and run-validations.yml cancels every unfinished workflow run of the commit, whichever workflow started it. A failing (or flaky) test in Tests therefore also cancelled Docs snippets and any other workflow running for the same commit, and the cancelled run showed up as a failure. Pass `same-workflow-only: true` to the fast-jobs-failure action, so each step cancels only the runs of its own workflow file. The option is added in client-engineering-deployment-tools (branch cancel-entire-workflow-fix). Both workflows still pin `ref: v1`. Until the option is part of that tag, the action ignores the input and behaves as before, so this change is safe to merge first. Tested on a scratch branch that pointed both checkouts at cancel-entire-workflow-fix, with a deliberate failure in Tests and a second workflow running for the same commit. The action reported "has 1 workflows" and cancelled only the Tests run. The other workflow was not cancelled. --- .github/workflows/run-tests.yml | 4 ++++ .github/workflows/run-validations.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 8c894bb05..ad6cd2793 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -59,6 +59,10 @@ jobs: - name: Cancel workflow runs for commit on error if: failure() uses: ./.github/.release/actions/actions/utils/fast-jobs-failure + with: + # Cancel only the runs of this workflow. Without it every workflow of the commit is cancelled, other workflows + # (for example Docs snippets) included. + same-workflow-only: true all-tests: name: Tests runs-on: diff --git a/.github/workflows/run-validations.yml b/.github/workflows/run-validations.yml index 266a04d23..42af762fa 100644 --- a/.github/workflows/run-validations.yml +++ b/.github/workflows/run-validations.yml @@ -32,6 +32,10 @@ jobs: - name: Cancel workflow runs for commit on error if: failure() uses: ./.github/.release/actions/actions/utils/fast-jobs-failure + with: + # Cancel only the runs of this workflow. Without it every workflow of the commit is cancelled, other workflows + # (for example Docs snippets) included. + same-workflow-only: true all-validations: name: Validations runs-on: From ca4196f0e45474ca9b7d4d5c0fe7013a3c7c3b87 Mon Sep 17 00:00:00 2001 From: Mateusz Wiktor Date: Thu, 5 Nov 2026 11:20:09 +0100 Subject: [PATCH 2/2] ci: remove the cross-workflow cancel from Tests and Validations The "Cancel workflow runs for commit on error" step cancelled every unfinished run of the commit, whichever workflow started it. A failing test in Tests therefore also cancelled Docs snippets and any other workflow on the same commit. Delete the step from run-tests.yml and run-validations.yml. The checkout of client-engineering-deployment-tools that only the cancel step used is removed from run-tests.yml too. run-validations.yml keeps its checkout, because the pubnub-yml validator uses it. Within one workflow, the matrix keeps fail-fast, and a newer run on the same ref still cancels the older one. --- .github/workflows/run-tests.yml | 14 -------------- .github/workflows/run-validations.yml | 7 ------- 2 files changed, 21 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index ad6cd2793..20c4465d0 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -36,13 +36,6 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Checkout actions - uses: actions/checkout@v4 - with: - repository: pubnub/client-engineering-deployment-tools - ref: v1 - token: ${{ secrets.GH_TOKEN }} - path: .github/.release/actions - name: Setup NodeJS ${{ matrix.node }} uses: actions/setup-node@v4 with: @@ -56,13 +49,6 @@ jobs: - name: Test docs snippets syntax if: matrix.node == '22' && matrix.env == 'ci:node' run: npm run test:snippets - - name: Cancel workflow runs for commit on error - if: failure() - uses: ./.github/.release/actions/actions/utils/fast-jobs-failure - with: - # Cancel only the runs of this workflow. Without it every workflow of the commit is cancelled, other workflows - # (for example Docs snippets) included. - same-workflow-only: true all-tests: name: Tests runs-on: diff --git a/.github/workflows/run-validations.yml b/.github/workflows/run-validations.yml index 42af762fa..a1cc10c7e 100644 --- a/.github/workflows/run-validations.yml +++ b/.github/workflows/run-validations.yml @@ -29,13 +29,6 @@ jobs: uses: ./.github/.release/actions/actions/validators/pubnub-yml with: token: ${{ secrets.GH_TOKEN }} - - name: Cancel workflow runs for commit on error - if: failure() - uses: ./.github/.release/actions/actions/utils/fast-jobs-failure - with: - # Cancel only the runs of this workflow. Without it every workflow of the commit is cancelled, other workflows - # (for example Docs snippets) included. - same-workflow-only: true all-validations: name: Validations runs-on: