Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix multi-output dependency detection #28276

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .ci_support/compute_build_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,24 @@ def collapse_subpackage_nodes(graph):
# fold in dependencies for all of the other subpackages within a group. This is just
# the intersection of the edges between all nodes. Store this on the "master" node.
if subpackages:
remap_edges = [edge for edge in graph.edges() if edge[1] in subpackages]
for edge in remap_edges:
# make sure to remap edges both into and out of subpackages
# before deleting nodes
# remap '* -> subpackage' to '* -> recipe'
remap_in = [edge for edge in graph.edges() if edge[1] in subpackages]
for edge in remap_in:
# make sure not to add references to yourself
if edge[0] != master_key:
graph.add_edge(edge[0], master_key)
graph.remove_edge(*edge)

# remap 'subpackage -> *' to 'recipe -> *'
remap_out = [edge for edge in graph.edges() if edge[0] in subpackages]
for edge in remap_out:
# make sure not to add references to yourself
if edge[1] != master_key:
graph.add_edge(master_key, edge[1])
graph.remove_edge(*edge)

# remove nodes that have been folded into master nodes
for subnode in subpackages:
graph.remove_node(subnode)
Expand Down
Loading