diff options
author | Sascha Roloff <sascha.roloff@huawei.com> | 2023-10-17 11:55:00 +0200 |
---|---|---|
committer | Sascha Roloff <sascha.roloff@huawei.com> | 2023-11-22 16:18:17 +0100 |
commit | 9dc43626cf863ecfee29ef36fe3637e52b876f85 (patch) | |
tree | b40faacce4b8dff7d2a2410c6ea65c9ca03daa5b /etc/patches/remote_execution.proto.diff | |
parent | eeb141b08b8d4d12cd9482da25d919c9ea27be51 (diff) | |
download | justbuild-9dc43626cf863ecfee29ef36fe3637e52b876f85.tar.gz |
Patch remote execution protocol with blob splitting API
Diffstat (limited to 'etc/patches/remote_execution.proto.diff')
-rw-r--r-- | etc/patches/remote_execution.proto.diff | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/etc/patches/remote_execution.proto.diff b/etc/patches/remote_execution.proto.diff new file mode 100644 index 00000000..1de1a120 --- /dev/null +++ b/etc/patches/remote_execution.proto.diff @@ -0,0 +1,60 @@ +--- remote_execution.proto.orig 1970-01-01 01:00:00.000000000 +0100 ++++ remote_execution.proto 2023-11-03 13:32:37.502134562 +0100 +@@ -406,6 +406,29 @@ + rpc GetTree(GetTreeRequest) returns (stream GetTreeResponse) { + option (google.api.http) = { get: "/v2/{instance_name=**}/blobs/{root_digest.hash}/{root_digest.size_bytes}:getTree" }; + } ++ ++ // Split a blob into chunks. ++ // ++ // Clients can use this API before downloading a blob to determine which parts ++ // of the blob are already present locally and do not need to be downloaded ++ // again. ++ // ++ // The blob is split into chunks which are individually stored in the CAS. A ++ // list of the chunk digests is returned in the order in which the chunks have ++ // to be concatenated to assemble the requested blob. ++ // ++ // Using this API is optional but it allows clients to download only the ++ // missing parts of a blob instead of the entire blob data, which in turn can ++ // considerably reduce network traffic. ++ // ++ // Errors: ++ // ++ // * `NOT_FOUND`: The requested blob is not present in the CAS. ++ // * `RESOURCE_EXHAUSTED`: There is insufficient disk quota to store the blob ++ // chunks. ++ rpc SplitBlob(SplitBlobRequest) returns (SplitBlobResponse) { ++ option (google.api.http) = { get: "/v2/{instance_name=**}/blobs/{blob_digest.hash}/{blob_digest.size_bytes}:splitBlob" }; ++ } + } + + // The Capabilities service may be used by remote execution clients to query +@@ -1601,6 +1624,27 @@ + } + + // A request message for ++// [ContentAddressableStorage.SplitBlob][build.bazel.remote.execution.v2.ContentAddressableStorage.SplitBlob]. ++message SplitBlobRequest { ++ // The instance of the execution system to operate against. A server may ++ // support multiple instances of the execution system (with their own workers, ++ // storage, caches, etc.). The server MAY require use of this field to select ++ // between them in an implementation-defined fashion, otherwise it can be ++ // omitted. ++ string instance_name = 1; ++ ++ // The digest of the blob to be splitted. ++ Digest blob_digest = 2; ++} ++ ++// A response message for ++// [ContentAddressableStorage.SplitBlob][build.bazel.remote.execution.v2.ContentAddressableStorage.SplitBlob]. ++message SplitBlobResponse { ++ // The digests of the chunks into in which the blob was splitted. ++ repeated Digest chunk_digests = 1; ++} ++ ++// A request message for + // [Capabilities.GetCapabilities][build.bazel.remote.execution.v2.Capabilities.GetCapabilities]. + message GetCapabilitiesRequest { + // The instance of the execution system to operate against. A server may |