feat(libstore): add support for multipart s3 uploads#14330
feat(libstore): add support for multipart s3 uploads#14330Ericson2314 merged 4 commits intoNixOS:masterfrom
Conversation
6fabf0d to
d5ef2c8
Compare
b179028 to
617ebc6
Compare
9bdac08 to
9415bfc
Compare
9415bfc to
7e1ec95
Compare
1e1800a to
b9a7cb6
Compare
86426bf to
78afd35
Compare
78afd35 to
30f22e7
Compare
30f22e7 to
4daa3e6
Compare
4daa3e6 to
a756484
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
WalkthroughThis PR implements multipart upload support for S3 binary cache operations to address upload failures with large files. It adds three new configuration settings ( Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes
Areas requiring extra attention:
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🧰 Additional context used🧠 Learnings (1)📚 Learning: 2025-10-28T18:50:29.831ZApplied to files:
Comment |
| - **`multipart-upload`** (default: `false`): Enable multipart uploads for large | ||
| files. When enabled, files exceeding the multipart threshold will be uploaded | ||
| in multiple parts. | ||
|
|
||
| - **`multipart-threshold`** (default: `100 MiB`): Minimum file size for using | ||
| multipart uploads. Files smaller than this will use regular PUT requests. | ||
| Only takes effect when `multipart-upload` is enabled. | ||
|
|
||
| - **`multipart-chunk-size`** (default: `5 MiB`): Size of each part in multipart | ||
| uploads. Must be at least 5 MiB (AWS S3 requirement). Larger chunk sizes | ||
| reduce the number of requests but use more memory. | ||
|
|
||
| - **`buffer-size`**: Has been replaced by `multipart-chunk-size`. |
There was a problem hiding this comment.
Note (not actionable for this PR) that this is the sort of thing that I think nested settings / settings JSON is good for.
a756484 to
25b4045
Compare
…tings Add three configuration settings to `S3BinaryCacheStoreConfig` to control multipart upload behavior: - `bool multipart-upload` (default `false`): Enable/disable multipart uploads - `uint64_t multipart-chunk-size` (default 5 MiB): Size of each upload part - `uint64_t multipart-threshold` (default 100 MiB): Minimum file size for multipart The feature is disabled by default.
25b4045 to
33e78a4
Compare
Implement `uploadMultipart()`, the main method that orchestrates S3 multipart uploads
33e78a4 to
3448d4f
Compare
Motivation
This adds support for multipart uploads to the new s3 implementation, which is required for uploading files larger than 5GiB.
It's a big change, the commits will be pulled out into individual PRs, but this is here for early review of the big picture.
Context
Fixes: #12671
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.