You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/08/09 11:32:41 UTC

[GitHub] [airflow] Taragolis commented on a diff in pull request #25609: Remove deprecated modules from Amazon provider package

Taragolis commented on code in PR #25609:
URL: https://github.com/apache/airflow/pull/25609#discussion_r941227062


##########
airflow/providers/amazon/aws/secrets/secrets_manager.py:
##########
@@ -367,24 +366,6 @@ def get_conn_value(self, conn_id: str) -> Optional[str]:
 
         return connection
 
-    def get_conn_uri(self, conn_id: str) -> Optional[str]:
-        """
-        Return URI representation of Connection conn_id.
-
-        As of Airflow version 2.3.0 this method is deprecated.
-
-        :param conn_id: the connection id
-        :return: deserialized Connection
-        """
-        if get_airflow_version() >= (2, 3):
-            warnings.warn(
-                f"Method `{self.__class__.__name__}.get_conn_uri` is deprecated and will be removed "
-                "in a future release.  Please use method `get_conn_value` instead.",
-                DeprecationWarning,
-                stacklevel=2,
-            )
-        return self.get_conn_value(conn_id)
-

Review Comment:
   Same as for SSM Secret Backend



##########
airflow/providers/amazon/aws/secrets/systems_manager.py:
##########
@@ -100,24 +98,6 @@ def get_conn_value(self, conn_id: str) -> Optional[str]:
 
         return self._get_secret(self.connections_prefix, conn_id)
 
-    def get_conn_uri(self, conn_id: str) -> Optional[str]:
-        """
-        Return URI representation of Connection conn_id.
-
-        As of Airflow version 2.3.0 this method is deprecated.
-
-        :param conn_id: the connection id
-        :return: deserialized Connection
-        """
-        if get_airflow_version() >= (2, 3):
-            warnings.warn(
-                f"Method `{self.__class__.__name__}.get_conn_uri` is deprecated and will be removed "
-                "in a future release.  Please use method `get_conn_value` instead.",
-                DeprecationWarning,
-                stacklevel=2,
-            )
-        return self.get_conn_value(conn_id)
-

Review Comment:
   This is the reason why SSM Parameters Sectet Backend Task failed.
   I don't think we can remove this method right now, otherwise it would use `BaseSecretsBackend.get_conn_uri` which raise NotImplementedError
   
   Also Provider might use in Airflow 2.2 where this method not deprecated



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org