Skip to content

Adding more client side validation to airflowctl #57633

Open
2 of 2 issues completed
Open

Description

@bugraoz93

Apache Airflow version

main (development)

What happened?

airflowctl shouldn't send the fields that are empty from terminal. This will fix the problem related to filling some dicts before sending because when they exist in the request, some fields are failing due to server-side validation not being available.

What you think should happen instead?

airflowctl only sends keys, params, and body that are sent from the terminal.

How to reproduce

https://lists.apache.org/thread/cnz3k2pox69ddkk647mt8gpfy0t70f94

> airflowctl dagrun list
2025-10-30 16:09:33 [warning  ] Server error                   [airflowctl.api.client] extra={'detail': 'Invalid value for state. Valid values are queued, running, success, failed'}
Server response error: Client error message: {'detail': 'Invalid value for state. Valid values are queued, running,
success, failed'}
Client error,  Please check the command and its parameters. If you need help, run the command with —help.

And the request that is making is GET /api/v2/dags/None/dagRuns?start_date=&end_date=&state=&limit=&dag_id

Operating System

linux

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Sub-issues

Sub-issues

2 of 2 Issues completed
Loading 2 sub-issues

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions