This is an automated email from the ASF dual-hosted git repository. juergbi pushed a commit to branch jbilleter/junction-provenance in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit 08e0d0f53cf89d9211e8b4d859b88b3d4db27f4c Author: Jürg Billeter <[email protected]> AuthorDate: Fri May 1 14:50:45 2026 +0200 _stream.py: Ensure all projects are fully loaded Specifying only a junction as target may otherwise leave the project in a partially loaded state. --- src/buildstream/_context.py | 11 ++++++++--- src/buildstream/_stream.py | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/buildstream/_context.py b/src/buildstream/_context.py index 0c949fa59..6124e5e60 100644 --- a/src/buildstream/_context.py +++ b/src/buildstream/_context.py @@ -565,6 +565,13 @@ class Context: # return self._projects[0] + # ensure_fully_loaded(): + # + # Ensure all projects are fully loaded. + def ensure_fully_loaded(self) -> None: + for project in self._projects: + project.ensure_fully_loaded() + # initialize_remotes() # # This will resolve what remotes each loaded project will interact @@ -592,9 +599,7 @@ class Context: ignore_project_source_remotes: bool = False, ) -> None: - # Ensure all projects are fully loaded. - for project in self._projects: - project.ensure_fully_loaded() + self.ensure_fully_loaded() # # If the global remote execution specs have been overridden by the diff --git a/src/buildstream/_stream.py b/src/buildstream/_stream.py index a475bdb41..f945bf568 100644 --- a/src/buildstream/_stream.py +++ b/src/buildstream/_stream.py @@ -1684,6 +1684,7 @@ class Stream: elements, except_elements, artifacts = self._load_elements_from_targets( targets, except_targets, rewritable=False, valid_artifact_names=load_artifacts ) + self._context.ensure_fully_loaded() if artifacts: if selection in (_PipelineSelection.ALL, _PipelineSelection.RUN):
