download-artifact
download-artifact copied to clipboard
[bug] Artifact download sometimes randomly fails
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