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


##########
src/buildstream/buildelement.py:
##########
@@ -285,10 +297,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)

Review Comment:
   > It would however be good to add a test with this merge request, asserting 
that we get the same CAS digest environment variable using both orderings of 
element e in my overlapping example above.
   
   I agree with this. I was just pointing out that if this behaviour is 
non-deterministic, then it's a pitfall that also applies to all plugins that 
make use of `Element.stage_dependency_artifacts()` and is not something 
specific to this use case.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to