Skip to content

Commit

Permalink
log metadata endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 committed Oct 29, 2024
1 parent 1b22061 commit 58c2cee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 7 additions & 4 deletions metadata-ingestion/src/datahub/ingestion/run/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,11 +647,11 @@ def _get_text_color(self, running: bool, failures: bool, warnings: bool) -> str:
return "cyan"
else:
if failures:
return "red"
return "bright_red"
elif warnings:
return "yellow"
return "bright_yellow"
else:
return "green"
return "bright_green"

def has_failures(self) -> bool:
return bool(
Expand Down Expand Up @@ -735,11 +735,14 @@ def pretty_print_summary(
return 0

def _handle_uncaught_pipeline_exception(self, exc: Exception) -> None:
logger.exception("Ingestion pipeline threw an uncaught exception")
logger.exception(
f"Ingestion pipeline threw an uncaught exception: {exc}", stacklevel=2
)
self.source.get_report().report_failure(
title="Pipeline Error",
message="Ingestion pipeline raised an unexpected exception!",
exc=exc,
log=False,
)

def _get_structured_report(self) -> Dict[str, Any]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def set_metadata_endpoint(cls, values: dict) -> dict:
raise ValueError(
"Unable to infer the metadata endpoint from the access URL. Please provide a metadata endpoint."
)
logger.info(f"Inferred metadata endpoint: {metadata_endpoint}")
values["metadata_endpoint"] = metadata_endpoint
return values

Expand Down

0 comments on commit 58c2cee

Please sign in to comment.