Skip to content

providers_manager | Exception when importing 'apache-airflow-providers-google' package ModuleNotFoundError: No module named 'airflow.providers.mysql' #23033

@raphaelauv

Description

@raphaelauv

Apache Airflow version

2.3.0b1 (pre-release)

What happened

airflow users create -r Admin -u admin -e admin@example.com -f admin -l user -p admin

give

[2022-04-15 07:08:30,801] {manager.py:807} WARNING - No user yet created, use flask fab command to do it.
[2022-04-15 07:08:31,024] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin
[2022-04-15 07:08:31,049] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions
[2022-04-15 07:08:31,149] {manager.py:508} INFO - Created Permission View: menu access on Permissions
[2022-04-15 07:08:31,160] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin
[2022-04-15 07:08:32,250] {providers_manager.py:237} WARNING - Exception when importing 'airflow.providers.google.cloud.hooks.cloud_sql.CloudSQLHook' from 'apache-airflow-providers-google' package
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/airflow/providers_manager.py", line 215, in _sanity_check
    imported_class = import_string(class_name)
  File "/usr/local/lib/python3.8/site-packages/airflow/utils/module_loading.py", line 32, in import_string
    module = import_module(module_path)
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/local/lib/python3.8/site-packages/airflow/providers/google/cloud/hooks/cloud_sql.py", line 52, in <module>
    from airflow.providers.mysql.hooks.mysql import MySqlHook
ModuleNotFoundError: No module named 'airflow.providers.mysql'
[2022-04-15 07:29:12,007] {manager.py:213} INFO - Added user admin
User "admin" created with role "Admin"

What you think should happen instead

it do not log this warning with

apache-airflow==2.2.5
apache-airflow-providers-google==6.7.0
[2022-04-15 07:44:45,962] {manager.py:779} WARNING - No user yet created, use flask fab command to do it.
[2022-04-15 07:44:46,304] {manager.py:512} WARNING - Refused to delete permission view, assoc with role exists DAG Runs.can_create Admin
[2022-04-15 07:44:48,310] {manager.py:214} INFO - Added user admin
User "admin" created with role "Admin"

How to reproduce

No response

Operating System

ubuntu

Versions of Apache Airflow Providers

requirements.txt :

apache-airflow-providers-google==6.8.0

pip install -r requirements.txt --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.3.0b1/constraints-3.8.txt"

Deployment

Other Docker-based deployment

Deployment details

pip install apache-airflow[postgres]==2.3.0b1 --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.3.0b1/constraints-3.8.txt"

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions