Clara0619 opened a new pull request, #73317: URL: https://github.com/apache/airflow/pull/73317
## Summary Fixes #57721. This change improves how `airflowctl` handles required fields from Pydantic API request models. Previously, required fields inside request-body models were exposed as CLI options but were not marked as required in `argparse`. As a result, missing fields could reach Pydantic validation before the user received an error. This change propagates Pydantic's `is_required()` information to the generated CLI arguments so missing required fields are reported directly by the CLI. For example, `backfills create` now reports missing required arguments such as: - `--dag-id` - `--from-date` - `--to-date` before request-model validation occurs. The existing CLI-default behavior is preserved, including fields such as `logical_date` that are supplied by `airflowctl` itself. ## Tests Added regression tests covering: - all required `BackfillPostBody` fields missing - each required field missing individually - successful parsing when all required fields are provided - optional boolean/default fields remaining optional - CLI-supplied defaults such as `logical_date` remaining optional Relevant tests passed locally, and `git diff --check` completed successfully. ## Gen-AI disclosure Gen-AI was used to assist with implementation and test drafting. I reviewed the changes and validated the final behavior and tests. -- 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]
