Skip to content

Avoid multipart uploads for release artifacts - #1438

Merged
jjhelmus merged 2 commits into
mainfrom
zanieb/r2-single-upload-threshold
Nov 13, 2026
Merged

jjhelmus merged 2 commits into
mainfrom
zanieb/r2-single-upload-threshold

Conversation

@zanieb

@zanieb zanieb commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

The ty 0.0.102 release mirror failed when R2 rejected CompleteMultipartUpload with InvalidPart for a 17 MiB archive in the initial mirror job. python-build-standalone uses boto3's 8 MiB default, so 990 of the 991 assets in the current release use the same multipart path. Skipping keys that exist before the transfers start does not resolve an upload whose object was stored but whose response was lost.

Raise multipart_threshold to 200 MiB so all current release artifacts, the largest of which is about 126 MiB, use a single upload. This deliberately exceeds R2's recommendation to use multipart uploads above roughly 100 MB. Each file loses multipart parallelism and resumability, so a failed upload must restart from the beginning; the release process still uploads four objects concurrently. Single uploads support objects up to about 5 GiB. Artifacts at or above the threshold will use multipart uploads and require additional retry handling.

@jjhelmus
jjhelmus merged commit 393de99 into main Nov 13, 2026
22 checks passed
@jjhelmus
jjhelmus deleted the zanieb/r2-single-upload-threshold branch November 13, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants