-
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
Backport 9328 to 1.7.latest #9391
Conversation
Co-authored-by: Peter Allen Webb <peter.webb@dbtlabs.com> (cherry picked from commit 1e4286a)
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## 1.7.latest #9391 +/- ##
==============================================
- Coverage 86.67% 86.62% -0.05%
==============================================
Files 179 179
Lines 26612 26626 +14
==============================================
- Hits 23065 23064 -1
- Misses 3547 3562 +15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -264,23 +265,12 @@ def wrapper(*args, **kwargs): | |||
raise DbtProjectError("profile, project, and runtime_config required for manifest") | |||
|
|||
runtime_config = ctx.obj["runtime_config"] | |||
register_adapter(runtime_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.
Re-locating the call to register_adapter() makes me nervous. With this change, it looks like register_adapter() was previously called even when ctx.obj.get("manifest) was already set. But now, it will not be called in that scenario. Do you know if that is safe?
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.
So it is still being called in line 271 in this fine.
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.
Right, but it is only called if the if condition evaluates to True. What about the case where it is False?
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.
Good point! Update to restore previous behavior
resolves #9327 and #9112