fix Issue 16349 - better curl retry for install.sh script#187
fix Issue 16349 - better curl retry for install.sh script#187MartinNowak merged 1 commit intodlang:masterfrom
Conversation
- curl's --retry option isn't really helpful b/c no timeouts are activated by default - use a retry loop with increasing sleep times instead - enable connection (5s) and download (<1KB/s for 30s) timeouts (using --max-time is too tricky b/c of the unknown download sizes)
|
|
FYI @wilzbach |
| elif [ $i -lt 4 ]; then | ||
| sleep $((1 << $i)) | ||
| else | ||
| fatal "Failed to download '$url'" |
There was a problem hiding this comment.
Should we try to cleanup intermediate temp files on failure?
(due to fatal exiting directly the cleanup in fetch won't take place)
There was a problem hiding this comment.
There is already a cleanup trap that wipes the whole TMP_ROOT, I'm just deleting intermediate temporaries for cleanliness.
|
I tested all compilers, and the |
Maybe at some point we should setup a small travis CI for this repo that does this automatically? ;-)
I did the same and also tried it a bit and it looks really good - e.g. I interrupted the network during the download and all the retry and timeouts fire correctly :) So from my side this looks great - thanks for doing this @MartinNowak :) |
|
Let's closely monitor if that fixes the remaining Travis-CI issues. |
activated by default
(using --max-time is too tricky b/c of the unknown download sizes)