You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ju...@apache.org on 2025/07/18 14:07:14 UTC
(buildstream) 03/07: _sandboxremote.py: Upload blobs for subsandbox roots
This is an automated email from the ASF dual-hosted git repository.
juergbi pushed a commit to branch jbilleter/digest-environment
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 259c27d1302e7ea59e47b7c1bf76645ba20393c3
Author: Abderrahim Kitouni <ab...@codethink.co.uk>
AuthorDate: Wed Jul 9 10:16:41 2025 +0100
_sandboxremote.py: Upload blobs for subsandbox roots
The subsandboxes can be used to extract a CAS digest that could be used for
nested remote execution, and thus need to be available in the remote execution
CAS.
---
src/buildstream/sandbox/_sandboxremote.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/buildstream/sandbox/_sandboxremote.py b/src/buildstream/sandbox/_sandboxremote.py
index 5b4bd0414..8072938bf 100644
--- a/src/buildstream/sandbox/_sandboxremote.py
+++ b/src/buildstream/sandbox/_sandboxremote.py
@@ -174,9 +174,17 @@ class SandboxRemote(SandboxREAPI):
"Uploading input root", element_name=self._get_element_name()
):
# Determine blobs missing on remote
+ root_digests = [action.input_root_digest]
+
+ # Add virtual directories for subsandboxes
+ for subsandbox in self._get_subsandboxes():
+ vdir = subsandbox.get_virtual_directory()
+ root_digests.append(vdir._get_digest())
+
+ missing_blobs = []
try:
- input_root_digest = action.input_root_digest
- missing_blobs = list(cascache.missing_blobs_for_directory(input_root_digest, remote=casremote))
+ for root_digest in root_digests:
+ missing_blobs.extend(cascache.missing_blobs_for_directory(root_digest, remote=casremote))
except grpc.RpcError as e:
raise SandboxError("Failed to determine missing blobs: {}".format(e)) from e