-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
loggingtech_debtBehind-the-scenes changes, with little direct impact on end-user functionalityBehind-the-scenes changes, with little direct impact on end-user functionality
Description
Instead of raising as an Exception that stops the whole run, let's instead fire a different warn-level event to call out the event serialization failure. Ideally, this would include enough information about the event's contents (serialized as a string?) that would be helpful in debugging, but let's make extra sure that doesn't silently/loudly fail either.
In main branch:
dbt-core/core/dbt/events/functions.py
Lines 205 to 209 in 72076b3
| try: | |
| msg_dict = msg.to_dict(casing=betterproto.Casing.SNAKE, include_default_values=True) # type: ignore | |
| except AttributeError as exc: | |
| event_type = type(msg).__name__ | |
| raise Exception(f"type {event_type} is not serializable. {str(exc)}") |
In 1.3.latest (should be similar in 1.2.latest and 1.1.latest):
dbt-core/core/dbt/events/functions.py
Lines 129 to 135 in 7f2e9f9
| try: | |
| log_line = e.to_dict() | |
| except AttributeError as exc: | |
| event_type = type(e).__name__ | |
| raise Exception( # TODO this may hang async threads | |
| f"type {event_type} is not serializable. {str(exc)}" | |
| ) |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
loggingtech_debtBehind-the-scenes changes, with little direct impact on end-user functionalityBehind-the-scenes changes, with little direct impact on end-user functionality