Leondon9 commented on code in PR #62702:
URL: https://github.com/apache/airflow/pull/62702#discussion_r2883605462


##########
airflow-ctl/src/airflowctl/ctl/cli_config.py:
##########
@@ -275,6 +275,15 @@ def __call__(self, parser, namespace, values, 
option_string=None):
     choices=("overwrite", "fail", "skip"),
 )
 
+# Common import action arg (for pools, connections)
+ARG_ACTION_ON_EXISTING_KEY = Arg(

Review Comment:
   Done! Renamed `ARG_VARIABLE_ACTION_ON_EXISTING_KEY` → 
`ARG_ACTION_ON_EXISTING_KEY` and it's now shared across all three commands 
(connections, pools, variables). Updated the help text to be generic as well.



##########
airflow-ctl/src/airflowctl/ctl/commands/connection_command.py:
##########
@@ -59,10 +59,11 @@ def import_(args, api_client=NEW_API_CLIENT) -> None:
             )
             for k, v in connections_json.items()
         }
+        action_on_existence = 
BulkActionOnExistence(args.action_on_existing_key)
         connection_create_action = BulkCreateActionConnectionBody(
             action="create",
             entities=list(connections_data.values()),
-            action_on_existence=BulkActionOnExistence("fail"),
+            action_on_existence=action_on_existence,

Review Comment:
   Done! Removed the intermediate variable and inlined it directly. Thanks for 
the suggestion!



-- 
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]

Reply via email to