{"thread":{"id":"54173","subject":"[PATCH 1/2] ci: fix indentation of the `ci-config` job","startedAt":"2020-09-01T20:19:37Z","lastAt":"2020-09-02T19:21:11Z","messageCount":6,"participants":["Johannes Schindelin via GitGitGadget","Jeff King","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"404878","messageId":"b5363e282f69570e34ffb806f7a62e00e39b98bc.1598991568.git.gitgitgadget@gmail.com","threadId":"54173","inReplyTo":"pull.719.git.1598991568.gitgitgadget@gmail.com","subject":"[PATCH 1/2] ci: fix indentation of the `ci-config` job","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-09-01T20:19:26Z","receivedAt":"2020-09-01T20:19:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThe section added in e76eec35540f (ci: allow per-branch config for\nGitHub Actions, 2020-05-07) contains a `&&`-chain that connects several\ncommands. The first command is actually so long that it stretches over\nmultiple lines, and as per usual, the continuation lines are indented one\nmore level than the first.\n\nHowever, the subsequent commands in the `&&`-chain were also indented\none more level than the first command, which was almost certainly\nunintended.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 30425404eb..6fd1d1a2c8 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -23,8 +23,8 @@ jobs:\n             --filter=blob:none \\\n             https://github.com/${{ github.repository }} \\\n             config-repo &&\n-            cd config-repo &&\n-            git checkout HEAD -- ci/config\n+          cd config-repo &&\n+          git checkout HEAD -- ci/config\n       - id: check-ref\n         name: check whether CI is enabled for ref\n         run: |\n-- \ngitgitgadget\n\n"},{"id":"404879","messageId":"b92374e69192d57bcb11fb2573beb4e9aee339a9.1598991568.git.gitgitgadget@gmail.com","threadId":"54173","inReplyTo":"pull.719.git.1598991568.gitgitgadget@gmail.com","subject":"[PATCH 2/2] ci: avoid ugly \"failure\" in the `ci-config` job","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-09-01T20:19:27Z","receivedAt":"2020-09-01T20:19:42Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn the common case where users have _not_ pushed a `ci-config` branch to\nconfigure which branches should be included in the GitHub workflow runs,\nthere is a big fat ugly annotation about a failure in the run's log:\n\n\tX Check failure on line 1 in .github\n\n\t  @github-actions github-actions / ci-config\n\n\t  .github#L1\n\n\t  Process completed with exit code 128.\n\nThe reason is that the `ci-config` job tries to clone that `ci-config`\nbranch, and even if it is configured to continue on error, the\nannotation is displayed, and it is distracting.\n\nLet's just handle this on the shell script level, so that the job's step\nis not marked as a failure.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n .github/workflows/main.yml | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 6fd1d1a2c8..fcfd138ff1 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -12,7 +12,6 @@ jobs:\n       enabled: ${{ steps.check-ref.outputs.enabled }}\n     steps:\n       - name: try to clone ci-config branch\n-        continue-on-error: true\n         run: |\n           git -c protocol.version=2 clone \\\n             --no-tags \\\n@@ -24,7 +23,7 @@ jobs:\n             https://github.com/${{ github.repository }} \\\n             config-repo &&\n           cd config-repo &&\n-          git checkout HEAD -- ci/config\n+          git checkout HEAD -- ci/config || : ignore\n       - id: check-ref\n         name: check whether CI is enabled for ref\n         run: |\n-- \ngitgitgadget\n"},{"id":"404880","messageId":"pull.719.git.1598991568.gitgitgadget@gmail.com","threadId":"54173","inReplyTo":null,"subject":"[PATCH 0/2] ci: avoid ugly \"failure\" annotation in the GitHub workflow","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-09-01T20:19:25Z","receivedAt":"2020-09-01T20:19:42Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Whenever the GitHub workflow runs in a fork that does not contain the\nspecial-purpose ci-config branch, a big fat failure annotation greets the\ncasual reader. See e.g. \nhttps://github.com/gitgitgadget/git/actions/runs/233438295\n\nThis is caused by the (non-fatal) failure to clone said branch. Let's avoid\nthat. It's distracting.\n\nJohannes Schindelin (2):\n  ci: fix indentation of the `ci-config` job\n  ci: avoid ugly \"failure\" in the `ci-config` job\n\n .github/workflows/main.yml | 5 ++---\n 1 file changed, 2 insertions(+), 3 deletions(-)\n\n\nbase-commit: e19713638985533ce461db072b49112da5bd2042\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-719%2Fdscho%2Favoid-error-in-ci-config-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-719/dscho/avoid-error-in-ci-config-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/719\n-- \ngitgitgadget\n"},{"id":"404894","messageId":"20200902003340.GB3294015@coredump.intra.peff.net","threadId":"54173","inReplyTo":"b5363e282f69570e34ffb806f7a62e00e39b98bc.1598991568.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 1/2] ci: fix indentation of the `ci-config` job","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-09-02T00:33:40Z","receivedAt":"2020-09-02T00:33:42Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Sep 01, 2020 at 08:19:26PM +0000, Johannes Schindelin via GitGitGadget wrote:\n\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> \n> The section added in e76eec35540f (ci: allow per-branch config for\n> GitHub Actions, 2020-05-07) contains a `&&`-chain that connects several\n> commands. The first command is actually so long that it stretches over\n> multiple lines, and as per usual, the continuation lines are indented one\n> more level than the first.\n> \n> However, the subsequent commands in the `&&`-chain were also indented\n> one more level than the first command, which was almost certainly\n> unintended.\n\nYeah, I'm pretty sure this was unintentional in my original (and got\ncarried through the recent re-indentation).\n\n-Peff\n"},{"id":"404896","messageId":"20200902004030.GC3294015@coredump.intra.peff.net","threadId":"54173","inReplyTo":"b92374e69192d57bcb11fb2573beb4e9aee339a9.1598991568.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 2/2] ci: avoid ugly \"failure\" in the `ci-config` job","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-09-02T00:40:30Z","receivedAt":"2020-09-02T00:40:38Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Sep 01, 2020 at 08:19:27PM +0000, Johannes Schindelin via GitGitGadget wrote:\n\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> \n> In the common case where users have _not_ pushed a `ci-config` branch to\n> configure which branches should be included in the GitHub workflow runs,\n> there is a big fat ugly annotation about a failure in the run's log:\n> \n> \tX Check failure on line 1 in .github\n> \n> \t  @github-actions github-actions / ci-config\n> \n> \t  .github#L1\n> \n> \t  Process completed with exit code 128.\n> \n> The reason is that the `ci-config` job tries to clone that `ci-config`\n> branch, and even if it is configured to continue on error, the\n> annotation is displayed, and it is distracting.\n\nHmm. I thought we handled this with the \"continue-on-error\" flag.\nUnsurprisingly I have a ci-config branch in my repo, but git/git\ndoesn't, and here's a sample run there:\n\n  https://github.com/git/git/runs/1053619435?check_suite_focus=true\n\nBoth the \"ci-config\" task, as well as the individual \"try to clone\nci-config branch\" step are marked with a green check.\n\n...Oh, I think I see what you mean. In the \"Annotations\" summary we\nstill see an ugly \"X\" box.\n\n> Let's just handle this on the shell script level, so that the job's step\n> is not marked as a failure.\n\nOK, that makes sense. We could do differentiate clone failing versus cd\nversus checkout (or for that matter, clone failing because the branch\ndoesn't exist versus a network error). But it's probably not worth\ngetting too fancy.\n\nMy next question was going to be: should we also drop the\ncontinue-on-error flag? But I see you did that already.\n\nSo the patch looks good to me. Sorry for introducing CI noise in the\nfirst place. :)\n\n-Peff\n"},{"id":"404930","messageId":"xmqqk0xcaste.fsf@gitster.c.googlers.com","threadId":"54173","inReplyTo":"pull.719.git.1598991568.gitgitgadget@gmail.com","subject":"Re: [PATCH 0/2] ci: avoid ugly \"failure\" annotation in the GitHub workflow","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-09-02T19:21:01Z","receivedAt":"2020-09-02T19:21:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> Whenever the GitHub workflow runs in a fork that does not contain the\n> special-purpose ci-config branch, a big fat failure annotation greets the\n> casual reader. See e.g. \n> https://github.com/gitgitgadget/git/actions/runs/233438295\n>\n> This is caused by the (non-fatal) failure to clone said branch. Let's avoid\n> that. It's distracting.\n\nThanks.  Anything that reduces the CI noise is very much welcomed.\n\n"}]}