Skip to content

storage: use s3 multipart upload for files > 100 MiB#3356

Merged
GuillaumeGomez merged 2 commits into
rust-lang:mainfrom
syphar:multipart-upload
Jun 3, 2026
Merged

storage: use s3 multipart upload for files > 100 MiB#3356
GuillaumeGomez merged 2 commits into
rust-lang:mainfrom
syphar:multipart-upload

Conversation

@syphar

@syphar syphar commented Jun 3, 2026

Copy link
Copy Markdown
Member

the current method we're using (put_object) works fine most of the time, but has a limitation:

it only allows files < 5 GiB.

Especially with the reduced default targets this is more of an edge case, but it is blocking me from my repackaging efforts, where I'm trying to convert old releases into archives, so I can drop the non-archive logic from the codebase. We have a handful of crates where the zipfile with the html files will become > 5 GiB.

AWS recommends using multipart uploads for anything > 100 MiB, so let's do that generally. It also enables us to do parallel uploads.

I'm also dropping our custom retry logic, in favor of the SDK internal retries that we configure too.

@syphar syphar self-assigned this Jun 3, 2026
@syphar syphar requested a review from a team as a code owner June 3, 2026 05:37
@github-actions github-actions Bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Jun 3, 2026
@syphar syphar force-pushed the multipart-upload branch 2 times, most recently from f88e14e to 34614e9 Compare June 3, 2026 05:47
@syphar syphar force-pushed the multipart-upload branch from 34614e9 to d4afcd9 Compare June 3, 2026 07:21
@syphar

syphar commented Jun 3, 2026

Copy link
Copy Markdown
Member Author

cc @GuillaumeGomez do you have time for a review here?

Comment thread crates/lib/docs_rs_storage/src/lib.rs Outdated
@syphar syphar requested a review from GuillaumeGomez June 3, 2026 20:15
Comment thread crates/bin/docs_rs_admin/src/repackage.rs
Comment thread crates/lib/docs_rs_storage/src/config.rs
@syphar syphar requested a review from GuillaumeGomez June 3, 2026 20:26
@GuillaumeGomez

Copy link
Copy Markdown
Member

Looks good to me, thanks!

@GuillaumeGomez GuillaumeGomez enabled auto-merge (rebase) June 3, 2026 20:47
@GuillaumeGomez GuillaumeGomez merged commit 39849b9 into rust-lang:main Jun 3, 2026
26 checks passed
@syphar syphar deleted the multipart-upload branch June 3, 2026 20:51
@github-actions github-actions Bot added S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Jun 3, 2026
@syphar syphar removed the S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it label Jun 3, 2026
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