Skip to contentSkip to conversation

ci: fix patch download when using curl

PATCH Superseded Andrea Cervesato 4 participants 5 messages Dec 15, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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
index 09eb8bb6d446b3e7100f43844942a5dd3976badb..408eb9a69f5cbebf725751633db46169be288bb8 100644
@@ -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
Acked-by on v1 1/1
#1 lore raw

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 via git am.

---
 .github/workflows/ci-docker-build.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.github/workflows/ci-docker-build.yml +0 -0
index 09eb8bb6d446b3e7100f43844942a5dd3976badb..408eb9a69f5cbebf725751633db46169be288bb8 100644

.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
#2 lore raw
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 via git am.

---
 .github/workflows/ci-docker-build.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.github/workflows/ci-docker-build.yml +0 -0
index 09eb8bb6d446b3e7100f43844942a5dd3976badb..408eb9a69f5cbebf725751633db46169be288bb8 100644
@@ -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 -1
         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!

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

Kind regards,
Petr

--
Mailing list info: https://lists.linux.it/listinfo/ltp

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#3 lore raw
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
#4 lore raw
In reply to Ben Copeland

...

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 am

Hopefully --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