Skip to content

ci: move integration-trigger concurrency to job level - #424

Closed
vuanhphung wants to merge 3 commits into
mainfrom
vuanhphung/integration-trigger-job-concurrency
Closed

vuanhphung wants to merge 3 commits into
mainfrom
vuanhphung/integration-trigger-job-concurrency

Conversation

@vuanhphung

Copy link
Copy Markdown
Collaborator

trigger-integration-tests.yml had a workflow-level concurrency group keyed on the PR number with cancel-in-progress: true. Every run joins that group as soon as it's queued, including a labeled run whose jobs are all skipped. When a bot adds a label right after a PR opens (the GitHub tooling adds ai-assisted at creation), the no-op labeled run cancels the opened run's Integration tests (auto-pass on PR) job, so the app-pinned Kernel Integration Tests check is never posted and the PR sits blocked until someone reruns the cancelled run. This happened on #423.

The workflow-level group is replaced with per-job groups on the three dispatch-side jobs. Skipped jobs never join a job-level group, so label events can no longer cancel the auto-pass, while push and label cycles still coalesce per PR (and per merge-group head in the queue). The label-cleanup job keeps its existing non-cancelling group. trigger-coverage-fanout.yml was split out for the same cancellation problem; its comment is updated to match.

This PR is itself a test: it gets the ai-assisted label on creation, so Kernel Integration Tests should post without a manual rerun.

This pull request and its description were written by Isaac.


This PR was created with GitHub MCP.

A workflow-level concurrency group is joined by every run, including a
labeled run whose jobs are all skipped. A bot label added right after a PR
opens therefore cancelled the opened run's auto-pass job, and the required
Kernel Integration Tests check was never posted. Use per-job groups so only
jobs that actually run can supersede each other.

Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: 1 Low

Looks good: the change fixes the cancellation of the auto-pass job by a no-op labeled run, and per-job groups are the right way to do it. One low concern: pushes no longer cancel an in-flight label dispatch, and the concurrency comment still says they do.

Signed-off-by: Vu Anh Phung <vu.phung@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: 1 Low

The fix looks correct, with one low-severity concern: the concurrency comment no longer matches the new behaviour. Moving to job-level groups does stop skipped labeled runs from cancelling the opened auto-pass. As a side effect, a new push no longer cancels an in-flight labeled dispatch.

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: 1 Low

Looks good. The fix is correct: skipped jobs don't join job-level concurrency groups, so no-op labeled runs can no longer cancel the auto-pass. One low concern: moving auto-pass and dispatch into separate groups means a delayed auto-pass can now post success after a label-triggered real run has started on the same SHA.

github.event.action != 'labeled' &&
github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
concurrency:
group: ${{ github.workflow }}-autopass-${{ github.event.pull_request.number }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Low — Splitting auto-pass and dispatch into separate groups (-autopass-<PR> and -dispatch-<PR>) drops a guarantee the old shared group gave you. Before, if a maintainer added integration-test while a synchronize/opened run's auto-pass was still queued, the labeled run cancelled it. That meant the auto-pass could never post after the real dispatch had started.

Now the two can run concurrently. Here's the failure case: the auto-pass job sits waiting for a protected runner after a push, a maintainer labels the PR, and the receiver posts its Kernel Integration Tests run (in_progress → failure). The delayed auto-pass then calls checks.create(conclusion: 'success') on the same head SHA as the same app. Because that run is newer, it can hide the real failure on the PR.

The merge queue still gates, so the impact is limited to the advisory PR-time signal. Still, the old behaviour was strictly safer. Two options:

  • Put both jobs in one PR-keyed group, e.g. ${{ github.workflow }}-pr-${{ github.event.pull_request.number }}. This still fixes the reported bug, because a skipped job never joins a job-level group and so can't cancel anything.
  • Or have the auto-pass step skip posting when a Kernel Integration Tests run from the receiver already exists for that SHA.

If the split is intentional, a sentence in the concurrency comment explaining why would help.

@vuanhphung vuanhphung closed this Nov 6, 2026
auto-merge was automatically disabled November 6, 2026 04:49

Pull request was closed

This branch was previously deployed

1 inactive deployment
azure-prod — 3d97826f Deployed Nov 5, 2026 by oss-reviewer-bot[bot] via followup #2141
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant