Skip to content

Commit

Permalink
Add support for inlined compressed data (minimal changes)
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.

Refers to bazelbuild#201.
  • Loading branch information
mostynb committed Jul 19, 2021
1 parent 0ecef08 commit 097a5ea
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions build/bazel/remote/execution/v2/remote_execution.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,10 @@ message ActionResult {
// would cause the response to exceed message size limits.
bytes stdout_raw = 5;

// If specified, the encoding used for `stdout_raw`. Must be either `IDENTITY` (or unspecified),
// or one of the values specified in `GetActionResultRequest.acceptable_compressors`.
Compressor.Value stdout_compressor = 13;

// The digest for a blob containing the standard output of the action, which
// can be retrieved from the
// [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage].
Expand All @@ -1119,6 +1123,10 @@ message ActionResult {
// would cause the response to exceed message size limits.
bytes stderr_raw = 7;

// If specified, the encoding used for `stderr_raw`. Must be either `IDENTITY` (or unspecified),
// or one of the values specified in `GetActionResultRequest.acceptable_compressors`.
Compressor.Value stderr_compressor = 14;

// The digest for a blob containing the standard error of the action, which
// can be retrieved from the
// [ContentAddressableStorage][build.bazel.remote.execution.v2.ContentAddressableStorage].
Expand Down Expand Up @@ -1153,6 +1161,10 @@ message OutputFile {
// would cause the response to exceed message size limits.
bytes contents = 5;

// The encoding used in `contents`. Must be `IDENTITY` (or unspecified), or
// one of the acceptable compressors specified in the client's request.
Compressor.Value compressor = 8;

// The supported node properties of the OutputFile, if requested by the Action.
reserved 6;
NodeProperties node_properties = 7;
Expand Down Expand Up @@ -1280,6 +1292,10 @@ message ExecuteRequest {
// The server will have a default policy if this is not provided.
// This may be applied to both the ActionResult and the associated blobs.
ResultsCachePolicy results_cache_policy = 8;

// A list of acceptable encodings to used for inlined data. `IDENTITY`
// is always allowed even if not specified here.
repeated Compressor.Value acceptable_compressors = 9;
}

// A `LogFile` is a log stored in the CAS.
Expand Down Expand Up @@ -1412,6 +1428,10 @@ message GetActionResultRequest {
// `output_files` (DEPRECATED since v2.1) in the
// [Command][build.bazel.remote.execution.v2.Command] message.
repeated string inline_output_files = 5;

// A list of acceptable encodings to used for inlined data. `IDENTITY`
// is always allowed even if not specified here.
repeated Compressor.Value acceptable_compressors = 6;
}

// A request message for
Expand Down Expand Up @@ -1469,6 +1489,11 @@ 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_compressor` if
// `CacheCapabilities.inlined_compressed_blobs` is true.
Compressor.Value compressor = 3;
}

// The instance of the execution system to operate against. A server may
Expand Down Expand Up @@ -1510,6 +1535,10 @@ message BatchReadBlobsRequest {

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

// A list of acceptable encodings to used for inlined data. `IDENTITY`
// is always allowed even if not specified here.
repeated Compressor.Value acceptable_compressors = 3;
}

// A response message for
Expand All @@ -1523,6 +1552,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;
}
Expand Down Expand Up @@ -1724,6 +1757,13 @@ 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 messages uploaded to the
// server like
// [BatchUpdateBlobsRequest][build.bazel.remote.execution.v2.BatchUpdateBlobsRequest],
// [ActionResult][build.bazel.remote.execution.v2.ActionResult] and
// [OutputFile][build.bazel.remote.execution.v2.OutputFile].
repeated Compressor.Value supported_inline_compressors = 7;
}

// Capabilities of the remote execution system.
Expand Down

0 comments on commit 097a5ea

Please sign in to comment.