Skip to content

Update concurrency groups to prevent merge runs and pull request runs from canceling each other#26257

Merged
TravisEz13 merged 2 commits into
masterfrom
copilot/update-concurrency-group-settings
Oct 21, 2025
Merged

Update concurrency groups to prevent merge runs and pull request runs from canceling each other#26257
TravisEz13 merged 2 commits into
masterfrom
copilot/update-concurrency-group-settings

Conversation

Copilot AI commented Oct 20, 2025

Copy link
Copy Markdown
Contributor

Summary

Updated the concurrency group configuration in the CI workflow files to include github.event_name, ensuring that merge runs (push events) and pull request runs (pull_request events) operate in separate concurrency groups and don't cancel each other.

Problem

The previous concurrency group configuration used only github.workflow and github.ref:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: ${{ contains(github.ref, 'merge')}}

While this typically worked because merge runs and PR runs usually have different refs, it wasn't explicitly guaranteed and could lead to edge cases where different event types might interfere with each other.

Solution

Added github.event_name to the concurrency group:

concurrency:
  group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
  cancel-in-progress: ${{ contains(github.ref, 'merge')}}

This creates distinct concurrency groups for different event types:

  • Pull request validation: Windows-CI-pull_request-refs/pull/123/merge
  • Merge to master: Windows-CI-push-refs/heads/master
  • Manual workflow dispatch: Windows-CI-workflow_dispatch-refs/heads/branch-name

Benefits

  • ✅ Pull request validation runs and merge runs can execute in parallel without canceling each other
  • ✅ Different event types are explicitly isolated in separate concurrency groups
  • ✅ Runs of the same event type for the same ref can still cancel each other when appropriate
  • ✅ Future-proof against edge cases and workflow trigger changes
  • ✅ Consistent behavior across all CI platforms (Windows, Linux, macOS)

Files Changed

  • .github/workflows/windows-ci.yml
  • .github/workflows/linux-ci.yml
  • .github/workflows/macos-ci.yml
Original prompt

Update the concurrency group in .github/workflows/windows-ci.yml so that merge runs and pull request runs don't cancel each other.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Oct 20, 2025
…t cancellation

Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Copilot AI changed the title [WIP] Update concurrency group in Windows CI workflow Update concurrency groups to prevent merge runs and pull request runs from canceling each other Oct 20, 2025
Copilot AI requested a review from TravisEz13 October 20, 2025 23:51
@TravisEz13 TravisEz13 marked this pull request as ready for review October 21, 2025 00:25
Copilot AI review requested due to automatic review settings October 21, 2025 00:25
@TravisEz13 TravisEz13 requested review from a team and jshigetomi as code owners October 21, 2025 00:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the concurrency group configuration across all CI workflow files to prevent merge runs and pull request runs from canceling each other by explicitly including the event type in the concurrency group identifier.

Key Changes:

  • Added github.event_name to concurrency group definitions to create distinct groups per event type
  • Applied consistently across Windows, Linux, and macOS CI workflows
  • Ensures parallel execution of different event types while maintaining cancellation within same event type

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.github/workflows/windows-ci.yml Updated concurrency group to include event_name for event type isolation
.github/workflows/macos-ci.yml Updated concurrency group to include event_name for event type isolation
.github/workflows/linux-ci.yml Updated concurrency group to include event_name for event type isolation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@TravisEz13 TravisEz13 added the CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log label Oct 21, 2025
@TravisEz13 TravisEz13 merged commit 770f867 into master Oct 21, 2025
42 of 70 checks passed
@TravisEz13 TravisEz13 deleted the copilot/update-concurrency-group-settings branch October 21, 2025 19:41
@microsoft-github-policy-service

microsoft-github-policy-service Bot commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

📣 Hey @@Copilot, how did we do? We would love to hear your feedback with the link below! 🗣️

🔗 https://aka.ms/PSRepoFeedback

SIRMARGIN pushed a commit to SIRMARGIN/PowerShell that referenced this pull request Dec 12, 2025
… from canceling each other (PowerShell#26257)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
kilasuit pushed a commit to kilasuit/PowerShell that referenced this pull request Jan 2, 2026
… from canceling each other (PowerShell#26257)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
JustinGrote pushed a commit to JustinGrote/PowerShell that referenced this pull request Jun 2, 2026
… from canceling each other (PowerShell#26257)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: TravisEz13 <10873629+TravisEz13@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-BuildPackaging Indicates that a PR should be marked as a build or packaging change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants