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

fix(ingestion/lookml): enable stack-trace in lookml logs #10971

Merged
merged 13 commits into from
Jul 31, 2024
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ def _load_viewfile(
with open(path) as file:
raw_file_content = file.read()
except Exception as e:
self.reporter.failure("Failed to read lkml file", path, exc=e)
self.reporter.failure(
title="LKML File Loading Error",
message="A lookml file is not present on local storage or GitHub",
context=f"file path: {path}",
exc=e,
)
self.viewfile_cache[path] = None
return None
try:
Expand All @@ -86,8 +91,19 @@ def _load_viewfile(
self.viewfile_cache[path] = looker_viewfile
return looker_viewfile
except Exception as e:
self.reporter.failure("Failed to parse lkml file", path, exc=e)
self.reporter.failure(
title="LKML File Parsing Error",
message="The input file is not lookml file",
context=f"file path: {path}",
exc=e,
)

logger.debug(f"Raw file content for path {path}")

logger.debug(raw_file_content)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this one debug log message

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are already debug.

Copy link
Collaborator

@hsheth2 hsheth2 Jul 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant one debug call instead of two


self.viewfile_cache[path] = None

return None

def load_viewfile(
Expand Down
Loading