Add deprecation warnings for log-path, target-path in dbt_project.yml#7185
Add deprecation warnings for log-path, target-path in dbt_project.yml#7185
log-path, target-path in dbt_project.yml#7185Conversation
| # this field is no longer supported, but many projects may specify it with the default value | ||
| # if so, let's only raise this deprecation warning if they set a custom value |
There was a problem hiding this comment.
Because so many users have the configs set, with just the default values, only raise the deprecation warning if a custom (non-default) value is set in
dbt_project.yml
❗disagreement welcome❗
There was a problem hiding this comment.
I'm fine with this. Why rouse them to action when there's really no need. It's just a syntactic artifact. At most, you could tell people "hey this doesn't even do anything anymore tbh" but also idk if it really impacts anyone.
VersusFacit
left a comment
There was a problem hiding this comment.
Comments mostly around readability. I'm generally on board for this and how you've gone about it.
Also, just an aside, man, I used to use these flags way back when. Crazy that they're going away. tempus fugit.
core/dbt/config/project.py
Outdated
| return ProjectPackageMetadata(self.project_name, packages_config.packages) | ||
|
|
||
| def check_config_path(self, project_dict, deprecated_path, exp_path): | ||
| def check_config_path(self, project_dict, deprecated_path, exp_path=None, default=None): |
There was a problem hiding this comment.
I don't know what exp_path is.....expected path? Explicit path? Something else? An explicit variable would be nice for readable/reasoning.
There was a problem hiding this comment.
Also what's default exactly?
There was a problem hiding this comment.
I'll rename these!
exp_path→expected_pathdefault→default_value
| # this field is no longer supported, but many projects may specify it with the default value | ||
| # if so, let's only raise this deprecation warning if they set a custom value |
There was a problem hiding this comment.
I'm fine with this. Why rouse them to action when there's really no need. It's just a syntactic artifact. At most, you could tell people "hey this doesn't even do anything anymore tbh" but also idk if it really impacts anyone.
VersusFacit
left a comment
There was a problem hiding this comment.
Thanks for making the variable names explicit. Last night without knowing exactly what they were, I was just having trouble parsing the code. It's much clearer now!
|
@VersusFacit Thank you for the review! :) |
[Preview](https://docs-getdbt-com-git-dbeatty10-patch-6-dbt-labs.vercel.app/reference/dbt_project.yml) ## What are you changing in this pull request and why? We deprecated `log-path` and `target-path` from `dbt_project.yml` beginning in v1.5 via dbt-labs/dbt-core#7185. So this PR removes them from the docs for `dbt_project.yml` for later versions to reduce confusion. ## Checklist - [x] Review the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines.
resolves #6882
Description
log-pathandtarget-pathbeing set indbt_project.ymlFlags(settable via CLI flag or env var), it is inconsistent (and added complexity in our codebase / initialization flow) that they can also be set indbt_project.ymldbt-core. Because so many users have the configs set, with just the default values, only raise the deprecation warning if a custom (non-default) value is set indbt_project.ymlChecklist
log-path+target-pathindbt_project.ymldocs.getdbt.com#3014changie newto create a changelog entry