actions / download-artifact

MIT License
1.44k stars 495 forks source link

[bug] Artifact download sometimes randomly fails #343

Open Harshil2107 opened 4 months ago

Harshil2107 commented 4 months ago

What happened?

We use artifacts to run tests on our GitHub organization. Sometimes randomly the atrifact download would fail randowmly with the following error.

error: Unable to download artifact(s): Unable to download and extract artifact: Artifact download failed after 5 retries.
/__w/_actions/actions/download-artifact/v4/dist/index.js:2478
            throw new Error(`Unable to download and extract artifact: ${error.message}`);
                  ^

Error: Unable to download and extract artifact: Artifact download failed after 5 retries.
    at /__w/_actions/actions/download-artifact/v4/dist/index.js:2478:19
    at Generator.throw (<anonymous>)
    at rejected (/__w/_actions/actions/download-artifact/v4/dist/index.js:2320:65)

Node.js v20.13.1

This doesnot happen everytime but will happen once in a while and we just have to re-run the tests and artifact download generally works on the re-run.

We first build gem5 and upload it using upload-artifact@v4

 - uses: actions/upload-artifact@v4
    with:
        name: ${{ needs.name-artifacts.outputs.build-name }}${{ matrix.image }}
        path: '*build/${{ matrix.image }}/gem5.opt'
        retention-days: 1
  - run: echo "This job's status is ${{ job.status }}."

and then we download it later in the tests:

 - uses: actions/checkout@v4
            # download all artifacts for each test. Thoguh this is inelegant,
            # it's simpler than figuring otu which long tests requires which
            # binary.
            - uses: actions/download-artifact@v4
              with:
                  pattern: ${{needs.name-artifacts.outputs.build-name}}*
                  merge-multiple: true

What did you expect to happen?

We expect that we can consistantly download the artifacts so that the we dont have to re-run our tests.

How can we reproduce it?

The repository is: https://github.com/gem5/gem5

I dont have a way to always reproduce this error as this happens randomly.

We use artifact-download to get built gem5 to run tests on.

We use the artifact download in the following way. Here is a snippet from one of our tests:

 - uses: actions/checkout@v4
            # download all artifacts for each test. Thoguh this is inelegant,
            # it's simpler than figuring otu which long tests requires which
            # binary.
            - uses: actions/download-artifact@v4
              with:
                  pattern: ${{needs.name-artifacts.outputs.build-name}}*
                  merge-multiple: true

Anything else we need to know?

One thing to note is that we use our self-hosted runners to run these tests and not GitHub runners.

What version of the action are you using?

v4

What are your runner environments?

self-hosted, linux

Are you on GitHub Enterprise Server? If so, what version?

No response

BittyBuck commented 2 months ago

I am also experiencing this. We are running a multi job workflow and it tends to fail intermittently on the second job. retrying the failed job works.

moshikshechter commented 2 months ago

I am also experiencing this, but rerunning only the failed download step doesn't succeed. i have debug logs for anyone that wants to investigate this issue

gdonoso94 commented 2 months ago

Another one having this issue, retrying sometimes work, sometimes doesn't.

fourass commented 1 month ago

Same for us, running a multijob workflow, and it's very random, sometimes it fails on first attempt and then succeed on the second one, and sometimes it succeeds from the first time

will-sargent-dbtlabs commented 1 month ago

I've just started seeing this as well, although I just rolled artifact upload and download into production last week. Retry has fixed it, but it's failing a job after 5 retries..


Attempt 1 of 5 failed with error: Request timeout: /twirp/github.actions.results.api.v1.ArtifactService/ListArtifacts. Retrying request in 3000 ms...
Attempt 2 of 5 failed with error: Request timeout: /twirp/github.actions.results.api.v1.ArtifactService/ListArtifacts. Retrying request in 5306 ms...
Attempt 3 of 5 failed with error: Request timeout: /twirp/github.actions.results.api.v1.ArtifactService/ListArtifacts. Retrying request in 7522 ms...
Attempt 4 of 5 failed with error: Request timeout: /twirp/github.actions.results.api.v1.ArtifactService/ListArtifacts. Retrying request in 13855 ms...
Error: Unable to download artifact(s): Failed to ListArtifacts: Failed to make request after 5 attempts: Request timeout: /twirp/github.actions.results.api.v1.ArtifactService/ListArtifacts```
gdonoso94 commented 1 month ago

Please, somebody has to take a look at this. It's maddening...

fourass commented 2 weeks ago

Hello Any updates regarding this issue ? Thank you

rwader-swi commented 1 week ago

Any updates on this issue? Ironically v3 is faster than v4 and also less flaky