try to address frequent CI timeouts

#169

- Set the total curl upload timeout to one minute. If we're uploading
  for longer than one minute, something is really broken.
- Retry 5 times.
- Max wait 10 seconds for connection to be established.
- If transfer speed is lower than 16KiB/s for longer than 10 seconds,
  abort (this is the most frequent reason for CI stall, xfer speed drops
  to zero and stays that way for hours)
This commit is contained in:
Ivan Avdeev 2021-10-31 17:02:43 -07:00 committed by Ivan Avdeev
parent eceb52cee0
commit b7529fecdd
1 changed files with 5 additions and 0 deletions

View File

@ -312,6 +312,11 @@ for FILE in "$@" ; do
curl -H "Authorization: token ${GITHUB_TOKEN}" \
-H "Accept: application/vnd.github.manifold-preview" \
-H "Content-Type: application/octet-stream" \
--max-time 60 \
--connect-timeout 10 \
--retry 5 \
--speed-limit 16384 \
--speed-time 10 \
--data-binary "@$FULLNAME" \
"$upload_url?name=$(urlencode "$BASENAME")"
echo ""