-
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
remove manifest from adapter.get_catalog signature #9212
remove manifest from adapter.get_catalog signature #9212
Conversation
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## relation-create-from-refactor #9212 +/- ##
=================================================================
+ Coverage 86.56% 86.62% +0.06%
=================================================================
Files 215 215
Lines 26862 26864 +2
=================================================================
+ Hits 23252 23270 +18
+ Misses 3610 3594 -16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -1166,16 +1163,16 @@ def _get_one_catalog_by_relations( | |||
table = self.execute_macro( | |||
GET_CATALOG_RELATIONS_MACRO_NAME, | |||
kwargs=kwargs, | |||
# pass in the full manifest, so we get any local project | |||
# overrides |
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 code is quite old, and I believe there is testing in place for this (will dig it up shortly) and that it is safe to remove at this point.
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.
Found where this was introduced (4 years ago): 62755fe#diff-aa1e9e602a0f1e2930b465b30a35a28778fbe131da4fbf2c4e88dd52ca44f140R1028
and corresponding test: 62755fe#diff-0e805e1b4d683c0d06b0b1110513b7bfb4cd2f49a16a089c8de934322eca36f3R3453
) -> agate.Table: | ||
kwargs = {"information_schema": information_schema, "schemas": schemas} | ||
table = self.execute_macro( | ||
GET_CATALOG_MACRO_NAME, | ||
kwargs=kwargs, | ||
# pass in the full manifest so we get any local project | ||
# overrides |
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.
Closing in favor of: #9242 |
resolves #9218
Problem
An entire manifest object is passed from core to adapters for catalog methods, when all that is needed is an iterable of
ResultConfig
protocols to create relations from, and a set of used schemas.Solution
Refactor the generate task to pre-compute the list of catalogable relation configs + used schemas and pass those + plumb them through adapter methods instead of passing an overly broad manifest object through core -> adapters.
Checklist