Repository navigation
ci: remove the cross-workflow cancel from Tests and Validations - #539
Merged
Merged
Conversation
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.
✅ Snyk checks have passed. No issues have been found so far.
💻 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
marked this pull request as ready for review
November 5, 2026 10:28
techwritermat
requested review from
jguz-pubnub,
mohitpubnub and
parfeon
as code owners
November 5, 2026 10:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The step "Cancel workflow runs for commit on error" in
run-tests.ymlandrun-validations.ymlcalls the sharedfast-jobs-failureaction. The action cancels every unfinished run of the commit, whichever workflow started it. A failing test in Tests, such as the flakyevents.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.ymlkeeps its checkout, because thepubnub-ymlvalidator 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
client-engineering-deployment-toolsPR 20 is closed. This change no longer needs itssame-workflow-onlyoption.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