Skip to content
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

Commits on Mar 31, 2023

  1. 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
    QMalcolm committed Mar 31, 2023
    Configuration menu
    Copy the full SHA
    f96b84d View commit details
    Browse the repository at this point in the history
  2. 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
    QMalcolm committed Mar 31, 2023
    Configuration menu
    Copy the full SHA
    b7f0caa View commit details
    Browse the repository at this point in the history
  3. 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.
    QMalcolm committed Mar 31, 2023
    Configuration menu
    Copy the full SHA
    21e8ff1 View commit details
    Browse the repository at this point in the history
  4. 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.
    QMalcolm committed Mar 31, 2023
    Configuration menu
    Copy the full SHA
    e914b6a View commit details
    Browse the repository at this point in the history
  5. 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.
    QMalcolm committed Mar 31, 2023
    Configuration menu
    Copy the full SHA
    f106e9b View commit details
    Browse the repository at this point in the history
  6. Add changie info for changes

    QMalcolm committed Mar 31, 2023
    Configuration menu
    Copy the full SHA
    a40aba2 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2023

  1. Configuration menu
    Copy the full SHA
    cd362c8 View commit details
    Browse the repository at this point in the history