You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ak...@apache.org on 2023/06/20 10:46:55 UTC

[buildstream] 02/03: Work around buildgrid not following RE spec

This is an automated email from the ASF dual-hosted git repository.

akitouni pushed a commit to branch abderrahim/re-investigation
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 7be934882d5febdf56b52ea7c82c2b022056eafe
Author: Abderrahim Kitouni <ab...@codethink.co.uk>
AuthorDate: Tue Jun 20 06:28:45 2023 +0100

    Work around buildgrid not following RE spec
    
    See https://gitlab.com/BuildGrid/buildgrid/-/issues/398
---
 src/buildstream/sandbox/_sandboxremote.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/buildstream/sandbox/_sandboxremote.py b/src/buildstream/sandbox/_sandboxremote.py
index f8a3e9390..a04b9c686 100644
--- a/src/buildstream/sandbox/_sandboxremote.py
+++ b/src/buildstream/sandbox/_sandboxremote.py
@@ -273,7 +273,11 @@ class SandboxRemote(SandboxREAPI):
             # Failure of remote execution, usually due to an error in BuildStream
             raise SandboxError("No response returned from server")
 
-        assert not operation.HasField("error") and operation.HasField("response")
+        if operation.HasField("error"):
+            raise SandboxError(f"Non-conforming Server returned an error {operation.error}", detail=operation)
+
+        assert operation.HasField("response")
+
 
         execution_response = remote_execution_pb2.ExecuteResponse()
         # The response is expected to be an ExecutionResponse message