Taragolis commented on code in PR #25980:
URL: https://github.com/apache/airflow/pull/25980#discussion_r969840119
##########
airflow/providers/amazon/aws/utils/connection_wrapper.py:
##########
@@ -127,9 +127,18 @@ def __post_init__(self, conn: "Connection"):
self.password = conn.password
self.extra_config = deepcopy(conn.extra_dejson)
- if self.conn_type != "aws":
+ if self.conn_type.lower() == "s3":
warnings.warn(
- f"{self.conn_repr} expected connection type 'aws', got
{self.conn_type!r}.",
+ f"{self.conn_repr} has connection type 's3', which is
deprecated. "
+ "Please update your connection and set `conn_type='aws'`.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
+ elif self.conn_type != "aws":
+ warnings.warn(
+ f"{self.conn_repr} expected connection type 'aws', got
{self.conn_type!r}. "
+ "This connection might not work correctly. "
Review Comment:
This is in general how it work right now, if user not provide expected
`conn_type == "aws"` then inform user that it might not work correctly.
--
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]