-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Overwrite clobber config fields #2062
Overwrite clobber config fields #2062
Conversation
5c5ae43
to
ec56d4f
Compare
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.
LGTM, one tiny comment
core/dbt/source_config.py
Outdated
intermediary_merged = deep_merge( | ||
merged_config.copy(), config.copy() | ||
merged_config.copy(), config |
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 .copy()
shouldn't be necessary, deep_merge
calls deepcopy
.
3e5e35d
to
1f74980
Compare
@@ -50,9 +50,16 @@ def __init__(self, active_project, own_project, fqn, node_type): | |||
def _merge(self, *configs): | |||
merged_config = {} | |||
for config in configs: | |||
# Do not attempt to deep merge clobber fields |
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.
@beckjake I preserved the copy
here since we pop elements out of the dict in the comprehension below. Can you give this another quick look?
Edit: also rebased this against dev/barbara-gittings
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.
Yes, I think that's the correct behavior
Fixes #2049 by updating the Source Config class to overwrite, instead of deep merge, keys marked as "clobberable".