upload-artifact
upload-artifact copied to clipboard
[bug] v4: Duplicate artifacts after FinalizeArtifact timeout
What happened?
Using a self-hosted runner, uploading a fairly large artifact (5G in this case), I occasionally see this:
Finalizing artifact upload
Attempt 1 of 5 failed with error: Request timeout: /twirp/github.actions.results.api.v1.ArtifactService/FinalizeArtifact. Retrying request in 3000 ms...
This results in two identical artifact archives.
What did you expect to happen?
When this error does not occur, a single artifact archive is posted.
How can we reproduce it?
I haven't created a repro case, but I imagine interrupting the network connection of a self-hosted runner during the finalize would do it.
Anything else we need to know?
My yaml:
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.machine }}-${{ github.run_id }}
path: "${{ steps.gather.outputs.artifacts }}/*"
overwrite: true
What version of the action are you using?
v4.3.1
What are your runner environments?
self-hosted
Are you on GitHub Enterprise Server? If so, what version?
No response
I second this issue. Here I my logs from the upload-artifact actions:
Uploaded bytes 1367343104
Uploaded bytes 1375731712
Uploaded bytes 1384120320
Uploaded bytes 1392508928
Uploaded bytes 1400897536
Uploaded bytes 1409286144
Uploaded bytes 1417674752
##[debug]Zip stream for upload has ended.
##[debug]Zip stream for upload has finished.
Uploaded bytes 1423439949
Finished uploading artifact content to blob storage!
SHA256 hash of uploaded artifact zip is 6ebf5386a19f11baa665483cb53c38f037613aeea8cd6f25de27b7e751646509
Finalizing artifact upload
##[debug][Request] FinalizeArtifact https://results-receiver.actions.githubusercontent.com/twirp/github.actions.results.api.v1.ArtifactService/FinalizeArtifact
Attempt 1 of 5 failed with error: Request timeout: /twirp/github.actions.results.api.v1.ArtifactService/FinalizeArtifact. Retrying request in 3000 ms...
##[debug][Response] - 200
##[debug]Headers: {
##[debug] "content-length": "38",
##[debug] "content-type": "application/json",
##[debug] "date": "Sat, 15 Feb 2025 17:01:37 GMT",
##[debug] "x-github-backend": "Kubernetes",
##[debug] "x-github-request-id": "A08A:217CAF:10D3E25:1928FA5:67B0C871"
##[debug]}
##[debug]Body: {
##[debug] "ok": true,
##[debug] "artifact_id": "2597380755"
##[debug]}
Artifact artifacts.zip successfully finalized. Artifact ID 2597380755
Artifact artifacts has been successfully uploaded! Final size is 1423439949 bytes. Artifact ID is 2597380755
Artifact download URL: https://github.com/ctu-mrs/buildfarm/actions/runs/13345881169/artifacts/2597380755
##[debug]Node Action run completed with exit code 0
##[debug]Set output artifact-id = 2597380755
##[debug]Set output artifact-digest = 6ebf5386a19f11baa665483cb53c38f037613aeea8cd6f25de27b7e751646509
##[debug]Set output artifact-url = https://github.com/ctu-mrs/buildfarm/actions/runs/13345881169/artifacts/2597380755
##[debug]Finishing: Save artifacts
and here are the logs immediately after that (from geekyeggo/delete-artifact job) that show the artifact is there 2 times:
##[debug]Workflow Run Backend ID: 9bcec10c-d320-4b4d-8924-2a48c8caa96e
##[debug]Workflow Job Run Backend ID: 1b2624b5-1bcc-5834-1955-8b56769f7473
##[debug][Request] ListArtifacts https://results-receiver.actions.githubusercontent.com/twirp/github.actions.results.api.v1.ArtifactService/ListArtifacts
##[debug][Response] - 200
##[debug]Headers: {
##[debug] "content-length": "657",
##[debug] "content-type": "application/json",
##[debug] "date": "Sat, 15 Feb 2025 17:12:31 GMT",
##[debug] "x-github-backend": "Kubernetes",
##[debug] "x-github-request-id": "600A:28883F:13FAA0A:1CBCEBE:67B0CAFF"
##[debug]}
##[debug]Body: {
##[debug] "artifacts": [
##[debug] {
##[debug] "workflow_run_backend_id": "9bcec10c-d320-4b4d-8924-2a48c8caa96e",
##[debug] "workflow_job_run_backend_id": "f4586535-1ffc-583b-1acf-b49be254e713",
##[debug] "database_id": "2597380681",
##[debug] "name": "artifacts",
##[debug] "size": "1423439949",
##[debug] "created_at": "2025-02-15T17:01:34Z",
##[debug] "digest": "sha256:6ebf5386a19f11baa665483cb53c38f037613aeea8cd6f25de27b7e751646509"
##[debug] },
##[debug] {
##[debug] "workflow_run_backend_id": "9bcec10c-d320-4b4d-8924-2a48c8caa96e",
##[debug] "workflow_job_run_backend_id": "f4586535-1ffc-583b-1acf-b49be254e713",
##[debug] "database_id": "2597380755",
##[debug] "name": "artifacts",
##[debug] "size": "1423439949",
##[debug] "created_at": "2025-02-15T17:01:37Z",
##[debug] "digest": "sha256:6ebf5386a19f11baa665483cb53c38f037613aeea8cd6f25de27b7e751646509"
##[debug] }
##[debug] ]
##[debug]}
Found 2 artifact(s)
##[debug]Workflow Run Backend ID: 9bcec10c-d320-4b4d-8924-2a48c8caa96e
##[debug]Workflow Job Run Backend ID: 1b2624b5-1bcc-5834-1955-8b56769f7473
##[debug][Request] ListArtifacts https://results-receiver.actions.githubusercontent.com/twirp/github.actions.results.api.v1.ArtifactService/ListArtifacts
##[debug][Response] - 200
##[debug]Headers: {
##[debug] "content-length": "657",
##[debug] "content-type": "application/json",
##[debug] "date": "Sat, 15 Feb 2025 17:12:32 GMT",
##[debug] "x-github-backend": "Kubernetes",
##[debug] "x-github-request-id": "600A:28883F:13FAA29:1CBCEED:67B0CAFF"
##[debug]}
##[debug]Body: {
##[debug] "artifacts": [
##[debug] {
##[debug] "workflow_run_backend_id": "9bcec10c-d320-4b4d-8924-2a48c8caa96e",
##[debug] "workflow_job_run_backend_id": "f4586535-1ffc-583b-1acf-b49be254e713",
##[debug] "database_id": "2597380681",
##[debug] "name": "artifacts",
##[debug] "size": "1423439949",
##[debug] "created_at": "2025-02-15T17:01:34Z",
##[debug] "digest": "sha256:6ebf5386a19f11baa665483cb53c38f037613aeea8cd6f25de27b7e751646509"
##[debug] },
##[debug] {
##[debug] "workflow_run_backend_id": "9bcec10c-d320-4b4d-8924-2a48c8caa96e",
##[debug] "workflow_job_run_backend_id": "f4586535-1ffc-583b-1acf-b49be254e713",
##[debug] "database_id": "2597380755",
##[debug] "name": "artifacts",
##[debug] "size": "1423439949",
##[debug] "created_at": "2025-02-15T17:01:37Z",
##[debug] "digest": "sha256:6ebf5386a19f11baa665483cb53c38f037613aeea8cd6f25de27b7e751646509"
##[debug] }
##[debug] ]
##[debug]}
##[debug]More than one artifact found for a single name, returning newest (id: 2597380755)
##[debug][Request] DeleteArtifact https://results-receiver.actions.githubusercontent.com/twirp/github.actions.results.api.v1.ArtifactService/DeleteArtifact
##[debug][Response] - 200
##[debug]Headers: {
##[debug] "content-length": "38",
##[debug] "content-type": "application/json",
##[debug] "date": "Sat, 15 Feb 2025 17:12:32 GMT",
##[debug] "x-github-backend": "Kubernetes",
##[debug] "x-github-request-id": "600A:28883F:13FAA4E:1CBCF20:67B0CB00"
##[debug]}
##[debug]Body: {
##[debug] "ok": true,
##[debug] "artifact_id": "2597380681"
##[debug]}