blob: 27823dad17084beaca74253551238f9ad3b66451 [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="remotebuildexecution_v2.html">Remote Build Execution API</a> . <a href="remotebuildexecution_v2.actions.html">actions</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#execute">execute(instanceName, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Execute an action remotely.</p>
80<h3>Method Details</h3>
81<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070082 <code class="details" id="execute">execute(instanceName, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070083 <pre>Execute an action remotely.
84
85In order to execute an action, the client must first upload all of the
86inputs, the
87Command to run, and the
88Action into the
89ContentAddressableStorage.
90It then calls `Execute` with an `action_digest` referring to them. The
91server will run the action and eventually return the result.
92
Bu Sun Kim65020912020-05-20 12:08:20 -070093The input `Action`&#x27;s fields MUST meet the various canonicalization
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094requirements specified in the documentation for their types so that it has
95the same digest as other logically equivalent `Action`s. The server MAY
96enforce the requirements and return errors if a non-canonical input is
97received. It MAY also proceed without verifying some or all of the
98requirements, such as for performance reasons. If the server does not
99verify the requirement, then it will treat the `Action` as distinct from
100another logically equivalent action if they hash differently.
101
102Returns a stream of
103google.longrunning.Operation messages
104describing the resulting execution, with eventual `response`
105ExecuteResponse. The
106`metadata` on the operation is of type
107ExecuteOperationMetadata.
108
109If the client remains connected after the first response is returned after
110the server, then updates are streamed as if the client had called
111WaitExecution
112until the execution completes or the request reaches an error. The
113operation can also be queried using Operations
114API.
115
116The server NEED NOT implement other methods or functionality of the
117Operations API.
118
119Errors discovered during creation of the `Operation` will be reported
120as gRPC Status errors, while errors that occurred while running the
121action will be reported in the `status` field of the `ExecuteResponse`. The
122server MUST NOT set the `error` field of the `Operation` proto.
123The possible errors include:
124
125* `INVALID_ARGUMENT`: One or more arguments are invalid.
126* `FAILED_PRECONDITION`: One or more errors occurred in setting up the
127 action requested, such as a missing input or command or no worker being
128 available. The client may be able to fix the errors and retry.
129* `RESOURCE_EXHAUSTED`: There is insufficient quota of some resource to run
130 the action.
131* `UNAVAILABLE`: Due to a transient condition, such as all workers being
132 occupied (and the server does not support a queue), the action could not
133 be started. The client should retry.
134* `INTERNAL`: An internal error occurred in the execution engine or the
135 worker.
136* `DEADLINE_EXCEEDED`: The execution timed out.
137* `CANCELLED`: The operation was cancelled by the client. This status is
138 only possible if the server implements the Operations API CancelOperation
139 method, and it was called for the current execution.
140
141In the case of a missing input or command, the server SHOULD additionally
142send a PreconditionFailure error detail
143where, for each requested blob not present in the CAS, there is a
144`Violation` with a `type` of `MISSING` and a `subject` of
Bu Sun Kim65020912020-05-20 12:08:20 -0700145`&quot;blobs/{hash}/{size}&quot;` indicating the digest of the missing blob.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700146
147Args:
148 instanceName: string, The instance of the execution system to operate against. A server may
149support multiple instances of the execution system (with their own workers,
150storage, caches, etc.). The server MAY require use of this field to select
151between them in an implementation-defined fashion, otherwise it can be
152omitted. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700153 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700154 The object takes the form of:
155
156{ # A request message for
157 # Execution.Execute.
Bu Sun Kim65020912020-05-20 12:08:20 -0700158 &quot;skipCacheLookup&quot;: True or False, # If true, the action will be executed even if its result is already
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700159 # present in the ActionCache.
160 # The execution is still allowed to be merged with other in-flight executions
161 # of the same action, however - semantically, the service MUST only guarantee
162 # that the results of an execution with this field set were not visible
163 # before the corresponding execution request was sent.
164 # Note that actions from execution requests setting this field set are still
165 # eligible to be entered into the action cache upon completion, and services
166 # SHOULD overwrite any existing entries that may exist. This allows
167 # skip_cache_lookup requests to be used as a mechanism for replacing action
168 # cache entries that reference outputs no longer available or that are
169 # poisoned in any way.
170 # If false, the result may be served from the action cache.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700171 &quot;executionPolicy&quot;: { # An `ExecutionPolicy` can be used to control the scheduling of the action. # An optional policy for execution of the action.
172 # The server will have a default policy if this is not provided.
173 &quot;priority&quot;: 42, # The priority (relative importance) of this action. Generally, a lower value
174 # means that the action should be run sooner than actions having a greater
175 # priority value, but the interpretation of a given value is server-
176 # dependent. A priority of 0 means the *default* priority. Priorities may be
177 # positive or negative, and such actions should run later or sooner than
178 # actions having the default priority, respectively. The particular semantics
179 # of this field is up to the server. In particular, every server will have
180 # their own supported range of priorities, and will decide how these map into
181 # scheduling policy.
182 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700183 &quot;actionDigest&quot;: { # A content digest. A digest for a given blob consists of the size of the blob # The digest of the Action to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700184 # execute.
Dan O'Mearadd494642020-05-01 07:42:23 -0700185 # and its hash. The hash algorithm to use is defined by the server.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700186 #
187 # The size is considered to be an integral part of the digest and cannot be
188 # separated. That is, even if the `hash` field is correctly specified but
189 # `size_bytes` is not, the server MUST reject the request.
190 #
191 # The reason for including the size in the digest is as follows: in a great
192 # many cases, the server needs to know the size of the blob it is about to work
193 # with prior to starting an operation with it, such as flattening Merkle tree
194 # structures or streaming it to a worker. Technically, the server could
195 # implement a separate metadata store, but this results in a significantly more
196 # complicated implementation as opposed to having the client specify the size
197 # up-front (or storing the size along with the digest in every message where
198 # digests are embedded). This does mean that the API leaks some implementation
199 # details of (what we consider to be) a reasonable server implementation, but
200 # we consider this to be a worthwhile tradeoff.
201 #
202 # When a `Digest` is used to refer to a proto message, it always refers to the
203 # message in binary encoded form. To ensure consistent hashing, clients and
204 # servers MUST ensure that they serialize messages according to the following
205 # rules, even if there are alternate valid encodings for the same message:
206 #
207 # * Fields are serialized in tag order.
208 # * There are no unknown fields.
209 # * There are no duplicate fields.
210 # * Fields are serialized according to the default semantics for their type.
211 #
212 # Most protocol buffer implementations will always follow these rules when
213 # serializing, but care should be taken to avoid shortcuts. For instance,
214 # concatenating two messages to merge them may produce duplicate fields.
Bu Sun Kim65020912020-05-20 12:08:20 -0700215 &quot;sizeBytes&quot;: &quot;A String&quot;, # The size of the blob, in bytes.
216 &quot;hash&quot;: &quot;A String&quot;, # The hash. In the case of SHA-256, it will always be a lowercase hex string
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700217 # exactly 64 characters long.
218 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700219 &quot;resultsCachePolicy&quot;: { # A `ResultsCachePolicy` is used for fine-grained control over how action # An optional policy for the results of this execution in the remote cache.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700220 # The server will have a default policy if this is not provided.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700221 # This may be applied to both the ActionResult and the associated blobs.
222 # outputs are stored in the CAS and Action Cache.
223 &quot;priority&quot;: 42, # The priority (relative importance) of this content in the overall cache.
224 # Generally, a lower value means a longer retention time or other advantage,
225 # but the interpretation of a given value is server-dependent. A priority of
226 # 0 means a *default* value, decided by the server.
227 #
228 # The particular semantics of this field is up to the server. In particular,
229 # every server will have their own supported range of priorities, and will
230 # decide how these map into retention/eviction policy.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700231 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700232 }
233
234 x__xgafv: string, V1 error format.
235 Allowed values
236 1 - v1 error format
237 2 - v2 error format
238
239Returns:
240 An object of the form:
241
242 { # This resource represents a long-running operation that is the result of a
243 # network API call.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700244 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
245 # contains progress information and common metadata such as create time.
246 # Some services might not provide such metadata. Any method that returns a
247 # long-running operation should document the metadata type, if any.
248 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
249 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700250 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
251 # If `true`, the operation is completed, and either `error` or `response` is
252 # available.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700253 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
254 # different programming environments, including REST APIs and RPC APIs. It is
255 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
256 # three pieces of data: error code, error message, and error details.
257 #
258 # You can find out more about this error model and how to work with it in the
259 # [API Design Guide](https://cloud.google.com/apis/design/errors).
260 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
261 # user-facing error message should be localized and sent in the
262 # google.rpc.Status.details field, or localized by the client.
263 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
264 # message types for APIs to use.
265 {
266 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
267 },
268 ],
269 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
270 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700271 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700272 # method returns no data on success, such as `Delete`, the response is
273 # `google.protobuf.Empty`. If the original method is standard
274 # `Get`/`Create`/`Update`, the response should be the resource. For other
275 # methods, the response should have the type `XxxResponse`, where `Xxx`
276 # is the original method name. For example, if the original method name
277 # is `TakeSnapshot()`, the inferred response type is
278 # `TakeSnapshotResponse`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700279 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700280 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700281 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700282 # originally returns it. If you use the default HTTP mapping, the
283 # `name` should be a resource name ending with `operations/{unique_id}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700284 }</pre>
285</div>
286
287</body></html>