This is an automated email from the ASF dual-hosted git repository. akitouni pushed a commit to branch abderrahim/nested-reapi in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit d53b09db404f2f2c0f26b9de8135892aaa3e9715 Author: Abderrahim Kitouni <abderrahim.kito...@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