Skip to content

Commit

Permalink
_context: use artifact caches from the parent project for junctions
Browse files Browse the repository at this point in the history
This makes a junction use the artifact cache of the parent project
before the ones defined for the junction

This was originally done in 24c0de1,
but regressed at some point

Fixes #1839
  • Loading branch information
abderrahim committed Aug 2, 2024
1 parent 8a397eb commit fca3645
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/buildstream/_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,13 @@ def _resolve_specs_for_project(

# If there are any project recommendations, append them at the end
project_remotes = getattr(project, project_attribute)

junction = project.junction
while junction:
parent_project = junction._get_project()
project_remotes = getattr(parent_project, project_attribute) + project_remotes
junction = parent_project.junction

remotes = list(utils._deduplicate(remotes + project_remotes))

return remotes
Expand Down

0 comments on commit fca3645

Please sign in to comment.