Skip to content

Avoid cancelling in-progress conformance runs on main#461

Open
koic wants to merge 1 commit into
modelcontextprotocol:mainfrom
koic:avoid_cancelling_conformance_runs_on_main
Open

Avoid cancelling in-progress conformance runs on main#461
koic wants to merge 1 commit into
modelcontextprotocol:mainfrom
koic:avoid_cancelling_conformance_runs_on_main

Conversation

@koic

@koic koic commented Jul 16, 2026

Copy link
Copy Markdown
Member

Motivation and Context

When two PRs are merged to main in quick succession, the Conformance Tests run for the earlier merge commit is cancelled by the run for the later one.

On push events, github.ref is always refs/heads/main, so every merge to main shares the same concurrency group and cancel-in-progress: true cancels all but the latest run. As a result, only the last merged PR gets a conformance result.

This change appends github.sha to the concurrency group for push events so that each merge commit runs independently. For pull_request events the SHA part is empty, keeping the existing behavior where pushing new commits to a PR cancels its superseded runs.

How Has This Been Tested?

Validated the workflow YAML syntax locally. The concurrent behavior itself can only be observed on GitHub Actions, by confirming that both Conformance Tests runs complete when two pushes land on main within a short interval.

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

@koic
koic force-pushed the avoid_cancelling_conformance_runs_on_main branch from 0d87b80 to 70935d1 Compare July 16, 2026 18:20
## Motivation and Context

When two PRs are merged to main in quick succession, the Conformance Tests run for
the earlier merge commit is cancelled by the run for the later one.

On push events, `github.ref` is always `refs/heads/main`, so every merge to main shares
the same concurrency group and `cancel-in-progress: true` cancels all but the latest run.
As a result, only the last merged PR gets a conformance result.

This change appends `github.sha` to the concurrency group for push events so that
each merge commit runs independently. For pull_request events the SHA part is empty,
keeping the existing behavior where pushing new commits to a PR cancels its superseded runs.

## How Has This Been Tested?

Validated the workflow YAML syntax locally. The concurrent behavior itself can only be
observed on GitHub Actions, by confirming that both Conformance Tests runs complete
when two pushes land on main within a short interval.

## Breaking Changes

None.
@koic
koic force-pushed the avoid_cancelling_conformance_runs_on_main branch from 70935d1 to c78d4a2 Compare July 17, 2026 01:22
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