amoghrajesh commented on code in PR #45924:
URL: https://github.com/apache/airflow/pull/45924#discussion_r1928101055


##########
task_sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -479,12 +481,40 @@ def run(ti: RuntimeTaskInstance, log: Logger):
 
         _push_xcom_if_needed(result, ti)
 
+        task_outlets = []
+        outlet_events = []
+        events = context["outlet_events"]
+        asset_type = ""
+
+        for obj in ti.task.outlets or []:
+            # Lineage can have other types of objects besides assets
+            if isinstance(obj, Asset):
+                task_outlets.append(AssetNameAndUri(name=obj.name, 
uri=obj.uri))
+                outlet_events.append(attrs.asdict(events[obj]))  # type: ignore
+            elif isinstance(obj, AssetNameRef):
+                task_outlets.append(AssetNameAndUri(name=obj.name))
+                # send all as we do not know how to filter here yet
+                outlet_events.append(attrs.asdict(events))  # type: ignore
+            elif isinstance(obj, AssetUriRef):
+                task_outlets.append(AssetNameAndUri(uri=obj.uri))
+                # send all as we do not know how to filter here yet
+                outlet_events.append(attrs.asdict(events))  # type: ignore

Review Comment:
   Issue for tracking https://github.com/apache/airflow/issues/46002



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to