-
Notifications
You must be signed in to change notification settings - Fork 3k
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(ingest): improve error reporting in emit_all
#12309
Conversation
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
... and 203 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
@@ -248,9 +248,11 @@ def make_rest_sink( | |||
with DatahubRestSink(PipelineContext(run_id=run_id), sink_config) as sink: | |||
yield sink | |||
if sink.report.failures: | |||
logger.error( | |||
f"Failed to emit {len(sink.report.failures)} records\n{sink.report.as_string()}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if sink.report.as_string()
might be too verbose.
The report will be printed out once the pipeline finishes, regardless of success, right? If so, printing it here may be redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is only printed if the sink had any failures
it is somewhat verbose, but it's definitely better than not printing anything
Checklist