-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix 14040: Part 1 Remove get_by_name calls from topology #14098
Conversation
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
for dependency in stage.consumer or [] # root nodes do not have consumers | ||
] | ||
return fqn._build( # pylint: disable=protected-access | ||
*context_names, entity_request.name.__root__ | ||
) | ||
|
||
def update_context(self, stage: NodeStage, entity: Entity): | ||
def update_context(self, stage: NodeStage, entity_name: str): |
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.
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.
sounds good! We can add a comment about this in the code itself
|
||
# We have ack the sink waiting for a response, but got nothing back | ||
if stage.must_return and entity is None: | ||
if stage.must_return and entity_name is None: |
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.
does it make sense to have the must_return
anymore? We are not running any GET so we might as well skip this validation I guess.
Another approach which I might like a bit better is to keep a must_return
only for important pieces, such as the Services. Those we want to be able to GET all the time otherwise there's no point continuing the ingestion
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.
Added a get_by_name call only if the must_return
attribute is kept true
@@ -283,7 +264,7 @@ def _( | |||
) | |||
|
|||
# We want to keep the full payload in the context | |||
self.update_context(stage=stage, entity=right) | |||
self.update_context(stage=stage, entity_name=right) |
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.
in this method we are missing removing the GET I believe
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.
and same as with the lineage, not sure why we are passing the full right
to the entity_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.
Modified the call
@@ -245,7 +226,7 @@ def _( | |||
lineage has been properly drawn. We'll skip the process for now. | |||
""" | |||
yield entity_request | |||
self.update_context(stage=stage, entity=right) | |||
self.update_context(stage=stage, entity_name=right) |
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.
Maybe we can update this call. Not sure why we are passing the full right
to the entity_name
service_name=self.context.dashboard_service, | ||
data_model_name=datamodel, | ||
) | ||
datamodel_entity = self.metadata.get_by_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.
why are we running a GET here?
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.
We are still adding some GETs required for the lineage. We will address this in a followup PR caching OM's state
[open-metadata-ingestion] Kudos, SonarCloud Quality Gate passed! |
* Changed for database * Added changes for dashboard_service * Changed for messaging service * Changed for mlmodel service * Changed for pipeline service * Changed for search service * Changed for objectstore service * fixed wrong import * fixed lint * fixes * fixed pytests * fixed domo db pytest * Fixed review comments
Describe your changes:
Remove get_by_name calls from topology
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>