-
Notifications
You must be signed in to change notification settings - Fork 3k
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(ingestion/airflow-plugin): pipeline tasks discoverable in search #10819
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -536,14 +536,27 @@ def on_dag_start(self, dag_run: "DagRun") -> None: | |
) | ||
dataflow.emit(self.emitter, callback=self._make_emit_callback()) | ||
|
||
event: MetadataChangeProposalWrapper = MetadataChangeProposalWrapper( | ||
entityUrn=str(dataflow.urn), aspect=StatusClass(removed=False) | ||
) | ||
self.emitter.emit(event) | ||
|
||
for task in dag.tasks: | ||
task_urn = builder.make_data_job_urn_with_flow( | ||
str(dataflow.urn), task.task_id | ||
) | ||
event = MetadataChangeProposalWrapper( | ||
entityUrn=task_urn, aspect=StatusClass(removed=False) | ||
) | ||
self.emitter.emit(event) | ||
Comment on lines
+548
to
+551
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure error handling for task MetadataChangeProposalWrapper creation. Consider adding error handling when creating + try:
event = MetadataChangeProposalWrapper(
entityUrn=task_urn, aspect=StatusClass(removed=False)
)
+ except Exception as e:
+ logger.error(f"Error creating MetadataChangeProposalWrapper for task: {task_urn}", exc_info=e)
+ continue
|
||
|
||
# emit tags | ||
for tag in dataflow.tags: | ||
tag_urn = builder.make_tag_urn(tag) | ||
|
||
event: MetadataChangeProposalWrapper = MetadataChangeProposalWrapper( | ||
event = MetadataChangeProposalWrapper( | ||
entityUrn=tag_urn, aspect=StatusClass(removed=False) | ||
) | ||
|
||
self.emitter.emit(event) | ||
Comment on lines
+557
to
560
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure error handling for tag MetadataChangeProposalWrapper creation. Consider adding error handling when creating + try:
event = MetadataChangeProposalWrapper(
entityUrn=tag_urn, aspect=StatusClass(removed=False)
+ except Exception as e:
+ logger.error(f"Error creating MetadataChangeProposalWrapper for tag: {tag_urn}", exc_info=e)
+ continue
|
||
|
||
browse_path_v2_event: MetadataChangeProposalWrapper = ( | ||
|
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.
Ensure error handling for MetadataChangeProposalWrapper creation.
Consider adding error handling when creating
MetadataChangeProposalWrapper
events to ensure that any issues during the creation process are logged and handled gracefully.Committable suggestion