{"thread":{"id":"58910","subject":"[PATCH] CI: migrate away from deprecated \"set-output\" syntax","startedAt":"2022-12-06T20:00:09Z","lastAt":"2022-12-08T05:41:57Z","messageCount":9,"participants":["Ævar Arnfjörð Bjarmason","Victoria Dye","Taylor Blau","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"468638","messageId":"patch-1.1-deb65805345-20221206T195811Z-avarab@gmail.com","threadId":"58910","inReplyTo":null,"subject":"[PATCH] CI: migrate away from deprecated \"set-output\" syntax","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-12-06T20:00:00Z","receivedAt":"2022-12-06T20:00:09Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"As noted in [1] and the warnings the CI itself is spewing echoing\noutputs to stdout is deprecated, and they should be written to\n\"$GITHUB_OUTPUT\" instead.\n\n1. https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n\nAlong with my just-sent\nhttps://lore.kernel.org/git/patch-1.1-4c1dcc89e7a-20221206T195552Z-avarab@gmail.com/\nand Junio's https://lore.kernel.org/git/xmqq1qpd9bys.fsf@gitster.g/\nthis should make our CI warning free.\n\n .github/workflows/main.yml | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 9afacfa0b33..d1e16009b11 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -34,7 +34,7 @@ jobs:\n           then\n             enabled=no\n           fi\n-          echo \"::set-output name=enabled::$enabled\"\n+          echo \"enabled=$enabled\" >>$GITHUB_OUTPUT\n       - name: skip if the commit or tree was already tested\n         id: skip-if-redundant\n         uses: actions/github-script@v6\n-- \n2.39.0.rc2.1017.g5f0c708352f\n\n"},{"id":"468639","messageId":"3859f3a7-ade8-4778-be15-b393694435e3@github.com","threadId":"58910","inReplyTo":"patch-1.1-deb65805345-20221206T195811Z-avarab@gmail.com","subject":"Re: [PATCH] CI: migrate away from deprecated \"set-output\" syntax","fromName":"Victoria Dye","fromEmail":"vdye@github.com","sentAt":"2022-12-06T20:50:32Z","receivedAt":"2022-12-06T20:50:59Z","isPatch":true,"sender":{"key":"vdye@github.com","avatar":"https://avatars.githubusercontent.com/u/3619353?v=4"},"body":"Ævar Arnfjörð Bjarmason wrote:\n> As noted in [1] and the warnings the CI itself is spewing echoing\n> outputs to stdout is deprecated, and they should be written to\n> \"$GITHUB_OUTPUT\" instead.\n> \n> 1. https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/\n\nInteresting, I didn't realize this changed! The new syntax is certainly much\nnicer to read.\n\n> \n> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n> ---\n> \n> Along with my just-sent\n> https://lore.kernel.org/git/patch-1.1-4c1dcc89e7a-20221206T195552Z-avarab@gmail.com/\n> and Junio's https://lore.kernel.org/git/xmqq1qpd9bys.fsf@gitster.g/\n> this should make our CI warning free.\n> \n>  .github/workflows/main.yml | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n\nShould this also be updated for 'l10n.yml'? There are two usages of\n'::set-output' there as well.\n\n> \n> diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\n> index 9afacfa0b33..d1e16009b11 100644\n> --- a/.github/workflows/main.yml\n> +++ b/.github/workflows/main.yml\n> @@ -34,7 +34,7 @@ jobs:\n>            then\n>              enabled=no\n>            fi\n> -          echo \"::set-output name=enabled::$enabled\"\n> +          echo \"enabled=$enabled\" >>$GITHUB_OUTPUT\n\nLooks good!\n\n>        - name: skip if the commit or tree was already tested\n>          id: skip-if-redundant\n>          uses: actions/github-script@v6\n\n"},{"id":"468641","messageId":"221206.86fsdsb5os.gmgdl@evledraar.gmail.com","threadId":"58910","inReplyTo":"3859f3a7-ade8-4778-be15-b393694435e3@github.com","subject":"Re: [PATCH] CI: migrate away from deprecated \"set-output\" syntax","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-12-06T21:08:36Z","receivedAt":"2022-12-06T21:09:13Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Tue, Dec 06 2022, Victoria Dye wrote:\n\n> Ævar Arnfjörð Bjarmason wrote:\n> [...]\n>> \n>> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n>> ---\n>> \n>> Along with my just-sent\n>> https://lore.kernel.org/git/patch-1.1-4c1dcc89e7a-20221206T195552Z-avarab@gmail.com/\n>> and Junio's https://lore.kernel.org/git/xmqq1qpd9bys.fsf@gitster.g/\n>> this should make our CI warning free.\n>> \n>>  .github/workflows/main.yml | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> Should this also be updated for 'l10n.yml'? There are two usages of\n> '::set-output' there as well.\n\nYes, I just missed that one. I'll fix that, but will wait a bit to see\nif there's any other comments first. Thanks!\n"},{"id":"468660","messageId":"Y4/k2TW8Udz4LsaI@nand.local","threadId":"58910","inReplyTo":"221206.86fsdsb5os.gmgdl@evledraar.gmail.com","subject":"Re: [PATCH] CI: migrate away from deprecated \"set-output\" syntax","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2022-12-07T00:56:57Z","receivedAt":"2022-12-07T00:57:03Z","isPatch":true,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Tue, Dec 06, 2022 at 10:08:36PM +0100, Ævar Arnfjörð Bjarmason wrote:\n> > Should this also be updated for 'l10n.yml'? There are two usages of\n> > '::set-output' there as well.\n>\n> Yes, I just missed that one. I'll fix that, but will wait a bit to see\n> if there's any other comments first. Thanks!\n\nNo concerns from me. I noticed this warning when I was looking at all of\nthe CI builds a few weeks ago.\n\nThis transition looks obviously correct to me, and as long as we apply\nit in the l10n workflow as Victoria mentions, this should be good to go.\n\nThanks,\nTaylor\n"},{"id":"468671","messageId":"patch-v2-1.1-4e7db0db3be-20221207T014848Z-avarab@gmail.com","threadId":"58910","inReplyTo":"patch-1.1-deb65805345-20221206T195811Z-avarab@gmail.com","subject":"[PATCH v2] CI: migrate away from deprecated \"set-output\" syntax","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-12-07T01:49:18Z","receivedAt":"2022-12-07T01:49:33Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"As noted in [1] and the warnings the CI itself is spewing echoing\noutputs to stdout is deprecated, and they should be written to\n\"$GITHUB_OUTPUT\" instead.\n\n1. https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\nRange-diff against v1:\n1:  deb65805345 ! 1:  4e7db0db3be CI: migrate away from deprecated \"set-output\" syntax\n    @@ Commit message\n     \n         Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n     \n    + ## .github/workflows/l10n.yml ##\n    +@@ .github/workflows/l10n.yml: jobs:\n    +             base=${{ github.event.before }}\n    +             head=${{ github.event.after }}\n    +           fi\n    +-          echo \"::set-output name=base::$base\"\n    +-          echo \"::set-output name=head::$head\"\n    ++          cat >>$GITHUB_OUTPUT <<-EOF\n    ++          base=$base\n    ++          head=$head\n    ++          EOF\n    +       - name: Run partial clone\n    +         run: |\n    +           git -c init.defaultBranch=master init --bare .\n    +\n      ## .github/workflows/main.yml ##\n     @@ .github/workflows/main.yml: jobs:\n                then\n\n .github/workflows/l10n.yml | 6 ++++--\n .github/workflows/main.yml | 2 +-\n 2 files changed, 5 insertions(+), 3 deletions(-)\n\ndiff --git a/.github/workflows/l10n.yml b/.github/workflows/l10n.yml\nindex 27f72f0ff34..8fa073db2dc 100644\n--- a/.github/workflows/l10n.yml\n+++ b/.github/workflows/l10n.yml\n@@ -23,8 +23,10 @@ jobs:\n             base=${{ github.event.before }}\n             head=${{ github.event.after }}\n           fi\n-          echo \"::set-output name=base::$base\"\n-          echo \"::set-output name=head::$head\"\n+          cat >>$GITHUB_OUTPUT <<-EOF\n+          base=$base\n+          head=$head\n+          EOF\n       - name: Run partial clone\n         run: |\n           git -c init.defaultBranch=master init --bare .\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 9afacfa0b33..d1e16009b11 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -34,7 +34,7 @@ jobs:\n           then\n             enabled=no\n           fi\n-          echo \"::set-output name=enabled::$enabled\"\n+          echo \"enabled=$enabled\" >>$GITHUB_OUTPUT\n       - name: skip if the commit or tree was already tested\n         id: skip-if-redundant\n         uses: actions/github-script@v6\n-- \n2.39.0.rc2.1019.gce04d262ea9\n\n"},{"id":"468754","messageId":"xmqq359q6a30.fsf@gitster.g","threadId":"58910","inReplyTo":"patch-v2-1.1-4e7db0db3be-20221207T014848Z-avarab@gmail.com","subject":"Re: [PATCH v2] CI: migrate away from deprecated \"set-output\" syntax","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-12-07T23:57:39Z","receivedAt":"2022-12-07T23:57:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:\n\n>     +-          echo \"::set-output name=base::$base\"\n>     +-          echo \"::set-output name=head::$head\"\n>     ++          cat >>$GITHUB_OUTPUT <<-EOF\n>     ++          base=$base\n>     ++          head=$head\n>     ++          EOF\n\nHmph, I do not trust this part.\n\nThe redirection operator \"<<-\" causes the leading tabs in the\nhere-doc-text stripped, but the .yml file does not indent with tab\nto begin with.\n\nI suspect the leading spaces will all be stripped and not seen by\nthe shell, so the distinction may not matter, which means the use of\n\"<<-\" is very much misleading.\n\nLet's stick to the dumb and proven\n\n\techo \"base=$base\" >>$GITHUB_OUTPUT\n\techo \"head=$head\" >>$GITHUB_OUTPUT\n\ninstead, which is used throughout the rewrite in this patch.\n\n"},{"id":"468760","messageId":"221208.861qpa91ti.gmgdl@evledraar.gmail.com","threadId":"58910","inReplyTo":"xmqq359q6a30.fsf@gitster.g","subject":"Re: [PATCH v2] CI: migrate away from deprecated \"set-output\" syntax","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-12-08T00:27:28Z","receivedAt":"2022-12-08T00:28:11Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Thu, Dec 08 2022, Junio C Hamano wrote:\n\n> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:\n>\n>>     +-          echo \"::set-output name=base::$base\"\n>>     +-          echo \"::set-output name=head::$head\"\n>>     ++          cat >>$GITHUB_OUTPUT <<-EOF\n>>     ++          base=$base\n>>     ++          head=$head\n>>     ++          EOF\n>\n> Hmph, I do not trust this part.\n>\n> The redirection operator \"<<-\" causes the leading tabs in the\n> here-doc-text stripped, but the .yml file does not indent with tab\n> to begin with.\n>\n> I suspect the leading spaces will all be stripped and not seen by\n> the shell, so the distinction may not matter, which means the use of\n> \"<<-\" is very much misleading.\n>\n> Let's stick to the dumb and proven\n>\n> \techo \"base=$base\" >>$GITHUB_OUTPUT\n> \techo \"head=$head\" >>$GITHUB_OUTPUT\n>\n> instead, which is used throughout the rewrite in this patch.\n\nSure, I'll re-roll with that.\n"},{"id":"468761","messageId":"patch-v3-1.1-0519cc1105a-20221208T003233Z-avarab@gmail.com","threadId":"58910","inReplyTo":"patch-v2-1.1-4e7db0db3be-20221207T014848Z-avarab@gmail.com","subject":"[PATCH v3] CI: migrate away from deprecated \"set-output\" syntax","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-12-08T00:33:06Z","receivedAt":"2022-12-08T00:33:23Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"As noted in [1] and the warnings the CI itself is spewing echoing\noutputs to stdout is deprecated, and they should be written to\n\"$GITHUB_OUTPUT\" instead.\n\n1. https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\nRange-diff against v2:\n1:  4e7db0db3be ! 1:  0519cc1105a CI: migrate away from deprecated \"set-output\" syntax\n    @@ .github/workflows/l10n.yml: jobs:\n                fi\n     -          echo \"::set-output name=base::$base\"\n     -          echo \"::set-output name=head::$head\"\n    -+          cat >>$GITHUB_OUTPUT <<-EOF\n    -+          base=$base\n    -+          head=$head\n    -+          EOF\n    ++          echo \"base=$base\" >>$GITHUB_OUTPUT\n    ++          echo \"head=$head\" >>$GITHUB_OUTPUT\n            - name: Run partial clone\n              run: |\n                git -c init.defaultBranch=master init --bare .\n\n .github/workflows/l10n.yml | 4 ++--\n .github/workflows/main.yml | 2 +-\n 2 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/.github/workflows/l10n.yml b/.github/workflows/l10n.yml\nindex 27f72f0ff34..2915c595b4f 100644\n--- a/.github/workflows/l10n.yml\n+++ b/.github/workflows/l10n.yml\n@@ -23,8 +23,8 @@ jobs:\n             base=${{ github.event.before }}\n             head=${{ github.event.after }}\n           fi\n-          echo \"::set-output name=base::$base\"\n-          echo \"::set-output name=head::$head\"\n+          echo \"base=$base\" >>$GITHUB_OUTPUT\n+          echo \"head=$head\" >>$GITHUB_OUTPUT\n       - name: Run partial clone\n         run: |\n           git -c init.defaultBranch=master init --bare .\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 9afacfa0b33..d1e16009b11 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -34,7 +34,7 @@ jobs:\n           then\n             enabled=no\n           fi\n-          echo \"::set-output name=enabled::$enabled\"\n+          echo \"enabled=$enabled\" >>$GITHUB_OUTPUT\n       - name: skip if the commit or tree was already tested\n         id: skip-if-redundant\n         uses: actions/github-script@v6\n-- \n2.39.0.rc2.1019.gce04d262ea9\n\n"},{"id":"468764","messageId":"xmqqmt7y4fl5.fsf@gitster.g","threadId":"58910","inReplyTo":"221208.861qpa91ti.gmgdl@evledraar.gmail.com","subject":"Re: [PATCH v2] CI: migrate away from deprecated \"set-output\" syntax","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-12-08T05:41:42Z","receivedAt":"2022-12-08T05:41:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n>> Let's stick to the dumb and proven\n>>\n>> \techo \"base=$base\" >>$GITHUB_OUTPUT\n>> \techo \"head=$head\" >>$GITHUB_OUTPUT\n>>\n>> instead, which is used throughout the rewrite in this patch.\n>\n> Sure, I'll re-roll with that.\n\nAh, no need.  I've already amended the one under discussion and it\nis in 'next' together with the last bit from Johannes to use the\nupdated upload/download artifact Action.\n\nThanks.\n"}]}