James Ennis pushed to branch jennis/update_CI at BuildGrid / buildgrid
Commits:
-
62026e54
by Carter Sande at 2018-07-27T19:29:51Z
-
1007082f
by Carter Sande at 2018-07-27T19:36:19Z
-
719646e0
by James Ennis at 2018-07-30T09:57:02Z
-
80568d4e
by James Ennis at 2018-07-30T09:57:02Z
-
e8221e63
by James Ennis at 2018-07-30T09:57:02Z
15 changed files:
- .gitlab-ci.yml
- app/commands/cmd_bot.py
- buildgrid/bot/bot.py
- buildgrid/server/job.py
- buildgrid/server/scheduler.py
- google/devtools/remoteworkers/v1test2/bots.proto
- google/devtools/remoteworkers/v1test2/bots_pb2.py
- google/devtools/remoteworkers/v1test2/command.proto
- google/devtools/remoteworkers/v1test2/command_pb2.py
- google/devtools/remoteworkers/v1test2/tasks.proto
- google/devtools/remoteworkers/v1test2/tasks_pb2_grpc.py
- google/devtools/remoteworkers/v1test2/worker.proto
- google/devtools/remoteworkers/v1test2/worker_pb2.py
- setup.py
- tests/integration/bots_service.py
Changes:
1 |
-image: buildstream/buildstream-fedora:master-81-06ae434
|
|
1 |
+# Use a debian image with python 3.5 (and pip3) pre-installed
|
|
2 |
+image: python:3.5-stretch
|
|
2 | 3 |
|
3 | 4 |
variables:
|
4 | 5 |
BGD: bgd --verbose
|
... | ... | @@ -8,6 +9,7 @@ stages: |
8 | 9 |
- post
|
9 | 10 |
|
10 | 11 |
before_script:
|
12 |
+ - pip3 install setuptools
|
|
11 | 13 |
- export PATH=~/.local/bin:${PATH}
|
12 | 14 |
- pip3 install --user -e .
|
13 | 15 |
|
... | ... | @@ -31,30 +33,19 @@ before_script: |
31 | 33 |
- ${BGD} bot --host=0.0.0.0 dummy &
|
32 | 34 |
- ${BGD} execute --host=0.0.0.0 request --wait-for-completion
|
33 | 35 |
|
34 |
-tests-debian:
|
|
35 |
- image: buildstream/buildstream-debian
|
|
36 |
- <<: *linux-tests
|
|
37 |
- |
|
38 |
-# Need to yum install until we have our own image
|
|
39 |
-tests-fedora:
|
|
36 |
+tests-debian-stretch:
|
|
40 | 37 |
<<: *linux-tests
|
41 |
- script:
|
|
42 |
- - yum -y install clang libffi-devel openssl-devel python3-devel
|
|
43 |
- - python3 setup.py test
|
|
44 |
- - mkdir -p coverage/
|
|
45 |
- - cp .coverage.* coverage/coverage."${CI_JOB_NAME}"
|
|
46 | 38 |
|
47 | 39 |
run-dummy-job-debian:
|
48 | 40 |
image: buildstream/buildstream-debian
|
49 | 41 |
<<: *dummy-job
|
50 | 42 |
|
51 |
-run-dummy-job-fedora:
|
|
52 |
- <<: *dummy-job
|
|
53 | 43 |
|
54 | 44 |
coverage:
|
55 | 45 |
stage: post
|
56 | 46 |
coverage: '/TOTAL +\d+ +\d+ +(\d+\.\d+)%/'
|
57 | 47 |
script:
|
48 |
+ - pip3 install coverage==4.4.0
|
|
58 | 49 |
- mkdir report
|
59 | 50 |
- cd report
|
60 | 51 |
- cp ../coverage/coverage.* .
|
... | ... | @@ -62,14 +53,14 @@ coverage: |
62 | 53 |
- coverage combine --rcfile=../.coveragerc -a coverage.*
|
63 | 54 |
- coverage report --rcfile=../.coveragerc -m
|
64 | 55 |
dependencies:
|
65 |
- - tests-fedora
|
|
56 |
+ - tests-debian-stretch
|
|
66 | 57 |
|
67 | 58 |
# Deploy, only for merges which land on master branch.
|
68 | 59 |
#
|
69 | 60 |
pages:
|
70 | 61 |
stage: post
|
71 | 62 |
dependencies:
|
72 |
- - tests-fedora
|
|
63 |
+ - tests-debian-stretch
|
|
73 | 64 |
script:
|
74 | 65 |
- mv coverage/ public/
|
75 | 66 |
artifacts:
|
... | ... | @@ -117,7 +117,7 @@ async def _work_dummy(context, lease): |
117 | 117 |
async def _work_buildbox(context, lease):
|
118 | 118 |
logger = context.logger
|
119 | 119 |
|
120 |
- action_any = lease.inline_assignment
|
|
120 |
+ action_any = lease.payload
|
|
121 | 121 |
action = remote_execution_pb2.Action()
|
122 | 122 |
action_any.Unpack(action)
|
123 | 123 |
|
... | ... | @@ -173,7 +173,7 @@ async def _work_buildbox(context, lease): |
173 | 173 |
action_result_any = any_pb2.Any()
|
174 | 174 |
action_result_any.Pack(action_result)
|
175 | 175 |
|
176 |
- lease.inline_assignment.CopyFrom(action_result_any)
|
|
176 |
+ lease.result.CopyFrom(action_result_any)
|
|
177 | 177 |
|
178 | 178 |
return lease
|
179 | 179 |
|
... | ... | @@ -58,7 +58,7 @@ class Bot(object): |
58 | 58 |
if futures:
|
59 | 59 |
loop = asyncio.new_event_loop()
|
60 | 60 |
leases_complete, _ = loop.run_until_complete(asyncio.wait(futures))
|
61 |
- work_complete = [(lease.result().assignment, lease.result(),) for lease in leases_complete]
|
|
61 |
+ work_complete = [(lease.result().id, lease.result(),) for lease in leases_complete]
|
|
62 | 62 |
self._work_complete(work_complete)
|
63 | 63 |
loop.close()
|
64 | 64 |
self._update_bot_session()
|
... | ... | @@ -78,10 +78,10 @@ class Bot(object): |
78 | 78 |
async def _do_work(self, work, context, lease):
|
79 | 79 |
""" Work is done here, work function should be asynchronous
|
80 | 80 |
"""
|
81 |
- self.logger.info("Work found: {}".format(lease.assignment))
|
|
81 |
+ self.logger.info("Work found: {}".format(lease.id))
|
|
82 | 82 |
lease = await work(context=context, lease=lease)
|
83 | 83 |
lease.state = bots_pb2.LeaseState.Value('COMPLETED')
|
84 |
- self.logger.info("Work complete: {}".format(lease.assignment))
|
|
84 |
+ self.logger.info("Work complete: {}".format(lease.id))
|
|
85 | 85 |
return lease
|
86 | 86 |
|
87 | 87 |
def _update_bot_session(self):
|
... | ... | @@ -109,7 +109,7 @@ class Bot(object): |
109 | 109 |
del self._bot_session.leases[:]
|
110 | 110 |
for lease in leases_active:
|
111 | 111 |
for lease_tuple in leases_complete:
|
112 |
- if lease.assignment == lease_tuple[0]:
|
|
112 |
+ if lease.id == lease_tuple[0]:
|
|
113 | 113 |
leases_not_active.extend([lease_tuple[1]])
|
114 | 114 |
self._bot_session.leases.extend(leases_not_active)
|
115 | 115 |
|
... | ... | @@ -83,8 +83,8 @@ class Job(): |
83 | 83 |
def create_lease(self):
|
84 | 84 |
action = self._pack_any(self.action)
|
85 | 85 |
|
86 |
- lease = bots_pb2.Lease(assignment = self.name,
|
|
87 |
- inline_assignment = action,
|
|
86 |
+ lease = bots_pb2.Lease(id = self.name,
|
|
87 |
+ payload = action,
|
|
88 | 88 |
state = LeaseState.PENDING.value)
|
89 | 89 |
self.lease = lease
|
90 | 90 |
return lease
|
... | ... | @@ -74,7 +74,7 @@ class Scheduler(): |
74 | 74 |
return response
|
75 | 75 |
|
76 | 76 |
def update_lease(self, lease):
|
77 |
- name = lease.assignment
|
|
77 |
+ name = lease.id
|
|
78 | 78 |
job = self.jobs.get(name)
|
79 | 79 |
state = lease.state
|
80 | 80 |
|
... | ... | @@ -94,7 +94,7 @@ class Scheduler(): |
94 | 94 |
job.lease = lease
|
95 | 95 |
|
96 | 96 |
elif state == LeaseState.COMPLETED.value:
|
97 |
- self.job_complete(job.name, lease.inline_assignment)
|
|
97 |
+ self.job_complete(job.name, lease.result)
|
|
98 | 98 |
|
99 | 99 |
create_job = self.create_job()
|
100 | 100 |
if create_job is None:
|
1 |
-// Copyright 2018 Google Inc.
|
|
1 |
+// Copyright 2018 Google LLC
|
|
2 | 2 |
//
|
3 | 3 |
// Licensed under the Apache License, Version 2.0 (the "License");
|
4 | 4 |
// you may not use this file except in compliance with the License.
|
... | ... | @@ -166,26 +166,19 @@ message BotSession { |
166 | 166 |
// bot shouldn't report on them any more (the server will ignore superfluous
|
167 | 167 |
// COMPLETED records).
|
168 | 168 |
message Lease {
|
169 |
- // The assignment, which is typically a resource that can be accessed through
|
|
170 |
- // some other services. The assignment must be meaningful to the bot based
|
|
171 |
- // solely on this name, either because the bot only understands one type of
|
|
172 |
- // assignment (e.g., tasks served through the Tasks interface) or through some
|
|
173 |
- // implementation-defined schema.
|
|
174 |
- //
|
|
175 |
- // For example, if the worker is executing a Task as defined by the Tasks
|
|
176 |
- // interface, this field might be projects/{projectid}/tasks/{taskid}.
|
|
177 |
- // However, it the worker is being assigned pull from a *queue* of tasks, the
|
|
178 |
- // resource would be the name of the queue, something like
|
|
179 |
- // projects/{projectid}/locations/{locationid}/queues/{queueid}. That queue
|
|
180 |
- // may then provide the bot with tasks through another interface, which the
|
|
181 |
- // bot then processes through the [Tasks]
|
|
182 |
- // [google.devtools.remoteworkers.v1test2.Tasks] interface.
|
|
183 |
- //
|
|
184 |
- // Note that the assignment may be a [full resource name]
|
|
185 |
- // [https://cloud.google.com/apis/design/resource_names#full_resource_name] if
|
|
186 |
- // it should be accessed through an endpoint that is not already known to the
|
|
187 |
- // bot.
|
|
188 |
- string assignment = 1;
|
|
169 |
+ // A short string uniquely identifing the lease within this bot session.
|
|
170 |
+ string id = 7;
|
|
171 |
+ |
|
172 |
+ // The actual work to be performed, if any. May be omitted by the server if
|
|
173 |
+ // the lease is not in the `PENDING` state. The message must be meaningful to
|
|
174 |
+ // the bot. Output only (must only be set by the server).
|
|
175 |
+ google.protobuf.Any payload = 8;
|
|
176 |
+ |
|
177 |
+ // Any result the bot wishes to provide about the lease. Must not be changed
|
|
178 |
+ // after the first call with the lease in the `COMPLETED` or `CANCELLED`
|
|
179 |
+ // state. Input only (must only be set by the bot, will not be echoed by the
|
|
180 |
+ // server).
|
|
181 |
+ google.protobuf.Any result = 9;
|
|
189 | 182 |
|
190 | 183 |
// The state of the lease. See LeaseState for more information.
|
191 | 184 |
LeaseState state = 2;
|
... | ... | @@ -196,7 +189,7 @@ message Lease { |
196 | 189 |
// asked for some resource the bot didn't have, this status will be
|
197 | 190 |
// FAILED_PRECONDITION. But if the assignment in the lease didn't execute
|
198 | 191 |
// correctly, this field will be `OK` while the failure of the assignment must
|
199 |
- // be tracked elsewhere (e.g., through the Tasks interface).
|
|
192 |
+ // communicated via the `result` field.
|
|
200 | 193 |
google.rpc.Status status = 3;
|
201 | 194 |
|
202 | 195 |
// The requirements that are being claimed by this lease. This field may be
|
... | ... | @@ -208,19 +201,14 @@ message Lease { |
208 | 201 |
// expiry date except the first one.
|
209 | 202 |
google.protobuf.Timestamp expire_time = 5;
|
210 | 203 |
|
211 |
- // While the `assignment` field is a resource name that allows the bot to
|
|
212 |
- // get the actual assignment, the server can also optionally include the
|
|
213 |
- // assignment itself inline in order to save a round trip to the server.
|
|
214 |
- //
|
|
215 |
- // This doesn't necessarily need to be the resource pointed to by
|
|
216 |
- // `assignment`. For example, if the assignment is a task, this field could
|
|
217 |
- // be task.description, not the entire task, since that's all the bot needs
|
|
218 |
- // to know to get started. As with `assignment` itself, all that's necessary
|
|
219 |
- // is that the bot knows how to handle the type of message received here.
|
|
220 |
- //
|
|
221 |
- // This field may be omitted by the server if the lease is not in the
|
|
222 |
- // `PENDING` state.
|
|
223 |
- google.protobuf.Any inline_assignment = 6;
|
|
204 |
+ // DEPRECATED. The assignment should be provided to the bot via the `payload`
|
|
205 |
+ // field. Clients that wish to use a simple name (such as a queue of work
|
|
206 |
+ // provided elsewhere) should define a custom message type and encode it into
|
|
207 |
+ // `payload`.
|
|
208 |
+ string assignment = 1 [deprecated = true];
|
|
209 |
+ |
|
210 |
+ // DEPRECATED. Use `payload` instead.
|
|
211 |
+ google.protobuf.Any inline_assignment = 6 [deprecated = true];
|
|
224 | 212 |
}
|
225 | 213 |
|
226 | 214 |
// AdminTemp is a prelimiary set of administration tasks. It's called "Temp"
|
... | ... | @@ -27,7 +27,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( |
27 | 27 |
name='google/devtools/remoteworkers/v1test2/bots.proto',
|
28 | 28 |
package='google.devtools.remoteworkers.v1test2',
|
29 | 29 |
syntax='proto3',
|
30 |
- serialized_pb=_b('\n0google/devtools/remoteworkers/v1test2/bots.proto\x12%google.devtools.remoteworkers.v1test2\x1a\x1cgoogle/api/annotations.proto\x1a\x32google/devtools/remoteworkers/v1test2/worker.proto\x1a\x19google/protobuf/any.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xab\x02\n\nBotSession\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x62ot_id\x18\x02 \x01(\t\x12@\n\x06status\x18\x03 \x01(\x0e\x32\x30.google.devtools.remoteworkers.v1test2.BotStatus\x12=\n\x06worker\x18\x04 \x01(\x0b\x32-.google.devtools.remoteworkers.v1test2.Worker\x12<\n\x06leases\x18\x05 \x03(\x0b\x32,.google.devtools.remoteworkers.v1test2.Lease\x12/\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\x07 \x01(\t\"\xa8\x02\n\x05Lease\x12\x12\n\nassignment\x18\x01 \x01(\t\x12@\n\x05state\x18\x02 \x01(\x0e\x32\x31.google.devtools.remoteworkers.v1test2.LeaseState\x12\"\n\x06status\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12\x43\n\x0crequirements\x18\x04 \x01(\x0b\x32-.google.devtools.remoteworkers.v1test2.Worker\x12/\n\x0b\x65xpire_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x11inline_assignment\x18\x06 \x01(\x0b\x32\x14.google.protobuf.Any\"\xc5\x01\n\tAdminTemp\x12I\n\x07\x63ommand\x18\x01 \x01(\x0e\x32\x38.google.devtools.remoteworkers.v1test2.AdminTemp.Command\x12\x0b\n\x03\x61rg\x18\x02 \x01(\t\"`\n\x07\x43ommand\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0e\n\nBOT_UPDATE\x10\x01\x12\x0f\n\x0b\x42OT_RESTART\x10\x02\x12\x11\n\rBOT_TERMINATE\x10\x03\x12\x10\n\x0cHOST_RESTART\x10\x04\"q\n\x17\x43reateBotSessionRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x46\n\x0b\x62ot_session\x18\x02 \x01(\x0b\x32\x31.google.devtools.remoteworkers.v1test2.BotSession\"\xa0\x01\n\x17UpdateBotSessionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x46\n\x0b\x62ot_session\x18\x02 \x01(\x0b\x32\x31.google.devtools.remoteworkers.v1test2.BotSession\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xb5\x01\n\x17PostBotEventTempRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12Q\n\x04type\x18\x02 \x01(\x0e\x32\x43.google.devtools.remoteworkers.v1test2.PostBotEventTempRequest.Type\x12\x0b\n\x03msg\x18\x03 \x01(\t\",\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\t\n\x05\x45RROR\x10\x02*g\n\tBotStatus\x12\x1a\n\x16\x42OT_STATUS_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x01\x12\r\n\tUNHEALTHY\x10\x02\x12\x12\n\x0eHOST_REBOOTING\x10\x03\x12\x13\n\x0f\x42OT_TERMINATING\x10\x04*`\n\nLeaseState\x12\x1b\n\x17LEASE_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\r\n\tCOMPLETED\x10\x04\x12\r\n\tCANCELLED\x10\x05\x32\xa8\x04\n\x04\x42ots\x12\xbc\x01\n\x10\x43reateBotSession\x12>.google.devtools.remoteworkers.v1test2.CreateBotSessionRequest\x1a\x31.google.devtools.remoteworkers.v1test2.BotSession\"5\x82\xd3\xe4\x93\x02/\" /v1test2/{parent=**}/botSessions:\x0b\x62ot_session\x12\xbc\x01\n\x10UpdateBotSession\x12>.google.devtools.remoteworkers.v1test2.UpdateBotSessionRequest\x1a\x31.google.devtools.remoteworkers.v1test2.BotSession\"5\x82\xd3\xe4\x93\x02/2 /v1test2/{name=**/botSessions/*}:\x0b\x62ot_session\x12\xa1\x01\n\x10PostBotEventTemp\x12>.google.devtools.remoteworkers.v1test2.PostBotEventTempRequest\x1a\x16.google.protobuf.Empty\"5\x82\xd3\xe4\x93\x02/\"*/v1test2/{name=**/botSessions/*}:postEvent:\x01*B\xc1\x01\n)com.google.devtools.remoteworkers.v1test2B\x11RemoteWorkersBotsP\x01ZRgoogle.golang.org/genproto/googleapis/devtools/remoteworkers/v1test2;remoteworkers\xa2\x02\x02RW\xaa\x02%Google.DevTools.RemoteWorkers.V1Test2b\x06proto3')
|
|
30 |
+ serialized_pb=_b('\n0google/devtools/remoteworkers/v1test2/bots.proto\x12%google.devtools.remoteworkers.v1test2\x1a\x1cgoogle/api/annotations.proto\x1a\x32google/devtools/remoteworkers/v1test2/worker.proto\x1a\x19google/protobuf/any.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\xab\x02\n\nBotSession\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x62ot_id\x18\x02 \x01(\t\x12@\n\x06status\x18\x03 \x01(\x0e\x32\x30.google.devtools.remoteworkers.v1test2.BotStatus\x12=\n\x06worker\x18\x04 \x01(\x0b\x32-.google.devtools.remoteworkers.v1test2.Worker\x12<\n\x06leases\x18\x05 \x03(\x0b\x32,.google.devtools.remoteworkers.v1test2.Lease\x12/\n\x0b\x65xpire_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07version\x18\x07 \x01(\t\"\x89\x03\n\x05Lease\x12\n\n\x02id\x18\x07 \x01(\t\x12%\n\x07payload\x18\x08 \x01(\x0b\x32\x14.google.protobuf.Any\x12$\n\x06result\x18\t \x01(\x0b\x32\x14.google.protobuf.Any\x12@\n\x05state\x18\x02 \x01(\x0e\x32\x31.google.devtools.remoteworkers.v1test2.LeaseState\x12\"\n\x06status\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12\x43\n\x0crequirements\x18\x04 \x01(\x0b\x32-.google.devtools.remoteworkers.v1test2.Worker\x12/\n\x0b\x65xpire_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x16\n\nassignment\x18\x01 \x01(\tB\x02\x18\x01\x12\x33\n\x11inline_assignment\x18\x06 \x01(\x0b\x32\x14.google.protobuf.AnyB\x02\x18\x01\"\xc5\x01\n\tAdminTemp\x12I\n\x07\x63ommand\x18\x01 \x01(\x0e\x32\x38.google.devtools.remoteworkers.v1test2.AdminTemp.Command\x12\x0b\n\x03\x61rg\x18\x02 \x01(\t\"`\n\x07\x43ommand\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0e\n\nBOT_UPDATE\x10\x01\x12\x0f\n\x0b\x42OT_RESTART\x10\x02\x12\x11\n\rBOT_TERMINATE\x10\x03\x12\x10\n\x0cHOST_RESTART\x10\x04\"q\n\x17\x43reateBotSessionRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x46\n\x0b\x62ot_session\x18\x02 \x01(\x0b\x32\x31.google.devtools.remoteworkers.v1test2.BotSession\"\xa0\x01\n\x17UpdateBotSessionRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x46\n\x0b\x62ot_session\x18\x02 \x01(\x0b\x32\x31.google.devtools.remoteworkers.v1test2.BotSession\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xb5\x01\n\x17PostBotEventTempRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12Q\n\x04type\x18\x02 \x01(\x0e\x32\x43.google.devtools.remoteworkers.v1test2.PostBotEventTempRequest.Type\x12\x0b\n\x03msg\x18\x03 \x01(\t\",\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x08\n\x04INFO\x10\x01\x12\t\n\x05\x45RROR\x10\x02*g\n\tBotStatus\x12\x1a\n\x16\x42OT_STATUS_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x01\x12\r\n\tUNHEALTHY\x10\x02\x12\x12\n\x0eHOST_REBOOTING\x10\x03\x12\x13\n\x0f\x42OT_TERMINATING\x10\x04*`\n\nLeaseState\x12\x1b\n\x17LEASE_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\r\n\tCOMPLETED\x10\x04\x12\r\n\tCANCELLED\x10\x05\x32\xa8\x04\n\x04\x42ots\x12\xbc\x01\n\x10\x43reateBotSession\x12>.google.devtools.remoteworkers.v1test2.CreateBotSessionRequest\x1a\x31.google.devtools.remoteworkers.v1test2.BotSession\"5\x82\xd3\xe4\x93\x02/\" /v1test2/{parent=**}/botSessions:\x0b\x62ot_session\x12\xbc\x01\n\x10UpdateBotSession\x12>.google.devtools.remoteworkers.v1test2.UpdateBotSessionRequest\x1a\x31.google.devtools.remoteworkers.v1test2.BotSession\"5\x82\xd3\xe4\x93\x02/2 /v1test2/{name=**/botSessions/*}:\x0b\x62ot_session\x12\xa1\x01\n\x10PostBotEventTemp\x12>.google.devtools.remoteworkers.v1test2.PostBotEventTempRequest\x1a\x16.google.protobuf.Empty\"5\x82\xd3\xe4\x93\x02/\"*/v1test2/{name=**/botSessions/*}:postEvent:\x01*B\xc1\x01\n)com.google.devtools.remoteworkers.v1test2B\x11RemoteWorkersBotsP\x01ZRgoogle.golang.org/genproto/googleapis/devtools/remoteworkers/v1test2;remoteworkers\xa2\x02\x02RW\xaa\x02%Google.DevTools.RemoteWorkers.V1Test2b\x06proto3')
|
|
31 | 31 |
,
|
32 | 32 |
dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_devtools_dot_remoteworkers_dot_v1test2_dot_worker__pb2.DESCRIPTOR,google_dot_protobuf_dot_any__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_rpc_dot_status__pb2.DESCRIPTOR,])
|
33 | 33 |
|
... | ... | @@ -60,8 +60,8 @@ _BOTSTATUS = _descriptor.EnumDescriptor( |
60 | 60 |
],
|
61 | 61 |
containing_type=None,
|
62 | 62 |
options=None,
|
63 |
- serialized_start=1584,
|
|
64 |
- serialized_end=1687,
|
|
63 |
+ serialized_start=1681,
|
|
64 |
+ serialized_end=1784,
|
|
65 | 65 |
)
|
66 | 66 |
_sym_db.RegisterEnumDescriptor(_BOTSTATUS)
|
67 | 67 |
|
... | ... | @@ -95,8 +95,8 @@ _LEASESTATE = _descriptor.EnumDescriptor( |
95 | 95 |
],
|
96 | 96 |
containing_type=None,
|
97 | 97 |
options=None,
|
98 |
- serialized_start=1689,
|
|
99 |
- serialized_end=1785,
|
|
98 |
+ serialized_start=1786,
|
|
99 |
+ serialized_end=1882,
|
|
100 | 100 |
)
|
101 | 101 |
_sym_db.RegisterEnumDescriptor(_LEASESTATE)
|
102 | 102 |
|
... | ... | @@ -142,8 +142,8 @@ _ADMINTEMP_COMMAND = _descriptor.EnumDescriptor( |
142 | 142 |
],
|
143 | 143 |
containing_type=None,
|
144 | 144 |
options=None,
|
145 |
- serialized_start=1024,
|
|
146 |
- serialized_end=1120,
|
|
145 |
+ serialized_start=1121,
|
|
146 |
+ serialized_end=1217,
|
|
147 | 147 |
)
|
148 | 148 |
_sym_db.RegisterEnumDescriptor(_ADMINTEMP_COMMAND)
|
149 | 149 |
|
... | ... | @@ -168,8 +168,8 @@ _POSTBOTEVENTTEMPREQUEST_TYPE = _descriptor.EnumDescriptor( |
168 | 168 |
],
|
169 | 169 |
containing_type=None,
|
170 | 170 |
options=None,
|
171 |
- serialized_start=1538,
|
|
172 |
- serialized_end=1582,
|
|
171 |
+ serialized_start=1635,
|
|
172 |
+ serialized_end=1679,
|
|
173 | 173 |
)
|
174 | 174 |
_sym_db.RegisterEnumDescriptor(_POSTBOTEVENTTEMPREQUEST_TYPE)
|
175 | 175 |
|
... | ... | @@ -255,47 +255,68 @@ _LEASE = _descriptor.Descriptor( |
255 | 255 |
containing_type=None,
|
256 | 256 |
fields=[
|
257 | 257 |
_descriptor.FieldDescriptor(
|
258 |
- name='assignment', full_name='google.devtools.remoteworkers.v1test2.Lease.assignment', index=0,
|
|
259 |
- number=1, type=9, cpp_type=9, label=1,
|
|
258 |
+ name='id', full_name='google.devtools.remoteworkers.v1test2.Lease.id', index=0,
|
|
259 |
+ number=7, type=9, cpp_type=9, label=1,
|
|
260 | 260 |
has_default_value=False, default_value=_b("").decode('utf-8'),
|
261 | 261 |
message_type=None, enum_type=None, containing_type=None,
|
262 | 262 |
is_extension=False, extension_scope=None,
|
263 | 263 |
options=None, file=DESCRIPTOR),
|
264 | 264 |
_descriptor.FieldDescriptor(
|
265 |
- name='state', full_name='google.devtools.remoteworkers.v1test2.Lease.state', index=1,
|
|
265 |
+ name='payload', full_name='google.devtools.remoteworkers.v1test2.Lease.payload', index=1,
|
|
266 |
+ number=8, type=11, cpp_type=10, label=1,
|
|
267 |
+ has_default_value=False, default_value=None,
|
|
268 |
+ message_type=None, enum_type=None, containing_type=None,
|
|
269 |
+ is_extension=False, extension_scope=None,
|
|
270 |
+ options=None, file=DESCRIPTOR),
|
|
271 |
+ _descriptor.FieldDescriptor(
|
|
272 |
+ name='result', full_name='google.devtools.remoteworkers.v1test2.Lease.result', index=2,
|
|
273 |
+ number=9, type=11, cpp_type=10, label=1,
|
|
274 |
+ has_default_value=False, default_value=None,
|
|
275 |
+ message_type=None, enum_type=None, containing_type=None,
|
|
276 |
+ is_extension=False, extension_scope=None,
|
|
277 |
+ options=None, file=DESCRIPTOR),
|
|
278 |
+ _descriptor.FieldDescriptor(
|
|
279 |
+ name='state', full_name='google.devtools.remoteworkers.v1test2.Lease.state', index=3,
|
|
266 | 280 |
number=2, type=14, cpp_type=8, label=1,
|
267 | 281 |
has_default_value=False, default_value=0,
|
268 | 282 |
message_type=None, enum_type=None, containing_type=None,
|
269 | 283 |
is_extension=False, extension_scope=None,
|
270 | 284 |
options=None, file=DESCRIPTOR),
|
271 | 285 |
_descriptor.FieldDescriptor(
|
272 |
- name='status', full_name='google.devtools.remoteworkers.v1test2.Lease.status', index=2,
|
|
286 |
+ name='status', full_name='google.devtools.remoteworkers.v1test2.Lease.status', index=4,
|
|
273 | 287 |
number=3, type=11, cpp_type=10, label=1,
|
274 | 288 |
has_default_value=False, default_value=None,
|
275 | 289 |
message_type=None, enum_type=None, containing_type=None,
|
276 | 290 |
is_extension=False, extension_scope=None,
|
277 | 291 |
options=None, file=DESCRIPTOR),
|
278 | 292 |
_descriptor.FieldDescriptor(
|
279 |
- name='requirements', full_name='google.devtools.remoteworkers.v1test2.Lease.requirements', index=3,
|
|
293 |
+ name='requirements', full_name='google.devtools.remoteworkers.v1test2.Lease.requirements', index=5,
|
|
280 | 294 |
number=4, type=11, cpp_type=10, label=1,
|
281 | 295 |
has_default_value=False, default_value=None,
|
282 | 296 |
message_type=None, enum_type=None, containing_type=None,
|
283 | 297 |
is_extension=False, extension_scope=None,
|
284 | 298 |
options=None, file=DESCRIPTOR),
|
285 | 299 |
_descriptor.FieldDescriptor(
|
286 |
- name='expire_time', full_name='google.devtools.remoteworkers.v1test2.Lease.expire_time', index=4,
|
|
300 |
+ name='expire_time', full_name='google.devtools.remoteworkers.v1test2.Lease.expire_time', index=6,
|
|
287 | 301 |
number=5, type=11, cpp_type=10, label=1,
|
288 | 302 |
has_default_value=False, default_value=None,
|
289 | 303 |
message_type=None, enum_type=None, containing_type=None,
|
290 | 304 |
is_extension=False, extension_scope=None,
|
291 | 305 |
options=None, file=DESCRIPTOR),
|
292 | 306 |
_descriptor.FieldDescriptor(
|
293 |
- name='inline_assignment', full_name='google.devtools.remoteworkers.v1test2.Lease.inline_assignment', index=5,
|
|
307 |
+ name='assignment', full_name='google.devtools.remoteworkers.v1test2.Lease.assignment', index=7,
|
|
308 |
+ number=1, type=9, cpp_type=9, label=1,
|
|
309 |
+ has_default_value=False, default_value=_b("").decode('utf-8'),
|
|
310 |
+ message_type=None, enum_type=None, containing_type=None,
|
|
311 |
+ is_extension=False, extension_scope=None,
|
|
312 |
+ options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')), file=DESCRIPTOR),
|
|
313 |
+ _descriptor.FieldDescriptor(
|
|
314 |
+ name='inline_assignment', full_name='google.devtools.remoteworkers.v1test2.Lease.inline_assignment', index=8,
|
|
294 | 315 |
number=6, type=11, cpp_type=10, label=1,
|
295 | 316 |
has_default_value=False, default_value=None,
|
296 | 317 |
message_type=None, enum_type=None, containing_type=None,
|
297 | 318 |
is_extension=False, extension_scope=None,
|
298 |
- options=None, file=DESCRIPTOR),
|
|
319 |
+ options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')), file=DESCRIPTOR),
|
|
299 | 320 |
],
|
300 | 321 |
extensions=[
|
301 | 322 |
],
|
... | ... | @@ -309,7 +330,7 @@ _LEASE = _descriptor.Descriptor( |
309 | 330 |
oneofs=[
|
310 | 331 |
],
|
311 | 332 |
serialized_start=624,
|
312 |
- serialized_end=920,
|
|
333 |
+ serialized_end=1017,
|
|
313 | 334 |
)
|
314 | 335 |
|
315 | 336 |
|
... | ... | @@ -347,8 +368,8 @@ _ADMINTEMP = _descriptor.Descriptor( |
347 | 368 |
extension_ranges=[],
|
348 | 369 |
oneofs=[
|
349 | 370 |
],
|
350 |
- serialized_start=923,
|
|
351 |
- serialized_end=1120,
|
|
371 |
+ serialized_start=1020,
|
|
372 |
+ serialized_end=1217,
|
|
352 | 373 |
)
|
353 | 374 |
|
354 | 375 |
|
... | ... | @@ -385,8 +406,8 @@ _CREATEBOTSESSIONREQUEST = _descriptor.Descriptor( |
385 | 406 |
extension_ranges=[],
|
386 | 407 |
oneofs=[
|
387 | 408 |
],
|
388 |
- serialized_start=1122,
|
|
389 |
- serialized_end=1235,
|
|
409 |
+ serialized_start=1219,
|
|
410 |
+ serialized_end=1332,
|
|
390 | 411 |
)
|
391 | 412 |
|
392 | 413 |
|
... | ... | @@ -430,8 +451,8 @@ _UPDATEBOTSESSIONREQUEST = _descriptor.Descriptor( |
430 | 451 |
extension_ranges=[],
|
431 | 452 |
oneofs=[
|
432 | 453 |
],
|
433 |
- serialized_start=1238,
|
|
434 |
- serialized_end=1398,
|
|
454 |
+ serialized_start=1335,
|
|
455 |
+ serialized_end=1495,
|
|
435 | 456 |
)
|
436 | 457 |
|
437 | 458 |
|
... | ... | @@ -476,14 +497,16 @@ _POSTBOTEVENTTEMPREQUEST = _descriptor.Descriptor( |
476 | 497 |
extension_ranges=[],
|
477 | 498 |
oneofs=[
|
478 | 499 |
],
|
479 |
- serialized_start=1401,
|
|
480 |
- serialized_end=1582,
|
|
500 |
+ serialized_start=1498,
|
|
501 |
+ serialized_end=1679,
|
|
481 | 502 |
)
|
482 | 503 |
|
483 | 504 |
_BOTSESSION.fields_by_name['status'].enum_type = _BOTSTATUS
|
484 | 505 |
_BOTSESSION.fields_by_name['worker'].message_type = google_dot_devtools_dot_remoteworkers_dot_v1test2_dot_worker__pb2._WORKER
|
485 | 506 |
_BOTSESSION.fields_by_name['leases'].message_type = _LEASE
|
486 | 507 |
_BOTSESSION.fields_by_name['expire_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP
|
508 |
+_LEASE.fields_by_name['payload'].message_type = google_dot_protobuf_dot_any__pb2._ANY
|
|
509 |
+_LEASE.fields_by_name['result'].message_type = google_dot_protobuf_dot_any__pb2._ANY
|
|
487 | 510 |
_LEASE.fields_by_name['state'].enum_type = _LEASESTATE
|
488 | 511 |
_LEASE.fields_by_name['status'].message_type = google_dot_rpc_dot_status__pb2._STATUS
|
489 | 512 |
_LEASE.fields_by_name['requirements'].message_type = google_dot_devtools_dot_remoteworkers_dot_v1test2_dot_worker__pb2._WORKER
|
... | ... | @@ -551,6 +574,10 @@ _sym_db.RegisterMessage(PostBotEventTempRequest) |
551 | 574 |
|
552 | 575 |
DESCRIPTOR.has_options = True
|
553 | 576 |
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n)com.google.devtools.remoteworkers.v1test2B\021RemoteWorkersBotsP\001ZRgoogle.golang.org/genproto/googleapis/devtools/remoteworkers/v1test2;remoteworkers\242\002\002RW\252\002%Google.DevTools.RemoteWorkers.V1Test2'))
|
577 |
+_LEASE.fields_by_name['assignment'].has_options = True
|
|
578 |
+_LEASE.fields_by_name['assignment']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
|
|
579 |
+_LEASE.fields_by_name['inline_assignment'].has_options = True
|
|
580 |
+_LEASE.fields_by_name['inline_assignment']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
|
|
554 | 581 |
|
555 | 582 |
_BOTS = _descriptor.ServiceDescriptor(
|
556 | 583 |
name='Bots',
|
... | ... | @@ -558,8 +585,8 @@ _BOTS = _descriptor.ServiceDescriptor( |
558 | 585 |
file=DESCRIPTOR,
|
559 | 586 |
index=0,
|
560 | 587 |
options=None,
|
561 |
- serialized_start=1788,
|
|
562 |
- serialized_end=2340,
|
|
588 |
+ serialized_start=1885,
|
|
589 |
+ serialized_end=2437,
|
|
563 | 590 |
methods=[
|
564 | 591 |
_descriptor.MethodDescriptor(
|
565 | 592 |
name='CreateBotSession',
|
1 |
-// Copyright 2018 Google Inc.
|
|
1 |
+// Copyright 2018 Google LLC
|
|
2 | 2 |
//
|
3 | 3 |
// Licensed under the Apache License, Version 2.0 (the "License");
|
4 | 4 |
// you may not use this file except in compliance with the License.
|
... | ... | @@ -16,7 +16,9 @@ syntax = "proto3"; |
16 | 16 |
|
17 | 17 |
package google.devtools.remoteworkers.v1test2;
|
18 | 18 |
|
19 |
+import "google/protobuf/any.proto";
|
|
19 | 20 |
import "google/protobuf/duration.proto";
|
21 |
+import "google/rpc/status.proto";
|
|
20 | 22 |
|
21 | 23 |
option csharp_namespace = "Google.DevTools.RemoteWorkers.V1Test2";
|
22 | 24 |
option go_package = "google.golang.org/genproto/googleapis/devtools/remoteworkers/v1test2;remoteworkers";
|
... | ... | @@ -26,7 +28,8 @@ option java_package = "com.google.devtools.remoteworkers.v1test2"; |
26 | 28 |
option objc_class_prefix = "RW";
|
27 | 29 |
|
28 | 30 |
|
29 |
-// Describes a shell-style task to execute.
|
|
31 |
+// Describes a shell-style task to execute, suitable for providing as the Bots
|
|
32 |
+// interface's `Lease.payload` field.
|
|
30 | 33 |
message CommandTask {
|
31 | 34 |
// Describes the inputs to a shell-style task.
|
32 | 35 |
message Inputs {
|
... | ... | @@ -39,7 +42,16 @@ message CommandTask { |
39 | 42 |
string value = 2;
|
40 | 43 |
}
|
41 | 44 |
|
42 |
- // The command itself to run (e.g., argv)
|
|
45 |
+ // The command itself to run (e.g., argv).
|
|
46 |
+ //
|
|
47 |
+ // This field should be passed directly to the underlying operating system,
|
|
48 |
+ // and so it must be sensible to that operating system. For example, on
|
|
49 |
+ // Windows, the first argument might be "C:\Windows\System32\ping.exe" -
|
|
50 |
+ // that is, using drive letters and backslashes. A command for a *nix
|
|
51 |
+ // system, on the other hand, would use forward slashes.
|
|
52 |
+ //
|
|
53 |
+ // All other fields in the RWAPI must consistently use forward slashes,
|
|
54 |
+ // since those fields may be interpretted by both the service and the bot.
|
|
43 | 55 |
repeated string arguments = 1;
|
44 | 56 |
|
45 | 57 |
// The input filesystem to be set up prior to the task beginning. The
|
... | ... | @@ -59,11 +71,27 @@ message CommandTask { |
59 | 71 |
|
60 | 72 |
// Describes the expected outputs of the command.
|
61 | 73 |
message Outputs {
|
62 |
- // A list of expected files, relative to the execution root.
|
|
74 |
+ // A list of expected files, relative to the execution root. All paths
|
|
75 |
+ // MUST be delimited by forward slashes.
|
|
63 | 76 |
repeated string files = 1;
|
64 | 77 |
|
65 |
- // A list of expected directories, relative to the execution root.
|
|
78 |
+ // A list of expected directories, relative to the execution root. All paths
|
|
79 |
+ // MUST be delimited by forward slashes.
|
|
66 | 80 |
repeated string directories = 2;
|
81 |
+ |
|
82 |
+ // The destination to which any stdout should be sent. The method by which
|
|
83 |
+ // the bot should send the stream contents to that destination is not
|
|
84 |
+ // defined in this API. As examples, the destination could be a file
|
|
85 |
+ // referenced in the `files` field in this message, or it could be a URI
|
|
86 |
+ // that must be written via the ByteStream API.
|
|
87 |
+ string stdout_destination = 3;
|
|
88 |
+ |
|
89 |
+ // The destination to which any stderr should be sent. The method by which
|
|
90 |
+ // the bot should send the stream contents to that destination is not
|
|
91 |
+ // defined in this API. As examples, the destination could be a file
|
|
92 |
+ // referenced in the `files` field in this message, or it could be a URI
|
|
93 |
+ // that must be written via the ByteStream API.
|
|
94 |
+ string stderr_destination = 4;
|
|
67 | 95 |
}
|
68 | 96 |
|
69 | 97 |
// Describes the timeouts associated with this task.
|
... | ... | @@ -98,6 +126,7 @@ message CommandTask { |
98 | 126 |
Timeouts timeouts = 5;
|
99 | 127 |
}
|
100 | 128 |
|
129 |
+// DEPRECATED - use CommandResult instead.
|
|
101 | 130 |
// Describes the actual outputs from the task.
|
102 | 131 |
message CommandOutputs {
|
103 | 132 |
// exit_code is only fully reliable if the status' code is OK. If the task
|
... | ... | @@ -113,6 +142,7 @@ message CommandOutputs { |
113 | 142 |
Digest outputs = 2;
|
114 | 143 |
}
|
115 | 144 |
|
145 |
+// DEPRECATED - use CommandResult instead.
|
|
116 | 146 |
// Can be used as part of CompleteRequest.metadata, or are part of a more
|
117 | 147 |
// sophisticated message.
|
118 | 148 |
message CommandOverhead {
|
... | ... | @@ -126,14 +156,50 @@ message CommandOverhead { |
126 | 156 |
google.protobuf.Duration overhead = 2;
|
127 | 157 |
}
|
128 | 158 |
|
159 |
+// All information about the execution of a command, suitable for providing as
|
|
160 |
+// the Bots interface's `Lease.result` field.
|
|
161 |
+message CommandResult {
|
|
162 |
+ // An overall status for the command. For example, if the command timed out,
|
|
163 |
+ // this might have a code of DEADLINE_EXCEEDED; if it was killed by the OS for
|
|
164 |
+ // memory exhaustion, it might have a code of RESOURCE_EXHAUSTED.
|
|
165 |
+ google.rpc.Status status = 1;
|
|
166 |
+ |
|
167 |
+ // The exit code of the process. An exit code of "0" should only be trusted if
|
|
168 |
+ // `status` has a code of OK (otherwise it may simply be unset).
|
|
169 |
+ int32 exit_code = 2;
|
|
170 |
+ |
|
171 |
+ // The output files. The blob referenced by the digest should contain
|
|
172 |
+ // one of the following (implementation-dependent):
|
|
173 |
+ // * A marshalled DirectoryMetadata of the returned filesystem
|
|
174 |
+ // * A LUCI-style .isolated file
|
|
175 |
+ Digest outputs = 3;
|
|
176 |
+ |
|
177 |
+ // The elapsed time between calling Accept and Complete. The server will also
|
|
178 |
+ // have its own idea of what this should be, but this excludes the overhead of
|
|
179 |
+ // the RPCs and the bot response time.
|
|
180 |
+ google.protobuf.Duration duration = 4 [deprecated = true];
|
|
181 |
+ |
|
182 |
+ // The amount of time *not* spent executing the command (ie
|
|
183 |
+ // uploading/downloading files).
|
|
184 |
+ google.protobuf.Duration overhead = 5 [deprecated = true];
|
|
185 |
+ |
|
186 |
+ // Implementation-dependent statistics about the task. Both servers and bots
|
|
187 |
+ // may define messages which can be encoded here; bots are free to provide
|
|
188 |
+ // statistics in multiple formats, and servers are free to choose one or more
|
|
189 |
+ // of the values to process and ignore others. In particular, it is *not*
|
|
190 |
+ // considered an error for the bot to provide the server with a field that it
|
|
191 |
+ // doesn't know about.
|
|
192 |
+ repeated google.protobuf.Any statistics = 6;
|
|
193 |
+}
|
|
194 |
+ |
|
129 | 195 |
// The metadata for a file. Similar to the equivalent message in the Remote
|
130 | 196 |
// Execution API.
|
131 | 197 |
message FileMetadata {
|
132 | 198 |
// The path of this file. If this message is part of the
|
133 |
- // CommandResult.output_files fields, the path is relative to the execution
|
|
134 |
- // root and must correspond to an entry in CommandTask.outputs.files. If this
|
|
199 |
+ // CommandOutputs.outputs fields, the path is relative to the execution root
|
|
200 |
+ // and must correspond to an entry in CommandTask.outputs.files. If this
|
|
135 | 201 |
// message is part of a Directory message, then the path is relative to the
|
136 |
- // root of that directory.
|
|
202 |
+ // root of that directory. All paths MUST be delimited by forward slashes.
|
|
137 | 203 |
string path = 1;
|
138 | 204 |
|
139 | 205 |
// A pointer to the contents of the file. The method by which a client
|
... | ... | @@ -159,9 +225,15 @@ message DirectoryMetadata { |
159 | 225 |
Digest digest = 2;
|
160 | 226 |
}
|
161 | 227 |
|
162 |
-// A reference to the contents of a file or a directory. If the latter, the has
|
|
163 |
-// refers to the hash of a marshalled Directory message. Similar to the
|
|
164 |
-// equivalent message in the Remote Execution API.
|
|
228 |
+// The CommandTask and CommandResult messages assume the existence of a service
|
|
229 |
+// that can serve blobs of content, identified by a hash and size known as a
|
|
230 |
+// "digest." The method by which these blobs may be retrieved is not specified
|
|
231 |
+// here, but a model implementation is in the Remote Execution API's
|
|
232 |
+// "ContentAddressibleStorage" interface.
|
|
233 |
+//
|
|
234 |
+// In the context of the RWAPI, a Digest will virtually always refer to the
|
|
235 |
+// contents of a file or a directory. The latter is represented by the
|
|
236 |
+// byte-encoded Directory message.
|
|
165 | 237 |
message Digest {
|
166 | 238 |
// A string-encoded hash (eg "1a2b3c", not the byte array [0x1a, 0x2b, 0x3c])
|
167 | 239 |
// using an implementation-defined hash algorithm (eg SHA-256).
|
... | ... | @@ -13,16 +13,18 @@ from google.protobuf import descriptor_pb2 |
13 | 13 |
_sym_db = _symbol_database.Default()
|
14 | 14 |
|
15 | 15 |
|
16 |
+from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2
|
|
16 | 17 |
from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2
|
18 |
+from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2
|
|
17 | 19 |
|
18 | 20 |
|
19 | 21 |
DESCRIPTOR = _descriptor.FileDescriptor(
|
20 | 22 |
name='google/devtools/remoteworkers/v1test2/command.proto',
|
21 | 23 |
package='google.devtools.remoteworkers.v1test2',
|
22 | 24 |
syntax='proto3',
|
23 |
- serialized_pb=_b('\n3google/devtools/remoteworkers/v1test2/command.proto\x12%google.devtools.remoteworkers.v1test2\x1a\x1egoogle/protobuf/duration.proto\"\xbb\x05\n\x0b\x43ommandTask\x12I\n\x06inputs\x18\x01 \x01(\x0b\x32\x39.google.devtools.remoteworkers.v1test2.CommandTask.Inputs\x12T\n\x10\x65xpected_outputs\x18\x04 \x01(\x0b\x32:.google.devtools.remoteworkers.v1test2.CommandTask.Outputs\x12M\n\x08timeouts\x18\x05 \x01(\x0b\x32;.google.devtools.remoteworkers.v1test2.CommandTask.Timeouts\x1a\xfb\x01\n\x06Inputs\x12\x11\n\targuments\x18\x01 \x03(\t\x12<\n\x05\x66iles\x18\x02 \x03(\x0b\x32-.google.devtools.remoteworkers.v1test2.Digest\x12l\n\x15\x65nvironment_variables\x18\x03 \x03(\x0b\x32M.google.devtools.remoteworkers.v1test2.CommandTask.Inputs.EnvironmentVariable\x1a\x32\n\x13\x45nvironmentVariable\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x1a-\n\x07Outputs\x12\r\n\x05\x66iles\x18\x01 \x03(\t\x12\x13\n\x0b\x64irectories\x18\x02 \x03(\t\x1a\x8e\x01\n\x08Timeouts\x12,\n\texecution\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\'\n\x04idle\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12+\n\x08shutdown\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\"c\n\x0e\x43ommandOutputs\x12\x11\n\texit_code\x18\x01 \x01(\x05\x12>\n\x07outputs\x18\x02 \x01(\x0b\x32-.google.devtools.remoteworkers.v1test2.Digest\"k\n\x0f\x43ommandOverhead\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12+\n\x08overhead\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x84\x01\n\x0c\x46ileMetadata\x12\x0c\n\x04path\x18\x01 \x01(\t\x12=\n\x06\x64igest\x18\x02 \x01(\x0b\x32-.google.devtools.remoteworkers.v1test2.Digest\x12\x10\n\x08\x63ontents\x18\x03 \x01(\x0c\x12\x15\n\ris_executable\x18\x04 \x01(\x08\"`\n\x11\x44irectoryMetadata\x12\x0c\n\x04path\x18\x01 \x01(\t\x12=\n\x06\x64igest\x18\x02 \x01(\x0b\x32-.google.devtools.remoteworkers.v1test2.Digest\"*\n\x06\x44igest\x12\x0c\n\x04hash\x18\x01 \x01(\t\x12\x12\n\nsize_bytes\x18\x02 \x01(\x03\"\x9e\x01\n\tDirectory\x12\x42\n\x05\x66iles\x18\x01 \x03(\x0b\x32\x33.google.devtools.remoteworkers.v1test2.FileMetadata\x12M\n\x0b\x64irectories\x18\x02 \x03(\x0b\x32\x38.google.devtools.remoteworkers.v1test2.DirectoryMetadataB\xc5\x01\n)com.google.devtools.remoteworkers.v1test2B\x15RemoteWorkersCommandsP\x01ZRgoogle.golang.org/genproto/googleapis/devtools/remoteworkers/v1test2;remoteworkers\xa2\x02\x02RW\xaa\x02%Google.DevTools.RemoteWorkers.V1Test2b\x06proto3')
|
|
25 |
+ serialized_pb=_b('\n3google/devtools/remoteworkers/v1test2/command.proto\x12%google.devtools.remoteworkers.v1test2\x1a\x19google/protobuf/any.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x17google/rpc/status.proto\"\xf3\x05\n\x0b\x43ommandTask\x12I\n\x06inputs\x18\x01 \x01(\x0b\x32\x39.google.devtools.remoteworkers.v1test2.CommandTask.Inputs\x12T\n\x10\x65xpected_outputs\x18\x04 \x01(\x0b\x32:.google.devtools.remoteworkers.v1test2.CommandTask.Outputs\x12M\n\x08timeouts\x18\x05 \x01(\x0b\x32;.google.devtools.remoteworkers.v1test2.CommandTask.Timeouts\x1a\xfb\x01\n\x06Inputs\x12\x11\n\targuments\x18\x01 \x03(\t\x12<\n\x05\x66iles\x18\x02 \x03(\x0b\x32-.google.devtools.remoteworkers.v1test2.Digest\x12l\n\x15\x65nvironment_variables\x18\x03 \x03(\x0b\x32M.google.devtools.remoteworkers.v1test2.CommandTask.Inputs.EnvironmentVariable\x1a\x32\n\x13\x45nvironmentVariable\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x1a\x65\n\x07Outputs\x12\r\n\x05\x66iles\x18\x01 \x03(\t\x12\x13\n\x0b\x64irectories\x18\x02 \x03(\t\x12\x1a\n\x12stdout_destination\x18\x03 \x01(\t\x12\x1a\n\x12stderr_destination\x18\x04 \x01(\t\x1a\x8e\x01\n\x08Timeouts\x12,\n\texecution\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\'\n\x04idle\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12+\n\x08shutdown\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\"c\n\x0e\x43ommandOutputs\x12\x11\n\texit_code\x18\x01 \x01(\x05\x12>\n\x07outputs\x18\x02 \x01(\x0b\x32-.google.devtools.remoteworkers.v1test2.Digest\"k\n\x0f\x43ommandOverhead\x12+\n\x08\x64uration\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12+\n\x08overhead\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x92\x02\n\rCommandResult\x12\"\n\x06status\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12\x11\n\texit_code\x18\x02 \x01(\x05\x12>\n\x07outputs\x18\x03 \x01(\x0b\x32-.google.devtools.remoteworkers.v1test2.Digest\x12/\n\x08\x64uration\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x02\x18\x01\x12/\n\x08overhead\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x02\x18\x01\x12(\n\nstatistics\x18\x06 \x03(\x0b\x32\x14.google.protobuf.Any\"\x84\x01\n\x0c\x46ileMetadata\x12\x0c\n\x04path\x18\x01 \x01(\t\x12=\n\x06\x64igest\x18\x02 \x01(\x0b\x32-.google.devtools.remoteworkers.v1test2.Digest\x12\x10\n\x08\x63ontents\x18\x03 \x01(\x0c\x12\x15\n\ris_executable\x18\x04 \x01(\x08\"`\n\x11\x44irectoryMetadata\x12\x0c\n\x04path\x18\x01 \x01(\t\x12=\n\x06\x64igest\x18\x02 \x01(\x0b\x32-.google.devtools.remoteworkers.v1test2.Digest\"*\n\x06\x44igest\x12\x0c\n\x04hash\x18\x01 \x01(\t\x12\x12\n\nsize_bytes\x18\x02 \x01(\x03\"\x9e\x01\n\tDirectory\x12\x42\n\x05\x66iles\x18\x01 \x03(\x0b\x32\x33.google.devtools.remoteworkers.v1test2.FileMetadata\x12M\n\x0b\x64irectories\x18\x02 \x03(\x0b\x32\x38.google.devtools.remoteworkers.v1test2.DirectoryMetadataB\xc5\x01\n)com.google.devtools.remoteworkers.v1test2B\x15RemoteWorkersCommandsP\x01ZRgoogle.golang.org/genproto/googleapis/devtools/remoteworkers/v1test2;remoteworkers\xa2\x02\x02RW\xaa\x02%Google.DevTools.RemoteWorkers.V1Test2b\x06proto3')
|
|
24 | 26 |
,
|
25 |
- dependencies=[google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,])
|
|
27 |
+ dependencies=[google_dot_protobuf_dot_any__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_rpc_dot_status__pb2.DESCRIPTOR,])
|
|
26 | 28 |
|
27 | 29 |
|
28 | 30 |
|
... | ... | @@ -60,8 +62,8 @@ _COMMANDTASK_INPUTS_ENVIRONMENTVARIABLE = _descriptor.Descriptor( |
60 | 62 |
extension_ranges=[],
|
61 | 63 |
oneofs=[
|
62 | 64 |
],
|
63 |
- serialized_start=584,
|
|
64 |
- serialized_end=634,
|
|
65 |
+ serialized_start=636,
|
|
66 |
+ serialized_end=686,
|
|
65 | 67 |
)
|
66 | 68 |
|
67 | 69 |
_COMMANDTASK_INPUTS = _descriptor.Descriptor(
|
... | ... | @@ -104,8 +106,8 @@ _COMMANDTASK_INPUTS = _descriptor.Descriptor( |
104 | 106 |
extension_ranges=[],
|
105 | 107 |
oneofs=[
|
106 | 108 |
],
|
107 |
- serialized_start=383,
|
|
108 |
- serialized_end=634,
|
|
109 |
+ serialized_start=435,
|
|
110 |
+ serialized_end=686,
|
|
109 | 111 |
)
|
110 | 112 |
|
111 | 113 |
_COMMANDTASK_OUTPUTS = _descriptor.Descriptor(
|
... | ... | @@ -129,6 +131,20 @@ _COMMANDTASK_OUTPUTS = _descriptor.Descriptor( |
129 | 131 |
message_type=None, enum_type=None, containing_type=None,
|
130 | 132 |
is_extension=False, extension_scope=None,
|
131 | 133 |
options=None, file=DESCRIPTOR),
|
134 |
+ _descriptor.FieldDescriptor(
|
|
135 |
+ name='stdout_destination', full_name='google.devtools.remoteworkers.v1test2.CommandTask.Outputs.stdout_destination', index=2,
|
|
136 |
+ number=3, type=9, cpp_type=9, label=1,
|
|
137 |
+ has_default_value=False, default_value=_b("").decode('utf-8'),
|
|
138 |
+ message_type=None, enum_type=None, containing_type=None,
|
|
139 |
+ is_extension=False, extension_scope=None,
|
|
140 |
+ options=None, file=DESCRIPTOR),
|
|
141 |
+ _descriptor.FieldDescriptor(
|
|
142 |
+ name='stderr_destination', full_name='google.devtools.remoteworkers.v1test2.CommandTask.Outputs.stderr_destination', index=3,
|
|
143 |
+ number=4, type=9, cpp_type=9, label=1,
|
|
144 |
+ has_default_value=False, default_value=_b("").decode('utf-8'),
|
|
145 |
+ message_type=None, enum_type=None, containing_type=None,
|
|
146 |
+ is_extension=False, extension_scope=None,
|
|
147 |
+ options=None, file=DESCRIPTOR),
|
|
132 | 148 |
],
|
133 | 149 |
extensions=[
|
134 | 150 |
],
|
... | ... | @@ -141,8 +157,8 @@ _COMMANDTASK_OUTPUTS = _descriptor.Descriptor( |
141 | 157 |
extension_ranges=[],
|
142 | 158 |
oneofs=[
|
143 | 159 |
],
|
144 |
- serialized_start=636,
|
|
145 |
- serialized_end=681,
|
|
160 |
+ serialized_start=688,
|
|
161 |
+ serialized_end=789,
|
|
146 | 162 |
)
|
147 | 163 |
|
148 | 164 |
_COMMANDTASK_TIMEOUTS = _descriptor.Descriptor(
|
... | ... | @@ -185,8 +201,8 @@ _COMMANDTASK_TIMEOUTS = _descriptor.Descriptor( |
185 | 201 |
extension_ranges=[],
|
186 | 202 |
oneofs=[
|
187 | 203 |
],
|
188 |
- serialized_start=684,
|
|
189 |
- serialized_end=826,
|
|
204 |
+ serialized_start=792,
|
|
205 |
+ serialized_end=934,
|
|
190 | 206 |
)
|
191 | 207 |
|
192 | 208 |
_COMMANDTASK = _descriptor.Descriptor(
|
... | ... | @@ -229,8 +245,8 @@ _COMMANDTASK = _descriptor.Descriptor( |
229 | 245 |
extension_ranges=[],
|
230 | 246 |
oneofs=[
|
231 | 247 |
],
|
232 |
- serialized_start=127,
|
|
233 |
- serialized_end=826,
|
|
248 |
+ serialized_start=179,
|
|
249 |
+ serialized_end=934,
|
|
234 | 250 |
)
|
235 | 251 |
|
236 | 252 |
|
... | ... | @@ -267,8 +283,8 @@ _COMMANDOUTPUTS = _descriptor.Descriptor( |
267 | 283 |
extension_ranges=[],
|
268 | 284 |
oneofs=[
|
269 | 285 |
],
|
270 |
- serialized_start=828,
|
|
271 |
- serialized_end=927,
|
|
286 |
+ serialized_start=936,
|
|
287 |
+ serialized_end=1035,
|
|
272 | 288 |
)
|
273 | 289 |
|
274 | 290 |
|
... | ... | @@ -305,8 +321,74 @@ _COMMANDOVERHEAD = _descriptor.Descriptor( |
305 | 321 |
extension_ranges=[],
|
306 | 322 |
oneofs=[
|
307 | 323 |
],
|
308 |
- serialized_start=929,
|
|
309 |
- serialized_end=1036,
|
|
324 |
+ serialized_start=1037,
|
|
325 |
+ serialized_end=1144,
|
|
326 |
+)
|
|
327 |
+ |
|
328 |
+ |
|
329 |
+_COMMANDRESULT = _descriptor.Descriptor(
|
|
330 |
+ name='CommandResult',
|
|
331 |
+ full_name='google.devtools.remoteworkers.v1test2.CommandResult',
|
|
332 |
+ filename=None,
|
|
333 |
+ file=DESCRIPTOR,
|
|
334 |
+ containing_type=None,
|
|
335 |
+ fields=[
|
|
336 |
+ _descriptor.FieldDescriptor(
|
|
337 |
+ name='status', full_name='google.devtools.remoteworkers.v1test2.CommandResult.status', index=0,
|
|
338 |
+ number=1, type=11, cpp_type=10, label=1,
|
|
339 |
+ has_default_value=False, default_value=None,
|
|
340 |
+ message_type=None, enum_type=None, containing_type=None,
|
|
341 |
+ is_extension=False, extension_scope=None,
|
|
342 |
+ options=None, file=DESCRIPTOR),
|
|
343 |
+ _descriptor.FieldDescriptor(
|
|
344 |
+ name='exit_code', full_name='google.devtools.remoteworkers.v1test2.CommandResult.exit_code', index=1,
|
|
345 |
+ number=2, type=5, cpp_type=1, label=1,
|
|
346 |
+ has_default_value=False, default_value=0,
|
|
347 |
+ message_type=None, enum_type=None, containing_type=None,
|
|
348 |
+ is_extension=False, extension_scope=None,
|
|
349 |
+ options=None, file=DESCRIPTOR),
|
|
350 |
+ _descriptor.FieldDescriptor(
|
|
351 |
+ name='outputs', full_name='google.devtools.remoteworkers.v1test2.CommandResult.outputs', index=2,
|
|
352 |
+ number=3, type=11, cpp_type=10, label=1,
|
|
353 |
+ has_default_value=False, default_value=None,
|
|
354 |
+ message_type=None, enum_type=None, containing_type=None,
|
|
355 |
+ is_extension=False, extension_scope=None,
|
|
356 |
+ options=None, file=DESCRIPTOR),
|
|
357 |
+ _descriptor.FieldDescriptor(
|
|
358 |
+ name='duration', full_name='google.devtools.remoteworkers.v1test2.CommandResult.duration', index=3,
|
|
359 |
+ number=4, type=11, cpp_type=10, label=1,
|
|
360 |
+ has_default_value=False, default_value=None,
|
|
361 |
+ message_type=None, enum_type=None, containing_type=None,
|
|
362 |
+ is_extension=False, extension_scope=None,
|
|
363 |
+ options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')), file=DESCRIPTOR),
|
|
364 |
+ _descriptor.FieldDescriptor(
|
|
365 |
+ name='overhead', full_name='google.devtools.remoteworkers.v1test2.CommandResult.overhead', index=4,
|
|
366 |
+ number=5, type=11, cpp_type=10, label=1,
|
|
367 |
+ has_default_value=False, default_value=None,
|
|
368 |
+ message_type=None, enum_type=None, containing_type=None,
|
|
369 |
+ is_extension=False, extension_scope=None,
|
|
370 |
+ options=_descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001')), file=DESCRIPTOR),
|
|
371 |
+ _descriptor.FieldDescriptor(
|
|
372 |
+ name='statistics', full_name='google.devtools.remoteworkers.v1test2.CommandResult.statistics', index=5,
|
|
373 |
+ number=6, type=11, cpp_type=10, label=3,
|
|
374 |
+ has_default_value=False, default_value=[],
|
|
375 |
+ message_type=None, enum_type=None, containing_type=None,
|
|
376 |
+ is_extension=False, extension_scope=None,
|
|
377 |
+ options=None, file=DESCRIPTOR),
|
|
378 |
+ ],
|
|
379 |
+ extensions=[
|
|
380 |
+ ],
|
|
381 |
+ nested_types=[],
|
|
382 |
+ enum_types=[
|
|
383 |
+ ],
|
|
384 |
+ options=None,
|
|
385 |
+ is_extendable=False,
|
|
386 |
+ syntax='proto3',
|
|
387 |
+ extension_ranges=[],
|
|
388 |
+ oneofs=[
|
|
389 |
+ ],
|
|
390 |
+ serialized_start=1147,
|
|
391 |
+ serialized_end=1421,
|
|
310 | 392 |
)
|
311 | 393 |
|
312 | 394 |
|
... | ... | @@ -357,8 +439,8 @@ _FILEMETADATA = _descriptor.Descriptor( |
357 | 439 |
extension_ranges=[],
|
358 | 440 |
oneofs=[
|
359 | 441 |
],
|
360 |
- serialized_start=1039,
|
|
361 |
- serialized_end=1171,
|
|
442 |
+ serialized_start=1424,
|
|
443 |
+ serialized_end=1556,
|
|
362 | 444 |
)
|
363 | 445 |
|
364 | 446 |
|
... | ... | @@ -395,8 +477,8 @@ _DIRECTORYMETADATA = _descriptor.Descriptor( |
395 | 477 |
extension_ranges=[],
|
396 | 478 |
oneofs=[
|
397 | 479 |
],
|
398 |
- serialized_start=1173,
|
|
399 |
- serialized_end=1269,
|
|
480 |
+ serialized_start=1558,
|
|
481 |
+ serialized_end=1654,
|
|
400 | 482 |
)
|
401 | 483 |
|
402 | 484 |
|
... | ... | @@ -433,8 +515,8 @@ _DIGEST = _descriptor.Descriptor( |
433 | 515 |
extension_ranges=[],
|
434 | 516 |
oneofs=[
|
435 | 517 |
],
|
436 |
- serialized_start=1271,
|
|
437 |
- serialized_end=1313,
|
|
518 |
+ serialized_start=1656,
|
|
519 |
+ serialized_end=1698,
|
|
438 | 520 |
)
|
439 | 521 |
|
440 | 522 |
|
... | ... | @@ -471,8 +553,8 @@ _DIRECTORY = _descriptor.Descriptor( |
471 | 553 |
extension_ranges=[],
|
472 | 554 |
oneofs=[
|
473 | 555 |
],
|
474 |
- serialized_start=1316,
|
|
475 |
- serialized_end=1474,
|
|
556 |
+ serialized_start=1701,
|
|
557 |
+ serialized_end=1859,
|
|
476 | 558 |
)
|
477 | 559 |
|
478 | 560 |
_COMMANDTASK_INPUTS_ENVIRONMENTVARIABLE.containing_type = _COMMANDTASK_INPUTS
|
... | ... | @@ -490,6 +572,11 @@ _COMMANDTASK.fields_by_name['timeouts'].message_type = _COMMANDTASK_TIMEOUTS |
490 | 572 |
_COMMANDOUTPUTS.fields_by_name['outputs'].message_type = _DIGEST
|
491 | 573 |
_COMMANDOVERHEAD.fields_by_name['duration'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION
|
492 | 574 |
_COMMANDOVERHEAD.fields_by_name['overhead'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION
|
575 |
+_COMMANDRESULT.fields_by_name['status'].message_type = google_dot_rpc_dot_status__pb2._STATUS
|
|
576 |
+_COMMANDRESULT.fields_by_name['outputs'].message_type = _DIGEST
|
|
577 |
+_COMMANDRESULT.fields_by_name['duration'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION
|
|
578 |
+_COMMANDRESULT.fields_by_name['overhead'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION
|
|
579 |
+_COMMANDRESULT.fields_by_name['statistics'].message_type = google_dot_protobuf_dot_any__pb2._ANY
|
|
493 | 580 |
_FILEMETADATA.fields_by_name['digest'].message_type = _DIGEST
|
494 | 581 |
_DIRECTORYMETADATA.fields_by_name['digest'].message_type = _DIGEST
|
495 | 582 |
_DIRECTORY.fields_by_name['files'].message_type = _FILEMETADATA
|
... | ... | @@ -497,6 +584,7 @@ _DIRECTORY.fields_by_name['directories'].message_type = _DIRECTORYMETADATA |
497 | 584 |
DESCRIPTOR.message_types_by_name['CommandTask'] = _COMMANDTASK
|
498 | 585 |
DESCRIPTOR.message_types_by_name['CommandOutputs'] = _COMMANDOUTPUTS
|
499 | 586 |
DESCRIPTOR.message_types_by_name['CommandOverhead'] = _COMMANDOVERHEAD
|
587 |
+DESCRIPTOR.message_types_by_name['CommandResult'] = _COMMANDRESULT
|
|
500 | 588 |
DESCRIPTOR.message_types_by_name['FileMetadata'] = _FILEMETADATA
|
501 | 589 |
DESCRIPTOR.message_types_by_name['DirectoryMetadata'] = _DIRECTORYMETADATA
|
502 | 590 |
DESCRIPTOR.message_types_by_name['Digest'] = _DIGEST
|
... | ... | @@ -556,6 +644,13 @@ CommandOverhead = _reflection.GeneratedProtocolMessageType('CommandOverhead', (_ |
556 | 644 |
))
|
557 | 645 |
_sym_db.RegisterMessage(CommandOverhead)
|
558 | 646 |
|
647 |
+CommandResult = _reflection.GeneratedProtocolMessageType('CommandResult', (_message.Message,), dict(
|
|
648 |
+ DESCRIPTOR = _COMMANDRESULT,
|
|
649 |
+ __module__ = 'google.devtools.remoteworkers.v1test2.command_pb2'
|
|
650 |
+ # @@protoc_insertion_point(class_scope:google.devtools.remoteworkers.v1test2.CommandResult)
|
|
651 |
+ ))
|
|
652 |
+_sym_db.RegisterMessage(CommandResult)
|
|
653 |
+ |
|
559 | 654 |
FileMetadata = _reflection.GeneratedProtocolMessageType('FileMetadata', (_message.Message,), dict(
|
560 | 655 |
DESCRIPTOR = _FILEMETADATA,
|
561 | 656 |
__module__ = 'google.devtools.remoteworkers.v1test2.command_pb2'
|
... | ... | @@ -587,4 +682,8 @@ _sym_db.RegisterMessage(Directory) |
587 | 682 |
|
588 | 683 |
DESCRIPTOR.has_options = True
|
589 | 684 |
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n)com.google.devtools.remoteworkers.v1test2B\025RemoteWorkersCommandsP\001ZRgoogle.golang.org/genproto/googleapis/devtools/remoteworkers/v1test2;remoteworkers\242\002\002RW\252\002%Google.DevTools.RemoteWorkers.V1Test2'))
|
685 |
+_COMMANDRESULT.fields_by_name['duration'].has_options = True
|
|
686 |
+_COMMANDRESULT.fields_by_name['duration']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
|
|
687 |
+_COMMANDRESULT.fields_by_name['overhead'].has_options = True
|
|
688 |
+_COMMANDRESULT.fields_by_name['overhead']._options = _descriptor._ParseOptions(descriptor_pb2.FieldOptions(), _b('\030\001'))
|
|
590 | 689 |
# @@protoc_insertion_point(module_scope)
|
1 |
-// Copyright 2018 Google Inc.
|
|
1 |
+// Copyright 2018 Google LLC
|
|
2 | 2 |
//
|
3 | 3 |
// Licensed under the Apache License, Version 2.0 (the "License");
|
4 | 4 |
// you may not use this file except in compliance with the License.
|
... | ... | @@ -29,20 +29,11 @@ option java_package = "com.google.devtools.remoteworkers.v1test2"; |
29 | 29 |
option objc_class_prefix = "RW";
|
30 | 30 |
|
31 | 31 |
|
32 |
-// Design doc: https://goo.gl/oojM5H
|
|
33 |
-//
|
|
34 |
-// The Tasks interface defines tasks to execute and the results of these tasks.
|
|
35 |
-// It does not include the metadata surrounding tasks; that is, the Task message
|
|
36 |
-// represents *what* to be executed and *what* was the result of that execution,
|
|
37 |
-// but not *how* to execute that task. For example this interface does not
|
|
38 |
-// explain what platform the task should be run on, what priority it may have in
|
|
39 |
-// any queue, etc.
|
|
40 |
-//
|
|
41 |
-// NB: we are not using google.rpc.batch since that's designed specifically for
|
|
42 |
-// batch execution of RPC methods, and so is semantically quite different from
|
|
43 |
-// our more general concept (though an RPC method could certainly be described
|
|
44 |
-// by a Task in this interface).
|
|
32 |
+// DEPRECATED. GetTask should be replaced by Lease.payload, UpdateTaskResult by
|
|
33 |
+// Lease.result and logs should be precreated prior to sending to the bot (eg,
|
|
34 |
+// via CommandTask.expected_outputs.stdout_destination).
|
|
45 | 35 |
service Tasks {
|
36 |
+ // DEPRECATED - use Lease.payload instead.
|
|
46 | 37 |
// GetTask reads the current state of the task. Tasks must be created through
|
47 | 38 |
// some other interface, and should be immutable once created and exposed to
|
48 | 39 |
// the bots.
|
... | ... | @@ -52,6 +43,7 @@ service Tasks { |
52 | 43 |
};
|
53 | 44 |
}
|
54 | 45 |
|
46 |
+ // DEPRECATED - use Lease.result instead.
|
|
55 | 47 |
// UpdateTaskResult updates the result.
|
56 | 48 |
rpc UpdateTaskResult(UpdateTaskResultRequest) returns (TaskResult) {
|
57 | 49 |
option (google.api.http) = {
|
... | ... | @@ -60,6 +52,7 @@ service Tasks { |
60 | 52 |
};
|
61 | 53 |
}
|
62 | 54 |
|
55 |
+ // DEPRECATED - precreate logs prior to sending to bot.
|
|
63 | 56 |
// AddTaskLog creates a new streaming log. The log is streamed and marked as
|
64 | 57 |
// completed through other interfaces (i.e., ByteStream). This can be called
|
65 | 58 |
// by the bot if it wants to create a new log; the server can also predefine
|
... | ... | @@ -72,6 +65,7 @@ service Tasks { |
72 | 65 |
}
|
73 | 66 |
}
|
74 | 67 |
|
68 |
+// DEPRECATED - use Lease.payload instead.
|
|
75 | 69 |
// A Task represents a unit of work. Its result and logs are defined as
|
76 | 70 |
// subresources.
|
77 | 71 |
//
|
... | ... | @@ -98,6 +92,7 @@ message Task { |
98 | 92 |
map<string, string> logs = 3;
|
99 | 93 |
}
|
100 | 94 |
|
95 |
+// DEPRECATED - use Lease.assignment_result instead.
|
|
101 | 96 |
// The result and metadata of the task.
|
102 | 97 |
message TaskResult {
|
103 | 98 |
// The name of the task result; must be a name of a `Task` followed by
|
... | ... | @@ -5,19 +5,9 @@ from google.devtools.remoteworkers.v1test2 import tasks_pb2 as google_dot_devtoo |
5 | 5 |
|
6 | 6 |
|
7 | 7 |
class TasksStub(object):
|
8 |
- """Design doc: https://goo.gl/oojM5H
|
|
9 |
- |
|
10 |
- The Tasks interface defines tasks to execute and the results of these tasks.
|
|
11 |
- It does not include the metadata surrounding tasks; that is, the Task message
|
|
12 |
- represents *what* to be executed and *what* was the result of that execution,
|
|
13 |
- but not *how* to execute that task. For example this interface does not
|
|
14 |
- explain what platform the task should be run on, what priority it may have in
|
|
15 |
- any queue, etc.
|
|
16 |
- |
|
17 |
- NB: we are not using google.rpc.batch since that's designed specifically for
|
|
18 |
- batch execution of RPC methods, and so is semantically quite different from
|
|
19 |
- our more general concept (though an RPC method could certainly be described
|
|
20 |
- by a Task in this interface).
|
|
8 |
+ """DEPRECATED. GetTask should be replaced by Lease.payload, UpdateTaskResult by
|
|
9 |
+ Lease.result and logs should be precreated prior to sending to the bot (eg,
|
|
10 |
+ via CommandTask.expected_outputs.stdout_destination).
|
|
21 | 11 |
"""
|
22 | 12 |
|
23 | 13 |
def __init__(self, channel):
|
... | ... | @@ -44,23 +34,14 @@ class TasksStub(object): |
44 | 34 |
|
45 | 35 |
|
46 | 36 |
class TasksServicer(object):
|
47 |
- """Design doc: https://goo.gl/oojM5H
|
|
48 |
- |
|
49 |
- The Tasks interface defines tasks to execute and the results of these tasks.
|
|
50 |
- It does not include the metadata surrounding tasks; that is, the Task message
|
|
51 |
- represents *what* to be executed and *what* was the result of that execution,
|
|
52 |
- but not *how* to execute that task. For example this interface does not
|
|
53 |
- explain what platform the task should be run on, what priority it may have in
|
|
54 |
- any queue, etc.
|
|
55 |
- |
|
56 |
- NB: we are not using google.rpc.batch since that's designed specifically for
|
|
57 |
- batch execution of RPC methods, and so is semantically quite different from
|
|
58 |
- our more general concept (though an RPC method could certainly be described
|
|
59 |
- by a Task in this interface).
|
|
37 |
+ """DEPRECATED. GetTask should be replaced by Lease.payload, UpdateTaskResult by
|
|
38 |
+ Lease.result and logs should be precreated prior to sending to the bot (eg,
|
|
39 |
+ via CommandTask.expected_outputs.stdout_destination).
|
|
60 | 40 |
"""
|
61 | 41 |
|
62 | 42 |
def GetTask(self, request, context):
|
63 |
- """GetTask reads the current state of the task. Tasks must be created through
|
|
43 |
+ """DEPRECATED - use Lease.payload instead.
|
|
44 |
+ GetTask reads the current state of the task. Tasks must be created through
|
|
64 | 45 |
some other interface, and should be immutable once created and exposed to
|
65 | 46 |
the bots.
|
66 | 47 |
"""
|
... | ... | @@ -69,14 +50,16 @@ class TasksServicer(object): |
69 | 50 |
raise NotImplementedError('Method not implemented!')
|
70 | 51 |
|
71 | 52 |
def UpdateTaskResult(self, request, context):
|
72 |
- """UpdateTaskResult updates the result.
|
|
53 |
+ """DEPRECATED - use Lease.result instead.
|
|
54 |
+ UpdateTaskResult updates the result.
|
|
73 | 55 |
"""
|
74 | 56 |
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
75 | 57 |
context.set_details('Method not implemented!')
|
76 | 58 |
raise NotImplementedError('Method not implemented!')
|
77 | 59 |
|
78 | 60 |
def AddTaskLog(self, request, context):
|
79 |
- """AddTaskLog creates a new streaming log. The log is streamed and marked as
|
|
61 |
+ """DEPRECATED - precreate logs prior to sending to bot.
|
|
62 |
+ AddTaskLog creates a new streaming log. The log is streamed and marked as
|
|
80 | 63 |
completed through other interfaces (i.e., ByteStream). This can be called
|
81 | 64 |
by the bot if it wants to create a new log; the server can also predefine
|
82 | 65 |
logs that do not need to be created (e.g. `stdout`).
|
1 |
-// Copyright 2018 Google Inc.
|
|
1 |
+// Copyright 2018 Google LLC
|
|
2 | 2 |
//
|
3 | 3 |
// Licensed under the Apache License, Version 2.0 (the "License");
|
4 | 4 |
// you may not use this file except in compliance with the License.
|
... | ... | @@ -78,6 +78,24 @@ message Worker { |
78 | 78 |
string value = 2;
|
79 | 79 |
}
|
80 | 80 |
|
81 |
+ // A configuration request or report; see the `configs` field for more
|
|
82 |
+ // information.
|
|
83 |
+ message Config {
|
|
84 |
+ // For general information on keys, see the documentation to `Worker`.
|
|
85 |
+ //
|
|
86 |
+ // The current set of standard keys are:
|
|
87 |
+ //
|
|
88 |
+ // * DockerImage: the image of the container. When being reported by the
|
|
89 |
+ // bot, the empty value should always be included if the bot is able to pull
|
|
90 |
+ // its own images; the bot may optionally *also* report images that are
|
|
91 |
+ // present in its cache. When being requested in a lease, the value is the
|
|
92 |
+ // URI of the image (eg `gcr.io/user/image@sha256:hash`).
|
|
93 |
+ string key = 1;
|
|
94 |
+ |
|
95 |
+ // The configuration's value.
|
|
96 |
+ string value = 2;
|
|
97 |
+ }
|
|
98 |
+ |
|
81 | 99 |
// A list of devices; the first device is the primary device. See the `Device`
|
82 | 100 |
// message for more information.
|
83 | 101 |
repeated Device devices = 1;
|
... | ... | @@ -90,6 +108,24 @@ message Worker { |
90 | 108 |
//
|
91 | 109 |
// The behaviour of repeated keys is identical to that of Device.Property.
|
92 | 110 |
repeated Property properties = 2;
|
111 |
+ |
|
112 |
+ // Bots can be configured in certain ways when accepting leases. For example,
|
|
113 |
+ // many leases are executed inside a Docker container. To support this, the
|
|
114 |
+ // bot needs to be able to report that it has Docker installed (and knows how
|
|
115 |
+ // to execute something inside a container), and the task submitter needs to
|
|
116 |
+ // specify which image should be used to start the container. Similarly, a
|
|
117 |
+ // lease may be able to run as one of several users on the worker; in such
|
|
118 |
+ // cases, the bot needs to report what users are available, and the submitter
|
|
119 |
+ // needs to choose one.
|
|
120 |
+ //
|
|
121 |
+ // Therefore, when this message is reported by the bot to the service, each
|
|
122 |
+ // key represents a *type* of configuration that the bot knows how to set,
|
|
123 |
+ // while each *value* represents a legal value for that configuration (the
|
|
124 |
+ // empty string is interpretted as a wildcard, such as for Docker images).
|
|
125 |
+ // When this message is sent by the server to the bot in the context of a
|
|
126 |
+ // lease, it represents a command to the bot to apply the setting. Keys may
|
|
127 |
+ // be repeated during reporting but not in a lease.
|
|
128 |
+ repeated Config configs = 3;
|
|
93 | 129 |
}
|
94 | 130 |
|
95 | 131 |
// Any device, including computers, phones, accelerators (e.g. GPUs), etc. All
|
... | ... | @@ -19,7 +19,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( |
19 | 19 |
name='google/devtools/remoteworkers/v1test2/worker.proto',
|
20 | 20 |
package='google.devtools.remoteworkers.v1test2',
|
21 | 21 |
syntax='proto3',
|
22 |
- serialized_pb=_b('\n2google/devtools/remoteworkers/v1test2/worker.proto\x12%google.devtools.remoteworkers.v1test2\"\xbc\x01\n\x06Worker\x12>\n\x07\x64\x65vices\x18\x01 \x03(\x0b\x32-.google.devtools.remoteworkers.v1test2.Device\x12J\n\nproperties\x18\x02 \x03(\x0b\x32\x36.google.devtools.remoteworkers.v1test2.Worker.Property\x1a&\n\x08Property\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\x8c\x01\n\x06\x44\x65vice\x12\x0e\n\x06handle\x18\x01 \x01(\t\x12J\n\nproperties\x18\x02 \x03(\x0b\x32\x36.google.devtools.remoteworkers.v1test2.Device.Property\x1a&\n\x08Property\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\tB\xc3\x01\n)com.google.devtools.remoteworkers.v1test2B\x13RemoteWorkersWorkerP\x01ZRgoogle.golang.org/genproto/googleapis/devtools/remoteworkers/v1test2;remoteworkers\xa2\x02\x02RW\xaa\x02%Google.DevTools.RemoteWorkers.V1Test2b\x06proto3')
|
|
22 |
+ serialized_pb=_b('\n2google/devtools/remoteworkers/v1test2/worker.proto\x12%google.devtools.remoteworkers.v1test2\"\xa9\x02\n\x06Worker\x12>\n\x07\x64\x65vices\x18\x01 \x03(\x0b\x32-.google.devtools.remoteworkers.v1test2.Device\x12J\n\nproperties\x18\x02 \x03(\x0b\x32\x36.google.devtools.remoteworkers.v1test2.Worker.Property\x12\x45\n\x07\x63onfigs\x18\x03 \x03(\x0b\x32\x34.google.devtools.remoteworkers.v1test2.Worker.Config\x1a&\n\x08Property\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x1a$\n\x06\x43onfig\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\x8c\x01\n\x06\x44\x65vice\x12\x0e\n\x06handle\x18\x01 \x01(\t\x12J\n\nproperties\x18\x02 \x03(\x0b\x32\x36.google.devtools.remoteworkers.v1test2.Device.Property\x1a&\n\x08Property\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\tB\xc3\x01\n)com.google.devtools.remoteworkers.v1test2B\x13RemoteWorkersWorkerP\x01ZRgoogle.golang.org/genproto/googleapis/devtools/remoteworkers/v1test2;remoteworkers\xa2\x02\x02RW\xaa\x02%Google.DevTools.RemoteWorkers.V1Test2b\x06proto3')
|
|
23 | 23 |
)
|
24 | 24 |
|
25 | 25 |
|
... | ... | @@ -58,8 +58,45 @@ _WORKER_PROPERTY = _descriptor.Descriptor( |
58 | 58 |
extension_ranges=[],
|
59 | 59 |
oneofs=[
|
60 | 60 |
],
|
61 |
- serialized_start=244,
|
|
62 |
- serialized_end=282,
|
|
61 |
+ serialized_start=315,
|
|
62 |
+ serialized_end=353,
|
|
63 |
+)
|
|
64 |
+ |
|
65 |
+_WORKER_CONFIG = _descriptor.Descriptor(
|
|
66 |
+ name='Config',
|
|
67 |
+ full_name='google.devtools.remoteworkers.v1test2.Worker.Config',
|
|
68 |
+ filename=None,
|
|
69 |
+ file=DESCRIPTOR,
|
|
70 |
+ containing_type=None,
|
|
71 |
+ fields=[
|
|
72 |
+ _descriptor.FieldDescriptor(
|
|
73 |
+ name='key', full_name='google.devtools.remoteworkers.v1test2.Worker.Config.key', index=0,
|
|
74 |
+ number=1, type=9, cpp_type=9, label=1,
|
|
75 |
+ has_default_value=False, default_value=_b("").decode('utf-8'),
|
|
76 |
+ message_type=None, enum_type=None, containing_type=None,
|
|
77 |
+ is_extension=False, extension_scope=None,
|
|
78 |
+ options=None, file=DESCRIPTOR),
|
|
79 |
+ _descriptor.FieldDescriptor(
|
|
80 |
+ name='value', full_name='google.devtools.remoteworkers.v1test2.Worker.Config.value', index=1,
|
|
81 |
+ number=2, type=9, cpp_type=9, label=1,
|
|
82 |
+ has_default_value=False, default_value=_b("").decode('utf-8'),
|
|
83 |
+ message_type=None, enum_type=None, containing_type=None,
|
|
84 |
+ is_extension=False, extension_scope=None,
|
|
85 |
+ options=None, file=DESCRIPTOR),
|
|
86 |
+ ],
|
|
87 |
+ extensions=[
|
|
88 |
+ ],
|
|
89 |
+ nested_types=[],
|
|
90 |
+ enum_types=[
|
|
91 |
+ ],
|
|
92 |
+ options=None,
|
|
93 |
+ is_extendable=False,
|
|
94 |
+ syntax='proto3',
|
|
95 |
+ extension_ranges=[],
|
|
96 |
+ oneofs=[
|
|
97 |
+ ],
|
|
98 |
+ serialized_start=355,
|
|
99 |
+ serialized_end=391,
|
|
63 | 100 |
)
|
64 | 101 |
|
65 | 102 |
_WORKER = _descriptor.Descriptor(
|
... | ... | @@ -83,10 +120,17 @@ _WORKER = _descriptor.Descriptor( |
83 | 120 |
message_type=None, enum_type=None, containing_type=None,
|
84 | 121 |
is_extension=False, extension_scope=None,
|
85 | 122 |
options=None, file=DESCRIPTOR),
|
123 |
+ _descriptor.FieldDescriptor(
|
|
124 |
+ name='configs', full_name='google.devtools.remoteworkers.v1test2.Worker.configs', index=2,
|
|
125 |
+ number=3, type=11, cpp_type=10, label=3,
|
|
126 |
+ has_default_value=False, default_value=[],
|
|
127 |
+ message_type=None, enum_type=None, containing_type=None,
|
|
128 |
+ is_extension=False, extension_scope=None,
|
|
129 |
+ options=None, file=DESCRIPTOR),
|
|
86 | 130 |
],
|
87 | 131 |
extensions=[
|
88 | 132 |
],
|
89 |
- nested_types=[_WORKER_PROPERTY, ],
|
|
133 |
+ nested_types=[_WORKER_PROPERTY, _WORKER_CONFIG, ],
|
|
90 | 134 |
enum_types=[
|
91 | 135 |
],
|
92 | 136 |
options=None,
|
... | ... | @@ -96,7 +140,7 @@ _WORKER = _descriptor.Descriptor( |
96 | 140 |
oneofs=[
|
97 | 141 |
],
|
98 | 142 |
serialized_start=94,
|
99 |
- serialized_end=282,
|
|
143 |
+ serialized_end=391,
|
|
100 | 144 |
)
|
101 | 145 |
|
102 | 146 |
|
... | ... | @@ -133,8 +177,8 @@ _DEVICE_PROPERTY = _descriptor.Descriptor( |
133 | 177 |
extension_ranges=[],
|
134 | 178 |
oneofs=[
|
135 | 179 |
],
|
136 |
- serialized_start=244,
|
|
137 |
- serialized_end=282,
|
|
180 |
+ serialized_start=315,
|
|
181 |
+ serialized_end=353,
|
|
138 | 182 |
)
|
139 | 183 |
|
140 | 184 |
_DEVICE = _descriptor.Descriptor(
|
... | ... | @@ -170,13 +214,15 @@ _DEVICE = _descriptor.Descriptor( |
170 | 214 |
extension_ranges=[],
|
171 | 215 |
oneofs=[
|
172 | 216 |
],
|
173 |
- serialized_start=285,
|
|
174 |
- serialized_end=425,
|
|
217 |
+ serialized_start=394,
|
|
218 |
+ serialized_end=534,
|
|
175 | 219 |
)
|
176 | 220 |
|
177 | 221 |
_WORKER_PROPERTY.containing_type = _WORKER
|
222 |
+_WORKER_CONFIG.containing_type = _WORKER
|
|
178 | 223 |
_WORKER.fields_by_name['devices'].message_type = _DEVICE
|
179 | 224 |
_WORKER.fields_by_name['properties'].message_type = _WORKER_PROPERTY
|
225 |
+_WORKER.fields_by_name['configs'].message_type = _WORKER_CONFIG
|
|
180 | 226 |
_DEVICE_PROPERTY.containing_type = _DEVICE
|
181 | 227 |
_DEVICE.fields_by_name['properties'].message_type = _DEVICE_PROPERTY
|
182 | 228 |
DESCRIPTOR.message_types_by_name['Worker'] = _WORKER
|
... | ... | @@ -191,12 +237,20 @@ Worker = _reflection.GeneratedProtocolMessageType('Worker', (_message.Message,), |
191 | 237 |
# @@protoc_insertion_point(class_scope:google.devtools.remoteworkers.v1test2.Worker.Property)
|
192 | 238 |
))
|
193 | 239 |
,
|
240 |
+ |
|
241 |
+ Config = _reflection.GeneratedProtocolMessageType('Config', (_message.Message,), dict(
|
|
242 |
+ DESCRIPTOR = _WORKER_CONFIG,
|
|
243 |
+ __module__ = 'google.devtools.remoteworkers.v1test2.worker_pb2'
|
|
244 |
+ # @@protoc_insertion_point(class_scope:google.devtools.remoteworkers.v1test2.Worker.Config)
|
|
245 |
+ ))
|
|
246 |
+ ,
|
|
194 | 247 |
DESCRIPTOR = _WORKER,
|
195 | 248 |
__module__ = 'google.devtools.remoteworkers.v1test2.worker_pb2'
|
196 | 249 |
# @@protoc_insertion_point(class_scope:google.devtools.remoteworkers.v1test2.Worker)
|
197 | 250 |
))
|
198 | 251 |
_sym_db.RegisterMessage(Worker)
|
199 | 252 |
_sym_db.RegisterMessage(Worker.Property)
|
253 |
+_sym_db.RegisterMessage(Worker.Config)
|
|
200 | 254 |
|
201 | 255 |
Device = _reflection.GeneratedProtocolMessageType('Device', (_message.Message,), dict(
|
202 | 256 |
|
... | ... | @@ -41,7 +41,6 @@ setup( |
41 | 41 |
description="A remote execution service",
|
42 | 42 |
packages=setuptools.find_packages(),
|
43 | 43 |
install_requires=[
|
44 |
- 'setuptools',
|
|
45 | 44 |
'protobuf',
|
46 | 45 |
'grpcio',
|
47 | 46 |
'Click',
|
... | ... | @@ -54,13 +53,9 @@ setup( |
54 | 53 |
''',
|
55 | 54 |
setup_requires=['pytest-runner'],
|
56 | 55 |
tests_require=['pep8',
|
57 |
- 'boto3',
|
|
58 |
- 'botocore',
|
|
59 | 56 |
'moto',
|
60 | 57 |
'coverage == 4.4.0',
|
61 | 58 |
'pytest-cov >= 2.5.0',
|
62 | 59 |
'pytest-pep8',
|
63 |
- 'pytest-pylint',
|
|
64 |
- 'pytest >= 3.1.0',
|
|
65 |
- 'pylint >= 1.8 , < 2'],
|
|
60 |
+ 'pytest >= 3.1.0'],
|
|
66 | 61 |
)
|
... | ... | @@ -150,12 +150,12 @@ def test_update_leases_with_work(bot_session, context, instance): |
150 | 150 |
|
151 | 151 |
response = instance.UpdateBotSession(request, context)
|
152 | 152 |
response_action = remote_execution_pb2.Action()
|
153 |
- _unpack_any(response.leases[0].inline_assignment, response_action)
|
|
153 |
+ _unpack_any(response.leases[0].payload, response_action)
|
|
154 | 154 |
|
155 | 155 |
assert isinstance(response, bots_pb2.BotSession)
|
156 | 156 |
assert response.leases[0].state == LeaseState.PENDING.value
|
157 | 157 |
assert response.leases[1].state == LeaseState.LEASE_STATE_UNSPECIFIED.value
|
158 |
- assert uuid.UUID(response.leases[0].assignment, version=4)
|
|
158 |
+ assert uuid.UUID(response.leases[0].id, version=4)
|
|
159 | 159 |
assert response_action == action
|
160 | 160 |
|
161 | 161 |
def test_update_leases_work_complete(bot_session, context, instance):
|
... | ... | @@ -177,7 +177,7 @@ def test_update_leases_work_complete(bot_session, context, instance): |
177 | 177 |
|
178 | 178 |
response = copy.deepcopy(instance.UpdateBotSession(request, context))
|
179 | 179 |
|
180 |
- operation_name = response.leases[0].assignment
|
|
180 |
+ operation_name = response.leases[0].id
|
|
181 | 181 |
|
182 | 182 |
assert response.leases[0].state == LeaseState.PENDING.value
|
183 | 183 |
response.leases[0].state = LeaseState.COMPLETED.value
|