Compare commits

...

1 Commits

Author SHA1 Message Date
Jeremy Cohen
b26c7ca3ef Rebuild flat_graph after deferral 2022-07-25 12:41:28 +02:00
2 changed files with 8 additions and 0 deletions

View File

@@ -1018,6 +1018,10 @@ class Manifest(MacroMethods, DataClassMessagePackMixin, dbtClassMixin):
merged.add(unique_id)
self.nodes[unique_id] = node.replace(deferred=True)
# (Option A)
# 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))

View File

@@ -433,6 +433,10 @@ class RunTask(CompileTask):
other=deferred_manifest,
selected=selected_uids,
)
# (Option B)
# Rebuild the flat_graph, which powers the 'graph' context variable,
# now that we've deferred some nodes
self.manifest.build_flat_graph()
# TODO: is it wrong to write the manifest here? I think it's right...
self.write_manifest()