ashb commented on a change in pull request #18764:
URL: https://github.com/apache/airflow/pull/18764#discussion_r724023511
##########
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:
Why is extra_dict a string rather than a dict? Where does it come from?
--
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]