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
3 changes: 2 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
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 @@ -74,6 +75,7 @@
(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"),
]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ def date_param():
"dags update example_bash_operator --no-is-paused",
# Dag Run commands
"dagrun list --dag-id example_bash_operator --state success --limit=1",
# Tasks commands
'tasks failed-deps example_bash_operator runme_0 "manual__{date_param}"',
'tasks failed-deps example_bash_operator runme_0 --logical-date "{date_param}"',
# Task Instances commands
'taskinstances get example_bash_operator "manual__{date_param}" runme_0',
'taskinstances get-dependencies example_bash_operator "manual__{date_param}" runme_0',
# XCom commands - need a Dag run with completed tasks
'xcom add example_bash_operator "manual__{date_param}" runme_0 {xcom_key} \'{{"test": "value"}}\'',
'xcom get example_bash_operator "manual__{date_param}" runme_0 {xcom_key}',
Expand Down
5 changes: 4 additions & 1 deletion airflow-ctl/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,10 @@ def add_airflow_ctl_exclude_patterns_to_sphinx(exclude_patterns: list[str]):
redirects_file = "redirects.txt"

# -- Options for sphinxcontrib-spelling ----------------------------------------
spelling_word_list_filename = [SPELLING_WORDLIST_PATH.as_posix()]
spelling_word_list_filename = [
SPELLING_WORDLIST_PATH.as_posix(),
(pathlib.Path(__file__).parent / "spelling_wordlist.txt").as_posix(),
]
spelling_exclude_patterns = ["project.rst", "changelog.rst"]

spelling_ignore_contributor_names = False
Expand Down
14 changes: 14 additions & 0 deletions airflow-ctl/docs/howto/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,20 @@ These visual references show the full command syntax, options, and parameters fo
:width: 60%
:alt: airflowctl Providers Command

**Task Instances**
''''''''''''''''''
.. image:: ../images/output_taskinstances.svg
:target: https://raw.githubusercontent.com/apache/airflow/main/airflow-ctl/docs/images/output_taskinstances.svg
:width: 60%
:alt: airflowctl Task Instances Command

**Tasks**
'''''''''
.. image:: ../images/output_tasks.svg
:target: https://raw.githubusercontent.com/apache/airflow/main/airflow-ctl/docs/images/output_tasks.svg
:width: 60%
:alt: airflowctl Tasks Command

**Variables**
'''''''''''''
.. image:: ../images/output_variables.svg
Expand Down
4 changes: 3 additions & 1 deletion airflow-ctl/docs/images/command_hashes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
main:27a22c00dcf32e7a1a4f06672dc8e3c8
main:0460d9c03248bee26207b20b05aa36b9
assets:6419e20452692f577c4c6f570b74be0c
auth:d79e9c7d00c432bdbcbc2a86e2e32053
backfill:74c8737b0a62a86ed3605fa9e6165874
Expand All @@ -9,6 +9,8 @@ dagrun:07035226eaaff0a557d3ad9aab4b41b5
jobs:a5b644c5da8889443bb40ee10b599270
pools:19efe105b9515ab1926ebcaf0e028d71
providers:34502fe09dc0b8b0a13e7e46efdffda6
taskinstances:828543543b03adbcd743a6f4eda308d8
tasks:33ee6ea468f816f71f1c363b785dbb77
variables:f8fc76d3d398b2780f4e97f7cd816646
version:31f4efdf8de0dbaaa4fac71ff7efecc3
plugins:4864fd8f356704bd2b3cd1aec3567e35
Expand Down
142 changes: 77 additions & 65 deletions airflow-ctl/docs/images/output_main.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
105 changes: 105 additions & 0 deletions airflow-ctl/docs/images/output_taskinstances.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 101 additions & 0 deletions airflow-ctl/docs/images/output_tasks.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions airflow-ctl/docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
taskinstances
7 changes: 7 additions & 0 deletions airflow-ctl/src/airflowctl/api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
PoolsOperations,
ProvidersOperations,
ServerResponseError,
TaskInstancesOperations,
VariablesOperations,
VersionOperations,
XComOperations,
Expand Down Expand Up @@ -450,6 +451,12 @@ def providers(self):
"""Operations related to providers."""
return ProvidersOperations(self)

@lru_cache() # type: ignore[prop-decorator]
@property
def task_instances(self):
"""Operations related to task instances."""
return TaskInstancesOperations(self)

@lru_cache() # type: ignore[prop-decorator]
@property
def variables(self):
Expand Down
Loading
Loading