You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/04/14 13:07:02 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #23008: Fix TaskFail queries in views after run_id migration

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


##########
airflow/www/views.py:
##########
@@ -2886,21 +2886,22 @@ def duration(self, dag_id, session=None):
             min_date = timezone.utc_epoch()
         ti_fails = (
             session.query(TaskFail)
+            .join(TaskFail.dag_run)
             .filter(
                 TaskFail.dag_id == dag.dag_id,
                 DagRun.execution_date >= min_date,
                 DagRun.execution_date <= base_date,
-                TaskFail.task_id.in_([t.task_id for t in dag.tasks]),
             )
-            .all()
         )
+        if dag.partial:
+            ti_fails = ti_fails.filter(TaskFail.task_id.in_([t.task_id for t in dag.tasks]))

Review Comment:
   This one doesn’t seem related?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org