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

[CI]: Add Concurrency Grouping to GitHub Workflows #1444

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Ishani217
Copy link

What problem is this PR solving?

fixes #1437

Description of the changes

  • Whenever we push commits to a PR, workflows are triggered for that commit. After that, if we push additional commits to this PR, workflows in Github Actions run on both commits.
  • We need to cancel the previous run and run only on the most recent pushed commit. This would help save some GitHub Action Minutes (probably not a problem for this project but its always better to same some resources) and unexpected workflow failures on previous commits.

Signed-off-by: Ishani Goyal <111218213+Ishani217@users.noreply.github.com>
Signed-off-by: Ishani Goyal <111218213+Ishani217@users.noreply.github.com>
Signed-off-by: Ishani Goyal <111218213+Ishani217@users.noreply.github.com>
Signed-off-by: Ishani Goyal <111218213+Ishani217@users.noreply.github.com>
Copy link
Member

@ArthurSens ArthurSens left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! If I understand it correctly, if we accept the PR as it is, we would be canceling workflows if we merge 2 or more PRs to main in a short period, is that correct?

Ideally, we never want to cancel workflows on pushes to the main branch to make sure it is easy to find commits that break our workflows

@Ishani217
Copy link
Author

@ArthurSens Nice catch actually :)
If two PRs would be merged in a timeframe when their workflow runs are concurrent, then yes, previous PR's commit push workflow trigger would be cancelled.

I need to close this PR then, since we aren't using merge queues to handle that case

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.

[CI]: Add Concurrency Grouping to GitHub Workflows
3 participants