ambika-garg commented on code in PR #47837:
URL: https://github.com/apache/airflow/pull/47837#discussion_r2006702826
##########
airflow/cli/commands/remote_commands/task_command.py:
##########
@@ -447,12 +456,11 @@ def task_clear(args) -> None:
"""Clear all task instances or only those matched by regex for a DAG(s)."""
logging.basicConfig(level=settings.LOGGING_LEVEL,
format=settings.SIMPLE_LOG_FORMAT)
- if args.dag_id and not args.subdir and not args.dag_regex and not
args.task_regex:
+ if args.dag_id and not args.dag_regex and not args.task_regex:
dags = [get_dag_by_file_location(args.dag_id)]
else:
# todo clear command only accepts a single dag_id. no reason for
get_dags with 's' except regex?
Review Comment:
I think this function should be maintained because if the user wants to use
regex, `dag_id` is treated as a regex.
--
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]