Skip to content

Add airflowctl tasks states-for-dag-run command#69366

Merged
Lee-W merged 1 commit into
apache:mainfrom
FrankYang0529:airflow-tasks-states-for-dag-run
Jul 21, 2026
Merged

Add airflowctl tasks states-for-dag-run command#69366
Lee-W merged 1 commit into
apache:mainfrom
FrankYang0529:airflow-tasks-states-for-dag-run

Conversation

@FrankYang0529

Copy link
Copy Markdown
Member
  • Add airflowctl tasks states-for-dag-run <dag_id> <logical_date_or_run_id>.
  • Add TaskInstancesOperations.list in operations.py (GET /dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances), which also auto-generates airflowctl taskinstances list <dag_id> <dag_run_id>.
  • Move the dag-run resolution helper shared with dags state to airflowctl/ctl/utils/dag_run.py.
  • Mark the core CLI command with @deprecated_for_airflowctl("airflowctl tasks states-for-dag-run") and register it in test_command_deprecations.py.

Was generative AI tooling used to co-author this PR?
  • Yes - Claude Code

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

Signed-off-by: PoAn Yang <payang@apache.org>
@FrankYang0529
FrankYang0529 force-pushed the airflow-tasks-states-for-dag-run branch from 33e1f93 to 4dafc6e Compare July 14, 2026 08:27
@Lee-W
Lee-W merged commit e9f89d6 into apache:main Jul 21, 2026
149 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Backport failed to create: airflow-ctl/v0-1-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
airflow-ctl/v0-1-test Commit Link

You can attempt to backport this manually by running:

cherry_picker e9f89d6 airflow-ctl/v0-1-test

This should apply the commit to the airflow-ctl/v0-1-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

@github-actions

Copy link
Copy Markdown
Contributor

Backport failed to create: v3-3-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-3-test Commit Link

You can attempt to backport this manually by running:

cherry_picker e9f89d6 v3-3-test

This should apply the commit to the v3-3-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

@FrankYang0529
FrankYang0529 deleted the airflow-tasks-states-for-dag-run branch July 22, 2026 05:52
IamJasonBian pushed a commit to IamJasonBian/airflow that referenced this pull request Jul 22, 2026
Resolve conflicts with the new tasks states-for-dag-run command (apache#69366):
- keep both 'tasks state' (with --map-index) and 'tasks states-for-dag-run'
  in a single TASK_COMMANDS group
- merge TaskInstancesOperations so it exposes both get() and list()
- drop the TaskInstancesOperations exclusions so the auto-generated
  taskinstances group (get/list) stays available, add help text and an
  integration-test entry for 'taskinstances get'
- regenerate command hashes and tasks/taskinstances help images
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 states-for-dag-run command

2 participants