Skip to content

Google provider : Unnecessary imports for CloudSQL operators #40175

@bourliam

Description

@bourliam

Apache Airflow Provider(s)

google

Versions of Apache Airflow Providers

google, ssh, slack

Apache Airflow version

2.6.3

Operating System

composer

Deployment

Google Cloud Composer

Deployment details

No response

What happened

When trying to load the dag for a test with a CloudSQLExportInstanceOperator (from airflow.providers.google.cloud.operators.cloud_sql) I have a module not found error (ModuleNotFoundError: No module named 'airflow.providers.mysql').

I do not use mysql, so I should not have to install this module.

What you think should happen instead

We should not need those dependencies if not necessary. Moreover it is only used for type checking in another operator (CloudSQLExecuteQueryOperator)

How to reproduce

Import a CloudSQL operator without the mysql provider installed for example

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions