Repository navigation
Fix enum names and non-ISO dates in airflowctl dags output - #76354
Merged
shahar1 merged 1 commit intoNov 6, 2026
Merged
Conversation
`dags pause`, `unpause`, `drain` and `next-execution` printed "DagSchedulingState.ACTIVE" and "2024-12-31 23:59:59+00:00" with `-o json`, so scripts comparing against the API values never matched, and the output disagreed with `dags get` for the same Dag.
Eason09053360
marked this pull request as ready for review
November 5, 2026 00:38
Eason09053360
requested review from
bugraoz93,
dheerajturaga,
henry3260 and
potiuk
as code owners
November 5, 2026 00:38
Andrushika
approved these changes
Nov 5, 2026
shahar1
approved these changes
Nov 6, 2026
Contributor
Backport successfully created: airflow-ctl/v0-1-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
shahar1
added a commit
that referenced
this pull request
Nov 6, 2026
…l dags output (#76354) (#76574) * [airflow-ctl/v0-1-test] Fix enum names and non-ISO dates in airflowctl dags output (#76354) `dags pause`, `unpause`, `drain` and `next-execution` printed "DagSchedulingState.ACTIVE" and "2024-12-31 23:59:59+00:00" with `-o json`, so scripts comparing against the API values never matched, and the output disagreed with `dags get` for the same Dag. (cherry picked from commit 3204b6e) Co-authored-by: Y-C <[email protected]> * Test the enum output fix against the field this branch has The cherry-picked test asserts on `scheduling_state`, which `DAGResponse` does not have on this branch, so it raised KeyError. `allowed_run_types` is the enum field that `pause` and `unpause` print here, and it printed "DagRunType.MANUAL" before this fix. Claude-Session: https://claude.ai/code/session_01BVx6g7kMcPenQEPwEZbPQJ --------- Co-authored-by: Y-C <[email protected]> Co-authored-by: Shahar Epstein <[email protected]>
shahar1
added a commit
to shahar1/airflow
that referenced
this pull request
Nov 7, 2026
…l dags output (apache#76354) (apache#76574) * [airflow-ctl/v0-1-test] Fix enum names and non-ISO dates in airflowctl dags output (apache#76354) `dags pause`, `unpause`, `drain` and `next-execution` printed "DagSchedulingState.ACTIVE" and "2024-12-31 23:59:59+00:00" with `-o json`, so scripts comparing against the API values never matched, and the output disagreed with `dags get` for the same Dag. (cherry picked from commit 3204b6e) Co-authored-by: Y-C <[email protected]> * Test the enum output fix against the field this branch has The cherry-picked test asserts on `scheduling_state`, which `DAGResponse` does not have on this branch, so it raised KeyError. `allowed_run_types` is the enum field that `pause` and `unpause` print here, and it printed "DagRunType.MANUAL" before this fix. Claude-Session: https://claude.ai/code/session_01BVx6g7kMcPenQEPwEZbPQJ --------- Co-authored-by: Y-C <[email protected]> Co-authored-by: Shahar Epstein <[email protected]>
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.
Why
airflowctl dags pause,unpause,drainandnext-executionhanded enum anddatetimeobjects toprint_as, whichstr()s every value. So-o jsonprinted"DagSchedulingState.ACTIVE"and"2024-12-31 23:59:59+00:00"instead of the API's"active"and"2024-12-31T23:59:59Z", and disagreed withdags getfor the same Dag.What
airflow-ctl/src/airflowctl/ctl/commands/dag_command.pynow dumps the response withmodel_dump(mode="json"), as the generateddags getalready does; table output changes the same way. The tests assert the printed JSON matches what the server sent, andtest_next_executionchecks the printed output instead of the returneddatetimeobjects.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5.5) following the guidelines