finn pushed to branch master at BuildGrid / buildgrid
Commits:
2 changed files:
Changes:
... | ... | @@ -122,8 +122,11 @@ class Job: |
122 | 122 |
if self.result is not None:
|
123 | 123 |
self._operation.done = True
|
124 | 124 |
response = remote_execution_pb2.ExecuteResponse(result=self.result,
|
125 |
- cached_result=self.result_cached,
|
|
126 |
- status=self.lease.status)
|
|
125 |
+ cached_result=self.result_cached)
|
|
126 |
+ |
|
127 |
+ if not self.result_cached:
|
|
128 |
+ response.status.CopyFrom(self.lease.status)
|
|
129 |
+ |
|
127 | 130 |
self._operation.response.CopyFrom(self._pack_any(response))
|
128 | 131 |
|
129 | 132 |
return self._operation
|
... | ... | @@ -23,8 +23,6 @@ Schedules jobs. |
23 | 23 |
|
24 | 24 |
from collections import deque
|
25 | 25 |
|
26 |
-from google.protobuf import any_pb2
|
|
27 |
- |
|
28 | 26 |
from buildgrid._exceptions import NotFoundError
|
29 | 27 |
from buildgrid._protos.build.bazel.remote.execution.v2 import remote_execution_pb2
|
30 | 28 |
from buildgrid._protos.google.longrunning import operations_pb2
|
... | ... | @@ -60,9 +58,7 @@ class Scheduler: |
60 | 58 |
job.update_execute_stage(ExecuteStage.QUEUED)
|
61 | 59 |
|
62 | 60 |
else:
|
63 |
- cached_result_any = any_pb2.Any()
|
|
64 |
- cached_result_any.Pack(cached_result)
|
|
65 |
- job.result = cached_result_any
|
|
61 |
+ job.result = cached_result
|
|
66 | 62 |
job.result_cached = True
|
67 | 63 |
job.update_execute_stage(ExecuteStage.COMPLETED)
|
68 | 64 |
|