amarlearning commented on code in PR #49496:
URL: https://github.com/apache/airflow/pull/49496#discussion_r2059110934
##########
airflow-ctl/src/airflowctl/ctl/cli_config.py:
##########
@@ -530,16 +564,32 @@ def merge_commands(
command_factory = CommandFactory()
+AUTH_ARGS = (ARG_AUTH_URL, ARG_AUTH_TOKEN, ARG_AUTH_ENVIRONMENT,
ARG_AUTH_USERNAME, ARG_AUTH_PASSWORD)
+
AUTH_COMMANDS = (
ActionCommand(
name="login",
help="Login to the metadata database for personal usage. JWT Token
must be provided via parameter.",
description="Login to the metadata database",
func=lazy_load_command("airflowctl.ctl.commands.auth_command.login"),
- args=(ARG_AUTH_URL, ARG_AUTH_TOKEN, ARG_AUTH_ENVIRONMENT,
ARG_AUTH_USERNAME, ARG_AUTH_PASSWORD),
+ args=AUTH_ARGS,
),
)
+POOL_COMMANDS = (
+ ActionCommand(
+ name="import",
+ help="Import pools",
+ func=lazy_load_command("airflowctl.ctl.commands.pool_command.import"),
+ args=(ARG_POOL_IMPORT, *AUTH_ARGS),
Review Comment:
Hey @bugraoz93, I grouped all the auth-related args — `ARG_AUTH_URL,
ARG_AUTH_TOKEN, ARG_AUTH_ENVIRONMENT, ARG_AUTH_USERNAME, and ARG_AUTH_PASSWORD`
— into a list called `AUTH_ARGS`, so they can be reused wherever needed. Do you
want me to undo that change and instead use the auth-related args explicitly in
the pool commands?
--
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]