Copilot commented on code in PR #74554:
URL: https://github.com/apache/airflow/pull/74554#discussion_r4241094156
##########
airflow-ctl/src/airflowctl/ctl/cli_config.py:
##########
@@ -734,14 +735,27 @@ def _create_arg_for_non_primitive_type(
except AttributeError:
annotation = field_type.annotation
+ is_required = field_type.is_required()
+ is_bool = annotation is bool
+ has_cli_default = (parameter_type, field) in
self.datamodel_fields_with_cli_defaults
+ if is_required and not is_bool and not has_cli_default:
Review Comment:
This generic conversion also changes every other required request-body
field, but the end-to-end command list still uses the removed option forms for
`assets create-event --asset-id`, `pools create --name/--slots`, and `variables
create/update --key/--value`. Those commands will now fail in `argparse`;
please migrate all affected command fixtures to positional values along with
the connection commands.
##########
airflow-ctl-tests/tests/airflowctl_tests/test_airflowctl_commands.py:
##########
@@ -179,8 +179,8 @@ def test_hardcoded_xcom_key_would_collide():
hardcoded = xcom_add_template[0].format(date_param=DATE_PARAM_1,
xcom_key="test_xcom_key")
also_hardcoded = xcom_add_template[0].format(date_param=DATE_PARAM_2,
xcom_key="test_xcom_key")
- # With a hardcoded key, only the dag-run-id differs — but if the same date
- # is reused (e.g. across retries), the commands are fully identical →
collision.
+ # With a hardcoded key, only the dag-run-id differs �" but if the same date
+ # is reused (e.g. across retries), the commands are fully identical �'
collision.
Review Comment:
These replacement characters corrupt the explanatory comment. Restore the
intended em dash and right arrow so the source remains readable.
--
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]