You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by gh...@apache.org on 2020/10/28 20:42:41 UTC
[bookkeeper] branch master updated: [BUILD] Use Cancel workflow
action to cancel outdated PR build jobs
This is an automated email from the ASF dual-hosted git repository.
ghatage pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new d8683b0 [BUILD] Use Cancel workflow action to cancel outdated PR build jobs
d8683b0 is described below
commit d8683b09d6452c08923941391a5926dca4080194
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Wed Oct 28 22:42:32 2020 +0200
[BUILD] Use Cancel workflow action to cancel outdated PR build jobs
### Motivation
Currently a single user can cause the Github Actions / Workflows based CI to get overloaded when commits are pushed to a PR branch frequently, one by one. To mitigate this issue, cancel any previous Github Actions runs that are not completed for a given workflow, for a particular branch / PR. This can be achieved by using the https://github.com/marketplace/actions/cancel-workflow-action .
[There are multiple cancel actions available](https://github.community/t/github-actions-cancel-redundant-builds-not-solved/16025/22). This particular one was picked based on its popularity.
### Modifications
Append each workflow with the cancel workflow action step.
A similar change was made in Pulsar CI in PR https://github.com/apache/pulsar/pull/8393
Reviewers: Enrico Olivelli <eo...@gmail.com>, Anup Ghatage <gh...@apache.org>
This closes #2464 from lhotari/lh-cancel-previous-build
---
.github/workflows/bookie-tests.yml | 5 +++++
.github/workflows/client-tests.yml | 5 +++++
.github/workflows/compatibility-check-java11.yml | 5 +++++
.github/workflows/compatibility-check-java8.yml | 5 +++++
.github/workflows/integration-tests.yml | 5 +++++
.github/workflows/pr-validation.yml | 5 +++++
.github/workflows/remaining-tests.yml | 5 +++++
.github/workflows/replication-tests.yml | 5 +++++
.github/workflows/tls-tests.yml | 5 +++++
9 files changed, 45 insertions(+)
diff --git a/.github/workflows/bookie-tests.yml b/.github/workflows/bookie-tests.yml
index 875efcd..670b9fd 100644
--- a/.github/workflows/bookie-tests.yml
+++ b/.github/workflows/bookie-tests.yml
@@ -33,6 +33,11 @@ jobs:
runs-on: ubuntu-latest
steps:
+ - name: Cancel Previous Runs
+ uses: styfle/cancel-workflow-action@0.6.0
+ with:
+ access_token: ${{ github.token }}
+
- name: Checkout
uses: actions/checkout@v2
with:
diff --git a/.github/workflows/client-tests.yml b/.github/workflows/client-tests.yml
index 159464d..95bcca8 100644
--- a/.github/workflows/client-tests.yml
+++ b/.github/workflows/client-tests.yml
@@ -33,6 +33,11 @@ jobs:
runs-on: ubuntu-latest
steps:
+ - name: Cancel Previous Runs
+ uses: styfle/cancel-workflow-action@0.6.0
+ with:
+ access_token: ${{ github.token }}
+
- name: Checkout
uses: actions/checkout@v2
with:
diff --git a/.github/workflows/compatibility-check-java11.yml b/.github/workflows/compatibility-check-java11.yml
index 55de1fb..409e3b2 100644
--- a/.github/workflows/compatibility-check-java11.yml
+++ b/.github/workflows/compatibility-check-java11.yml
@@ -32,6 +32,11 @@ jobs:
runs-on: ubuntu-latest
steps:
+ - name: Cancel Previous Runs
+ uses: styfle/cancel-workflow-action@0.6.0
+ with:
+ access_token: ${{ github.token }}
+
- name: Checkout
uses: actions/checkout@v2
with:
diff --git a/.github/workflows/compatibility-check-java8.yml b/.github/workflows/compatibility-check-java8.yml
index 271d2e0..59c2e62 100644
--- a/.github/workflows/compatibility-check-java8.yml
+++ b/.github/workflows/compatibility-check-java8.yml
@@ -32,6 +32,11 @@ jobs:
runs-on: ubuntu-latest
steps:
+ - name: Cancel Previous Runs
+ uses: styfle/cancel-workflow-action@0.6.0
+ with:
+ access_token: ${{ github.token }}
+
- name: Checkout
uses: actions/checkout@v2
with:
diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml
index cd5f90b..417feaa 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -33,6 +33,11 @@ jobs:
runs-on: ubuntu-latest
steps:
+ - name: Cancel Previous Runs
+ uses: styfle/cancel-workflow-action@0.6.0
+ with:
+ access_token: ${{ github.token }}
+
- name: Checkout
uses: actions/checkout@v2
with:
diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml
index 5b2dc95..4d69ce1 100644
--- a/.github/workflows/pr-validation.yml
+++ b/.github/workflows/pr-validation.yml
@@ -33,6 +33,11 @@ jobs:
runs-on: ubuntu-latest
steps:
+ - name: Cancel Previous Runs
+ uses: styfle/cancel-workflow-action@0.6.0
+ with:
+ access_token: ${{ github.token }}
+
- name: Checkout
uses: actions/checkout@v2
with:
diff --git a/.github/workflows/remaining-tests.yml b/.github/workflows/remaining-tests.yml
index 5aacf26..a9ef62d 100644
--- a/.github/workflows/remaining-tests.yml
+++ b/.github/workflows/remaining-tests.yml
@@ -32,6 +32,11 @@ jobs:
runs-on: ubuntu-latest
steps:
+ - name: Cancel Previous Runs
+ uses: styfle/cancel-workflow-action@0.6.0
+ with:
+ access_token: ${{ github.token }}
+
- name: Checkout
uses: actions/checkout@v2
with:
diff --git a/.github/workflows/replication-tests.yml b/.github/workflows/replication-tests.yml
index b06017a..32b66ce 100644
--- a/.github/workflows/replication-tests.yml
+++ b/.github/workflows/replication-tests.yml
@@ -33,6 +33,11 @@ jobs:
runs-on: ubuntu-latest
steps:
+ - name: Cancel Previous Runs
+ uses: styfle/cancel-workflow-action@0.6.0
+ with:
+ access_token: ${{ github.token }}
+
- name: Checkout
uses: actions/checkout@v2
with:
diff --git a/.github/workflows/tls-tests.yml b/.github/workflows/tls-tests.yml
index 43d17f7..adaae02 100644
--- a/.github/workflows/tls-tests.yml
+++ b/.github/workflows/tls-tests.yml
@@ -33,6 +33,11 @@ jobs:
runs-on: ubuntu-latest
steps:
+ - name: Cancel Previous Runs
+ uses: styfle/cancel-workflow-action@0.6.0
+ with:
+ access_token: ${{ github.token }}
+
- name: Checkout
uses: actions/checkout@v2
with: