ci: split build.yaml concurrency group by build_type#1211
Conversation
Previously the concurrency group was keyed only on workflow + ref, so a push to main would cancel an in-progress nightly-dispatched build.yaml run on the same branch (and vice versa). Add the build_type input (with 'branch' as the fallback for push events) to the group key so nightly and branch builds occupy separate groups, while still cancelling older runs of the same type on the same ref. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Ramakrishna Prabhu <ramakrishnap@nvidia.com>
jameslamb
left a comment
There was a problem hiding this comment.
Oh cool idea!
A nightly run cancelling one triggered from a merge is mildly annoying only because it delays package publishing, but I think not that big of a problem.
However, a merge cancelling a nightly build is more serious. Because the nightly CI polls for a single, specific workflow run (rapidsai/trigger-workflow-and-wait code link), in that situation where there's a merge while the nightly build is going on, the nightly build will be cancelled and the nightly tests will never run.
I support trying this, and we should probably do it across all of RAPIDS. I'll put up a build-planning issue proposing that and see what folks think.
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.build_type || 'branch' }} |
There was a problem hiding this comment.
This makes sense to me. Just noting I looked into this here: https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#github-context
github.ref should be identical and set to just the branch name for both a push and workflow_dispatch run, I think, so it makes sense that those would conflict.
|
/merge |
Summary
build.yamlwas keyed onworkflow + ref, so a push tomain(orrelease/*) would cancel an in-progress nightly-dispatchedbuild.yamlrun on the same branch — and the reverse was equally true.build_typeinput to the group key (falling back to'branch'wheninputsis unset onpush) so nightly and branch builds occupy separate groups.mainstill supersede each other).🤖 Generated with Claude Code