Suraj-kumar00 commented on code in PR #67947:
URL: https://github.com/apache/airflow/pull/67947#discussion_r3566599944
##########
airflow-ctl/src/airflowctl/ctl/cli_config.py:
##########
@@ -602,7 +627,7 @@ def _create_arg_for_non_primitive_type(
arg_type=self._python_type_from_string(annotation),
arg_action=argparse.BooleanOptionalAction if
annotation is bool else None, # type: ignore
arg_help=f"{field} for {parameter_key} operation",
- arg_default=False if annotation is bool else None,
+ arg_default=None,
Review Comment:
This was addressing henry3260's comment: the generated CLI hard-coded False
for every bool body flag, so tasks clear sent dry_run=False and
only_failed=False, overriding the API defaults of True and turning a dry run
into a real clear. Reworked per your other comments: no more None. Each
generated bool flag now defaults to its datamodel field's own default (the
generated client models carry the API defaults from the OpenAPI spec), falling
back to False. Every flag is a concrete True or False, and existing commands
are unaffected since their models' bool defaults are already False.
--
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]