potiuk commented on code in PR #59921:
URL: https://github.com/apache/airflow/pull/59921#discussion_r2652892987


##########
providers/openlineage/src/airflow/providers/openlineage/utils/utils.py:
##########
@@ -537,7 +538,13 @@ def is_selective_lineage_enabled(obj: DAG | SerializedDAG 
| AnyOperator) -> bool
 
     @provide_session
     def is_ti_rescheduled_already(ti: TaskInstance, session=NEW_SESSION):
-        from sqlalchemy import exists, select
+        try:

Review Comment:
   I think that one indicates an issue -> from what I read that method is 
called in the plugin  in `on_task_instance_running`, which .... will not have 
the session at all.
   
   ```
   | 3.0.0           | ``on_task_instance_running``               | ``session`` 
argument removed from task instance listeners,                                  
                                  |
   |                 |                                            | 
``task_instance`` object is now an instance of ``RuntimeTaskInstance``          
                                              |
   ```
   
   So I'd say this method is not Airflow 3 compatible  ? 



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