uranusjr commented on code in PR #25810:
URL: https://github.com/apache/airflow/pull/25810#discussion_r949945663


##########
airflow/providers/amazon/aws/secrets/secrets_manager.py:
##########
@@ -193,8 +196,11 @@ def _format_uri_with_extra(secret, conn_string: str) -> 
str:
 
         return conn_string
 
-    def get_connection(self, conn_id: str) -> Optional[Connection]:
+    def get_connection(self, conn_id: str) -> Optional["Connection"]:
         if not self.full_url_mode:
+            # Avoid circular import problems when instantiating the backend 
during configuration.
+            from airflow.models.connection import Connection

Review Comment:
   There’s not really a good way to catch this, mainly due to `airflow.models` 
too eagerly imports everything. #24486 would be a good general solution to the 
problem in general.



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