Skip to content

[bug] Artifact download fails with Unable to download artifact(s): Unable to download and extract artifact: Artifact download failed after 5 retries. #367

@fabn

Description

@fabn

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

Anything 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions