Skip to content

ci: dedupe concurrent CI runs on identical commit (push + pull_request)#323

Merged
LeoBuron merged 1 commit into
developfrom
ci-dedupe-concurrent-runs
Jul 9, 2026
Merged

ci: dedupe concurrent CI runs on identical commit (push + pull_request)#323
LeoBuron merged 1 commit into
developfrom
ci-dedupe-concurrent-runs

Conversation

@LeoBuron

@LeoBuron LeoBuron commented Jul 9, 2026

Copy link
Copy Markdown
Member

Summary

  • develop/main are both push- and pull_request-trigger branches, so a commit landing on develop while a developmain release PR is open fires CI twice for the identical SHA (once via push, once via pull_request: synchronize).
  • Surfaced by Develop #320: the push-triggered run's c-format-check hit a transient apt.llvm.org outage independently of the pull_request-triggered run of the same commit, which had already passed — pure wasted duplicate work, and doubled exposure to that kind of external flake.
  • Adds a workflow-level concurrency group keyed on the actual commit SHA (github.event.pull_request.head.sha when present, else github.sha) with cancel-in-progress: true, so the redundant run is cancelled rather than both running to completion. Does not touch the push trigger itself — post-merge verification on develop/main when no PR is open is unaffected, since that scenario never produces a concurrent duplicate.

Test plan

  • .github/workflows/ci.yml validated as well-formed YAML
  • Observe on a future commit that lands on develop while a developmain PR is open: expect only one of the two triggered runs to complete, the other showing cancelled

develop and main are both push- and pull_request-trigger branches; a
commit landing on develop while a develop->main release PR is open fires
both events for the same SHA (surfaced by PR #320, where the push-
triggered run hit a transient apt.llvm.org outage independently of the
pull_request-triggered run that had already passed). Add a
workflow-level concurrency group keyed on the actual commit SHA
(pull_request head SHA, else push SHA) with cancel-in-progress so the
redundant run is cancelled instead of wasting CI minutes and doubling
exposure to flaky externals.
@LeoBuron LeoBuron merged commit a858fbe into develop Jul 9, 2026
10 checks passed
@LeoBuron LeoBuron deleted the ci-dedupe-concurrent-runs branch July 9, 2026 20:00
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