Repository navigation
Open
Labels
bugSomething isn't working
Description
What happened?
I'm using this action (actually called by this one) to process the outputs of a matrix and starting today it fails with these logs (partial)
Artifact download completed successfully.
##[debug]Failed to download artifact after 1 retries due to Not a valid zip file. Retrying in 5 seconds...
Artifact download completed successfully.
##[debug]Failed to download artifact after 2 retries due to Not a valid zip file. Retrying in 5 seconds...
##[debug]Failed to download artifact after 2 retries due to Not a valid zip file. Retrying in 5 seconds...
##[debug]Failed to download artifact after 3 retries due to Not a valid zip file. Retrying in 5 seconds...
##[debug]Failed to download artifact after 3 retries due to Not a valid zip file. Retrying in 5 seconds...
##[debug]Failed to download artifact after 4 retries due to Not a valid zip file. Retrying in 5 seconds...
##[debug]Failed to download artifact after 4 retries due to Not a valid zip file. Retrying in 5 seconds...
##[debug]Failed to download artifact after 5 retries due to Not a valid zip file. Retrying in 5 seconds...
##[debug]Failed to download artifact after 5 retries due to Not a valid zip file. Retrying in 5 seconds...
Error: Unable to download artifact(s): Unable to download and extract artifact: Artifact download failed after 5 retries.
##[debug]response.message: Artifact download failed: Blob storage chunk did not respond in 30000ms
##[debug]response.message: Artifact download failed: Blob storage chunk did not respond in 30000ms
##[debug]response.message: Artifact download failed: Blob storage chunk did not respond in 30000ms
##[debug]response.message: Artifact download failed: Blob storage chunk did not respond in 30000ms
##[debug]response.message: Artifact download failed: Blob storage chunk did not respond in 30000ms
##[debug]response.message: Artifact download failed: Blob storage chunk did not respond in 30000ms
##[debug]response.message: Artifact download failed: Blob storage chunk did not respond in 30000ms
##[debug]response.message: Artifact download failed: Blob storage chunk did not respond in 30000ms
##[debug]response.message: Artifact download failed: Blob storage chunk did not respond in 30000ms
##[debug]response.message: Artifact download failed: Blob storage chunk did not respond in 30000ms
It needs to download 4 to 6 small artifacts (less than 1KB). I used the same configuration in other workflows (matrix-write + matrix-read) and I never encountered this.
What did you expect to happen?
That all artifacts are downloaded with no issues
How can we reproduce it?
Here's an extract of the workflow that is causing the issue:
# Main pipeline run when any commit is pushed in default branch
name: Main Pipeline
on:
push:
jobs:
build:
name: Build docker images
uses: ./.github/workflows/build.yml
secrets: inherit
strategy:
fail-fast: false
matrix:
include:
- ecr_repository: alert
- ecr_repository: operations
- ecr_repository: warehouse
with:
ecr_repository: ${{ matrix.ecr_repository }}
# Last job of reusable workflow is, not called in this one.
write-matrix-item:
name: Write matrix item
runs-on: ubuntu-latest
needs: configuration
steps:
- name: Write Matrix
uses: cloudposse/github-action-matrix-outputs-write@v1
id: out
with:
matrix-step-name: docker-images
matrix-key: ${{ needs.configuration.outputs.name }}
outputs: |-
content: ${{ toJSON(needs.configuration.outputs.components) }}
config:
name: Read matrix output
needs: build
runs-on: ubuntu-latest
steps:
# I added this to debug and it fails as well
- uses: actions/download-artifact@v4
- name: Display structure of downloaded files
run: ls -R
- uses: cloudposse/github-action-matrix-outputs-read@v1
name: Read matrix
id: read
with:
matrix-step-name: docker-imagesAnything else we need to know?
If I download the artifacts using the GitHub UI they all works so I don't know what is happening.
I saw this thread https://github.com/orgs/community/discussions/81413 where a similar issue has already addressed but it's happening to me right now.
What version of the action are you using?
actions/download-artifact@v4
What are your runner environments?
linux
Are you on GitHub Enterprise Server? If so, what version?
No response
Reacted by Cal Stephens, David Sanftenberg, Jean Poudroux, Loki-Afro, Roman Valls Guimera, Eligio Mariño and Floris van Onna
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Activity
crazy-max commentedon Jan 7, 2025
What this reusable workflow looks like? I guess it uses either
docker/build-push-actionordocker/bake-action? If that's the case then this is probably related to #328 (comment)And we got similar reports:
With our actions we are using the upload artifact API to upload the build export artifact and we are not using zip format but gzip one:
And the API always expect a zip artifact when downloading: https://github.com/actions/toolkit/blob/361a115e538ac6d8eb06cc47f3fcecce557d04c8/packages/artifact/src/internal/download/download-artifact.ts#L92
I opened a PR in the toolkit to skip files that don't have the expected content-type before extracting them:
But seems to stale 😞
Here are the debug logs of "Download artifacts" step with toolkit's changes:
We have two files download by "Download artifacts". After adding some logging on response headers we can see that the regular artifact uploaded with
actions/upload-artifact@v4haszipascontent-typeheader but one uploaded bydocker/build-push-actionhasapplication/gzip:{ "content-length": "5572", "content-type": "application/gzip", "content-md5": "yPIHPOPuYDEHs/vabwyt6A==", "last-modified": "Mon, 01 Jul 2024 09:22:34 GMT", "accept-ranges": "bytes", "etag": "\"0x8DC99AF5777FC1C\"", "server": "Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0", "x-ms-request-id": "b45769a4-301e-00cf-5498-cb2dab000000", "x-ms-version": "2023-11-03", "x-ms-creation-time": "Mon, 01 Jul 2024 09:22:34 GMT", "x-ms-lease-status": "unlocked", "x-ms-lease-state": "available", "x-ms-blob-type": "BlockBlob", "content-disposition": "attachment; filename=\"docker~test-docker-action~44M6YV.dockerbuild\"", "x-ms-server-encrypted": "true", "access-control-expose-headers": "x-ms-request-id,Server,x-ms-version,Content-Type,Last-Modified,ETag,x-ms-creation-time,Content-MD5,x-ms-lease-status,x-ms-lease-state,x-ms-blob-type,Content-Disposition,x-ms-server-encrypted,Accept-Ranges,Content-Length,Date,Transfer-Encoding", "access-control-allow-origin": "*", "date": "Mon, 01 Jul 2024 09:22:47 GMT" }I think this change in the toolkit should mitigate this issue by making sure we try to extract a valid zip file. cc @joshmgross @bethanyj28 @robherley @konradpabjan
Memohalliwell commentedon Jan 8, 2025
Thanks
github action: fix downloading of artifacts
RobbieMcKinstry commentedon Mar 1, 2025
I'm experiencing this same error but I'm not working with Docker images. My artifact is a simple JSON file.
brainstorm commentedon Mar 7, 2025
Same issue, my artifacts are just small binary blobs: https://github.com/umccr/gatk-bwamem-jni/actions/runs/13716508594/job/38362482726
fix: possibly fi nightly ci failure
fix: possibly fi nightly ci failure
fix: possibly fi nightly ci failure