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

akitouni pushed a commit to branch abderrahim/no-fetch-stdout-stderr
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit d89ced1de2fe09ad4c4f3958de3aa3ff90d655c3
Author: Abderrahim Kitouni <[email protected]>
AuthorDate: Sun Aug 24 21:41:18 2025 +0100

    _sandboxreapi: check stdout and stderr exist when fetching action result
    
    Starting with b8e6876d760641c2b6ccc3e2578eba48d0a33332, action results
    generated by the buildbox-run sandbox may be pushed to the action cache,
    and they don't have stderr and stdout stored.
---
 src/buildstream/sandbox/_sandboxreapi.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/buildstream/sandbox/_sandboxreapi.py 
b/src/buildstream/sandbox/_sandboxreapi.py
index 9b95f63fa..7e391516d 100644
--- a/src/buildstream/sandbox/_sandboxreapi.py
+++ b/src/buildstream/sandbox/_sandboxreapi.py
@@ -184,8 +184,12 @@ class SandboxREAPI(Sandbox):
 
             raise SandboxError("Output directory structure had no digest 
attached.")
 
-        # Fetch stdout and stderr blobs
-        cascache.fetch_blobs(casremote, [action_result.stdout_digest, 
action_result.stderr_digest])
+        # Fetch stdout and stderr blobs, if they exist
+        blobs = []
+        for digest in [action_result.stdout_digest, 
action_result.stderr_digest]:
+            if digest.hash:
+                blobs.append(digest)
+        cascache.fetch_blobs(casremote, blobs)
 
     def _process_job_output(self, working_directory, output_directories, 
output_files, *, failure):
         # Reads the remote execution server response to an execution request.

Reply via email to