ci: fix patch download when using curl
PATCH 1/1 ci: fix patch download when using curl
From: Andrea Cervesato <[email protected]>
curl started to fail on CI after bots have been introduced to verify that a human is interacting with patchwork. This creates an issue when we need to download patches, since at the very first redirection we will miss the server hosting our patches. By using --location-trusted, we trust the bots redirection and we make sure that it's possible to download the patch which is going to be applied via git am.
--- .github/workflows/ci-docker-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
.github/workflows/ci-docker-build.yml +1 -1
@@ -155,7 +155,7 @@ jobs: git config --global --add safe.directory "$GITHUB_WORKSPACE" git checkout -b review_patch_series_"${{ inputs.SERIES_ID }}" - curl -k "${{ inputs.SERIES_MBOX }}" | git am + curl -k -L --max-redirs 1 --location-trusted "${{ inputs.SERIES_MBOX }}" | git am ./ci/tools/patchwork.sh state "${{ inputs.SERIES_ID }}" "needs-review-ack"
---
base-commit: d0e0426529619868195ff1dc8decd88c8259090c
change-id: 20251215-fix_ci-6d1edd26198d
Best regards,
Signature · 5 lines
Andrea Cervesato <[email protected]> -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Andrea,
Quoted 17 lines
curl started to fail on CI after bots have been introduced to verify that a human is interacting with patchwork. This creates an issue when we need to download patches, since at the very first redirection we will miss the server hosting our patches. By using
--location-trusted, we trust the bots redirection and we make sure that it's possible to download the patch which is going to be applied viagit am.Signed-off-by Andrea Cervesato <[email protected]>--- .github/workflows/ci-docker-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-).github/workflows/ci-docker-build.yml +0
-0
.github/workflows/ci-docker-build.yml jobs: · line 158
Quoted 5 lines
.github/workflows/ci-docker-build.yml +1
-1@@ -155,7 +155,7 @@ jobs: git config --global --add safe.directory "$GITHUB_WORKSPACE" git checkout -b review_patch_series_"${{ inputs.SERIES_ID }}" - curl -k "${{ inputs.SERIES_MBOX }}" | git am + curl -k -L --max-redirs 1 --location-trusted "${{ inputs.SERIES_MBOX }}" | git am
Hopefully --max-redirs 1 is enough.
Thanks for looking into this!
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 22 lines · Petr Vorel
Hi Andrea,
Quoted 18 lines
curl started to fail on CI after bots have been introduced to verify that a human is interacting with patchwork. This creates an issue when we need to download patches, since at the very first redirection we will miss the server hosting our patches. By using
--location-trusted, we trust the bots redirection and we make sure that it's possible to download the patch which is going to be applied viagit am.Signed-off-by Andrea Cervesato <[email protected]>--- .github/workflows/ci-docker-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-).github/workflows/ci-docker-build.yml +0
-0@@ -155,7 +155,7 @@ jobs: git config --global --add safe.directory "$GITHUB_WORKSPACE"
Quoted 6 lines
.github/workflows/ci-docker-build.yml jobs: · line 158
Quoted 3 lines
.github/workflows/ci-docker-build.yml +1
-1git checkout -b review_patch_series_"${{ inputs.SERIES_ID }}" - curl -k "${{ inputs.SERIES_MBOX }}" | git am + curl -k -L --max-redirs 1 --location-trusted "${{ inputs.SERIES_MBOX }}" | git amHopefully --max-redirs 1 is enough.
Thanks for looking into this!
I suggest adding --retry to the CURL call. --retry 3. At least then when curl fails, it won't fail on the first?
Ben
Quoted 8 lines
Acked-by Petr Vorel <[email protected]>Kind regards,
Petr--
Mailing list info: https://lists.linux.it/listinfo/ltp
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 6 lines
I suggest adding --retry to the CURL call. --retry 3. At least then when curl fails, it won't fail on the first?
Ben
+1
I will send a v2
Signature · 7 lines
Andrea Cervesato SUSE QE Automation Engineer Linux [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp
...
Quoted 8 lines
Quoted 5 lines
.github/workflows/ci-docker-build.yml jobs: · line 158
Quoted 2 lines
.github/workflows/ci-docker-build.yml +1
-1- curl -k "${{ inputs.SERIES_MBOX }}" | git am + curl -k -L --max-redirs 1 --location-trusted "${{ inputs.SERIES_MBOX }}" | git amHopefully --max-redirs 1 is enough.
Thanks for looking into this!I suggest adding --retry to the CURL call. --retry 3. At least then when curl fails, it won't fail on the first?
+1, sounds reasonable.
Kind regards,
Petr
Quoted 1 line
Ben
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp