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.1.latest] Improved event log msg stringification #7338

Merged
merged 4 commits into from
Apr 18, 2023

Conversation

QMalcolm
Copy link
Contributor

resolves #7108, #6568 for 1.1.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.1.latest. We then add 52eadae 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 a review from jtcohen6 April 12, 2023 19:07
@QMalcolm QMalcolm requested review from a team as code owners April 12, 2023 19:07
@QMalcolm QMalcolm requested a review from gshank April 12, 2023 19:07
@cla-bot cla-bot bot added the cla:yes label Apr 12, 2023
@QMalcolm QMalcolm requested a review from leahwicz April 18, 2023 20:23
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.

2 participants