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

Call build_flat_graph in merge_from_artifact #5786

Merged
merged 4 commits into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
7 changes: 7 additions & 0 deletions .changes/unreleased/Features-20220907-154639.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Features
gshank marked this conversation as resolved.
Show resolved Hide resolved
body: Support dbt-metrics compilation by rebuilding flat_graph
time: 2022-09-07T15:46:39.937326-04:00
custom:
Author: gshank
Issue: "5525"
PR: "5786"
4 changes: 4 additions & 0 deletions core/dbt/contracts/graph/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,10 @@ def merge_from_artifact(
merged.add(unique_id)
self.nodes[unique_id] = node.replace(deferred=True)

# Rebuild the flat_graph, which powers the 'graph' context variable,
# now that we've deferred some nodes
self.build_flat_graph()

# log up to 5 items
sample = list(islice(merged, 5))
fire_event(MergedFromState(nbr_merged=len(merged), sample=sample))
Expand Down