Skip to content

Commit

Permalink
Dbt: improve parsing logs (#1981)
Browse files Browse the repository at this point in the history
  • Loading branch information
m1n0 authored Jan 4, 2024
1 parent 3c05346 commit 1a44ce0
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions soda/dbt/soda/cloud/dbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,9 @@ def _parse_manifest(
node = ParsedGenericTestNode(**node)
test_nodes[node_name] = node
else:
# TODO: ??????????????????? COrect indent???
self.scan._logs.info(f"Ignoring unsupported {node_name}")
self.scan._logs.info(f"Ignoring unsupported test node '{node_name}'. Missing 'test_metadata'.")
else:
self.scan._logs.debug(f"Ignoring unsupported node type '{node['resource_type']}', {node_name}")

else:
model_nodes = None
Expand Down Expand Up @@ -377,10 +378,12 @@ def _create_nodes_to_tests_mapping(
test_unique_id: set(test_nodes[test_unique_id].depends_on["nodes"]) for test_unique_id in test_unique_ids
}

model_unique_ids = reduce(
or_,
[model_unique_ids for model_unique_ids in models_that_tests_depends_on.values()],
)
model_unique_ids = {}
if models_that_tests_depends_on:
model_unique_ids = reduce(
or_,
[model_unique_ids for model_unique_ids in models_that_tests_depends_on.values()],
)

models_with_tests = defaultdict(set)
for model_unique_id in model_unique_ids:
Expand Down

0 comments on commit 1a44ce0

Please sign in to comment.