This is an automated email from the ASF dual-hosted git repository.
rahulvats pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 3f0e48079b7 fix cli clear command (#49631)
3f0e48079b7 is described below
commit 3f0e48079b777c1691f417e4ed72fa3c18de4ba1
Author: Rahul Vats <[email protected]>
AuthorDate: Fri Apr 25 14:49:58 2025 +0530
fix cli clear command (#49631)
https://github.com/apache/airflow/issues/49618
---
airflow-core/src/airflow/models/dag.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/airflow-core/src/airflow/models/dag.py
b/airflow-core/src/airflow/models/dag.py
index fb18cf4cd81..4d9fb60b20b 100644
--- a/airflow-core/src/airflow/models/dag.py
+++ b/airflow-core/src/airflow/models/dag.py
@@ -1550,6 +1550,8 @@ class DAG(TaskSDKDag, LoggingMixin):
):
all_tis = []
for dag in dags:
+ if not isinstance(dag, DAG):
+ dag = DAG.from_sdk_dag(dag)
tis = dag.clear(
start_date=start_date,
end_date=end_date,
@@ -1576,6 +1578,8 @@ class DAG(TaskSDKDag, LoggingMixin):
if do_it:
for dag in dags:
+ if not isinstance(dag, DAG):
+ dag = DAG.from_sdk_dag(dag)
dag.clear(
start_date=start_date,
end_date=end_date,