Skip to content

Restore main branch filter on push trigger to avoid duplicate CI runs - #1106

Merged
Kludex merged 3 commits into
mainfrom
fix-duplicate-ci-runs-2
Aug 2, 2026
Merged

Restore main branch filter on push trigger to avoid duplicate CI runs#1106
Kludex merged 3 commits into
mainfrom
fix-duplicate-ci-runs-2

Conversation

@Kludex

@Kludex Kludex commented Aug 2, 2026

Copy link
Copy Markdown
Member

The Python 3.15 support PR (#1090) accidentally dropped branches: ["main"] from the push trigger in main.yml, so every push to a PR branch triggered both a push run and a pull_request run, duplicating CI.

This restores the branch filter, and adds a concurrency block to the PR-triggered workflows so superseded runs get cancelled when new commits are pushed.

Replaces #1105, which was branched off the wrong base.

Review in cubic

@Kludex Kludex changed the title Fix duplicate CI runs on pull requests Restore main branch filter on push trigger to avoid duplicate CI runs Aug 2, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1639a14824

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/main.yml Outdated
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restore the push branch filter

For an in-repository branch with an open PR against main or version-*, each commit still triggers both push and pull_request runs because on.push remains unfiltered. This concurrency key cannot cancel the duplicate: github.ref is the branch ref for the push run but the PR merge ref for the pull-request run, so they belong to different groups. Add the intended branches: ["main"] filter under push.

Useful? React with 👍 / 👎.

@codspeed-hq

codspeed-hq Bot commented Aug 2, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 15 untouched benchmarks
⏩ 7 skipped benchmarks1


Comparing fix-duplicate-ci-runs-2 (c83e8d2) with main (e27e2f9)

Open in CodSpeed

Footnotes

  1. 7 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

@Kludex
Kludex enabled auto-merge (squash) August 2, 2026 08:50
@Kludex
Kludex merged commit 94740e2 into main Aug 2, 2026
17 checks passed
@Kludex
Kludex deleted the fix-duplicate-ci-runs-2 branch August 2, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant