mirror of
https://github.com/datahub-project/datahub.git
synced 2025-09-22 15:43:21 +00:00
fix(ingestion): ensure source/sink reports are always logged (#4592)
This commit is contained in:
parent
7b1487135a
commit
23ece3b1a4
@ -102,10 +102,20 @@ def run(
|
|||||||
raise SensitiveError() from e
|
raise SensitiveError() from e
|
||||||
|
|
||||||
logger.info("Starting metadata ingestion")
|
logger.info("Starting metadata ingestion")
|
||||||
|
try:
|
||||||
pipeline.run()
|
pipeline.run()
|
||||||
logger.info("Finished metadata ingestion")
|
except Exception as e:
|
||||||
ret = pipeline.pretty_print_summary(warnings_as_failure=strict_warnings)
|
logger.info(
|
||||||
|
f"Source ({pipeline.config.source.type}) report:\n{pipeline.source.get_report().as_string()}"
|
||||||
|
)
|
||||||
|
logger.info(
|
||||||
|
f"Sink ({pipeline.config.sink.type}) report:\n{pipeline.sink.get_report().as_string()}"
|
||||||
|
)
|
||||||
|
raise e
|
||||||
|
else:
|
||||||
|
logger.info("Finished metadata pipeline")
|
||||||
pipeline.log_ingestion_stats()
|
pipeline.log_ingestion_stats()
|
||||||
|
ret = pipeline.pretty_print_summary(warnings_as_failure=strict_warnings)
|
||||||
sys.exit(ret)
|
sys.exit(ret)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user