From 9b8e8877576064dd1efef2bbbbf3c62f71fa5118 Mon Sep 17 00:00:00 2001 From: Tobie Tusing Date: Fri, 9 Aug 2024 14:26:12 -0700 Subject: [PATCH] fix depth --- core/dbt/graph/graph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/dbt/graph/graph.py b/core/dbt/graph/graph.py index 727534af8f6..cf569f3547d 100644 --- a/core/dbt/graph/graph.py +++ b/core/dbt/graph/graph.py @@ -67,7 +67,7 @@ def select_children( while len(selected) > 0 and (max_depth is None or i < max_depth): next_layer: Set[UniqueId] = set() for node in selected: - next_layer.update(self.graph.descendants(node)) + next_layer.update(self.descendants(node, 1)) next_layer = next_layer - children # Avoid re-searching children.update(next_layer) selected = next_layer @@ -86,7 +86,7 @@ def select_parents( while len(selected) > 0 and (max_depth is None or i < max_depth): next_layer: Set[UniqueId] = set() for node in selected: - next_layer.update(self.graph.ancestors(node)) + next_layer.update(self.ancestors(node, 1)) next_layer = next_layer - parents # Avoid re-searching parents.update(next_layer) selected = next_layer