-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
MINOR - Clean topology & add tests #14527
Conversation
post_process: the name of the post_process step | ||
""" | ||
if post_process == "mark_tables_as_deleted" and not self.context.database: | ||
raise ValueError("No Database found in `self.context`") |
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 logic should not be here, moved it to the database_service class itself
@@ -71,72 +67,118 @@ class TopologyRunnerMixin(Generic[C]): | |||
context: TopologyContext | |||
metadata: OpenMetadata | |||
|
|||
# The cache will have the shape {`child_stage.type_`: {`name`: `hash`}} | |||
cache = defaultdict(dict) |
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.
using this cache dict instead of relying on the context to keep things clean
cache_all: bool = ( | ||
False # If we need to cache all values being yielded in the context | ||
# Required fields to define the yielded entity type and the function processing it | ||
type_: Type[T] = Field( |
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.
using pydantic descriptions instead of comments
cache_all=True, | ||
clear_cache=True, | ||
store_all_in_context=True, | ||
clear_context=True, |
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.
updated names to separate goals from context & cache
|
Describe your changes:
Fixes
I worked on ... because ...
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>