-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Make warn return empty string (#2222) #2259
Make warn return empty string (#2222) #2259
Conversation
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Jeremy Yeo.
|
@cla-bot check |
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Jeremy Yeo.
|
The cla-bot has been summoned, and re-checked this pull request! |
dea83b6
to
11d62f6
Compare
@beckjake is it necessary to add a test for this one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeremyyeo Thanks for your contribution!
Can you add an integration test so we can be sure we don't regress? There's an existing test that uses {% do exceptions.warn(...) %}
. Can you update it to also do {{ exceptions.warn(...) }}
? The file in question is at dbt/test/integration/013_context_var_tests/emit-warning-models/warning.sql
. I don't think you'll have to update the Python at all, it should have the exact same pass/fail characteristics with the second warning.
What a timely question :) |
Had thought of adding it into a separate |
Btw I have some errors when running Recording: https://asciinema.org/a/VTmYWzD0TvAUO3aaJQh0R5Ell |
@jeremyyeo you may find that This PR looks great to me, I'll kick off the rest of the tests and we'll get this merged, assuming everything passes. |
resolves #2222
Description
Fixes the compilation of
{{ exceptions.warn("thing") }}
to return an empty string""
instead ofNone
.Checklist
CHANGELOG.md
and added information about my change to the "dbt next" section.