From 9ed0639288d4f98eef15a0a6ed379874c0940576 Mon Sep 17 00:00:00 2001 From: Mostyn Bramley-Moore Date: Thu, 12 Aug 2021 21:31:21 +0200 Subject: [PATCH] Add support for inlined compressed data in batch CAS operations This is a small API change which allows for inlined data to be compressed form in BatchReadBlobs and BatchUpdateBlobs calls. Refers to #201. --- .../execution/v2/remote_execution.proto | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/build/bazel/remote/execution/v2/remote_execution.proto b/build/bazel/remote/execution/v2/remote_execution.proto index 46911d7b..6e209c06 100644 --- a/build/bazel/remote/execution/v2/remote_execution.proto +++ b/build/bazel/remote/execution/v2/remote_execution.proto @@ -1510,6 +1510,12 @@ message BatchUpdateBlobsRequest { // The raw binary data. bytes data = 2; + + // The format of `data`. Must be `IDENTITY` (or unspecified), or one of the + // compressors advertised by the + // [CacheCapabilities.supported_batch_compressors][build.bazel.remote.execution.v2.CacheCapabilities.supported_batch_compressors] + // field. + Compressor.Value compressor = 3; } // The instance of the execution system to operate against. A server may @@ -1551,6 +1557,10 @@ message BatchReadBlobsRequest { // The individual blob digests. repeated Digest digests = 2; + + // A list of acceptable encodings to used for inlined data, in order of + // preference. `IDENTITY` is always allowed even if not specified here. + repeated Compressor.Value acceptable_compressors = 3; } // A response message for @@ -1564,6 +1574,10 @@ message BatchReadBlobsResponse { // The raw binary data. bytes data = 2; + // The format the data is encoded in. MUST be `IDENTITY` (or unspecified), + // or one of the acceptable compressors specified in the `BatchReadBlobsRequest`. + Compressor.Value compressor = 4; + // The result of attempting to download that blob. google.rpc.Status status = 3; } @@ -1765,6 +1779,11 @@ message CacheCapabilities { // Note that this does not imply which if any compressors are supported by // the server at the gRPC level. repeated Compressor.Value supported_compressors = 6; + + // Compressors supported for inlined data in + // [BatchUpdateBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.BatchUpdateBlobs] + // requests. + repeated Compressor.Value supported_batch_update_compressors = 7; } // Capabilities of the remote execution system.