Page MenuHomePhabricator

Implement wrapper around blob client C++ bindings for blob upload process
AbandonedPublicDraft

Authored by marcin on Sep 19 2022, 6:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 29, 10:30 AM
Unknown Object (File)
Fri, Nov 29, 7:43 AM
Unknown Object (File)
Thu, Nov 21, 12:40 PM
Unknown Object (File)
Wed, Nov 20, 7:28 PM
Unknown Object (File)
Sun, Nov 17, 3:25 PM
Unknown Object (File)
Fri, Nov 15, 5:48 AM
Unknown Object (File)
Thu, Nov 14, 11:21 PM
Unknown Object (File)
Sat, Nov 9, 7:40 AM

Details

Summary

This differential wraps generated C++ bindings for blob upload so that caller does not need to diretctly instantiate CXx types from ::rust namespace

Test Plan

Methods implemented in this differential can be used to send data to actual blob service instance.

  1. Start blob service locally.
  2. put the following code somewhere in CommCoreModule:
std::string holder = "test.holder.v0";
std::string hash = "test.hash.v0";

auto data = {
    std::string(4000000, 'a'),
    std::string(4000000, 'b'),
    std::string(4000000, 'c'),
    std::string(4000000, 'd'),
    std::string(4000000, 'e'),
    std::string(4000000, 'f'),
    std::string(4000000, 'g'),
};

UploadBlobClient client;
client.startUploadBlocking(holder, hash); 
for (auto &chunk : data) {
    client.uploadChunkBlocking((std::uint8_t *)chunk.c_str(), chunk.length());
} 
client.completeUploadBlocking();
  1. Run aws --endpoint-url=http://localhost:4566 s3 cp s3://commapp-blob/test.hash.v0 localfile. Then cat localfile | wc -c and ensure the output is 28000000.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

marcin retitled this revision from Implement wrapper around blob client C++ bindings to Implement wrapper around blob client C++ bindings for blob upload process.
marcin edited the summary of this revision. (Show Details)
Harbormaster returned this revision to the author for changes because remote builds failed.Sep 19 2022, 6:37 AM
Harbormaster failed remote builds in B12270: Diff 16832!
Harbormaster returned this revision to the author for changes because remote builds failed.Sep 19 2022, 6:52 AM
Harbormaster failed remote builds in B12272: Diff 16834!

Diff from 2022 what I was assigned encrypted blob upload work.