Skip to content

[v3-2-test] Fix airflowctl dagrun list crash when --state is omitted (#65608)#65620

Merged
potiuk merged 1 commit intov3-2-testfrom
backport-89a021c-v3-2-test
Apr 21, 2026
Merged

[v3-2-test] Fix airflowctl dagrun list crash when --state is omitted (#65608)#65620
potiuk merged 1 commit intov3-2-testfrom
backport-89a021c-v3-2-test

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

DagRunOperations.list() required a non-None state and unconditionally
sent str(state) to the API. When the CLI omitted --state, argparse
passed None and the API received the literal string "None", failing
with "Invalid value for state. Valid values are queued, running,
success, failed".

Make state optional (Optional[str] = None) and only include it in the
query string when provided. Give limit a sensible default (100) while
we are at it so the method works when called with no args. The
auto-generated airflowctl dagrun list command now accepts --state as
a true filter instead of a required flag.

Reported in #65497 (rc2 testing).
(cherry picked from commit 89a021c)

Co-authored-by: Jarek Potiuk jarek@potiuk.com

…65608)

DagRunOperations.list() required a non-None state and unconditionally
sent str(state) to the API. When the CLI omitted --state, argparse
passed None and the API received the literal string "None", failing
with "Invalid value for state. Valid values are queued, running,
success, failed".

Make state optional (Optional[str] = None) and only include it in the
query string when provided. Give limit a sensible default (100) while
we are at it so the method works when called with no args. The
auto-generated `airflowctl dagrun list` command now accepts --state as
a true filter instead of a required flag.

Reported in #65497 (rc2 testing).
(cherry picked from commit 89a021c)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
@potiuk potiuk marked this pull request as ready for review April 21, 2026 18:13
@potiuk potiuk merged commit 7cf2cdb into v3-2-test Apr 21, 2026
6 of 7 checks passed
@potiuk potiuk deleted the backport-89a021c-v3-2-test branch April 21, 2026 18:13
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.

1 participant