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

[BACKPORT 1.0.latest] Improved event log msg stringification #7339

Closed
wants to merge 4 commits into from

Commits on Apr 12, 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 Apr 12, 2023
    Configuration menu
    Copy the full SHA
    ab1d181 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 Apr 12, 2023
    Configuration menu
    Copy the full SHA
    1edbf64 View commit details
    Browse the repository at this point in the history
  3. Add changie info for changes

    QMalcolm committed Apr 12, 2023
    Configuration menu
    Copy the full SHA
    6d8fd01 View commit details
    Browse the repository at this point in the history
  4. Ensure log() calls from jinja ensure the msg is stringified

    The simplest way to resolve [CT-2259](#7108)
    and [CT-1783](#6568) in backports
    to dbt-core < 1.4 is to ensure `msg` in `BaseContext.log()` is stringified.
    QMalcolm committed Apr 12, 2023
    Configuration menu
    Copy the full SHA
    affdd73 View commit details
    Browse the repository at this point in the history