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

Conversation

QMalcolm
Copy link
Contributor

resolves #7108, #6568 for 1.0.latest

Description

This PR cherry-picks select commits from #7249, specifically: f96b84d, b7f0caa, a40aba2. These commits serve to add tests highlighting that #7108 and #6568 are problems in 1.0.latest. We then add affdd73 which ensures any non string msg in BaseContext.log() gets stringified (resolving #7108 and #6568)

Checklist

[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
[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
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 QMalcolm requested review from jtcohen6, a team and emmyoop April 12, 2023 19:07
@cla-bot cla-bot bot added the cla:yes label Apr 12, 2023
@QMalcolm QMalcolm closed this Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant