potiuk commented on a change in pull request #18979:
URL: https://github.com/apache/airflow/pull/18979#discussion_r728894323



##########
File path: airflow/models/taskinstance.py
##########
@@ -1702,7 +1702,8 @@ def handle_failure(
             session.add(Log(State.FAILED, self))
 
             # Log failure duration
-            session.add(TaskFail(task, self.execution_date, self.start_date, 
self.end_date))
+            dag_run = self.get_dagrun()  # self.dag_run not populated by 
refresh_from_db

Review comment:
       I believe this is correct:
   ```suggestion
               dag_run = self.get_dagrun(run_id=self.run_id)  # self.dag_run 
not populated by refresh_from_db
   ```




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