actions / toolkit

The GitHub ToolKit for developing GitHub Actions.
https://github.com/features/actions
MIT License
5.02k stars 1.45k forks source link

Ensure callback is only called once #1670

Closed bethanyj28 closed 8 months ago

bethanyj28 commented 8 months ago

We have gotten reports of errors using the latest download-artifact@main:

##[debug]Failed to download artifact after 5 retries due to Callback called multiple times. 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]Node Action run completed with exit code 1

Given Callback called multiple times it seems like it's attempting to create the directory and calling callback twice. It should only be called once when the file is extracted.

Part of https://github.com/actions/download-artifact/issues/302