-
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
Create method for env var deprecation #7046
Conversation
core/dbt/events/types.py
Outdated
description = ( | ||
f"The environment variable `{self.old_name}` has been renamed to `{self.new_name}`. " | ||
f"Since `{self.old_name}` has been set, its value will be used instead of `{self.new_name}`." | ||
) |
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.
This message is lacking. @dbeatty10 Do you have a suggestion for a better message to communicate that
ENV_VAR_FOO
has been deprecated in favor ofENV_VAR_BAR
- If you set
ENV_VAR_FOO
its will be used instead of the value ofENV_VAR_BAR
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.
What do you think of this?
The environment variable `ENV_VAR_FOO` has been deprecated and renamed as `ENV_VAR_BAR`.
If `ENV_VAR_FOO` is currently set, its value will be used instead of `ENV_VAR_BAR`.
Set `ENV_VAR_BAR` and unset `ENV_VAR_FOO` to avoid this deprecation warning and ensure it works properly in a future release.
It's kinda wordy, but it communicates three key things:
- The name you are using is deprecated and it has a new name.
- Here's how it will behave in the meantime.
- Here's the action you should take.
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.
That sounds great!
bdbdea0
to
7ceb9bc
Compare
7ceb9bc
to
42ca93f
Compare
resolves #6960
Description
Added a method of warning about deprecated environment variables and implemented it for
DBT_NO_PRINT -> DBT_PRINT
.Checklist
changie new
to create a changelog entry