diff options
author | 2016-10-24 14:28:38 +0000 | |
---|---|---|
committer | 2016-10-24 19:30:08 +0000 | |
commit | 4b4a53e1251771dd8ddfdc66e302c5ff9478c087 (patch) | |
tree | 660f46faea54395f0fbe974582964ccda2c21f4f /src/main | |
parent | e7ab8a7975add1a4c0bad9481ef7be08720214c7 (diff) |
Syncing up the latest protos with the internal version. Adding UNSUPPORTED
option to setting remote execution cache.
--
MOS_MIGRATED_REVID=137027196
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/remote/GrpcActionCache.java | 4 | ||||
-rw-r--r-- | src/main/protobuf/remote_protocol.proto | 17 |
2 files changed, 13 insertions, 8 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/remote/GrpcActionCache.java b/src/main/java/com/google/devtools/build/lib/remote/GrpcActionCache.java index c8283adeea..84a09ff3b5 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/GrpcActionCache.java +++ b/src/main/java/com/google/devtools/build/lib/remote/GrpcActionCache.java @@ -628,7 +628,9 @@ public final class GrpcActionCache implements RemoteActionCache { ExecutionCacheRequest.newBuilder().setActionDigest(actionKey.getDigest()).build(); ExecutionCacheReply reply = stub.getCachedResult(request); ExecutionCacheStatus status = reply.getStatus(); - if (!status.getSucceeded()) { + if (!status.getSucceeded() + && status.getError() != ExecutionCacheStatus.ErrorCode.UNSUPPORTED + && status.getError() != ExecutionCacheStatus.ErrorCode.MISSING_RESULT) { throw new RuntimeException(status.getErrorDetail()); } return reply.hasResult() ? reply.getResult() : null; diff --git a/src/main/protobuf/remote_protocol.proto b/src/main/protobuf/remote_protocol.proto index c807b00d45..c094febe45 100644 --- a/src/main/protobuf/remote_protocol.proto +++ b/src/main/protobuf/remote_protocol.proto @@ -107,7 +107,6 @@ message ActionResult { message CasStatus { bool succeeded = 1; // Whether the requested action had server side errors // or not. - bool cache_hit = 2; // Cache hit or not on download requests. enum ErrorCode { UNKNOWN = 0; INVALID_ARGUMENT = 1; // The client behaved incorrectly. error_detail should @@ -118,11 +117,11 @@ message CasStatus { NODE_PARSE_ERROR = 4; // Failed to parse digested data as node. // more errors... } - ErrorCode error = 3; - string error_detail = 4; // Human readable error. + ErrorCode error = 2; + string error_detail = 3; // Human readable error. // These are a common part of the status for many CAS requests: - repeated ContentDigest missing_digest = 5; - repeated ContentDigest parse_failed_digest = 6; // Only relevant to trees. + repeated ContentDigest missing_digest = 4; + repeated ContentDigest parse_failed_digest = 5; // Only relevant to trees. } service CasService { @@ -226,10 +225,14 @@ message ExecutionCacheRequest { } message ExecutionCacheStatus { - bool succeeded = 1; // Whether there were server side errors. + // Whether the request had any server side errors. For a lookup (get result) + // request, a true value means the result was found in the cache. + bool succeeded = 1; enum ErrorCode { UNKNOWN = 0; - // Some server errors... + MISSING_RESULT = 1; // The result was not found in the execution cache. + UNSUPPORTED = 2; // The request is not supported by the server. + // More server errors... } ErrorCode error = 2; string error_detail = 3; // Human readable error. |