Eason09053360 opened a new pull request, #76354: URL: https://github.com/apache/airflow/pull/76354
## Why `airflowctl dags pause`, `unpause`, `drain` and `next-execution` handed enum and `datetime` objects to `print_as`, which `str()`s every value. So `-o json` printed `"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 with `dags get` for the same Dag. ## What `airflow-ctl/src/airflowctl/ctl/commands/dag_command.py` now dumps the response with `model_dump(mode="json")`, as the generated `dags get` already does; table output changes the same way. The tests assert the printed JSON matches what the server sent, and `test_next_execution` checks the printed output instead of the returned `datetime` objects. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 5.5) Generated-by: Claude Code (Opus 5.5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
