package google.devtools.remoteexecution.v1test

Mouse Melon logoGet desktop application:
View/edit binary Protocol Buffers messages

service ActionCache

remote_execution.proto:128

The action cache API is used to query whether a given action has already been performed and, if so, retrieve its result. Unlike the [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage], which addresses blobs by their own content, the action cache addresses the [ActionResult][google.devtools.remoteexecution.v1test.ActionResult] by a digest of the encoded [Action][google.devtools.remoteexecution.v1test.Action] which produced them. The lifetime of entries in the action cache is implementation-specific, but the server SHOULD assume that more recently used entries are more likely to be used again. Additionally, action cache implementations SHOULD ensure that any blobs referenced in the [ContentAddressableStorage][google.devtools.remoteexecution.v1test.ContentAddressableStorage] are still valid when returning a result. As with other services in the Remote Execution API, any call may return an error with a [RetryInfo][google.rpc.RetryInfo] error detail providing information about when the client should retry the request; clients SHOULD respect the information provided.

service ContentAddressableStorage

remote_execution.proto:218

The CAS (content-addressable storage) is used to store the inputs to and outputs from the execution service. Each piece of content is addressed by the digest of its binary data. Most of the binary data stored in the CAS is opaque to the execution engine, and is only used as a communication medium. In order to build an [Action][google.devtools.remoteexecution.v1test.Action], however, the client will need to also upload the [Command][google.devtools.remoteexecution.v1test.Command] and input root [Directory][google.devtools.remoteexecution.v1test.Directory] for the Action. The Command and Directory messages must be marshalled to wire format and then uploaded under the hash as with any other piece of content. In practice, the input root directory is likely to refer to other Directories in its hierarchy, which must also each be uploaded on their own. For small file uploads the client should group them together and call [BatchUpdateBlobs][google.devtools.remoteexecution.v1test.ContentAddressableStorage.BatchUpdateBlobs] on chunks of no more than 10 MiB. For large uploads, the client must use the [Write method][google.bytestream.ByteStream.Write] of the ByteStream API. The `resource_name` is `{instance_name}/uploads/{uuid}/blobs/{hash}/{size}`, where `instance_name` is as described in the next paragraph, `uuid` is a version 4 UUID generated by the client, and `hash` and `size` are the [Digest][google.devtools.remoteexecution.v1test.Digest] of the blob. The `uuid` is used only to avoid collisions when multiple clients try to upload the same file (or the same client tries to upload the file multiple times at once on different threads), so the client MAY reuse the `uuid` for uploading different blobs. The `resource_name` may optionally have a trailing filename (or other metadata) for a client to use if it is storing URLs, as in `{instance}/uploads/{uuid}/blobs/{hash}/{size}/foo/bar/baz.cc`. Anything after the `size` is ignored. A single server MAY support multiple instances of the execution system, each with their own workers, storage, cache, etc. The exact relationship between instances is up to the server. If the server does, then the `instance_name` is an identifier, possibly containing multiple path segments, used to distinguish between the various instances on the server, in a manner defined by the server. For servers which do not support multiple instances, then the `instance_name` is the empty path and the leading slash is omitted, so that the `resource_name` becomes `uploads/{uuid}/blobs/{hash}/{size}`. When attempting an upload, if another client has already completed the upload (which may occur in the middle of a single upload if another client uploads the same blob concurrently), the request will terminate immediately with a response whose `committed_size` is the full size of the uploaded file (regardless of how much data was transmitted by the client). If the client completes the upload but the [Digest][google.devtools.remoteexecution.v1test.Digest] does not match, an `INVALID_ARGUMENT` error will be returned. In either case, the client should not attempt to retry the upload. For downloading blobs, the client must use the [Read method][google.bytestream.ByteStream.Read] of the ByteStream API, with a `resource_name` of `"{instance_name}/blobs/{hash}/{size}"`, where `instance_name` is the instance name (see above), and `hash` and `size` are the [Digest][google.devtools.remoteexecution.v1test.Digest] of the blob. The lifetime of entries in the CAS is implementation specific, but it SHOULD be long enough to allow for newly-added and recently looked-up entries to be used in subsequent calls (e.g. to [Execute][google.devtools.remoteexecution.v1test.Execution.Execute]). As with other services in the Remote Execution API, any call may return an error with a [RetryInfo][google.rpc.RetryInfo] error detail providing information about when the client should retry the request; clients SHOULD respect the information provided.

service Execution

remote_execution.proto:40

The Remote Execution API is used to execute an [Action][google.devtools.remoteexecution.v1test.Action] on the remote workers. As with other services in the Remote Execution API, any call may return an error with a [RetryInfo][google.rpc.RetryInfo] error detail providing information about when the client should retry the request; clients SHOULD respect the information provided.

message Action

remote_execution.proto:291

An `Action` captures all the information about an execution which is required to reproduce it. `Action`s are the core component of the [Execution] service. A single `Action` represents a repeatable action that can be performed by the execution service. `Action`s can be succinctly identified by the digest of their wire format encoding and, once an `Action` has been executed, will be cached in the action cache. Future requests can then use the cached result rather than needing to run afresh. When a server completes execution of an [Action][google.devtools.remoteexecution.v1test.Action], it MAY choose to cache the [result][google.devtools.remoteexecution.v1test.ActionResult] in the [ActionCache][google.devtools.remoteexecution.v1test.ActionCache] unless `do_not_cache` is `true`. Clients SHOULD expect the server to do so. By default, future calls to [Execute][] the same `Action` will also serve their results from the cache. Clients must take care to understand the caching behaviour. Ideally, all `Action`s will be reproducible so that serving a result from cache is always desirable and correct.

Used in: ExecuteRequest

message ActionResult

remote_execution.proto:580

An ActionResult represents the result of an [Action][google.devtools.remoteexecution.v1test.Action] being run.

Used as response type in: ActionCache.GetActionResult, ActionCache.UpdateActionResult

Used as field type in: ExecuteResponse, UpdateActionResultRequest

message BatchUpdateBlobsResponse.Response

remote_execution.proto:943

A response corresponding to a single blob that the client tried to upload.

Used in: BatchUpdateBlobsResponse

message Command

remote_execution.proto:375

A `Command` is the actual command executed by a worker running an [Action][google.devtools.remoteexecution.v1test.Action]. Except as otherwise required, the environment (such as which system libraries or binaries are available, and what filesystems are mounted where) is defined by and specific to the implementation of the remote execution API.

message Command.EnvironmentVariable

remote_execution.proto:378

An `EnvironmentVariable` is one variable to set in the running program's environment.

Used in: Command

message Digest

remote_execution.proto:569

A content digest. A digest for a given blob consists of the size of the blob and its hash. The hash algorithm to use is defined by the server, but servers SHOULD use SHA-256. The size is considered to be an integral part of the digest and cannot be separated. That is, even if the `hash` field is correctly specified but `size_bytes` is not, the server MUST reject the request. The reason for including the size in the digest is as follows: in a great many cases, the server needs to know the size of the blob it is about to work with prior to starting an operation with it, such as flattening Merkle tree structures or streaming it to a worker. Technically, the server could implement a separate metadata store, but this results in a significantly more complicated implementation as opposed to having the client specify the size up-front (or storing the size along with the digest in every message where digests are embedded). This does mean that the API leaks some implementation details of (what we consider to be) a reasonable server implementation, but we consider this to be a worthwhile tradeoff. When a `Digest` is used to refer to a proto message, it always refers to the message in binary encoded form. To ensure consistent hashing, clients and servers MUST ensure that they serialize messages according to the following rules, even if there are alternate valid encodings for the same message. - Fields are serialized in tag order. - There are no unknown fields. - There are no duplicate fields. - Fields are serialized according to the default semantics for their type. Most protocol buffer implementations will always follow these rules when serializing, but care should be taken to avoid shortcuts. For instance, concatenating two messages to merge them may produce duplicate fields.

Used in: Action, ActionResult, BatchUpdateBlobsResponse.Response, DirectoryNode, ExecuteOperationMetadata, FileNode, FindMissingBlobsRequest, FindMissingBlobsResponse, GetActionResultRequest, GetTreeRequest, LogFile, OutputDirectory, OutputFile, UpdateActionResultRequest, UpdateBlobRequest

message Directory

remote_execution.proto:504

A `Directory` represents a directory node in a file tree, containing zero or more children [FileNodes][google.devtools.remoteexecution.v1test.FileNode] and [DirectoryNodes][google.devtools.remoteexecution.v1test.DirectoryNode]. Each `Node` contains its name in the directory, the digest of its content (either a file blob or a `Directory` proto), as well as possibly some metadata about the file or directory. In order to ensure that two equivalent directory trees hash to the same value, the following restrictions MUST be obeyed when constructing a a `Directory`: - Every child in the directory must have a path of exactly one segment. Multiple levels of directory hierarchy may not be collapsed. - Each child in the directory must have a unique path segment (file name). - The files and directories in the directory must each be sorted in lexicographical order by path. The path strings must be sorted by code point, equivalently, by UTF-8 bytes. A `Directory` that obeys the restrictions is said to be in canonical form. As an example, the following could be used for a file named `bar` and a directory named `foo` with an executable file named `baz` (hashes shortened for readability): ```json // (Directory proto) { files: [ { name: "bar", digest: { hash: "4a73bc9d03...", size: 65534 } } ], directories: [ { name: "foo", digest: { hash: "4cf2eda940...", size: 43 } } ] } // (Directory proto with hash "4cf2eda940..." and size 43) { files: [ { name: "baz", digest: { hash: "b2c941073e...", size: 1294, }, is_executable: true } ] } ```

Used in: GetTreeResponse, Tree

message DirectoryNode

remote_execution.proto:527

A `DirectoryNode` represents a child of a [Directory][google.devtools.remoteexecution.v1test.Directory] which is itself a `Directory` and its associated metadata.

Used in: Directory

message ExecuteOperationMetadata

remote_execution.proto:825

Metadata about an ongoing [execution][google.devtools.remoteexecution.v1test.Execution.Execute], which will be contained in the [metadata field][google.longrunning.Operation.response] of the [Operation][google.longrunning.Operation].

enum ExecuteOperationMetadata.Stage

remote_execution.proto:827

The current stage of execution.

Used in: ExecuteOperationMetadata

message ExecuteResponse

remote_execution.proto:791

The response message for [Execution.Execute][google.devtools.remoteexecution.v1test.Execution.Execute], which will be contained in the [response field][google.longrunning.Operation.response] of the [Operation][google.longrunning.Operation].

message FileNode

remote_execution.proto:513

A `FileNode` represents a single file and associated metadata.

Used in: Directory

message LogFile

remote_execution.proto:774

A `LogFile` is a log stored in the CAS.

Used in: ExecuteResponse

message OutputDirectory

remote_execution.proto:730

An `OutputDirectory` is the output in an `ActionResult` corresponding to a directory's full contents rather than a single file.

Used in: ActionResult

message OutputFile

remote_execution.proto:689

An `OutputFile` is similar to a [FileNode][google.devtools.remoteexecution.v1test.FileNode], but it is tailored for output as part of an `ActionResult`. It allows a full file path rather than only a name, and allows the server to include content inline. `OutputFile` is binary-compatible with `FileNode`.

Used in: ActionResult

message Platform

remote_execution.proto:411

A `Platform` is a set of requirements, such as hardware, operating system, or compiler toolchain, for an [Action][google.devtools.remoteexecution.v1test.Action]'s execution environment. A `Platform` is represented as a series of key-value pairs representing the properties that are required of the platform. This message is currently being redeveloped since it is an overly simplistic model of platforms.

Used in: Action

message Platform.Property

remote_execution.proto:429

A single property for the environment. The server is responsible for specifying the property `name`s that it accepts. If an unknown `name` is provided in the requirements for an [Action][google.devtools.remoteexecution.v1test.Action], the server SHOULD reject the execution request. If permitted by the server, the same `name` may occur multiple times. The server is also responsible for specifying the interpretation of property `value`s. For instance, a property describing how much RAM must be available may be interpreted as allowing a worker with 16GB to fulfill a request for 8GB, while a property describing the OS environment on which the action must be performed may require an exact match with the worker's OS. The server MAY use the `value` of one or more properties to determine how it sets up the execution environment, such as by making specific system files available to the worker.

Used in: Platform

message RequestMetadata

remote_execution.proto:1011

An optional Metadata to attach to any RPC request to tell the server about an external context of the request. The server may use this for logging or other purposes. To use it, the client attaches the header to the call using the canonical proto serialization: name: google.devtools.remoteexecution.v1test.requestmetadata-bin contents: the base64 encoded binary RequestMetadata message.

message ToolDetails

remote_execution.proto:997

Details for the tool used to call the API.

Used in: RequestMetadata

message Tree

remote_execution.proto:717

A `Tree` contains all the [Directory][google.devtools.remoteexecution.v1test.Directory] protos in a single directory Merkle tree, compressed into one message.

message UpdateBlobRequest

remote_execution.proto:917

A single request message for [ContentAddressableStorage.BatchUpdateBlobs][google.devtools.remoteexecution.v1test.ContentAddressableStorage.BatchUpdateBlobs].

Used in: BatchUpdateBlobsRequest