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] Only run one post commit job on a push to a pull request in sycl-devops-pr #16079

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

sarnex
Copy link
Contributor

@sarnex sarnex commented Nov 13, 2024

Kind of a really specific case, but if someone pushes to sycl-devops-pr to run postcommit and then makes a PR from the same branch, both the initial pull request event and every subsequent push to the branch will cause two postcommits to run, one from the push to the branch and one from the PR.

Use a unique key that will be the same in both cases so only one is run and the other is cancelled.

Nobody really uses this branch besides CI devs so we don't need to overengineer it so it never runs two in the first place IMO.

…-devops-pr

Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
@sarnex sarnex marked this pull request as ready for review November 13, 2024 21:00
@sarnex sarnex requested a review from a team as a code owner November 13, 2024 21:00
@@ -21,7 +21,7 @@ on:

concurrency:
# Cancel a currently running workflow from the same PR or commit hash.
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
group: "${{ github.actor }}-${{ github.head_ref || github.ref_name }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think PR's description needs to be copied/summarized here too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point, added in latest commit

Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
@sarnex
Copy link
Contributor Author

sarnex commented Nov 13, 2024

Merging since postcommit passed in a previous run and this doesn't effect precommit and CI is really slammed, thanks all.

@sarnex sarnex merged commit 80b63a2 into sycl Nov 13, 2024
5 of 16 checks passed
@sarnex sarnex deleted the sycl-devops-pr/sarnex/postdup branch November 13, 2024 21:36
sarnex added a commit that referenced this pull request Nov 14, 2024
… in sycl-devops-pr" (#16092)

Reverts #16079

This is cancelling jobs in unexpected ways, I need to debug it and fix
the problem.
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.

3 participants