Skip to content

ci: remove the cross-workflow cancel from Tests and Validations - #539

Merged
techwritermat merged 2 commits into
masterfrom
fix/scope-fast-jobs-failure-cancel
Nov 5, 2026
Merged

techwritermat merged 2 commits into
masterfrom
fix/scope-fast-jobs-failure-cancel

Conversation

@techwritermat

@techwritermat techwritermat commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The step "Cancel workflow runs for commit on error" in run-tests.yml and run-validations.yml calls the shared fast-jobs-failure action. The action cancels every unfinished run of the commit, whichever workflow started it. A failing test in Tests, such as the flaky events.relationship.test.ts, therefore cancels Docs snippets (#538) and any other workflow on the same commit.

Change

Delete the step from both workflows, as the reviewer suggested. In run-tests.yml, also delete the deployment-tools checkout, because only that step used it. run-validations.yml keeps its checkout, because the pubnub-yml validator still uses it.

Within one workflow, the matrix keeps fail-fast: true, and a newer run on the same ref still cancels the older one.

Effect

A failing Tests or Validations run no longer cancels other workflows on the same commit. The cost is more CI minutes on failing commits.

Related

  • The flaky test still turns Tests red. It needs its own fix.
  • client-engineering-deployment-tools PR 20 is closed. This change no longer needs its same-workflow-only option.

Testing

Not run on this commit yet. Planned before merge: a scratch branch with a deliberate failure in Tests and a second workflow on the same commit. Expected result: Tests fails alone, and the second workflow finishes success.

🤖 Generated with Claude Code

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.
@pubnub-snyk-universal-prd

pubnub-snyk-universal-prd Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

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.
@techwritermat techwritermat changed the title ci: cancel only the runs of the failing workflow ci: remove the cross-workflow cancel from Tests and Validations Nov 5, 2026
@techwritermat
techwritermat marked this pull request as ready for review November 5, 2026 10:28

@parfeon parfeon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@techwritermat
techwritermat merged commit 3119434 into master Nov 5, 2026
7 of 9 checks passed
@techwritermat
techwritermat deleted the fix/scope-fast-jobs-failure-cancel branch November 5, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants