FoxHelms commented on code in PR #59224:
URL: https://github.com/apache/airflow/pull/59224#discussion_r2635883719
##########
providers/hashicorp/src/airflow/providers/hashicorp/secrets/vault.py:
##########
@@ -199,14 +199,15 @@ def get_connection(self, conn_id: str) -> Connection |
None:
from airflow.models.connection import Connection
response = self.get_response(conn_id)
- if response is None:
+ if not response:
return None
-
- uri = response.get("conn_uri")
- if uri:
+ try:
+ uri = response["conn_uri"]
return Connection(conn_id, uri=uri)
-
- return Connection(conn_id, **response)
+ except KeyError:
+ self.log.warning('Vault connection %s fetched but does not have
required key "conn_uri"', conn_id)
Review Comment:
Changes removed
--
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]