Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion airflow-core/src/airflow/cli/commands/task_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from airflow import settings
from airflow._shared.timezones import timezone
from airflow.cli.simple_table import AirflowConsole
from airflow.cli.utils import fetch_dag_run_from_run_id_or_logical_date_string
from airflow.cli.utils import deprecated_for_airflowctl, fetch_dag_run_from_run_id_or_logical_date_string
from airflow.exceptions import AirflowConfigException, DagRunNotFound, NotMapped, TaskInstanceNotFound
from airflow.models import TaskInstance
from airflow.models.dag_version import DagVersion
Expand Down Expand Up @@ -262,6 +262,7 @@ class TaskCommandMarker:
"""Marker for listener hooks, to properly detect from which component they are called."""


@deprecated_for_airflowctl("airflowctl tasks failed-deps")
@cli_utils.action_cli(check_db=False)
@providers_configuration_loaded
def task_failed_deps(args) -> None:
Expand Down Expand Up @@ -290,6 +291,7 @@ def task_failed_deps(args) -> None:
print("Task instance dependencies are all met.")


@deprecated_for_airflowctl("airflowctl tasks state")
@cli_utils.action_cli(check_db=False)
@suppress_logs_and_warning
@providers_configuration_loaded
Expand All @@ -307,6 +309,7 @@ def task_state(args) -> None:
print(ti.state)


@deprecated_for_airflowctl("airflowctl tasks list")
@cli_utils.action_cli(check_db=False)
@suppress_logs_and_warning
@providers_configuration_loaded
Expand Down Expand Up @@ -354,6 +357,7 @@ def _guess_debugger() -> _SupportedDebugger:
raise exc


@deprecated_for_airflowctl("airflowctl tasks states-for-dag-run")
@cli_utils.action_cli(check_db=False)
@suppress_logs_and_warning
@providers_configuration_loaded
Expand Down Expand Up @@ -492,6 +496,7 @@ def task_render(args, dag: DAG | None = None) -> None:
)


@deprecated_for_airflowctl("airflowctl tasks clear")
@cli_utils.action_cli(check_db=False)
@providers_configuration_loaded
def task_clear(args) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
dag_command,
pool_command,
provider_command,
task_command,
variable_command,
)

Expand Down Expand Up @@ -73,6 +74,11 @@
(provider_command.providers_list, "airflowctl providers list"),
(config_command.get_value, "airflowctl config get"),
(config_command.show_config, "airflowctl config list"),
(task_command.task_failed_deps, "airflowctl tasks failed-deps"),
(task_command.task_state, "airflowctl tasks state"),
(task_command.task_list, "airflowctl tasks list"),
(task_command.task_states_for_dag_run, "airflowctl tasks states-for-dag-run"),
(task_command.task_clear, "airflowctl tasks clear"),
]


Expand Down