ashb commented on code in PR #52177:
URL: https://github.com/apache/airflow/pull/52177#discussion_r2179718766


##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/dag_runs.py:
##########
@@ -122,9 +121,20 @@ def clear_dag_run(
                 "message": f"DAG with dag_id: '{dag_id}' has import errors and 
cannot be triggered",
             },
         )
+    from airflow.jobs.scheduler_job_runner import SchedulerDagBag
+
+    dag_run = session.scalar(select(DagRun).where(DagRun.dag_id == dag_id, 
DagRun.run_id == run_id))
+    dag_bag = SchedulerDagBag()

Review Comment:
   Given we did `task_exec_api_app.state.dag_bag = SchedulerDagBag()` in the 
app init, why do we need to create a new object here, rather than use the 
existing one?



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