Skip to content

Add airflowctl dags state command#68564

Merged
henry3260 merged 1 commit into
apache:mainfrom
henry3260:migrate-dag-state
Jul 1, 2026
Merged

Add airflowctl dags state command#68564
henry3260 merged 1 commit into
apache:mainfrom
henry3260:migrate-dag-state

Conversation

@henry3260

Copy link
Copy Markdown
Contributor

Add airflowctl dags state for retrieving the state and configuration of a Dag run by run ID or logical date.

The command first attempts to find the Dag run by run ID. If it is not found, the input is parsed as a logical date and used to query the Dag run list endpoint.

Because airflowctl can't reliably determine the remote Airflow instance's configured default timezone, naive logical dates are rejected with a clear message requiring the user to provide an explicit timezone offset. This avoids silently querying the wrong instant on non-UTC deployments.

related: #68402
-->


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • 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.

@bugraoz93 bugraoz93 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Henry! Overall looks good. My only suggestion is givin user definition for some output and use rich print please :)

Comment thread airflow-ctl/src/airflowctl/ctl/commands/dag_command.py Outdated
@henry3260 henry3260 force-pushed the migrate-dag-state branch from 4faabad to 24041e3 Compare June 15, 2026 20:33
@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Jun 17, 2026
@henry3260 henry3260 requested a review from bugraoz93 June 21, 2026 18:58
@henry3260

Copy link
Copy Markdown
Contributor Author

Hi @bugraoz93, just checking in to see if this is good to go, or if you need any further changes. Thank you!

@bugraoz93 bugraoz93 added the full tests needed We need to run full set of tests for this PR to merge label Jul 1, 2026
@bugraoz93 bugraoz93 closed this Jul 1, 2026
@bugraoz93 bugraoz93 reopened this Jul 1, 2026

@bugraoz93 bugraoz93 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks Henry! Let's see CI integrations and we can merge it

Comment thread airflow-ctl/src/airflowctl/api/operations.py
@henry3260 henry3260 merged commit ecd6fd4 into apache:main Jul 1, 2026
235 checks passed
@henry3260 henry3260 deleted the migrate-dag-state branch July 1, 2026 18:52
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Backport successfully created: airflow-ctl/v0-1-test

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 PR Link

henry3260 added a commit that referenced this pull request Jul 2, 2026
…69217)

(cherry picked from commit ecd6fd4)

Co-authored-by: Henry Chen <henrychen@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:airflow-ctl backport-to-airflow-ctl/v0-1-test full tests needed We need to run full set of tests for this PR to merge kind:documentation ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants