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/07/27 19:26:15 UTC

[GitHub] [airflow] Jorricks commented on a diff in pull request #25347: Remove useless logging line

Jorricks commented on code in PR #25347:
URL: https://github.com/apache/airflow/pull/25347#discussion_r931505899


##########
airflow/models/dagrun.py:
##########
@@ -728,9 +728,12 @@ def _filter_tis_and_exclude_removed(dag: "DAG", tis: List[TI]) -> Iterable[TI]:
                 try:
                     ti.task = dag.get_task(ti.task_id)
                 except TaskNotFound:
-                    self.log.error("Failed to get task for ti %s. Marking it as removed.", ti)
-                    ti.state = State.REMOVED
-                    session.flush()
+                    if ti.state == State.REMOVED:
+                        pass  # ti has already been removed, just ignore it
+                    else:

Review Comment:
   Yes that seems fair. I think that is also explicit enough indeed.



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