ci: stop labeled events from cancelling the commit CI run#4610
Open
mbutrovich wants to merge 1 commit into
Open
ci: stop labeled events from cancelling the commit CI run#4610mbutrovich wants to merge 1 commit into
mbutrovich wants to merge 1 commit into
Conversation
comphead
reviewed
Jun 9, 2026
| # On a `labeled` event, only proceed for the gating labels. Any other label | ||
| # (e.g. dependabot's `dependencies`) skips the whole pipeline rather than | ||
| # spawning a redundant run alongside the opened/synchronize one. | ||
| if: >- |
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.
Which issue does this PR close?
Follow-up to #4494.
Rationale for this change
Since #4494 unified every workflow under one
CIworkflow with a single concurrency group, deps-only PRs (and any PR that gets auto-labeled at open time) spawn a redundant CI run that the concurrency group cancels, leaving dangling cancelledPreflightandDetect changeschecks on the PR.The mechanism, observed on dependabot PR #4602:
08:56:05triggers aCIrun (openedevent).dependencieslabel at08:56:06, triggering a secondCIrun at the same commit (labeledevent).repo-headref-CI, socancel-in-progresscancels one of the pair.Before #4494 the
run-spark-*-testslabel gates lived in separate workflow files that listened only onpull_request: types: [labeled], each with its own concurrency group keyed ongithub.workflow. Anopenedevent and alabeledevent therefore never shared a group. Merging everything into one workflow removed that isolation, and GitHub cannot filtertypes: labeledby label name in theon:block, so dependabot'sdependencieslabel triggers a full second run.What changes are included in this PR?
Two coordinated changes in
.github/workflows/ci.yml:openedandsynchronizeboth map tocommit, so a new push still supersedes its predecessor.preflightjob so alabeledevent only proceeds for therun-spark-3.4-testsandrun-spark-4.1-testsgates. Any other label (such as dependabot'sdependencies) skips the whole pipeline transitively throughneeds, rather than spawning a redundant run.Net behavior:
opened/synchronizerun one full pipeline, no competing cancellation.labeled: dependencieslands in its own subgroup, skips immediately, and does not touch the commit run.labeled: run-spark-4.1-testslands in its own subgroup and runs the gated job.One note for reviewers: adding a gating label re-runs the whole pipeline rather than just that Spark version, because the non-gated jobs fire on any
pull_requestevent. That is pre-existing #4494 behavior, not introduced here. Fully restoring the old "label runs only that Spark version" isolation would mean pulling those two jobs back into a small dedicatedlabeled-only workflow.How are these changes tested?
Existing CI. The
preflightactionlint step lintsci.ymlon this branch.