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


The following commit(s) were added to refs/heads/abderrahim/re-investigation by 
this push:
     new 3c66836ac try retry operation
3c66836ac is described below

commit 3c66836acbed9f9b8b36a45eaa57fec7232dd95e
Author: Abderrahim Kitouni <[email protected]>
AuthorDate: Sat May 27 14:00:33 2023 +0100

    try retry operation
---
 src/buildstream/sandbox/_sandboxremote.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/buildstream/sandbox/_sandboxremote.py 
b/src/buildstream/sandbox/_sandboxremote.py
index bba26f583..c0b9557a9 100644
--- a/src/buildstream/sandbox/_sandboxremote.py
+++ b/src/buildstream/sandbox/_sandboxremote.py
@@ -95,6 +95,9 @@ class SandboxRemote(SandboxREAPI):
                 traceback.print_exc()
                 status_code = e.code()
 
+                if last_operation and status_code == 
grpc.StatusCode.UNAVAILABLE:
+                    return last_operation
+
                 if status_code in (
                     grpc.StatusCode.INVALID_ARGUMENT,
                     grpc.StatusCode.FAILED_PRECONDITION,

Reply via email to