mobuchowski commented on code in PR #43936:
URL: https://github.com/apache/airflow/pull/43936#discussion_r1843701260


##########
providers/src/airflow/providers/openlineage/plugins/listener.py:
##########
@@ -139,11 +139,19 @@ def on_running():
                 logical_date=dagrun.logical_date,
             )
 
-            task_uuid = self.adapter.build_task_instance_run_id(
+            if not task_instance.queued_dttm:
+                # This should not happen outside of tests, but if it does, we 
should log it and continue
+                self.log.warning("Task instance %s has no queued_dttm", 
task_instance)
+
+            task_uuid = OpenLineageAdapter.build_task_instance_run_id(
                 dag_id=dag.dag_id,
                 task_id=task.task_id,
                 try_number=task_instance.try_number,
                 execution_date=task_instance.execution_date,
+                queued_dttm=task_instance.queued_dttm
+                if task_instance.queued_dttm
+                else task_instance.execution_date,

Review Comment:
   Only instance I've seen this happen is actually in testing. 
   There's log over that warns in this case.



-- 
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