Adding more client side validation to airflowctl
- Dominant language
- Python
- Stars
- 46.9k
- Forks
- 17.8k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 483
Description
### 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?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
Contributor guide
Assessment
This issue has not been assessed yet.