This is an automated email from the ASF dual-hosted git repository.

amoghdesai 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 cefb52eb078 Update tasks clear CLI to use SerializedDAG instead of SDK 
DAG (#63827)
cefb52eb078 is described below

commit cefb52eb07892e30789f353fc635bb53b6901fbb
Author: Amogh Desai <[email protected]>
AuthorDate: Tue Mar 17 22:48:38 2026 +0530

    Update tasks clear CLI to use SerializedDAG instead of SDK DAG (#63827)
---
 airflow-core/src/airflow/cli/commands/task_command.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/airflow-core/src/airflow/cli/commands/task_command.py 
b/airflow-core/src/airflow/cli/commands/task_command.py
index e615d63ccf4..cd4b0368e9a 100644
--- a/airflow-core/src/airflow/cli/commands/task_command.py
+++ b/airflow-core/src/airflow/cli/commands/task_command.py
@@ -46,7 +46,6 @@ from airflow.ti_deps.dependencies_deps import 
SCHEDULER_QUEUED_DEPS
 from airflow.utils import cli as cli_utils
 from airflow.utils.cli import (
     get_bagged_dag,
-    get_dag_by_file_location,
     get_dags,
     get_db_dag,
     suppress_logs_and_warning,
@@ -496,7 +495,7 @@ def task_clear(args) -> None:
     """Clear all task instances or only those matched by regex for a DAG(s)."""
     logging.basicConfig(level=logging.INFO, format=settings.SIMPLE_LOG_FORMAT)
     if args.dag_id and not args.bundle_name and not args.dag_regex and not 
args.task_regex:
-        dags = [get_dag_by_file_location(args.dag_id)]
+        dags = [get_db_dag(bundle_names=args.bundle_name, dag_id=args.dag_id)]
     else:
         # todo clear command only accepts a single dag_id. no reason for 
get_dags with 's' except regex?
         # Reading from_db because clear method still not implemented in Task 
SDK DAG

Reply via email to