Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Jan 8, 2021

What changes were proposed in this pull request?

This PR aims to reduce the GitHub Action usage by cancelling the previous build.

Why are the changes needed?

In most case, the last commit is meaningful.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

@github-actions github-actions bot added the INFRA label Jan 8, 2021
@dongjoon-hyun dongjoon-hyun marked this pull request as draft January 8, 2021 22:59
# In order to fetch changed files
with:
fetch-depth: 0
- uses: n1hility/cancel-previous-runs@v2
Copy link
Member Author

Choose a reason for hiding this comment

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

This one seems to be not allowed as of now.
Screen Shot 2021-01-08 at 2 57 07 PM

@dongjoon-hyun
Copy link
Member Author

I'm trying to test the suggestion, but it seems this is not available for now.

@dongjoon-hyun dongjoon-hyun deleted the SPARK-34053 branch January 8, 2021 23:09
dongjoon-hyun pushed a commit that referenced this pull request Jan 11, 2021
Similar to: #31098 apache/calcite#2318 (solution suggestted by vlsi - apache/pulsar#9154 (comment))

I used the action, which was maintained by potiuk instead of the original author, for two reasons:
- the original action was abandoned and is not supported (Proof: n1hility/cancel-previous-runs#7)
- this action works with forks.  The original action only worked when the contribution was run in the same repository and the action had a token with full accesses.

> If you use forks, you should create a separate "Cancelling" workflow_run triggered workflow. The workflow_run should be responsible for all canceling actions. The examples below show the possible ways the action can be utilized.

### What changes were proposed in this pull request?
This PR aims to reduce the GitHub Action usage by cancelling the previous build.

### Why are the changes needed?
In most case, the last commit is meaningful.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?

Due to the nature of the change, testing of this change is difficult.

> Note: This event will only trigger a workflow run if the workflow file is on the default branch.

https://docs.github.com/en/free-pro-teamlatest/actions/reference/events-that-trigger-workflows#workflow_run

However, you can see on my fork that this action is triggered.
https://github.com/mik-laj/spark/actions?query=workflow%3A%22Cancelling+Duplicates%22

I also asked the author of this action to review this change - potiuk (PMC of Apache Airflow) and I have a positive review.

Closes #31104 from mik-laj/patch-1.

Lead-authored-by: Kamil Breguła <kamil.bregula@polidea.com>
Co-authored-by: Kamil Breguła <mik-laj@users.noreply.github.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
sijie pushed a commit to apache/pulsar that referenced this pull request Jan 11, 2021
Master Issue: #9154

### Motivation

This PR aims to reduce the GitHub Action usage by cancelling the previous build.

### Modifications

Similar to: apache/spark#31098 apache/calcite#2318 (solution suggestted by @vlsi - #9154 (comment))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant