potiuk opened a new pull request, #65608: URL: https://github.com/apache/airflow/pull/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). ## Test plan - [X] New unit test \`test_list_without_state_does_not_send_state_param\` asserts \`state\` is not present in the URL query params when omitted - [X] Existing \`TestDagRunOperations\` suite continues to pass --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Opus 4.7 (1M context) Generated-by: Claude Opus 4.7 (1M context) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
