Skip to content

Add airflowctl tasks state command#66213

Open
PrithviBadiga wants to merge 3 commits intoapache:mainfrom
PrithviBadiga:prithvi/airflowctl-task-state
Open

Add airflowctl tasks state command#66213
PrithviBadiga wants to merge 3 commits intoapache:mainfrom
PrithviBadiga:prithvi/airflowctl-task-state

Conversation

@PrithviBadiga
Copy link
Copy Markdown
Contributor

Adds airflowctl tasks state to the airflow-ctl CLI.

Updates:

  • add airflowctl.ctl.commands.task_command.state
  • call GET /api/v2/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_id}
  • print the task instance state via AirflowConsole
  • wire the command in cli_config.py
  • add a focused unit test for the command output
  • add the command to the airflowctl-tests command list

Verification:

  • PYTHONPATH=/Users/prith/Desktop/Codex/airflow-66174/airflow-ctl/src /Users/prith/Desktop/Codex/airflow/.venv/bin/python -m pytest /Users/prith/Desktop/Codex/airflow-66174/airflow-ctl/tests/airflow_ctl/ctl/commands/test_task_command.py /Users/prith/Desktop/Codex/airflow-66174/airflow-ctl/tests/airflow_ctl/ctl/test_cli_config.py -q
  • PYTHONPATH=/Users/prith/Desktop/Codex/airflow-66174/airflow-ctl/src /Users/prith/Desktop/Codex/airflow/.venv/bin/python -m ruff check /Users/prith/Desktop/Codex/airflow-66174/airflow-ctl/src/airflowctl/ctl/commands/task_command.py /Users/prith/Desktop/Codex/airflow-66174/airflow-ctl/src/airflowctl/ctl/cli_config.py /Users/prith/Desktop/Codex/airflow-66174/airflow-ctl/tests/airflow_ctl/ctl/commands/test_task_command.py /Users/prith/Desktop/Codex/airflow-66174/airflow-ctl-tests/tests/airflowctl_tests/test_airflowctl_commands.py

This closes: #66174

@hyungryuk
Copy link
Copy Markdown

@PrithviBadiga Hi! It looks like we've opened overlapping PRs for the same issue. It would be great if we could discuss our differences and see how to best combine our work.

@hyungryuk
Copy link
Copy Markdown

@PrithviBadiga Why don't you check out my PR and share your thoughts? Then, we could look into making a co-authored commit together.

@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AIP-94] airflowctl tasks: add state command

3 participants