Skip to content

Commit

Permalink
tweak error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 committed Dec 23, 2024
1 parent df60ca6 commit 4d0f212
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,14 @@ def resolve_includes(
if "*" not in inc and not included_files:
reporter.warning(

Check warning on line 189 in metadata-ingestion/src/datahub/ingestion/source/looker/looker_dataclasses.py

View check run for this annotation

Codecov / codecov/patch

metadata-ingestion/src/datahub/ingestion/source/looker/looker_dataclasses.py#L189

Added line #L189 was not covered by tests
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.warning(

Check warning on line 195 in metadata-ingestion/src/datahub/ingestion/source/looker/looker_dataclasses.py

View check run for this annotation

Codecov / codecov/patch

metadata-ingestion/src/datahub/ingestion/source/looker/looker_dataclasses.py#L195

Added line #L195 was not covered by tests
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 4d0f212

Please sign in to comment.