Skip to content

ci: cancel superseded runs in remaining workflows#767

Merged
wgtmac merged 1 commit into
apache:mainfrom
abnobdoss:ci/cancel-in-progress
Jun 22, 2026
Merged

ci: cancel superseded runs in remaining workflows#767
wgtmac merged 1 commit into
apache:mainfrom
abnobdoss:ci/cancel-in-progress

Conversation

@abnobdoss

Copy link
Copy Markdown
Contributor

What

Add a concurrency block to the five workflows that don't have one — cpp-linter, pre-commit, license_check, zizmor, and codeql:

concurrency:
  group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
  cancel-in-progress: true

Why

The heavier workflows already cancel outdated runs, but these five don't - so pushing again to a PR leaves the old runs going and tying up runners. Grouping on head_ref || sha cancels superseded PR runs while leaving main and scheduled runs untouched.

@zhjwpku zhjwpku left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

cpp-linter can be expensive, I'm not sure why we weren't using workflow concurrency for it already. The other four finish in less than a minute, I don't expect much difference there. But, having a consistent setup across all workflows seems worthwhile.

@abnobdoss

Copy link
Copy Markdown
Contributor Author

Thank you for the review! I agree the cpp-linter is the one where we'd actually see it invoked. And I figured, as you said, it'd be nice to make them consistent while we're at it.

@zhjwpku zhjwpku added the ready to merge This PR has been approved and it is ready to merge. label Jun 22, 2026
@wgtmac wgtmac removed the ready to merge This PR has been approved and it is ready to merge. label Jun 22, 2026
@wgtmac

wgtmac commented Jun 22, 2026

Copy link
Copy Markdown
Member

Thanks @abnobdoss for adding this and @zhjwpku for the review!

@wgtmac wgtmac merged commit 42b498f into apache:main Jun 22, 2026
20 checks passed
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.

3 participants