Suraj-kumar00 commented on code in PR #67947:
URL: https://github.com/apache/airflow/pull/67947#discussion_r3448558475
##########
airflow-ctl/src/airflowctl/ctl/cli_config.py:
##########
@@ -712,10 +737,19 @@ def _get_func(args: Namespace, api_operation: dict,
api_client: Client = NEW_API
datamodel_param_name = parameter_key
if expanded_parameter in self.excluded_parameters:
continue
- if expanded_parameter in args_dict.keys():
+ if (
+ expanded_parameter in args_dict.keys()
+ and args_dict[expanded_parameter] is not None
+ ):
+ val = args_dict[expanded_parameter]
Review Comment:
Yeah, you're right on both counts.
Fixed by changing the default from False to None for bool fields in
`_create_arg_for_non_primitive_type`, so unset flags are now omitted from the
request body and the API defaults apply. This also brings the path in sync with
the primitive arg path, which already defaulted to None.
Added a regression test
(`test_command_factory_body_bool_field_defaults_to_none`) using
ClearTaskInstancesBody to lock it in.
--
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]