-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Description
Apache Airflow version
3.0.0
If "Other Airflow 2 version" selected, which one?
No response
What happened?
I was trying to replace the import for Connection from from airflow.models import Connection to from airflow.sdk import Connection for making cloud_sql Hook compatible with Airflow 3 and Airflow 2. And I have gotten the error that the uri field does not exist for Connection imported from task-sdk.
It means for me that in the current time we can't replace the code for cloud_sql hook here: https://github.com/apache/airflow/blob/main/providers/google/src/airflow/providers/google/cloud/hooks/cloud_sql.py#L1122. This parameter is an important parameter for establishing a connection for CloudSQL operators. And when in the future we remove the ability for importing Connection from the models these operators will be broke.
What you think should happen instead?
In my opinion Connection from task-sdk and models should have the same fields and interface.
How to reproduce
For cloud_sql hook replace the import from from airflow.models import Connection to from airflow.sdk import Connection. After that run test_cloud_sql unit test.
Operating System
Ubuntu
Versions of Apache Airflow Providers
No response
Deployment
Other
Deployment details
No response
Anything else?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct