Skip to content

feat(libstore/s3-binary-cache-store): implement create/completeMultipartUpload()#14355

Closed
lovesegfault wants to merge 4 commits intoNixOS:masterfrom
lovesegfault:s3-init-complete
Closed

feat(libstore/s3-binary-cache-store): implement create/completeMultipartUpload()#14355
lovesegfault wants to merge 4 commits intoNixOS:masterfrom
lovesegfault:s3-init-complete

Conversation

@lovesegfault
Copy link
Member

@lovesegfault lovesegfault commented Oct 25, 2025

Motivation

  • refactor(libstore): use string_view in HttpBinaryCacheStore::makeRequest
  • refactor(libstore/filetransfer): make setupForS3 public
  • feat(libstore/s3-binary-cache-store): implement createMultipartUpload()
  • feat(libstore/s3-binary-cache-store): implement completeMultipartUpload()

Context

Part-Of: #14330


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions bot added the store Issues and pull requests concerning the Nix store label Oct 25, 2025
@lovesegfault lovesegfault requested a review from xokdvium October 25, 2025 00:32
const std::string & key, const std::string & mimeType, const std::optional<std::string> & contentEncoding);
void completeMultipartUpload(
const std::string & key,
const std::string & uploadId,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be an integer?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's the partNumber that's a uint64_t

@lovesegfault lovesegfault requested a review from xokdvium October 25, 2025 01:17
@lovesegfault lovesegfault force-pushed the s3-init-complete branch 2 times, most recently from f0fe86f to 10012a5 Compare October 25, 2025 01:24
@lovesegfault lovesegfault changed the title feat(libstore/s3-binary-cache-store): implement initiate/completeMultipartUpload() feat(libstore/s3-binary-cache-store): implement create/completeMultipartUpload() Oct 25, 2025
…d()`

POST to key with `?uploads` query parameter, optionally set
`Content-Encoding` header, parse `uploadId` from XML response using
regex
…oad()`

`completeMultipartUpload()`: Build XML with part numbers and `ETags`,
POST to key with `?uploadId` to finalize the multipart upload
@lovesegfault
Copy link
Member Author

I'm going to do this in another order to ease review, actually

@lovesegfault lovesegfault deleted the s3-init-complete branch October 25, 2025 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

store Issues and pull requests concerning the Nix store

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants