{"thread":{"id":"55063","subject":"[PATCH] ci: do not cancel all jobs of a matrix if one fails","startedAt":"2021-01-28T04:08:50Z","lastAt":"2021-01-28T16:16:21Z","messageCount":3,"participants":["Philippe Blain via GitGitGadget","Jeff King","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"415476","messageId":"pull.851.git.1611806768911.gitgitgadget@gmail.com","threadId":"55063","inReplyTo":null,"subject":"[PATCH] ci: do not cancel all jobs of a matrix if one fails","fromName":"Philippe Blain via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2021-01-28T04:06:08Z","receivedAt":"2021-01-28T04:08:50Z","isPatch":true,"sender":{"key":"levraiphilippeblain@gmail.com","avatar":"https://avatars.githubusercontent.com/u/44212482?v=4"},"body":"From: Philippe Blain <levraiphilippeblain@gmail.com>\n\nThe CI/PR GitHub Actions workflow uses the 'matrix' strategy for the\n\"windows-test\", \"vs-test\", \"regular\" and \"dockerized\" jobs. The default\nbehaviour of GitHub Actions is to cancel all in-progress jobs in a\nmatrix if one of the job of the matrix fails [1].\n\nThis is not ideal as a failure early in a job, like during installation of\nthe build/test dependencies on a specific platform, leads to the\ncancellation of all other jobs in the matrix.\n\nSet the 'fail-fast' variable to 'false' for all four matrix jobs in the\nworkflow.\n\n[1] https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast\n\nSigned-off-by: Philippe Blain <levraiphilippeblain@gmail.com>\n---\n    ci: do not cancel all jobs of a matrix if one fails\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-851%2Fphil-blain%2Fgh-actions-dont-fail-fast-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-851/phil-blain/gh-actions-dont-fail-fast-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/851\n\n .github/workflows/main.yml | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex aef66436484..f6885e88ee6 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -123,6 +123,7 @@ jobs:\n     runs-on: windows-latest\n     needs: [windows-build]\n     strategy:\n+      fail-fast: false\n       matrix:\n         nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n     steps:\n@@ -227,6 +228,7 @@ jobs:\n     runs-on: windows-latest\n     needs: [vs-build, windows-build]\n     strategy:\n+      fail-fast: false\n       matrix:\n         nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n     steps:\n@@ -272,6 +274,7 @@ jobs:\n     needs: ci-config\n     if: needs.ci-config.outputs.enabled == 'yes'\n     strategy:\n+      fail-fast: false\n       matrix:\n         vector:\n           - jobname: linux-clang\n@@ -309,6 +312,7 @@ jobs:\n     needs: ci-config\n     if: needs.ci-config.outputs.enabled == 'yes'\n     strategy:\n+      fail-fast: false\n       matrix:\n         vector:\n         - jobname: linux-musl\n\nbase-commit: e6362826a0409539642a5738db61827e5978e2e4\n-- \ngitgitgadget\n"},{"id":"415497","messageId":"YBJbJOLyh+ksolVB@coredump.intra.peff.net","threadId":"55063","inReplyTo":"pull.851.git.1611806768911.gitgitgadget@gmail.com","subject":"Re: [PATCH] ci: do not cancel all jobs of a matrix if one fails","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2021-01-28T06:35:16Z","receivedAt":"2021-01-28T06:36:00Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Jan 28, 2021 at 04:06:08AM +0000, Philippe Blain via GitGitGadget wrote:\n\n> From: Philippe Blain <levraiphilippeblain@gmail.com>\n> \n> The CI/PR GitHub Actions workflow uses the 'matrix' strategy for the\n> \"windows-test\", \"vs-test\", \"regular\" and \"dockerized\" jobs. The default\n> behaviour of GitHub Actions is to cancel all in-progress jobs in a\n> matrix if one of the job of the matrix fails [1].\n> \n> This is not ideal as a failure early in a job, like during installation of\n> the build/test dependencies on a specific platform, leads to the\n> cancellation of all other jobs in the matrix.\n> \n> Set the 'fail-fast' variable to 'false' for all four matrix jobs in the\n> workflow.\n\nI think this is worth doing. Thanks for rolling it up into a patch.\n\n-Peff\n"},{"id":"415508","messageId":"nycvar.QRO.7.76.6.2101281712460.54@tvgsbejvaqbjf.bet","threadId":"55063","inReplyTo":"YBJbJOLyh+ksolVB@coredump.intra.peff.net","subject":"Re: [PATCH] ci: do not cancel all jobs of a matrix if one fails","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2021-01-28T16:13:04Z","receivedAt":"2021-01-28T16:16:21Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 28 Jan 2021, Jeff King wrote:\n\n> On Thu, Jan 28, 2021 at 04:06:08AM +0000, Philippe Blain via GitGitGadget wrote:\n>\n> > From: Philippe Blain <levraiphilippeblain@gmail.com>\n> >\n> > The CI/PR GitHub Actions workflow uses the 'matrix' strategy for the\n> > \"windows-test\", \"vs-test\", \"regular\" and \"dockerized\" jobs. The default\n> > behaviour of GitHub Actions is to cancel all in-progress jobs in a\n> > matrix if one of the job of the matrix fails [1].\n> >\n> > This is not ideal as a failure early in a job, like during installation of\n> > the build/test dependencies on a specific platform, leads to the\n> > cancellation of all other jobs in the matrix.\n> >\n> > Set the 'fail-fast' variable to 'false' for all four matrix jobs in the\n> > workflow.\n>\n> I think this is worth doing.\n\nMe, too. ACK!\n\nThanks,\nDscho\n"}]}