wangyoucao577 / assets-uploader

Command line tool to robustly upload Github release assets.
Apache License 2.0
6 stars 5 forks source link

Random duration (3-15s) on upload failure, instead of fixed 3 seconds #16

Closed beelux closed 1 year ago

beelux commented 1 year ago

Having used assets-uploader as part of go-release-action, with a matrix of multiple builds, upload seems to fail arbitrarily.

I am hoping that using a random time might reduce the likelihood of such uploads failing one after the other. My guess being that the connection gets reset because multiple jobs are uploading at the same time.

beelux commented 1 year ago

This could also be reserved as an override feature (flag) like e.g. retry. Which would mean:

  1. use 3 seconds if there is no retry_time_max
  2. if retry_time_max exists, generate a random time between 3 and retry_time_max for each loop

What do you think?

wangyoucao577 commented 1 year ago

tag https://github.com/wangyoucao577/assets-uploader/releases/tag/v0.10.0 is ready for this feature, thanks very much!