hussein-awala commented on code in PR #35898:
URL: https://github.com/apache/airflow/pull/35898#discussion_r1428936920
##########
airflow/providers/google/cloud/hooks/cloud_sql.py:
##########
@@ -964,7 +964,7 @@ def create_connection(self) -> Connection:
proxy, TCP, UNIX sockets, SSL.
"""
uri = self._generate_connection_uri()
- connection = Connection(conn_id=self.db_conn_id, uri=uri)
+ connection = Connection.from_uri(conn_id=self.db_conn_id, uri=uri)
Review Comment:
You can check the Airflow version or check if `Connection .__dict__
.get("from_uri")` is not None; if the check fails, we need to fallback to old
way (via constructor). Also we need to add a small todo comment to remove it
when min_ariflow_version in the providers is >= your checked version.
--
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]