From ffbf4d4da43ec2c403214877f4d0630e3f886bb3 Mon Sep 17 00:00:00 2001 From: Niko Oliveira Date: Wed, 25 Sep 2024 11:25:05 -0700 Subject: [PATCH 1/3] Small fix to AWS AVP cli init script Correct the configuration name we as users to set --- airflow/providers/amazon/aws/auth_manager/cli/avp_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow/providers/amazon/aws/auth_manager/cli/avp_commands.py b/airflow/providers/amazon/aws/auth_manager/cli/avp_commands.py index 62452b722977c..cee3532f0e8be 100644 --- a/airflow/providers/amazon/aws/auth_manager/cli/avp_commands.py +++ b/airflow/providers/amazon/aws/auth_manager/cli/avp_commands.py @@ -65,7 +65,7 @@ def init_avp(args): if not args.dry_run: print( - "Please set configs below in Airflow configuration under AIRFLOW__AWS_AUTH_MANAGER__." + "Please set configs below in Airflow configuration under AIRFLOW__AWS_AUTH_MANAGER__AVP_POLICY_STORE_ID." ) print(json.dumps({"avp_policy_store_id": policy_store_id}, indent=4)) From 91f784dd2ad6aeab5b366c410b05b9c8ddcbc00d Mon Sep 17 00:00:00 2001 From: Niko Oliveira Date: Wed, 25 Sep 2024 11:37:47 -0700 Subject: [PATCH 2/3] Update airflow/providers/amazon/aws/auth_manager/cli/avp_commands.py Co-authored-by: Vincent <97131062+vincbeck@users.noreply.github.com> --- airflow/providers/amazon/aws/auth_manager/cli/avp_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airflow/providers/amazon/aws/auth_manager/cli/avp_commands.py b/airflow/providers/amazon/aws/auth_manager/cli/avp_commands.py index cee3532f0e8be..0aa77779c134f 100644 --- a/airflow/providers/amazon/aws/auth_manager/cli/avp_commands.py +++ b/airflow/providers/amazon/aws/auth_manager/cli/avp_commands.py @@ -65,9 +65,9 @@ def init_avp(args): if not args.dry_run: print( - "Please set configs below in Airflow configuration under AIRFLOW__AWS_AUTH_MANAGER__AVP_POLICY_STORE_ID." + "Please set configs below in Airflow configuration." ) - print(json.dumps({"avp_policy_store_id": policy_store_id}, indent=4)) + print(f"AIRFLOW__AWS_AUTH_MANAGER__AVP_POLICY_STORE_ID={policy_store_id}") @cli_utils.action_cli From 1f4081fc89a2b574013ae5714f3ab69dc247c5de Mon Sep 17 00:00:00 2001 From: Niko Oliveira Date: Wed, 25 Sep 2024 12:08:00 -0700 Subject: [PATCH 3/3] Small fixes from PR --- .../providers/amazon/aws/auth_manager/cli/avp_commands.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/airflow/providers/amazon/aws/auth_manager/cli/avp_commands.py b/airflow/providers/amazon/aws/auth_manager/cli/avp_commands.py index 0aa77779c134f..fcd9bddaceded 100644 --- a/airflow/providers/amazon/aws/auth_manager/cli/avp_commands.py +++ b/airflow/providers/amazon/aws/auth_manager/cli/avp_commands.py @@ -18,7 +18,6 @@ from __future__ import annotations -import json import logging from pathlib import Path from typing import TYPE_CHECKING @@ -64,10 +63,8 @@ def init_avp(args): _set_schema(client, policy_store_id, args) if not args.dry_run: - print( - "Please set configs below in Airflow configuration." - ) - print(f"AIRFLOW__AWS_AUTH_MANAGER__AVP_POLICY_STORE_ID={policy_store_id}") + print("Please set configs below in Airflow configuration:\n") + print(f"AIRFLOW__AWS_AUTH_MANAGER__AVP_POLICY_STORE_ID={policy_store_id}\n") @cli_utils.action_cli