ci: apply Patchwork series via REST API
PATCH 1/1 ci: apply Patchwork series via REST API
From: Andrea Cervesato <[email protected]>
Patchwork on kernel.org requires authentication to download mbox files from the web interface, causing anonymous curl downloads in CI to fail with HTTP 302 redirects to the login page.
Add an 'apply' command to ci/tools/patchwork.sh that retrieves patches via the public REST API and applies them using git am. Update workflows to use this command instead of curling the mbox URL directly.
---
Patchwork instances on kernel.org require authentication to download mbox files from the web interface, returning HTTP 302 redirects to the login page for anonymous requests. This breaks the CI workflows when trying to download and apply patch series using the web mbox URL.
This series adds an 'apply' subcommand to ci/tools/patchwork.sh that retrieves the individual patches using the public REST API and applies them via git am, and updates the CI workflows to use this command.
--- .github/workflows/ci-docker-build.yml | 6 +-- .github/workflows/ci-sphinx-doc.yml | 6 +-- ci/tools/patchwork.sh | 69 ++++++++++++++++++++++++++++++++++- 3 files changed, 74 insertions(+), 7 deletions(-)
.github/workflows/ci-docker-build.yml +3 -3
@@ -146,7 +146,7 @@ jobs: run: $CC --version - name: Apply Patchwork series - if: inputs.SERIES_ID != '' && inputs.SERIES_MBOX != '' + if: inputs.SERIES_ID != '' env: PATCHWORK_TOKEN: ${{ secrets.PATCHWORK_TOKEN }} run: |
@@ -155,7 +155,7 @@ jobs: git config --global --add safe.directory "$GITHUB_WORKSPACE" git checkout -b review_patch_series_"${{ inputs.SERIES_ID }}" - curl -k -L --retry 3 --max-redirs 1 --location-trusted "${{ inputs.SERIES_MBOX }}" | git am + ./ci/tools/patchwork.sh apply "${{ inputs.SERIES_ID }}" ./ci/tools/patchwork.sh state "${{ inputs.SERIES_ID }}" "needs-ack"
@@ -199,7 +199,7 @@ jobs: ./build.sh -r install -o ${TREE:-in} $INSTALL_OPT - name: Send results to Patchwork - if: always() && inputs.SERIES_ID != '' && inputs.SERIES_MBOX != '' + if: always() && inputs.SERIES_ID != '' env: PATCHWORK_TOKEN: ${{ secrets.PATCHWORK_TOKEN }} run: |
.github/workflows/ci-sphinx-doc.yml +3 -3
@@ -35,7 +35,7 @@ jobs: sudo apt install autoconf make python3-virtualenv - name: Apply Patchwork series - if: inputs.SERIES_ID != '' && inputs.SERIES_MBOX != '' + if: inputs.SERIES_ID != '' env: PATCHWORK_TOKEN: ${{ secrets.PATCHWORK_TOKEN }} run: |
@@ -44,7 +44,7 @@ jobs: git config --global --add safe.directory "$GITHUB_WORKSPACE" git checkout -b review_patch_series_"${{ inputs.SERIES_ID }}" - curl -k -L --retry 3 --max-redirs 1 --location-trusted "${{ inputs.SERIES_MBOX }}" | git am + ./ci/tools/patchwork.sh apply "${{ inputs.SERIES_ID }}" ./ci/tools/patchwork.sh state "${{ inputs.SERIES_ID }}" "needs-ack"
@@ -53,7 +53,7 @@ jobs: make autotools && ./configure - name: Send results to Patchwork - if: always() && inputs.SERIES_ID != '' && inputs.SERIES_MBOX != '' + if: always() && inputs.SERIES_ID != '' env: PATCHWORK_TOKEN: ${{ secrets.PATCHWORK_TOKEN }} run: |
ci/tools/patchwork.sh +68 -1
82 lines not on this page · raw message
---
base-commit: 463b33ad464b6840d0a1df5d41939e50d55d542c
change-id: 20260907-ci_patchwork_apply-90de69203f86
Best regards,
Signature · 5 lines
Andrea Cervesato <[email protected]> -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Quoted 3 lines
Patchwork on kernel.org requires authentication to download mbox files from the web interface, causing anonymous curl downloads in CI to fail with HTTP 302 redirects to the login page.
I supppose that this is fallout from crawlers.
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Andrea,
Quoted 1 line · Andrea Cervesato
[PATCH] ci: apply Patchwork series via REST API
Verdict - Reviewed
---
Note:
The agent can sometimes produce false positives although often its findings are genuine. If you find issues with the review, please comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Andrea Cervesato via ltp
AppliedMerged, Thanks!
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
[email protected]
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp