Skip to content
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(ingest): support patches in auto_status_aspect #6827

Merged
merged 1 commit into from
Dec 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion metadata-ingestion/src/datahub/utilities/source_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
from datahub.ingestion.source.state.stale_entity_removal_handler import (
StaleEntityRemovalHandler,
)
from datahub.metadata.schema_classes import MetadataChangeEventClass, StatusClass
from datahub.metadata.schema_classes import (
MetadataChangeEventClass,
MetadataChangeProposalClass,
StatusClass,
)
from datahub.utilities.urns.urn import guess_entity_type


Expand Down Expand Up @@ -40,6 +44,9 @@ def auto_status_aspect(
elif isinstance(wu.metadata, MetadataChangeProposalWrapper):
if isinstance(wu.metadata.aspect, StatusClass):
status_urns.add(urn)
elif isinstance(wu.metadata, MetadataChangeProposalClass):
if wu.metadata.aspectName == StatusClass.ASPECT_NAME:
status_urns.add(urn)
else:
raise ValueError(f"Unexpected type {type(wu.metadata)}")

Expand Down