Skip to content

Improve airflowctl required field validation#67410

Closed
bobu-putheeckal wants to merge 2 commits into
apache:mainfrom
bobu-putheeckal:codex-airflow-57721-required-field-errors
Closed

Improve airflowctl required field validation#67410
bobu-putheeckal wants to merge 2 commits into
apache:mainfrom
bobu-putheeckal:codex-airflow-57721-required-field-errors

Conversation

@bobu-putheeckal
Copy link
Copy Markdown

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?
  • Yes (OpenAI Codex)

Generated-by: OpenAI Codex

@potiuk
Copy link
Copy Markdown
Member

potiuk commented May 24, 2026

@bobu-putheeckal A few things need addressing before review — see our Pull Request quality criteria.

  • Static checks fail: CI image checks / Static checks. See the Checks tab.

No rush.


Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.


Drafted-by: Claude Code (Opus 4.7); reviewed by @potiuk before posting

@bobu-putheeckal
Copy link
Copy Markdown
Author

Pushed 6bf4de8d6e to address the ruff format static-check failure. The current PR check rollup no longer shows CI image checks / Static checks failing.

@kaxil
Copy link
Copy Markdown
Member

kaxil commented May 24, 2026

PR template hasn't been followed on any of your PRs. As such I am closing all your PRs since I see little to no evidence of actual testing and mass PRs to Airflow & other repos.

@kaxil kaxil closed this May 24, 2026
@kaxil kaxil added the ai-slop label May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve the error message when a required field from the API is not provided

3 participants