Skip to content

Commit 983c690

Browse files
ci(e2e): fail the asset download instead of writing the error into the image
`curl -sSL ... -o _out/assets/nocloud-amd64.raw.xz` exits 0 on an HTTP error and writes the response body into the file, so an expired token or a 404 lands as a "disk image" and surfaces minutes later as a decompression error that names nothing useful. Add --fail. The behaviour is unchanged from the code this composite was extracted from, but it now serves both the e2e and the upgrade lane, and the release PR path — the one that downloads a draft-release asset with a token that can expire — is the path the upgrade lane exists for. Assisted-By: Claude <[email protected]> Signed-off-by: Myasnikov Daniil <[email protected]>
1 parent 44feb45 commit 983c690

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎.github/actions/e2e-download-assets/action.yaml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ runs:
4747
DISK_ID: ${{ inputs.disk-id }}
4848
run: |
4949
mkdir -p _out/assets
50-
curl -sSL -H "Authorization: token ${APP_TOKEN}" -H "Accept: application/octet-stream" \
50+
# --fail: without it an auth failure or a 404 is written INTO the disk
51+
# image and curl still exits 0, so the run continues and surfaces much
52+
# later as an unrelated-looking decompression error. This composite
53+
# serves both the e2e and the upgrade lane, and the release PR path is
54+
# the one the upgrade lane exists for.
55+
curl --fail -sSL -H "Authorization: token ${APP_TOKEN}" -H "Accept: application/octet-stream" \
5156
-o _out/assets/nocloud-amd64.raw.xz \
5257
"https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/assets/${DISK_ID}"

0 commit comments

Comments
 (0)