2 Commits
Author SHA1 Message Date
jcoffey-dev 86b24460b6 Merge pull request 'ci: retry release file uploads over HTTP/1.1' (#14) from ci/release-upload-retry into main
ci / test (push) Skipped
github/ci (branch) GitHub Actions
ci / github (push) Successful in 3m15s
ci / announce (push) Skipped
2026-09-30 23:52:45 +00:00
jcoffey-dev 25083c8388 ci: retry release file uploads over HTTP/1.1
ci / announce (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 2m15s
ci / test (pull_request) Skipped
inbuxa-server's first GitHub-built release lost 50 MB uploads to
Gitea's release API through Cloudflare (curl 92, HTTP/2 PROTOCOL_ERROR)
on both runs of its binaries job. This job uploads the same way. Uploads
now go over HTTP/1.1, and the asset listing and uploads retry 5 times.
2026-09-30 16:49:45 -07:00
+5 -2
View File
@@ -192,12 +192,15 @@ jobs:
[ -n "$id" ] || { echo "::error::could not create the release"; exit 1; } [ -n "$id" ] || { echo "::error::could not create the release"; exit 1; }
created=1 created=1
fi fi
have="$(curl -fsS "${auth[@]}" "$API/releases/$id/assets" | jq -r '.[].name')" # The uploads cross Cloudflare, which dropped 50 MB HTTP/2 uploads
# part-way for inbuxa-server v2026.9.30.1 (curl 92). HTTP/1.1, and retry.
retry=(--retry 5 --retry-all-errors --retry-delay 15)
have="$(curl -fsS "${retry[@]}" "${auth[@]}" "$API/releases/$id/assets" | jq -r '.[].name')"
for f in dist/*; do for f in dist/*; do
n="$(basename "$f")" n="$(basename "$f")"
if grep -qxF "$n" <<<"$have"; then echo "already attached: $n"; continue; fi if grep -qxF "$n" <<<"$have"; then echo "already attached: $n"; continue; fi
echo "uploading $n" echo "uploading $n"
curl -fsS -o /dev/null "${auth[@]}" --form "attachment=@$f" "$API/releases/$id/assets?name=$n" || { curl -fsS --http1.1 "${retry[@]}" -o /dev/null "${auth[@]}" --form "attachment=@$f" "$API/releases/$id/assets?name=$n" || {
[ "$created" = 1 ] && curl -sS -o /dev/null "${auth[@]}" -X DELETE "$API/releases/$id" [ "$created" = 1 ] && curl -sS -o /dev/null "${auth[@]}" -X DELETE "$API/releases/$id"
exit 1 exit 1
} }