uranusjr commented on code in PR #44547:
URL: https://github.com/apache/airflow/pull/44547#discussion_r1865605628


##########
airflow/models/taskinstance.py:
##########
@@ -1127,7 +1127,8 @@ def _handle_failure(
         )
 
     if not test_mode:
-        TaskInstance.save_to_db(failure_context["ti"], session)
+        task_instance.dag_run.refresh_from_db()

Review Comment:
   Is the DagRun always stale here? Or does this only applied for some code 
paths? I’m just trying to understand the context of this and wondering if we 
should check either `task_instance` and/or `dag_run` is in `session`.



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