actions / upload-artifact

MIT License
3.26k stars 739 forks source link

[bug] Upload Artifacts takes time to finish #442

Closed jj-hoegh closed 11 months ago

jj-hoegh commented 1 year ago

What happened?

Upload Artifact job using actions/upload-artifact@v3 is now taking 2 hours to upload an artifact that has a size around 300MB.

image

Few days ago, this only takes 15 - 20 mins and sometimes faster. Aside from this action, all other other action like checkout works fine and process fast.

What did you expect to happen?

We expect that the upload will be faster same as few days ago and not 2 Hours for 300 MB war files

How can we reproduce it?

https://github.com/hoegh-autoliners/link/actions/runs/6294607080/job/17086676107

Anything else we need to know?

No response

What version of the action are you using?

v3

What are your runner environments?

self-hosted

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

No response

StephenHodgson commented 1 year ago

Duplicate of https://github.com/actions/upload-artifact/issues/403

StephenHodgson commented 1 year ago

The real root cause is because it is artificially capped to charge us more on compute. https://github.com/actions/toolkit/issues/1533

konradpabjan commented 11 months ago

V4 upload-artifact and download-artifact as been released today: https://github.blog/changelog/2023-12-14-github-actions-artifacts-v4-is-now-generally-available/

Recommend switching to @v4

v1-v3 were not capped artificially in any way. The real reason is because previously all uploads and traffic was first proxied from the runner to our backend service before finally making it to blob storage. This extra hop made uploads slow and it made the performance widely inconsistent. v4 is effectively an entire re-write from scratch that we've been working on for a very long time and it doesn't have the extra hop/proxy that has been plaguing old versions

V4 offers up to 98% faster uploads from our testing and the performance is more consistent as well

StephenHodgson commented 11 months ago

Whatever the reason, thanks so much for fixing it! My build times pretty much cut in half. Just wish I could get a refund for all those minutes it's been sucking up over the years 😅

jssuttles commented 11 months ago

V4 is amazing for this! Thank you so much!!! 🎉🎉🎉🎉🎉