Skip to content

[AIP-94] airflowctl tasks: add states-for-dag-run command #66175

@bugraoz93

Description

@bugraoz93

Body

Summary

Add airflowctl tasks states-for-dag-run to ctl/commands/task_command.py.
Custom command in ctl/commands/ — wired via cli_config.py.

Implementation

  • Add a task_states_for_dag_run function to ctl/commands/task_command.py.
  • Call GET /api/v2/dags/{dag_id}/dagRuns/{run_id}/taskInstances directly.
  • Output via AirflowConsole().print_as(data=[{"task_id": ti.task_id, "state": ti.state} for ti in tis], output=args.output).
  • Wire as airflowctl tasks states-for-dag-run --dag-id <id> --dag-run-id <run_id>
    in cli_config.py.

Committer

  • I acknowledge that I am a maintainer/committer of the Apache Airflow project.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions