From 0a51f271227e8c503867d04ec777a60a71ca712a Mon Sep 17 00:00:00 2001 From: Zoheb Shaikh <26975142+ZohebShaikh@users.noreply.github.com> Date: Wed, 21 Oct 2026 11:19:36 +0100 Subject: [PATCH 1/3] ci: stop re-running merge queue checks on push to main The merge queue already tests the exact commit that lands on main, so the push run duplicated it, got cancelled by the next merge, and competed for runners. On push to main, CI now only builds docs (for Publish). CodeQL drops merge_group, where SARIF upload failed once the queue branch was deleted. AsyncAPI/Backstage drop push. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/asyncapi.yml | 5 ----- .github/workflows/backstage.yml | 5 ----- .github/workflows/ci.yml | 7 ++++++- .github/workflows/codeql.yml | 2 -- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/asyncapi.yml b/.github/workflows/asyncapi.yml index 3e8f9b6c20..1710c6328e 100644 --- a/.github/workflows/asyncapi.yml +++ b/.github/workflows/asyncapi.yml @@ -3,11 +3,6 @@ name: AsyncAPI on: - push: - branches: - - main - tags: - - "*" pull_request: merge_group: types: [checks_requested] diff --git a/.github/workflows/backstage.yml b/.github/workflows/backstage.yml index a460e10333..b07e3447b7 100644 --- a/.github/workflows/backstage.yml +++ b/.github/workflows/backstage.yml @@ -1,11 +1,6 @@ name: Backstage on: - push: - branches: - - main - tags: - - '*' pull_request: merge_group: types: [checks_requested] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index db6190d004..e9fc4cb835 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,12 +15,15 @@ on: types: [checks_requested] jobs: + # Jobs below skip pushes to main: merge_group already ran them on the same commit lint: + if: github.event_name != 'push' || github.ref_type == 'tag' uses: ./.github/workflows/_tox.yml with: tox: pre-commit,type-checking test: + if: github.event_name != 'push' || github.ref_type == 'tag' strategy: matrix: runs-on: ["ubuntu-latest"] # can add windows-latest, macos-latest @@ -32,11 +35,12 @@ jobs: python-version: ${{ matrix.python-version }} system-test: + if: github.event_name != 'push' || github.ref_type == 'tag' uses: ./.github/workflows/_system_test.yml container: needs: test - if: ${{ !cancelled() }} + if: ${{ !cancelled() && (github.event_name != 'push' || github.ref_type == 'tag') }} uses: ./.github/workflows/_container.yml with: publish: ${{ needs.test.result == 'success' }} @@ -53,6 +57,7 @@ jobs: html-dir: build/html dist: + if: github.event_name != 'push' || github.ref_type == 'tag' uses: ./.github/workflows/_dist.yml pypi: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d32c2fb975..27f73884f1 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -22,8 +22,6 @@ on: tags: - '*' pull_request: - merge_group: - types: [checks_requested] jobs: analyze: From ce0a8e1dd2ebbab9fbe6f35935af0c454462b9f7 Mon Sep 17 00:00:00 2001 From: Zoheb Shaikh <26975142+ZohebShaikh@users.noreply.github.com> Date: Wed, 21 Oct 2026 11:32:33 +0100 Subject: [PATCH 2/3] ci: address review of merge queue dedupe - Simplify the skip guard to `github.ref != 'refs/heads/main'` - Clarify that docs still runs on main for publish.yml - Label merge queue Codecov uploads as main, since tests no longer run on push to main Co-Authored-By: Claude Opus 5.5 --- .github/workflows/_test.yml | 2 ++ .github/workflows/ci.yml | 13 +++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml index 12f87e4066..1e3f3537c4 100644 --- a/.github/workflows/_test.yml +++ b/.github/workflows/_test.yml @@ -43,3 +43,5 @@ jobs: with: name: ${{ inputs.python-version }}/${{ inputs.runs-on }} files: cov.xml + # Tests skip push-to-main; label the merge queue commit (same SHA) as main + override_branch: ${{ github.event_name == 'merge_group' && 'main' || '' }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9fc4cb835..8da5185b5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,15 +15,16 @@ on: types: [checks_requested] jobs: - # Jobs below skip pushes to main: merge_group already ran them on the same commit + # Check jobs skip pushes to main: merge_group already ran them on the same commit. + # docs still runs there because publish.yml deploys the main docs from it. lint: - if: github.event_name != 'push' || github.ref_type == 'tag' + if: github.ref != 'refs/heads/main' uses: ./.github/workflows/_tox.yml with: tox: pre-commit,type-checking test: - if: github.event_name != 'push' || github.ref_type == 'tag' + if: github.ref != 'refs/heads/main' strategy: matrix: runs-on: ["ubuntu-latest"] # can add windows-latest, macos-latest @@ -35,12 +36,12 @@ jobs: python-version: ${{ matrix.python-version }} system-test: - if: github.event_name != 'push' || github.ref_type == 'tag' + if: github.ref != 'refs/heads/main' uses: ./.github/workflows/_system_test.yml container: needs: test - if: ${{ !cancelled() && (github.event_name != 'push' || github.ref_type == 'tag') }} + if: ${{ !cancelled() && github.ref != 'refs/heads/main' }} uses: ./.github/workflows/_container.yml with: publish: ${{ needs.test.result == 'success' }} @@ -57,7 +58,7 @@ jobs: html-dir: build/html dist: - if: github.event_name != 'push' || github.ref_type == 'tag' + if: github.ref != 'refs/heads/main' uses: ./.github/workflows/_dist.yml pypi: From 1da858a0e28017005054a1685f408be148bd94a1 Mon Sep 17 00:00:00 2001 From: Zoheb Shaikh <26975142+ZohebShaikh@users.noreply.github.com> Date: Wed, 21 Oct 2026 12:25:47 +0100 Subject: [PATCH 3/3] ci: drop Codecov override_branch for merge queue uploads Failed or ejected merge groups would also be labelled main, giving Codecov a main head that never landed. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/_test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml index 1e3f3537c4..12f87e4066 100644 --- a/.github/workflows/_test.yml +++ b/.github/workflows/_test.yml @@ -43,5 +43,3 @@ jobs: with: name: ${{ inputs.python-version }}/${{ inputs.runs-on }} files: cov.xml - # Tests skip push-to-main; label the merge queue commit (same SHA) as main - override_branch: ${{ github.event_name == 'merge_group' && 'main' || '' }}