Skip to content

Conversation

@vlsi
Copy link
Contributor

@vlsi vlsi commented Jan 7, 2021

No description provided.

@vlsi vlsi force-pushed the actions_workaround branch 3 times, most recently from dc79014 to 70d2b47 Compare January 7, 2021 19:25
@vlsi
Copy link
Contributor Author

vlsi commented Jan 10, 2021

The actions have been approved, so the workaround is not needed.

@vlsi vlsi closed this Jan 10, 2021
dongjoon-hyun pushed a commit to apache/spark 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant