-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-34065][INFRA] Cancel the duplicated jobs only in PRs at GitHub Actions #31121
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
Conversation
|
cc @mik-laj and @dongjoon-hyun FYI |
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
31cd9f7 to
4b32e9f
Compare
|
|
||
| jobs: | ||
| cancel-duplicate-workflow-runs: | ||
| if: github.event.workflow_run.event == 'pull_request' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dongjoon-hyun, I referred to https://securitylab.github.com/research/github-actions-preventing-pwn-requests and found this way is slightly better because it's at least easier to understand. Likewise, I tested it in my fork, and updated PR description.
|
Let me merge this in to recover the test coverage. Let's see if it works out of the box in the main repo too. |
|
Merged to master. |
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
|
Test build #133909 has finished for PR 31121 at commit
|
|
Test build #133911 has finished for PR 31121 at commit
|


What changes were proposed in this pull request?
This is kind of a followup of #31104 but I decided to track it separately with a separate JIRA.
Currently the jobs are being canceled in main repo branches. If a commit is merged, for example, to master branch before the test finishes, it cancels the previous builds. This is a problem because we cannot, for example, detect logical conflict properly. We should only cancel the jobs in PRs:
This PR proposes to don't do this in the main repo branch commits but only do it in PRs.
Why are the changes needed?
Does this PR introduce any user-facing change?
No, dev-only.
How was this patch tested?
I manually tested in
I added Yi Wu as a co-author since he helped verifying the current fix in the PR above.
I checked that it does not cancel in the main repo branch:
I checked it cancels in PRs: