Skip to content

Commit

Permalink
fix(ingestion/lookml): enable stack-trace in lookml logs (#10971)
Browse files Browse the repository at this point in the history
  • Loading branch information
sid-acryl authored Jul 31, 2024
1 parent 4b9844d commit 4512209
Showing 1 changed file with 18 additions and 2 deletions.
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)

self.viewfile_cache[path] = None

return None

def load_viewfile(
Expand Down

0 comments on commit 4512209

Please sign in to comment.