Skip to content

Commit

Permalink
Add support for inlined compressed data in batch CAS operations
Browse files Browse the repository at this point in the history
This is a small API change which allows for inlined data to be
compressed form in BatchReadBlobs and BatchUpdateBlobs calls.

Refers to bazelbuild#201.
  • Loading branch information
mostynb committed Oct 4, 2021
1 parent 3e81645 commit 66d9653
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions build/bazel/remote/execution/v2/remote_execution.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1510,6 +1510,12 @@ message BatchUpdateBlobsRequest {

// The raw binary data.
bytes data = 2;

// The format of `data`. Must be `IDENTITY`/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
Expand Down Expand Up @@ -1551,6 +1557,10 @@ message BatchReadBlobsRequest {

// The individual blob digests.
repeated Digest digests = 2;

// A list of acceptable encodings for the returned inlined data, in no
// particular order. `IDENTITY` is always allowed even if not specified here.
repeated Compressor.Value acceptable_compressors = 3;
}

// A response message for
Expand All @@ -1564,6 +1574,10 @@ message BatchReadBlobsResponse {
// The raw binary data.
bytes data = 2;

// The format the data is encoded in. MUST be `IDENTITY`/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;
}
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 66d9653

Please sign in to comment.