Repository navigation
Replace cancel-workflow-action with native concurrency - #3154
Merged
Merged
Conversation
Use a top-level concurrency group in conda-package.yml, check-onemath.yaml, generate_coverage.yaml and cron-run-tests.yaml instead of styfle/cancel-workflow-action, and drop the actions: write permission it needed. Superseded PR runs are cancelled, master runs are not.
antonwolfy
requested review from
ndgrigorian and
vlad-perevezentsev
as code owners
November 3, 2026 19:13
There was a problem hiding this comment.
🟡 Changes recommended
Shared concurrency groups still allow newer master pushes to cancel pending runs and skip commit validation in three workflows, even with cancel-in-progress set to false.
1 open issue
What changed in this PR
Replaces the third-party workflow cancellation action with native GitHub Actions concurrency across four CI workflows, removing the associated write permissions.
Changes:
- Adds workflow-level concurrency groups keyed by workflow and ref.
- Enables cancellation of active runs for PR events in build and coverage workflows, and unconditionally in the scheduled test workflow.
- Removes cancellation steps and their job-level
actions: writegrants.
| File | Description |
|---|---|
.github/workflows/generate_coverage.yaml |
Adds native coverage-run concurrency and removes cancellation-related write access. |
.github/workflows/cron-run-tests.yaml |
Enables native cancellation of superseded test runs and removes write access. |
.github/workflows/conda-package.yml |
Adds package-build concurrency and removes the cancellation action and write grant. |
.github/workflows/check-onemath.yaml |
Adds oneMath validation concurrency and removes the cancellation action and write grant. |
Review effort: Balanced
Contributor
|
Array API standard conformance tests for dpnp=0.22.0dev0=np2py314h8d9cdd5_32 ran successfully. |
Collaborator
Contributor
|
View rendered docs @ https://intelpython.github.io/dpnp/index.html |
ndgrigorian
reviewed
Nov 5, 2026
PR-triggered workflows cancel only superseded PR runs and give other runs a unique group; schedule/dispatch-only workflows drop the group so every run completes.
ndgrigorian
approved these changes
Nov 5, 2026
github-actions Bot
added a commit
that referenced
this pull request
Nov 5, 2026
`styfle/cancel-workflow-action` was used in `conda-package.yml`,
`check-onemath.yaml`, `generate_coverage.yaml` and
`cron-run-tests.yaml`, and each of those jobs needed `actions: write`
for it.
This PR replaces it with native `concurrency` and aligns the other
workflows on the same rules:
- `conda-package.yml`, `check-onemath.yaml`, `generate_coverage.yaml`,
`conda-package-cf.yml`, `os-llvm-sycl-build.yml`, `zizmor.yml` and
`pre-commit.yml`: PR runs share a `${{ github.workflow }}-${{ github.ref
}}` group and cancel superseded runs, while other runs get a unique
group via `github.run_id`, so every master commit is validated. In
`zizmor.yml` this replaces `github.head_ref`, which put PRs from
different forks with the same branch name in one group.
- `cron-run-tests.yaml` and `coverity.yml` only run on schedule and
manual dispatch, so they get no concurrency group and every run
completes.
- `build-sphinx.yml` and `bump-sycl-deps.yml` are unchanged: their runs
push to `gh-pages` or to the dependency-bump PR branch, so a shared
group keeps those pushes from racing and the newest run wins.
The `actions: write` grants are removed, so these jobs now run with
read-only permissions. b2218b4
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.

styfle/cancel-workflow-actionwas used inconda-package.yml,check-onemath.yaml,generate_coverage.yamlandcron-run-tests.yaml, and each of those jobs neededactions: writefor it.This PR replaces it with native
concurrencyand aligns the other workflows on the same rules:conda-package.yml,check-onemath.yaml,generate_coverage.yaml,conda-package-cf.yml,os-llvm-sycl-build.yml,zizmor.ymlandpre-commit.yml: PR runs share a${{ github.workflow }}-${{ github.ref }}group and cancel superseded runs, while other runs get a unique group viagithub.run_id, so every master commit is validated. Inzizmor.ymlthis replacesgithub.head_ref, which put PRs from different forks with the same branch name in one group.cron-run-tests.yamlandcoverity.ymlonly run on schedule and manual dispatch, so they get no concurrency group and every run completes.build-sphinx.ymlandbump-sycl-deps.ymlare unchanged: their runs push togh-pagesor to the dependency-bump PR branch, so a shared group keeps those pushes from racing and the newest run wins.The
actions: writegrants are removed, so these jobs now run with read-only permissions.