dimberman commented on code in PR #29065:
URL: https://github.com/apache/airflow/pull/29065#discussion_r1104005421
##########
airflow/models/taskinstance.py:
##########
@@ -181,6 +182,7 @@ def clear_task_instances(
task_id_by_key: dict[str, dict[str, dict[int, dict[int, set[str]]]]] =
defaultdict(
lambda: defaultdict(lambda: defaultdict(lambda: defaultdict(set)))
)
+ dag_bag = DagBag(read_dags_from_db=True)
Review Comment:
```ti_dag = dag if dag and dag.dag_id == ti.dag_id else
dag_bag.get_dag(ti.dag_id, session=session)```
Looks like dag is optional because if there is no DAG we can just get the
DAG from the TaskInstance
--
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]