Skip to contentSkip to conversation

ci: do not cancel all jobs of a matrix if one fails

PATCH In review Philippe Blain via GitGitGadget 3 participants 3 messages Jan 28, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ci: do not cancel all jobs of a matrix if one fails

From: Philippe Blain <[email protected]>

The CI/PR GitHub Actions workflow uses the 'matrix' strategy for the "windows-test", "vs-test", "regular" and "dockerized" jobs. The default behaviour of GitHub Actions is to cancel all in-progress jobs in a matrix if one of the job of the matrix fails [1].

This is not ideal as a failure early in a job, like during installation of the build/test dependencies on a specific platform, leads to the cancellation of all other jobs in the matrix.

Set the 'fail-fast' variable to 'false' for all four matrix jobs in the workflow.

[1] https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast

---
ci: do not cancel all jobs of a matrix if one fails

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-851%2Fphil-blain%2Fgh-actions-dont-fail-fast-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-851/phil-blain/gh-actions-dont-fail-fast-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/851

 .github/workflows/main.yml | 4 ++++
 1 file changed, 4 insertions(+)
.github/workflows/main.yml +4 -0
index aef66436484..f6885e88ee6 100644
@@ -123,6 +123,7 @@ jobs:
     runs-on: windows-latest
     needs: [windows-build]
     strategy:
+      fail-fast: false
       matrix:
         nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
     steps:
@@ -227,6 +228,7 @@ jobs:
     runs-on: windows-latest
     needs: [vs-build, windows-build]
     strategy:
+      fail-fast: false
       matrix:
         nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
     steps:
@@ -272,6 +274,7 @@ jobs:
     needs: ci-config
     if: needs.ci-config.outputs.enabled == 'yes'
     strategy:
+      fail-fast: false
       matrix:
         vector:
           - jobname: linux-clang
@@ -309,6 +312,7 @@ jobs:
     needs: ci-config
     if: needs.ci-config.outputs.enabled == 'yes'
     strategy:
+      fail-fast: false
       matrix:
         vector:
         - jobname: linux-musl

base-commit: e6362826a0409539642a5738db61827e5978e2e4

Signature · 1 line
gitgitgadget
#1 lore raw
Quoted 7 lines · Philippe Blain via GitGitGadget

From: Philippe Blain <[email protected]>

The CI/PR GitHub Actions workflow uses the 'matrix' strategy for the "windows-test", "vs-test", "regular" and "dockerized" jobs. The default behaviour of GitHub Actions is to cancel all in-progress jobs in a matrix if one of the job of the matrix fails [1].

Quoted 6 lines

This is not ideal as a failure early in a job, like during installation of the build/test dependencies on a specific platform, leads to the cancellation of all other jobs in the matrix.

Set the 'fail-fast' variable to 'false' for all four matrix jobs in the workflow.

I think this is worth doing. Thanks for rolling it up into a patch.

-Peff

#2 lore raw

Hi,

Quoted 9 lines · Jeff King
Quoted 7 lines · Philippe Blain via GitGitGadget

From: Philippe Blain <[email protected]>

The CI/PR GitHub Actions workflow uses the 'matrix' strategy for the "windows-test", "vs-test", "regular" and "dockerized" jobs. The default behaviour of GitHub Actions is to cancel all in-progress jobs in a matrix if one of the job of the matrix fails [1].

Quoted 8 lines
Quoted 6 lines

This is not ideal as a failure early in a job, like during installation of the build/test dependencies on a specific platform, leads to the cancellation of all other jobs in the matrix.

Set the 'fail-fast' variable to 'false' for all four matrix jobs in the workflow.

I think this is worth doing.

Me, too. ACK!

Thanks,
Dscho