You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2020/11/14 16:34:22 UTC

[airflow] 06/44: Switches to "cancel-all-duplicates' mode of cancelling. (#12004)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit d3ab3df2eaad211f2ce24f73e354de4ec904716d
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Sat Oct 31 23:39:54 2020 +0100

    Switches to "cancel-all-duplicates' mode of cancelling. (#12004)
    
    The cancel-workflow-runs action in version 4.1 got the capability
    of cancelling not only duplicates of own run (including future,
    queued duplicates) but also cancelling all duplicates from all
    running worklfows - regardless if they were triggered by my own
    PR or some other PRs. This will be even more helpful with handling
    the queues and optimising our builds, because in case ANY of
    the build image workflows starts to run, it will cancel ALL
    duplicates immediately.
    
    (cherry picked from commit 21350aa3cf8952b605713257ae94e1ed648dd00b)
---
 .github/workflows/build-images-workflow-run.yml | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/.github/workflows/build-images-workflow-run.yml b/.github/workflows/build-images-workflow-run.yml
index 81c4fb4..972195a 100644
--- a/.github/workflows/build-images-workflow-run.yml
+++ b/.github/workflows/build-images-workflow-run.yml
@@ -65,12 +65,11 @@ jobs:
           token: ${{ secrets.GITHUB_TOKEN }}
           sourceRunId: ${{ github.event.workflow_run.id }}
       - name: "Cancel duplicated 'CI Build' runs"
-        uses: potiuk/cancel-workflow-runs@c8448eb1e435664b3731ea1ead2efa0d1bb83b5b  # v4_0
+        uses: potiuk/cancel-workflow-runs@99869d37d982384d18c79539b67df94f17557cbe  # v4_1
         with:
           token: ${{ secrets.GITHUB_TOKEN }}
-          cancelMode: duplicates
+          cancelMode: allDuplicates
           sourceRunId: ${{ github.event.workflow_run.id }}
-          notifyPRCancel: true
       - name: "Output BUILD_IMAGES"
         id: build-images
         run: |
@@ -83,7 +82,7 @@ jobs:
         # in GitHub Actions, we have to use Job names to match Event/Repo/Branch from the
         # build-info step there to find the duplicates ¯\_(ツ)_/¯.
 
-        uses: potiuk/cancel-workflow-runs@c8448eb1e435664b3731ea1ead2efa0d1bb83b5b  # v4_0
+        uses: potiuk/cancel-workflow-runs@99869d37d982384d18c79539b67df94f17557cbe  # v4_1
         with:
           cancelMode: namedJobs
           token: ${{ secrets.GITHUB_TOKEN }}
@@ -101,7 +100,7 @@ jobs:
         # can cancel all the matching "Build Images" workflow runs in the two following steps.
         # Yeah. Adding to the complexity ¯\_(ツ)_/¯.
 
-        uses: potiuk/cancel-workflow-runs@c8448eb1e435664b3731ea1ead2efa0d1bb83b5b  # v4_0
+        uses: potiuk/cancel-workflow-runs@99869d37d982384d18c79539b67df94f17557cbe  # v4_1
         id: cancel-failed
         with:
           token: ${{ secrets.GITHUB_TOKEN }}
@@ -135,18 +134,18 @@ jobs:
         # it to cancel any jobs that have matching names containing Source Run Id:
         # followed by one of the run ids. Yes I know it's super complex ¯\_(ツ)_/¯.
         if: env.BUILD_IMAGES == 'true' && steps.source-run-info-failed.outputs.cancelledRuns != '[]'
-        uses: potiuk/cancel-workflow-runs@c8448eb1e435664b3731ea1ead2efa0d1bb83b5b  # v4_0
+        uses: potiuk/cancel-workflow-runs@99869d37d982384d18c79539b67df94f17557cbe  # v4_1
         with:
           cancelMode: namedJobs
           token: ${{ secrets.GITHUB_TOKEN }}
           notifyPRCancel: true
           jobNameRegexps: ${{ steps.extract-cancelled-failed-runs.outputs.matching-regexp }}
       - name: "Cancel duplicated 'CodeQL' runs"
-        uses: potiuk/cancel-workflow-runs@c8448eb1e435664b3731ea1ead2efa0d1bb83b5b  # v4_0
+        uses: potiuk/cancel-workflow-runs@99869d37d982384d18c79539b67df94f17557cbe  # v4_1
         id: cancel
         with:
           token: ${{ secrets.GITHUB_TOKEN }}
-          cancelMode: duplicates
+          cancelMode: allDuplicates
           workflowFileName: 'codeql-analysis.yml'
       - name: "Set Docker Cache Directive"
         id: cache-directive
@@ -373,7 +372,7 @@ jobs:
     needs: [build-images]
     steps:
       - name: "Canceling the 'CI Build' source workflow in case of failure!"
-        uses: potiuk/cancel-workflow-runs@c8448eb1e435664b3731ea1ead2efa0d1bb83b5b  # v4_0
+        uses: potiuk/cancel-workflow-runs@99869d37d982384d18c79539b67df94f17557cbe  # v4_1
         with:
           token: ${{ secrets.GITHUB_TOKEN }}
           cancelMode: self
@@ -388,7 +387,7 @@ jobs:
     needs: [build-images]
     steps:
       - name: "Canceling the 'CI Build' source workflow in case of failure!"
-        uses: potiuk/cancel-workflow-runs@c8448eb1e435664b3731ea1ead2efa0d1bb83b5b  # v4_0
+        uses: potiuk/cancel-workflow-runs@99869d37d982384d18c79539b67df94f17557cbe  # v4_1
         with:
           token: ${{ secrets.GITHUB_TOKEN }}
           cancelMode: self