JavierLopezT commented on a change in pull request #18764:
URL: https://github.com/apache/airflow/pull/18764#discussion_r724155832



##########
File path: airflow/providers/amazon/aws/secrets/secrets_manager.py
##########
@@ -134,12 +138,17 @@ def client(self):
 
         return session.client(service_name="secretsmanager", **self.kwargs)
 
-    def _format_uri_with_extra(self, secret, conn_string):
+    @staticmethod
+    def _format_uri_with_extra(secret, conn_string):
         try:
             extra_dict = secret['extra']
         except KeyError:
             return conn_string
-        conn_string = f"{conn_string}?{urlencode(extra_dict)}"
+
+        extra = ast.literal_eval(
+            extra_dict
+        )  # json.loads doesn't work because you can have unquoted booleans 
values
+        conn_string = f"{conn_string}?{urlencode(extra)}"

Review comment:
       From boto3
   
https://github.com/apache/airflow/blob/main/airflow/providers/amazon/aws/secrets/secrets_manager.py#L231
   
   Extra is just another field in the secrets manager, so it's retrieved as 
string, like the others:
   ![Captura de pantalla 2021-10-07 a las 15 01 
04](https://user-images.githubusercontent.com/11339132/136389324-0fc05786-509a-4d41-82bb-7160d7175bc3.png)
   
   




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