3.0.0 • Published 5 years ago

@datafire/google_remotebuildexecution v3.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

@datafire/google_remotebuildexecution

Client library for Remote Build Execution API

Installation and Usage

npm install --save @datafire/google_remotebuildexecution
let google_remotebuildexecution = require('@datafire/google_remotebuildexecution').create({
  access_token: "",
  refresh_token: "",
  client_id: "",
  client_secret: "",
  redirect_uri: ""
});

.then(data => {
  console.log(data);
});

Description

Supplies a Remote Execution API service for tools such as bazel.

Actions

oauthCallback

Exchange the code passed to your redirect URI for an access_token

google_remotebuildexecution.oauthCallback({
  "code": ""
}, context)

Input

  • input object
    • code required string

Output

  • output object
    • access_token string
    • refresh_token string
    • token_type string
    • scope string
    • expiration string

oauthRefresh

Exchange a refresh_token for an access_token

google_remotebuildexecution.oauthRefresh(null, context)

Input

This action has no parameters

Output

  • output object
    • access_token string
    • refresh_token string
    • token_type string
    • scope string
    • expiration string

remotebuildexecution.actionResults.get

Retrieve a cached execution result. Implementations SHOULD ensure that any blobs referenced from the ContentAddressableStorage are available at the time of returning the ActionResult and will be for some period of time afterwards. The TTLs of the referenced blobs SHOULD be increased if necessary and applicable. Errors: * NOT_FOUND: The requested ActionResult is not in the cache.

google_remotebuildexecution.remotebuildexecution.actionResults.get({
  "instanceName": "",
  "hash": "",
  "sizeBytes": ""
}, context)

Input

  • input object
    • instanceName required string: 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.
    • hash required string: The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long.
    • sizeBytes required string: The size of the blob, in bytes.
    • inlineOutputFiles array: A hint to the server to inline the contents of the listed output files. Each path needs to exactly match one path in output_files in the Command message.
    • inlineStderr boolean: A hint to the server to request inlining stderr in the ActionResult message.
    • inlineStdout boolean: A hint to the server to request inlining stdout in the ActionResult message.
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

remotebuildexecution.actionResults.update

Upload a new execution result. In order to allow the server to perform access control based on the type of action, and to assist with client debugging, the client MUST first upload the Action that produced the result, along with its Command, into the ContentAddressableStorage. Errors: INVALID_ARGUMENT: One or more arguments are invalid. FAILED_PRECONDITION: One or more errors occurred in updating the action result, such as a missing command or action. * RESOURCE_EXHAUSTED: There is insufficient storage space to add the entry to the cache.

google_remotebuildexecution.remotebuildexecution.actionResults.update({
  "instanceName": "",
  "hash": "",
  "sizeBytes": ""
}, context)

Input

  • input object
    • instanceName required string: 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.
    • hash required string: The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long.
    • sizeBytes required string: The size of the blob, in bytes.
    • resultsCachePolicy.priority integer: The priority (relative importance) of this content in the overall cache. Generally, a lower value means a longer retention time or other advantage, but the interpretation of a given value is server-dependent. A priority of 0 means a default value, decided by the server. The particular semantics of this field is up to the server. In particular, every server will have their own supported range of priorities, and will decide how these map into retention/eviction policy.
    • body BuildBazelRemoteExecutionV2ActionResult
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

remotebuildexecution.actions.execute

Execute an action remotely. In order to execute an action, the client must first upload all of the inputs, the Command to run, and the Action into the ContentAddressableStorage. It then calls Execute with an action_digest referring to them. The server will run the action and eventually return the result. The input Action's fields MUST meet the various canonicalization requirements specified in the documentation for their types so that it has the same digest as other logically equivalent Actions. The server MAY enforce the requirements and return errors if a non-canonical input is received. It MAY also proceed without verifying some or all of the requirements, such as for performance reasons. If the server does not verify the requirement, then it will treat the Action as distinct from another logically equivalent action if they hash differently. Returns a stream of google.longrunning.Operation messages describing the resulting execution, with eventual response ExecuteResponse. The metadata on the operation is of type ExecuteOperationMetadata. If the client remains connected after the first response is returned after the server, then updates are streamed as if the client had called WaitExecution until the execution completes or the request reaches an error. The operation can also be queried using Operations API. The server NEED NOT implement other methods or functionality of the Operations API. Errors discovered during creation of the Operation will be reported as gRPC Status errors, while errors that occurred while running the action will be reported in the status field of the ExecuteResponse. The server MUST NOT set the error field of the Operation proto. The possible errors include: INVALID_ARGUMENT: One or more arguments are invalid. FAILED_PRECONDITION: One or more errors occurred in setting up the action requested, such as a missing input or command or no worker being available. The client may be able to fix the errors and retry. RESOURCE_EXHAUSTED: There is insufficient quota of some resource to run the action. UNAVAILABLE: Due to a transient condition, such as all workers being occupied (and the server does not support a queue), the action could not be started. The client should retry. INTERNAL: An internal error occurred in the execution engine or the worker. DEADLINE_EXCEEDED: The execution timed out. * CANCELLED: The operation was cancelled by the client. This status is only possible if the server implements the Operations API CancelOperation method, and it was called for the current execution. In the case of a missing input or command, the server SHOULD additionally send a PreconditionFailure error detail where, for each requested blob not present in the CAS, there is a Violation with a type of MISSING and a subject of "blobs/{hash}/{size}" indicating the digest of the missing blob.

google_remotebuildexecution.remotebuildexecution.actions.execute({
  "instanceName": ""
}, context)

Input

  • input object
    • instanceName required string: 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.
    • body BuildBazelRemoteExecutionV2ExecuteRequest
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

remotebuildexecution.blobs.getTree

Fetch the entire directory tree rooted at a node. This request must be targeted at a Directory stored in the ContentAddressableStorage (CAS). The server will enumerate the Directory tree recursively and return every node descended from the root. The GetTreeRequest.page_token parameter can be used to skip ahead in the stream (e.g. when retrying a partially completed and aborted request), by setting it to a value taken from GetTreeResponse.next_page_token of the last successfully processed GetTreeResponse). The exact traversal order is unspecified and, unless retrieving subsequent pages from an earlier request, is not guaranteed to be stable across multiple invocations of GetTree. If part of the tree is missing from the CAS, the server will return the portion present and omit the rest. Errors: * NOT_FOUND: The requested tree root is not present in the CAS.

google_remotebuildexecution.remotebuildexecution.blobs.getTree({
  "instanceName": "",
  "hash": "",
  "sizeBytes": ""
}, context)

Input

  • input object
    • instanceName required string: 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.
    • hash required string: The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long.
    • sizeBytes required string: The size of the blob, in bytes.
    • pageSize integer: A maximum page size to request. If present, the server will request no more than this many items. Regardless of whether a page size is specified, the server may place its own limit on the number of items to be returned and require the client to retrieve more items using a subsequent request.
    • pageToken string: A page token, which must be a value received in a previous GetTreeResponse. If present, the server will use that token as an offset, returning only that page and the ones that succeed it.
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

remotebuildexecution.blobs.batchRead

Download many blobs at once. The server may enforce a limit of the combined total size of blobs to be downloaded using this API. This limit may be obtained using the Capabilities API. Requests exceeding the limit should either be split into smaller chunks or downloaded using the ByteStream API, as appropriate. This request is equivalent to calling a Bytestream Read request on each individual blob, in parallel. The requests may succeed or fail independently. Errors: * INVALID_ARGUMENT: The client attempted to read more than the server supported limit. Every error on individual read will be returned in the corresponding digest status.

google_remotebuildexecution.remotebuildexecution.blobs.batchRead({
  "instanceName": ""
}, context)

Input

  • input object
    • instanceName required string: 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.
    • body BuildBazelRemoteExecutionV2BatchReadBlobsRequest
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

remotebuildexecution.blobs.batchUpdate

Upload many blobs at once. The server may enforce a limit of the combined total size of blobs to be uploaded using this API. This limit may be obtained using the Capabilities API. Requests exceeding the limit should either be split into smaller chunks or uploaded using the ByteStream API, as appropriate. This request is equivalent to calling a Bytestream Write request on each individual blob, in parallel. The requests may succeed or fail independently. Errors: INVALID_ARGUMENT: The client attempted to upload more than the server supported limit. Individual requests may return the following errors, additionally: RESOURCE_EXHAUSTED: There is insufficient disk quota to store the blob. * INVALID_ARGUMENT: The Digest does not match the provided data.

google_remotebuildexecution.remotebuildexecution.blobs.batchUpdate({
  "instanceName": ""
}, context)

Input

  • input object
    • instanceName required string: 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.
    • body BuildBazelRemoteExecutionV2BatchUpdateBlobsRequest
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

remotebuildexecution.blobs.findMissing

Determine if blobs are present in the CAS. Clients can use this API before uploading blobs to determine which ones are already present in the CAS and do not need to be uploaded again. Servers SHOULD increase the TTLs of the referenced blobs if necessary and applicable. There are no method-specific errors.

google_remotebuildexecution.remotebuildexecution.blobs.findMissing({
  "instanceName": ""
}, context)

Input

  • input object
    • instanceName required string: 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.
    • body BuildBazelRemoteExecutionV2FindMissingBlobsRequest
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

remotebuildexecution.getCapabilities

GetCapabilities returns the server capabilities configuration of the remote endpoint. Only the capabilities of the services supported by the endpoint will be returned: Execution + CAS + Action Cache endpoints should return both CacheCapabilities and ExecutionCapabilities. Execution only endpoints should return ExecutionCapabilities. * CAS + Action Cache only endpoints should return CacheCapabilities.

google_remotebuildexecution.remotebuildexecution.getCapabilities({
  "instanceName": ""
}, context)

Input

  • input object
    • instanceName required string: 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.
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

remotebuildexecution.operations.waitExecution

Wait for an execution operation to complete. When the client initially makes the request, the server immediately responds with the current status of the execution. The server will leave the request stream open until the operation completes, and then respond with the completed operation. The server MAY choose to stream additional updates as execution progresses, such as to provide an update as to the state of the execution.

google_remotebuildexecution.remotebuildexecution.operations.waitExecution({
  "name": ""
}, context)

Input

  • input object
    • name required string: The name of the Operation returned by Execute.
    • body BuildBazelRemoteExecutionV2WaitExecutionRequest
    • $.xgafv string (values: 1, 2): V1 error format.
    • access_token string: OAuth access token.
    • alt string (values: json, media, proto): Data format for response.
    • callback string: JSONP
    • fields string: Selector specifying which fields to include in a partial response.
    • key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
    • oauth_token string: OAuth 2.0 token for the current user.
    • prettyPrint boolean: Returns response with indentations and line breaks.
    • quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
    • upload_protocol string: Upload protocol for media (e.g. "raw", "multipart").
    • uploadType string: Legacy upload protocol for media (e.g. "media", "multipart").

Output

Definitions

BuildBazelRemoteExecutionV2Action

  • BuildBazelRemoteExecutionV2Action object: An Action captures all the information about an execution which is required to reproduce it. Actions are the core component of the Execution service. A single Action represents a repeatable action that can be performed by the execution service. Actions 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, it MAY choose to cache the result in the 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 Actions will be reproducible so that serving a result from cache is always desirable and correct.
    • commandDigest BuildBazelRemoteExecutionV2Digest
    • doNotCache boolean: If true, then the Action's result cannot be cached, and in-flight requests for the same Action may not be merged.
    • inputRootDigest BuildBazelRemoteExecutionV2Digest
    • outputNodeProperties array: List of required supported NodeProperty keys. In order to ensure that equivalent Actions always hash to the same value, the supported node properties MUST be lexicographically sorted by name. Sorting of strings is done by code point, equivalently, by the UTF-8 bytes. The interpretation of these properties is server-dependent. If a property is not recognized by the server, the server will return an INVALID_ARGUMENT error.
      • items string
    • timeout string: A timeout after which the execution should be killed. If the timeout is absent, then the client is specifying that the execution should continue as long as the server will let it. The server SHOULD impose a timeout if the client does not specify one, however, if the client does specify a timeout that is longer than the server's maximum timeout, the server MUST reject the request. The timeout is a part of the Action message, and therefore two Actions with different timeouts are different, even if they are otherwise identical. This is because, if they were not, running an Action with a lower timeout than is required might result in a cache hit from an execution run with a longer timeout, hiding the fact that the timeout is too short. By encoding it directly in the Action, a lower timeout will result in a cache miss and the execution timeout will fail immediately, rather than whenever the cache entry gets evicted.

BuildBazelRemoteExecutionV2ActionCacheUpdateCapabilities

  • BuildBazelRemoteExecutionV2ActionCacheUpdateCapabilities object: Describes the server/instance capabilities for updating the action cache.
    • updateEnabled boolean

BuildBazelRemoteExecutionV2ActionResult

  • BuildBazelRemoteExecutionV2ActionResult object: An ActionResult represents the result of an Action being run.
    • executionMetadata BuildBazelRemoteExecutionV2ExecutedActionMetadata
    • exitCode integer: The exit code of the command.
    • outputDirectories array: The output directories of the action. For each output directory requested in the output_directories or output_paths field of the Action, if the corresponding directory existed after the action completed, a single entry will be present in the output list, which will contain the digest of a Tree message containing the directory tree, and the path equal exactly to the corresponding Action output_directories member. As an example, suppose the Action had an output directory a/b/dir and the execution produced the following contents in a/b/dir: a file named bar and a directory named foo with an executable file named baz. Then, output_directory will contain (hashes shortened for readability): json // OutputDirectory proto: { path: "a/b/dir" tree_digest: { hash: "4a73bc9d03...", size: 55 } } // Tree proto with hash "4a73bc9d03..." and size 55: { root: { files: [ { name: "bar", digest: { hash: "4a73bc9d03...", size: 65534 } } ], directories: [ { name: "foo", digest: { hash: "4cf2eda940...", size: 43 } } ] } children : { // (Directory proto with hash "4cf2eda940..." and size 43) files: [ { name: "baz", digest: { hash: "b2c941073e...", size: 1294, }, is_executable: true } ] } } If an output of the same name as listed in output_files of the Command was found in output_directories, but was not a directory, the server will return a FAILED_PRECONDITION.
    • outputDirectorySymlinks array: The output directories of the action that are symbolic links to other directories. Those may be links to other output directories, or input directories, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output directory requested in the output_directories field of the Action, if the directory existed after the action completed, a single entry will be present either in this field, or in the output_directories field, if the directory was not a symbolic link. If an output of the same name was found, but was a symbolic link to a file instead of a directory, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API should still populate this field in addition to output_symlinks.
    • outputFileSymlinks array: The output files of the action that are symbolic links to other files. Those may be links to other output files, or input files, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output file requested in the output_files or output_paths field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or in the output_files field, if the file was not a symbolic link. If an output symbolic link of the same name as listed in output_files of the Command was found, but its target type was not a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API should still populate this field in addition to output_symlinks.
    • outputFiles array: The output files of the action. For each output file requested in the output_files or output_paths field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or the output_file_symlinks field if the file was a symbolic link to another file (output_symlinks field after v2.1). If an output listed in output_files was found, but was a directory rather than a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted.
    • outputSymlinks array: New in v2.1: this field will only be populated if the command output_paths field was used, and not the pre v2.1 output_files or output_directories fields. The output paths of the action that are symbolic links to other paths. Those may be links to other outputs, or inputs, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. A single entry for each output requested in output_paths field of the Action, if the corresponding path existed after the action completed and was a symbolic link. If the action does not produce a requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted.
    • stderrDigest BuildBazelRemoteExecutionV2Digest
    • stderrRaw string: The standard error buffer of the action. The server SHOULD NOT inline stderr unless requested by the client in the GetActionResultRequest message. The server MAY omit inlining, even if requested, and MUST do so if inlining would cause the response to exceed message size limits.
    • stdoutDigest BuildBazelRemoteExecutionV2Digest
    • stdoutRaw string: The standard output buffer of the action. The server SHOULD NOT inline stdout unless requested by the client in the GetActionResultRequest message. The server MAY omit inlining, even if requested, and MUST do so if inlining would cause the response to exceed message size limits.

BuildBazelRemoteExecutionV2BatchReadBlobsRequest

  • BuildBazelRemoteExecutionV2BatchReadBlobsRequest object: A request message for ContentAddressableStorage.BatchReadBlobs.

BuildBazelRemoteExecutionV2BatchReadBlobsResponse

BuildBazelRemoteExecutionV2BatchReadBlobsResponseResponse

BuildBazelRemoteExecutionV2BatchUpdateBlobsRequest

BuildBazelRemoteExecutionV2BatchUpdateBlobsRequestRequest

  • BuildBazelRemoteExecutionV2BatchUpdateBlobsRequestRequest object: A request corresponding to a single blob that the client wants to upload.

BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse

BuildBazelRemoteExecutionV2BatchUpdateBlobsResponseResponse

BuildBazelRemoteExecutionV2CacheCapabilities

  • BuildBazelRemoteExecutionV2CacheCapabilities object: Capabilities of the remote cache system.
    • actionCacheUpdateCapabilities BuildBazelRemoteExecutionV2ActionCacheUpdateCapabilities
    • cachePriorityCapabilities BuildBazelRemoteExecutionV2PriorityCapabilities
    • digestFunction array: All the digest functions supported by the remote cache. Remote cache may support multiple digest functions simultaneously.
      • items string (values: UNKNOWN, SHA256, SHA1, MD5, VSO, SHA384, SHA512)
    • maxBatchTotalSizeBytes string: Maximum total size of blobs to be uploaded/downloaded using batch methods. A value of 0 means no limit is set, although in practice there will always be a message size limitation of the protocol in use, e.g. GRPC.
    • symlinkAbsolutePathStrategy string (values: UNKNOWN, DISALLOWED, ALLOWED): Whether absolute symlink targets are supported.

BuildBazelRemoteExecutionV2Command

  • BuildBazelRemoteExecutionV2Command object: A Command is the actual command executed by a worker running an Action and specifications of its environment. 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.
    • arguments array: The arguments to the command. The first argument must be the path to the executable, which must be either a relative path, in which case it is evaluated with respect to the input root, or an absolute path.
      • items string
    • environmentVariables array: The environment variables to set when running the program. The worker may provide its own default environment variables; these defaults can be overridden using this field. Additional variables can also be specified. In order to ensure that equivalent Commands always hash to the same value, the environment variables MUST be lexicographically sorted by name. Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
    • outputDirectories array: A list of the output directories that the client expects to retrieve from the action. Only the listed directories will be returned (an entire directory structure will be returned as a Tree message digest, see OutputDirectory), as well as files listed in output_files. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (/) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. The special value of empty string is allowed, although not recommended, and can be used to capture the entire working directory tree, including inputs. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output directory cannot be duplicated or have the same path as any of the listed output files. An output directory is allowed to be a parent of another output directory. Directories leading up to the output directories (but not the output directories themselves) are created by the worker prior to execution, even if they are not explicitly part of the input root. DEPRECATED since 2.1: Use output_paths instead.
      • items string
    • outputFiles array: A list of the output files that the client expects to retrieve from the action. Only the listed files, as well as directories listed in output_directories, will be returned to the client as output. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (/) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output file cannot be duplicated, be a parent of another output file, or have the same path as any of the listed output directories. Directories leading up to the output files are created by the worker prior to execution, even if they are not explicitly part of the input root. DEPRECATED since v2.1: Use output_paths instead.
      • items string
    • outputPaths array: A list of the output paths that the client expects to retrieve from the action. Only the listed paths will be returned to the client as output. The type of the output (file or directory) is not specified, and will be determined by the server after action execution. If the resulting path is a file, it will be returned in an OutputFile) typed field. If the path is a directory, the entire directory structure will be returned as a Tree message digest, see OutputDirectory) Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (/) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. In order to ensure consistent hashing of the same Action, the output paths MUST be deduplicated and sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). Directories leading up to the output paths are created by the worker prior to execution, even if they are not explicitly part of the input root. New in v2.1: this field supersedes the DEPRECATED output_files and output_directories fields. If output_paths is used, output_files and output_directories will be ignored!
      • items string
    • platform BuildBazelRemoteExecutionV2Platform
    • workingDirectory string: The working directory, relative to the input root, for the command to run in. It must be a directory which exists in the input tree. If it is left empty, then the action is run in the input root.

BuildBazelRemoteExecutionV2CommandEnvironmentVariable

  • BuildBazelRemoteExecutionV2CommandEnvironmentVariable object: An EnvironmentVariable is one variable to set in the running program's environment.
    • name string: The variable name.
    • value string: The variable value.

BuildBazelRemoteExecutionV2Digest

  • BuildBazelRemoteExecutionV2Digest object: 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. 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.
    • hash string: The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long.
    • sizeBytes string: The size of the blob, in bytes.

BuildBazelRemoteExecutionV2Directory

  • BuildBazelRemoteExecutionV2Directory object: A Directory represents a directory node in a file tree, containing zero or more children FileNodes, DirectoryNodes and SymlinkNodes. Each Node contains its name in the directory, either the digest of its content (either a file blob or a Directory proto) or a symlink target, 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). Note that while the API itself is case-sensitive, the environment where the Action is executed may or may not be case-sensitive. That is, it is legal to call the API with a Directory that has both "Foo" and "foo" as children, but the Action may be rejected by the remote system upon execution. The files, directories and symlinks 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. The NodeProperties of files, directories, and symlinks must be sorted in lexicographical order by property name. 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 }, node_properties: [ { "name": "MTime", "value": "2017-01-15T01:30:15.01Z" } ] } ], 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 } ] }

BuildBazelRemoteExecutionV2DirectoryNode

  • BuildBazelRemoteExecutionV2DirectoryNode object: A DirectoryNode represents a child of a Directory which is itself a Directory and its associated metadata.

BuildBazelRemoteExecutionV2ExecuteOperationMetadata

  • BuildBazelRemoteExecutionV2ExecuteOperationMetadata object: Metadata about an ongoing execution, which will be contained in the metadata field of the Operation.
    • actionDigest BuildBazelRemoteExecutionV2Digest
    • stage string (values: UNKNOWN, CACHE_CHECK, QUEUED, EXECUTING, COMPLETED): The current stage of execution.
    • stderrStreamName string: If set, the client can use this name with ByteStream.Read to stream the standard error.
    • stdoutStreamName string: If set, the client can use this name with ByteStream.Read to stream the standard output.

BuildBazelRemoteExecutionV2ExecuteRequest

  • BuildBazelRemoteExecutionV2ExecuteRequest object: A request message for Execution.Execute.
    • actionDigest BuildBazelRemoteExecutionV2Digest
    • executionPolicy BuildBazelRemoteExecutionV2ExecutionPolicy
    • resultsCachePolicy BuildBazelRemoteExecutionV2ResultsCachePolicy
    • skipCacheLookup boolean: If true, the action will be executed even if its result is already present in the ActionCache. The execution is still allowed to be merged with other in-flight executions of the same action, however - semantically, the service MUST only guarantee that the results of an execution with this field set were not visible before the corresponding execution request was sent. Note that actions from execution requests setting this field set are still eligible to be entered into the action cache upon completion, and services SHOULD overwrite any existing entries that may exist. This allows skip_cache_lookup requests to be used as a mechanism for replacing action cache entries that reference outputs no longer available or that are poisoned in any way. If false, the result may be served from the action cache.

BuildBazelRemoteExecutionV2ExecuteResponse

  • BuildBazelRemoteExecutionV2ExecuteResponse object: The response message for Execution.Execute, which will be contained in the response field of the Operation.
    • cachedResult boolean: True if the result was served from cache, false if it was executed.
    • message string: Freeform informational message with details on the execution of the action that may be displayed to the user upon failure or when requested explicitly.
    • result BuildBazelRemoteExecutionV2ActionResult
    • serverLogs object: An optional list of additional log outputs the server wishes to provide. A server can use this to return execution-specific logs however it wishes. This is intended primarily to make it easier for users to debug issues that may be outside of the actual job execution, such as by identifying the worker executing the action or by providing logs from the worker's setup phase. The keys SHOULD be human readable so that a client can display them to a user.
    • status GoogleRpcStatus

BuildBazelRemoteExecutionV2ExecutedActionMetadata

  • BuildBazelRemoteExecutionV2ExecutedActionMetadata object: ExecutedActionMetadata contains details about a completed execution.
    • executionCompletedTimestamp string: When the worker completed executing the action command.
    • executionStartTimestamp string: When the worker started executing the action command.
    • inputFetchCompletedTimestamp string: When the worker finished fetching action inputs.
    • inputFetchStartTimestamp string: When the worker started fetching action inputs.
    • outputUploadCompletedTimestamp string: When the worker finished uploading action outputs.
    • outputUploadStartTimestamp string: When the worker started uploading action outputs.
    • queuedTimestamp string: When was the action added to the queue.
    • worker string: The name of the worker which ran the execution.
    • workerCompletedTimestamp string: When the worker completed the action, including all stages.
    • workerStartTimestamp string: When the worker received the action.

BuildBazelRemoteExecutionV2ExecutionCapabilities

  • BuildBazelRemoteExecutionV2ExecutionCapabilities object: Capabilities of the remote execution system.
    • digestFunction string (values: UNKNOWN, SHA256, SHA1, MD5, VSO, SHA384, SHA512): Remote execution may only support a single digest function.
    • execEnabled boolean: Whether remote execution is enabled for the particular server/instance.
    • executionPriorityCapabilities BuildBazelRemoteExecutionV2PriorityCapabilities
    • supportedNodeProperties array: Supported node properties.
      • items string

BuildBazelRemoteExecutionV2ExecutionPolicy

  • BuildBazelRemoteExecutionV2ExecutionPolicy object: An ExecutionPolicy can be used to control the scheduling of the action.
    • priority integer: The priority (relative importance) of this action. Generally, a lower value means that the action should be run sooner than actions having a greater priority value, but the interpretation of a given value is server- dependent. A priority of 0 means the default priority. Priorities may be positive or negative, and such actions should run later or sooner than actions having the default priority, respectively. The particular semantics of this field is up to the server. In particular, every server will have their own supported range of priorities, and will decide how these map into scheduling policy.

BuildBazelRemoteExecutionV2FileNode

BuildBazelRemoteExecutionV2FindMissingBlobsRequest

  • BuildBazelRemoteExecutionV2FindMissingBlobsRequest object: A request message for ContentAddressableStorage.FindMissingBlobs.

BuildBazelRemoteExecutionV2FindMissingBlobsResponse

  • BuildBazelRemoteExecutionV2FindMissingBlobsResponse object: A response message for ContentAddressableStorage.FindMissingBlobs.

BuildBazelRemoteExecutionV2GetTreeResponse

  • BuildBazelRemoteExecutionV2GetTreeResponse object: A response message for ContentAddressableStorage.GetTree.
    • directories array: The directories descended from the requested root.
    • nextPageToken string: If present, signifies that there are more results which the client can retrieve by passing this as the page_token in a subsequent request. If empty, signifies that this is the last page of results.

BuildBazelRemoteExecutionV2LogFile

  • BuildBazelRemoteExecutionV2LogFile object: A LogFile is a log stored in the CAS.
    • digest BuildBazelRemoteExecutionV2Digest
    • humanReadable boolean: This is a hint as to the purpose of the log, and is set to true if the log is human-readable text that can be usefully displayed to a user, and false otherwise. For instance, if a command-line client wishes to print the server logs to the terminal for a failed action, this allows it to avoid displaying a binary file.

BuildBazelRemoteExecutionV2NodeProperty

  • BuildBazelRemoteExecutionV2NodeProperty object: A single property for FileNodes, DirectoryNodes, and SymlinkNodes. The server is responsible for specifying the property names that it accepts. If permitted by the server, the same name may occur multiple times.
    • name string: The property name.
    • value string: The property value.

BuildBazelRemoteExecutionV2OutputDirectory

  • BuildBazelRemoteExecutionV2OutputDirectory object: An OutputDirectory is the output in an ActionResult corresponding to a directory's full contents rather than a single file.
    • path string: The full path of the directory relative to the working directory. The path separator is a forward slash /. Since this is a relative path, it MUST NOT begin with a leading forward slash. The empty string value is allowed, and it denotes the entire working directory.
    • treeDigest BuildBazelRemoteExecutionV2Digest

BuildBazelRemoteExecutionV2OutputFile

  • BuildBazelRemoteExecutionV2OutputFile object: An OutputFile is similar to a FileNode, but it is used as an output in an ActionResult. It allows a full file path rather than only a name.
    • contents string: The contents of the file if inlining was requested. The server SHOULD NOT inline file contents unless requested by the client in the GetActionResultRequest message. The server MAY omit inlining, even if requested, and MUST do so if inlining would cause the response to exceed message size limits.
    • digest BuildBazelRemoteExecutionV2Digest
    • isExecutable boolean: True if file is executable, false otherwise.
    • nodeProperties array: The supported node properties of the OutputFile, if requested by the Action.
    • path string: The full path of the file relative to the working directory, including the filename. The path separator is a forward slash /. Since this is a relative path, it MUST NOT begin with a leading forward slash.

BuildBazelRemoteExecutionV2OutputSymlink

  • BuildBazelRemoteExecutionV2OutputSymlink object: An OutputSymlink is similar to a Symlink, but it is used as an output in an ActionResult. OutputSymlink is binary-compatible with SymlinkNode.
    • nodeProperties array: The supported node properties of the OutputSymlink, if requested by the Action.
    • path string: The full path of the symlink relative to the working directory, including the filename. The path separator is a forward slash /. Since this is a relative path, it MUST NOT begin with a leading forward slash.
    • target string: The target path of the symlink. The path separator is a forward slash /. The target path can be relative to the parent directory of the symlink or it can be an absolute path starting with /. Support for absolute paths can be checked using the Capabilities API. The canonical form forbids the substrings /./ and // in the target path. .. components are allowed anywhere in the target path.

BuildBazelRemoteExecutionV2Platform

  • BuildBazelRemoteExecutionV2Platform object: A Platform is a set of requirements, such as hardware, operating system, or compiler toolchain, for an Action's execution environment. A Platform is represented as a series of key-value pairs representing the properties that are required of the platform.
    • properties array: The properties that make up this platform. In order to ensure that equivalent Platforms always hash to the same value, the properties MUST be lexicographically sorted by name, and then by value. Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.

BuildBazelRemoteExecutionV2PlatformProperty

  • BuildBazelRemoteExecutionV2PlatformProperty object: A single property for the environment. The server is responsible for specifying the property names that it accepts. If an unknown name is provided in the requirements for an 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 values. 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.
    • name string: The property name.
    • value string: The property value.

BuildBazelRemoteExecutionV2PriorityCapabilities

BuildBazelRemoteExecutionV2PriorityCapabilitiesPriorityRange

  • BuildBazelRemoteExecutionV2PriorityCapabilitiesPriorityRange object: Supported range of priorities, including boundaries.
    • maxPriority integer
    • minPriority integer

BuildBazelRemoteExecutionV2RequestMetadata

  • BuildBazelRemoteExecutionV2RequestMetadata object: 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: build.bazel.remote.execution.v2.requestmetadata-bin contents: the base64 encoded binary RequestMetadata message. Note: the gRPC library serializes binary headers encoded in base 64 by default (https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests). Therefore, if the gRPC library is used to pass/retrieve this metadata, the user may ignore the base64 encoding and assume it is simply serialized as a binary message.
    • actionId string: An identifier that ties multiple requests to the same action. For example, multiple requests to the CAS, Action Cache, and Execution API are used in order to compile foo.cc.
    • correlatedInvocationsId string: An identifier to tie multiple tool invocations together. For example, runs of foo_test, bar_test and baz_test on a post-submit of a given patch.
    • toolDetails BuildBazelRemoteExecutionV2ToolDetails
    • toolInvocationId string: An identifier that ties multiple actions together to a final result. For example, multiple actions are required to build and run foo_test.

BuildBazelRemoteExecutionV2ResultsCachePolicy

  • BuildBazelRemoteExecutionV2ResultsCachePolicy object: A ResultsCachePolicy is used for fine-grained control over how action outputs are stored in the CAS and Action Cache.
    • priority integer: The priority (relative importance) of this content in the overall cache. Generally, a lower value means a longer retention time or other advantage, but the interpretation of a given value is server-dependent. A priority of 0 means a default value, decided by the server. The particular semantics of this field is up to the server. In particular, every server will have their own supported range of priorities, and will decide how these map into retention/eviction policy.

BuildBazelRemoteExecutionV2ServerCapabilities