Skip to content

Commit

Permalink
fix(ingest/lookml): emit warnings for resolution failures (#12215)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 authored Dec 26, 2024
1 parent 5708bd9 commit a920e9b
Showing 1 changed file with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,16 @@ def resolve_includes(
f"traversal_path={traversal_path}, included_files = {included_files}, seen_so_far: {seen_so_far}"
)
if "*" not in inc and not included_files:
reporter.report_failure(
reporter.warning(
title="Error Resolving Include",
message=f"Cannot resolve include {inc}",
context=f"Path: {path}",
message="Cannot resolve included file",
context=f"Include: {inc}, path: {path}, traversal_path: {traversal_path}",
)
elif not included_files:
reporter.report_failure(
reporter.warning(
title="Error Resolving Include",
message=f"Did not resolve anything for wildcard include {inc}",
context=f"Path: {path}",
message="Did not find anything matching the wildcard include",
context=f"Include: {inc}, path: {path}, traversal_path: {traversal_path}",
)
# only load files that we haven't seen so far
included_files = [x for x in included_files if x not in seen_so_far]
Expand Down Expand Up @@ -231,9 +231,7 @@ def resolve_includes(
source_config,
reporter,
seen_so_far,
traversal_path=traversal_path
+ "."
+ pathlib.Path(included_file).stem,
traversal_path=f"{traversal_path} -> {pathlib.Path(included_file).stem}",
)
)
except Exception as e:
Expand Down

0 comments on commit a920e9b

Please sign in to comment.