From 979688a072e03040e7591c234c2c2f886e24d5d0 Mon Sep 17 00:00:00 2001 From: Vu Anh Phung Date: Tue, 3 Nov 2026 22:17:16 +0000 Subject: [PATCH 1/2] ci: move integration-trigger concurrency to job level 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 Co-authored-by: Isaac --- .github/workflows/trigger-coverage-fanout.yml | 5 ++-- .../workflows/trigger-integration-tests.yml | 27 +++++++++++++------ 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.github/workflows/trigger-coverage-fanout.yml b/.github/workflows/trigger-coverage-fanout.yml index f9480114..5cf1d204 100644 --- a/.github/workflows/trigger-coverage-fanout.yml +++ b/.github/workflows/trigger-coverage-fanout.yml @@ -25,8 +25,9 @@ # ------------------------------------------------------------------ # This dispatch is fire-and-forget: no check is posted and there is no # `if: failure()` fallback, so a cancellation silently drops the coverage -# fan-out. trigger-integration-tests.yml carries a workflow-level -# concurrency group keyed on PR number with `cancel-in-progress: true`. +# fan-out. trigger-integration-tests.yml used to carry a workflow-level +# concurrency group keyed on PR number with `cancel-in-progress: true` +# (it now uses job-level groups only). # Workflow-level and job-level concurrency operate independently: a # job-level group CANNOT exempt a job from a workflow-run-level # cancellation. So while this job lived in that workflow, a stray diff --git a/.github/workflows/trigger-integration-tests.yml b/.github/workflows/trigger-integration-tests.yml index e358685a..d6c74501 100644 --- a/.github/workflows/trigger-integration-tests.yml +++ b/.github/workflows/trigger-integration-tests.yml @@ -82,19 +82,21 @@ on: types: [opened, synchronize, reopened, labeled] merge_group: -# Concurrency model: +# Concurrency model (job-level only): +# - No workflow-level group. Every run joins a workflow-level group, even +# one whose jobs are all skipped, so a no-op `labeled` run (e.g. a bot +# adding `ai-assisted` right after the PR opens) cancelled the `opened` +# run's auto-pass and left the required check unposted. Skipped jobs +# never join a job-level group. # - Dispatch-side jobs (`skip-integration-tests-pr`, # `trigger-tests-pr`, `merge-queue-kernel`) coalesce per PR / merge -# group / branch so push-spam and label cycles don't burn through -# the GitHub App rate limit. `cancel-in-progress: true` lets a -# newer push supersede a stale dispatch. +# group so push-spam and label cycles don't burn through the GitHub +# App rate limit. `cancel-in-progress: true` lets a newer push +# supersede a stale dispatch. # - The label-cleanup job (`remove-label-on-new-commit`) runs in its # own group with `cancel-in-progress: false` — cancelling # mid-flight could leave the label attached after a push, which # would defeat the "re-review on each push" security contract. -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.merge_group.head_sha || github.ref }} - cancel-in-progress: true jobs: # ============================================================================= @@ -106,7 +108,7 @@ jobs: name: Reset integration-test label on push if: github.event_name == 'pull_request' && github.event.action == 'synchronize' # Own concurrency group with `cancel-in-progress: false` — see the - # workflow-level comment above. The label-cleanup is a + # concurrency comment above. The label-cleanup is a # security-critical action; it MUST run to completion on every # push regardless of how quickly subsequent pushes arrive. concurrency: @@ -202,6 +204,9 @@ jobs: github.event_name == 'pull_request' && 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 }} + cancel-in-progress: true runs-on: group: databricks-protected-runner-group labels: linux-ubuntu-latest @@ -298,6 +303,9 @@ jobs: github.event.action == 'labeled' && contains(github.event.pull_request.labels.*.name, 'integration-test') && vars.INTEGRATION_TESTS_ENABLED == 'true' + concurrency: + group: ${{ github.workflow }}-dispatch-${{ github.event.pull_request.number }} + cancel-in-progress: true runs-on: group: databricks-protected-runner-group labels: linux-ubuntu-latest @@ -444,6 +452,9 @@ jobs: merge-queue-kernel: name: Dispatch integration tests (merge queue) if: github.event_name == 'merge_group' + concurrency: + group: ${{ github.workflow }}-merge-queue-${{ github.event.merge_group.head_sha }} + cancel-in-progress: true runs-on: group: databricks-protected-runner-group labels: linux-ubuntu-latest From db4f4a467c18c33c58b3d067560b20ffe3b9d54f Mon Sep 17 00:00:00 2001 From: Vu Anh Phung Date: Tue, 3 Nov 2026 22:23:03 +0000 Subject: [PATCH 2/2] ci: drop history from coverage-fanout isolation comment Signed-off-by: Vu Anh Phung Co-authored-by: Isaac --- .github/workflows/trigger-coverage-fanout.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/trigger-coverage-fanout.yml b/.github/workflows/trigger-coverage-fanout.yml index 5cf1d204..e95a2bc3 100644 --- a/.github/workflows/trigger-coverage-fanout.yml +++ b/.github/workflows/trigger-coverage-fanout.yml @@ -25,20 +25,10 @@ # ------------------------------------------------------------------ # This dispatch is fire-and-forget: no check is posted and there is no # `if: failure()` fallback, so a cancellation silently drops the coverage -# fan-out. trigger-integration-tests.yml used to carry a workflow-level -# concurrency group keyed on PR number with `cancel-in-progress: true` -# (it now uses job-level groups only). -# Workflow-level and job-level concurrency operate independently: a -# job-level group CANNOT exempt a job from a workflow-run-level -# cancellation. So while this job lived in that workflow, a stray -# post-merge `pull_request` event on the same PR number — e.g. a bot -# label action landing during the token-mint + dispatch window (`labeled` -# is in that workflow's trigger `types`) — would start a new run in the -# shared PR-number group and cancel the entire prior run, including this -# dispatch. Isolating it in its own workflow file removes it from that -# shared group entirely; its own concurrency group below (keyed on the -# merge commit, `cancel-in-progress: false`) then lets the dispatch always -# run to completion. +# fan-out. In its own workflow, no other PR event (e.g. a bot label +# landing during the token-mint + dispatch window) can cancel it, and its +# concurrency group below (keyed on the merge commit, +# `cancel-in-progress: false`) lets the dispatch always run to completion. # # ------------------------------------------------------------------ # Fork-merge assumption (why the fire-and-forget dispatch is safe here)