You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
publish-to-r2: a failed payload upload leaves SHA256SUMS listing a missing file #84
publish-to-r2 uploads the whole ./repo tree with 1 aws s3 sync (action.yml, "Upload to R2"). The sync uploads metadata and payloads in parallel and in no fixed order. When 1 payload upload fails, the metadata that lists it is already live. The bucket then advertises a file that does not exist.
04:44:48Z: ext/chatgpt/SHA256SUMS, SHA256SUMS.gpg (good signature), chatgpt.transfer and index.html uploaded.
04:45:04Z: upload failed: repo/ext/chatgpt/chatgpt_26.1027.51404+r1_13_x86-64.raw.zst ... An error occurred (InvalidPart) when calling the CompleteMultipartUpload operation: One or more of the specified parts could not be found.
Now: https://repository.frostyard.org/ext/chatgpt/SHA256SUMS lists chatgpt_26.1027.51404+r1_13_x86-64.raw.zst (sha256 4a48b545…), and that URL returns 404. It is the newest version, so sysupdate/updex clients try it and fail.
The run failed, so the cache purge step was skipped too.
The earlier 29 main runs of that workflow had no upload failure: the R2 error looks transient. The damage it leaves is not: v0.7.0 digest reconciliation refuses a rebuild of the same identity with other bytes (mkosi output is not reproducible), so a rerun cannot repair it.
Proposal
Upload in 2 phases: first every payload (--exclude the metadata: SHA256SUMS*, *.transfer, index*, dists/, Release*, ...), then the metadata only after phase 1 succeeds. A failed payload then leaves the old, consistent metadata live.
Optionally retry transient S3 errors (AWS_RETRY_MODE=adaptive, AWS_MAX_ATTEMPTS); the CLI does not retry InvalidPart on CompleteMultipartUpload today.
snosi side
snosi works around it in frostyard/snosi#1200, in its pre-filter (shared/sysext/publish/drop-published.sh): it now fails when a built identity is listed but its payload object is missing, and chatgpt is republished as +r2. The dangling +r1 entry stays in ext/chatgpt/SHA256SUMS until someone repairs the bucket.
Activity
fix(publish-to-r2): upload payloads before metadata, with retries (#85)