airflowctl: add tasks states-for-dag-run command (closes #66175)#66385
Closed
noahwons wants to merge 2 commits into
Closed
airflowctl: add tasks states-for-dag-run command (closes #66175)#66385noahwons wants to merge 2 commits into
noahwons wants to merge 2 commits into
Conversation
Signed-off-by: noahwons <noahwons@gmail.com>
Signed-off-by: noahwons <noahwons@gmail.com>
Contributor
|
static check failed. you can use prek |
Member
|
@noahwons A few things need addressing before review — see our Pull Request quality criteria. Issues found:
What to do next:
No rush — take your time. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the Airflow Slack. Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title
airflowctl: add
tasks states-for-dag-runcommand (closes #66175)Body
Closes #66175.
Builds on top of #66174 #66384 (PR for issue #66174 —
tasks state).What this PR does
Adds the
airflowctl tasks states-for-dag-runsubcommand. Given a DAG ID and a DAG run ID, prints a table of all task instances in that run, with their current state, start/end timestamps, and (where applicable) map index. Replicates the legacyairflow tasks states-for-dag-runCLI behavior over the REST API.Implementation summary
list_states_for_dag_runmethod on theTasksOperationsclass added in #______, wrappingGET /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances. Uses the existingBaseOperations.execute_listhelper for automatic pagination.states_for_dag_runcommand function inairflow-ctl/src/airflowctl/ctl/commands/tasks_command.py.ActionCommandregistered in the existingTASKS_COMMANDStuple incli_config.pywithname="states-for-dag-run".test_tasks_command.pyexercising the happy path with a mocked REST response.airflow-ctl/newsfragments/.Testing
pytest airflow-ctl/tests/airflow_ctl/ctl/commands/test_tasks_command.py::TestTasksCommands::test_tasks_states_for_dag_run -v— passes.AI-assistance disclosure
Per the project's contribution policy: this PR was developed with AI assistance for code drafting and analysis. All code has been reviewed, manually tested by the contributor, and the contributor can explain and defend the changes during review.