-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
CT-2264, CT-2259, CT-1783: Improved event serialization failure handling #7249
CT-2264, CT-2259, CT-1783: Improved event serialization failure handling #7249
Commits on Mar 31, 2023
-
Add tests for logging jinja2.Undefined objects
[CT-2259](#7108) identifies an issue wherein dbt-core 1.0-1.3 raise errors if a jinja2.Undefined object is attempted to be logged. This generally happened in the form of `{{ log(undefined_variable, info=True) }}`. This commit adding this test exists for two reasons 1. Ensure we don't have a regression in this going forward 2. Exist as a commit to be used for backport fixes for dbt-core 1.0-1.3
Configuration menu - View commit details
-
Copy full SHA for f96b84d - Browse repository at this point
Copy the full SHA f96b84dView commit details -
Add tests for checking
DBT_ENV_SECRET_
s don't break logging[CT-1783](#6568) describes a bug in dbt-core 1.0-1.3 wherein when a `DBT_ENV_SECRET_` all `{{ log("logging stuff", info=True) }}` invocations break. This commit adds a test for this for two reasons: 1. Ensure we don't regress to this behavior going forward 2. Act as a base commit for making the backport fixes to dbt-core 1.0-1.3
Configuration menu - View commit details
-
Copy full SHA for b7f0caa - Browse repository at this point
Copy the full SHA b7f0caaView commit details -
Add tests ensuring failed event serialization is handled correctly
[CT-2264](#7113) states that failed serialization should result in an exception handling path which will fire another event instead of raising an exception. This is hard to test perfectly because the exception handling path for serialization depending on whether pytest is present. If pytest isn't present, a new event documentation the failed serialization is fired. If pytest is present, the failed serialization gets raised as an exception. Thus this added test ensures that the expected exception is raised and assumes that the correct event will be fired normally.
Configuration menu - View commit details
-
Copy full SHA for 21e8ff1 - Browse repository at this point
Copy the full SHA 21e8ff1View commit details -
Log warning when event serialization fails in
msg_to_dict
This commit updates the `msg_to_dict` exception handling path to fire a warning level event instead of raising an exception. Truthfully, we're not sure if this exception handling path is even possible to hit. That's because we recently switched from betterproto to google's protobuf. However, exception path is the subject of [CT-2264](#7113). Though we don't think it's actually possible to hit it anymore, we still want to handle the case if it is.
Configuration menu - View commit details
-
Copy full SHA for e914b6a - Browse repository at this point
Copy the full SHA e914b6aView commit details -
Update serialization failure note to be a warn level event in `BaseEv…
…ent` [CT-2264](#7113) wants logging messages about event serialization failure to be `WARNING` level events. This does that.
Configuration menu - View commit details
-
Copy full SHA for f106e9b - Browse repository at this point
Copy the full SHA f106e9bView commit details -
Configuration menu - View commit details
-
Copy full SHA for a40aba2 - Browse repository at this point
Copy the full SHA a40aba2View commit details
Commits on Apr 3, 2023
-
Configuration menu - View commit details
-
Copy full SHA for cd362c8 - Browse repository at this point
Copy the full SHA cd362c8View commit details