This is an automated email from the ASF dual-hosted git repository.

eladkal pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new d87f9b0505 Refactor AWS Auth manager user output (#42454)
d87f9b0505 is described below

commit d87f9b050505747ee070327ef482a5e0f5551ec1
Author: Niko Oliveira <[email protected]>
AuthorDate: Wed Sep 25 06:58:22 2024 -0700

    Refactor AWS Auth manager user output (#42454)
    
    AWS auth manager has incredible tooling to setup the required resources,
    however one piece needs to be done manually. This PR updates the docs
    and user output to make it more clear what needs to happen next.
    
    Removing the stacktrace (which usually indicates a critical failure in
    a piece of code) and replacing with a more clearly marked output
    message. Also update the docs to more clearly indicate that the script
    will most likely need user intervention.
---
 airflow/providers/amazon/aws/auth_manager/cli/idc_commands.py  | 10 +++++++---
 .../auth-manager/setup/identity-center.rst                     |  6 +-----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/airflow/providers/amazon/aws/auth_manager/cli/idc_commands.py 
b/airflow/providers/amazon/aws/auth_manager/cli/idc_commands.py
index 388948765a..c4901351b2 100644
--- a/airflow/providers/amazon/aws/auth_manager/cli/idc_commands.py
+++ b/airflow/providers/amazon/aws/auth_manager/cli/idc_commands.py
@@ -19,6 +19,7 @@
 from __future__ import annotations
 
 import logging
+import sys
 from typing import TYPE_CHECKING
 
 import boto3
@@ -139,10 +140,13 @@ def _create_application(client: BaseClient, instance_arn: 
str | None, args) -> s
             # Remove this part when it is supported
             if "is not supported for this action" in 
e.response["Error"]["Message"]:
                 print(
-                    "Creation of SAML applications is only supported in AWS 
console today. "
-                    "Please create the application through the console."
+                    
"*************************************************************************\n"
+                    "*                            ACTION REQUIRED              
              *\n"
+                    "* Creation of SAML applications is only supported in AWS 
console today. *\n"
+                    "* Please create the application through the console.      
              *\n"
+                    
"*************************************************************************\n"
                 )
-            raise
+            sys.exit(1)
 
         print(f"Application created: '{response['ApplicationArn']}'")
 
diff --git 
a/docs/apache-airflow-providers-amazon/auth-manager/setup/identity-center.rst 
b/docs/apache-airflow-providers-amazon/auth-manager/setup/identity-center.rst
index a134dfe0dd..acf3727bf9 100644
--- 
a/docs/apache-airflow-providers-amazon/auth-manager/setup/identity-center.rst
+++ 
b/docs/apache-airflow-providers-amazon/auth-manager/setup/identity-center.rst
@@ -48,11 +48,7 @@ To create the resources, please run the following command:
 
   airflow aws-auth-manager init-identity-center
 
-The CLI command should exit successfully with the message: ::
-
-  AWS IAM Identity Center resources created successfully.
-
-If the CLI command exited with an error, please look carefully at the CLI 
command output to understand which resource(s)
+The CLI command will ask you to create any resources manually if they cannot 
be automatically created. Please look carefully at the CLI command output to 
understand which resource(s)
 have or have not been created successfully. The resource(s) which have not 
been successfully created need to be
 :ref:`created manually <identity_center_manual_configuration>`.
 

Reply via email to