gtristan commented on code in PR #1991: URL: https://github.com/apache/buildstream/pull/1991#discussion_r2153808770
########## 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: In the case that we are staging elements in `element_list` which don't depend on eachother, I don't believe that `Element.stage_dependency_artifacts()` will do any sorting. In the case that we have resulting overlaps in the resulting staged trees, I am worried that the resulting CAS digest may differ depending on the order in which the dependencies are declared in the buildstream `.bst` element. Also there is a concern that overlaps may not turn out to be the same as when staging the element's overall dependencies. I think abderrahim also noted the sandbox staging seems a bit weird, or could be done nicer. I don't believe it should be algorithmically necessary to do the actual staging in order to calculate what the resulting CAS digest would be, probably there should be a way to support this better in the `CasBasedDirectory` code without doing an actual staging process. -- 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