bobu-putheeckal opened a new pull request, #67410: URL: https://github.com/apache/airflow/pull/67410
Improve airflowctl client-side validation for API request bodies so missing required generated Pydantic fields are reported clearly before building/sending requests. Changes: - Add a reusable required-field validator using Pydantic field `is_required()`. - Validate generated request body models before dumping them for API requests. - Reuse the validator while importing pools, variables, and connections from JSON so missing API-required fields point to the specific missing input. - Add focused tests for direct API operations and import commands. Closes: #57721 Tests: - `uv run --project airflow-ctl ruff check airflow-ctl/src/airflowctl/api/operations.py airflow-ctl/src/airflowctl/ctl/cli_config.py airflow-ctl/src/airflowctl/ctl/commands/connection_command.py airflow-ctl/src/airflowctl/ctl/commands/pool_command.py airflow-ctl/src/airflowctl/ctl/commands/variable_command.py airflow-ctl/src/airflowctl/exceptions.py airflow-ctl/tests/airflow_ctl/api/test_operations.py airflow-ctl/tests/airflow_ctl/ctl/commands/test_connections_command.py airflow-ctl/tests/airflow_ctl/ctl/commands/test_pool_command.py airflow-ctl/tests/airflow_ctl/ctl/commands/test_variable_command.py` - `uv run --project airflow-ctl pytest airflow-ctl/tests` --- ##### Was generative AI tooling used to co-author this PR? - [x] Yes (OpenAI Codex) Generated-by: OpenAI Codex -- 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]
