Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add concurrency control to cancel in-progress PR workflows #3042

Merged
merged 1 commit into from
Apr 7, 2025

Conversation

TTOzzi
Copy link
Member

@TTOzzi TTOzzi commented Apr 5, 2025

When updating a pull request that's already open, each new commit can trigger a workflow. If the PR author doesn't have permission to cancel workflows, this can lead to unnecessary executions.
To avoid redundant executions and reduce resource usage, this change cancels any in-progress workflow for the same pull request when a new one is triggered by a commit push, ensuring only one active workflow per PR.

@TTOzzi TTOzzi requested review from ahoppen and bnbarham as code owners April 5, 2025 01:56
@TTOzzi
Copy link
Member Author

TTOzzi commented Apr 5, 2025

@swift-ci please test

@TTOzzi
Copy link
Member Author

TTOzzi commented Apr 5, 2025

The ci test failure is expected to be resolved once swiftlang/swift-foundation#1239 is merged.

@TTOzzi
Copy link
Member Author

TTOzzi commented Apr 5, 2025

@swift-ci please test Linux

@TTOzzi
Copy link
Member Author

TTOzzi commented Apr 5, 2025

@swift-ci please test Windows

@bnbarham
Copy link
Contributor

bnbarham commented Apr 5, 2025

Just came back to start these after noticing the failure and merging the fix, but you already did. Thanks @TTOzzi!

@TTOzzi
Copy link
Member Author

TTOzzi commented Apr 5, 2025

Just came back to start these after noticing the failure and merging the fix, but you already did. Thanks @TTOzzi!

Thanks for looking out! 🙇

@bnbarham bnbarham merged commit 491c5c9 into swiftlang:main Apr 7, 2025
26 checks passed
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.

2 participants