abderrahim commented on code in PR #1991:
URL: https://github.com/apache/buildstream/pull/1991#discussion_r2166168701


##########
src/buildstream/buildelement.py:
##########
@@ -285,10 +296,19 @@ def configure_sandbox(self, sandbox):
             command_dir = build_root
         sandbox.set_work_directory(command_dir)
 
+    def stage(self, sandbox):
         # Setup environment
-        sandbox.set_environment(self.get_environment())
+        env = self.get_environment()
 
-    def stage(self, sandbox):
+        for digest_variable, element_list in self.__digest_environment.items():
+            dummy_sandbox = SandboxDummy(
+                self._get_context(), self._get_project(), plugin=self, 
stdout=None, stderr=None, config={}
+            )
+            self.stage_dependency_artifacts(dummy_sandbox, element_list)
+            digest = dummy_sandbox.get_virtual_directory()._get_digest()
+            env[digest_variable] = "{}/{}".format(digest.hash, 
digest.size_bytes)

Review Comment:
   Another issue I discovered when testing with remote execution: If using this 
with recc/bazel (https://github.com/apache/buildstream/issues/1751), for 
setting a remote execution platform property (e.g. chrootRootDigest) then we 
also need to upload it to the remote execution CAS.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to