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 77ff6a3da4be640fd57625406636a0b9201c070e Author: Abderrahim Kitouni <[email protected]> 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 c0b9557a9..2c2391285 100644 --- a/src/buildstream/sandbox/_sandboxremote.py +++ b/src/buildstream/sandbox/_sandboxremote.py @@ -275,7 +275,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
