Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn provider's import warnings into debug logs #14903

Merged
merged 1 commit into from Mar 20, 2021

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Mar 19, 2021

When only some providers are installed, cross-dependencies between
the providers might cause import erors. Those import errors are
repeated in webserver as it is reloaded every 30 seconds.

Since "only some providers" case is valid, it should not generate
warrnings if it is an ImportError. Those warnings are now
turned into debug messages.

Fixes: #14286


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

airflow/providers_manager.py Outdated Show resolved Hide resolved
@potiuk potiuk force-pushed the remove-warnings-from-providers-manager branch from e524653 to c0196c8 Compare March 19, 2021 22:02
@potiuk
Copy link
Member Author

potiuk commented Mar 19, 2021

I simplified it a it more and added comment @ashb -> i simply turn all the ImportErrors into debug.

airflow/providers_manager.py Outdated Show resolved Hide resolved
When only some providers are installed, cross-dependencies between
the providers might cause import erors. Those import errors are
repeated in webserver as it is reloaded every 30 seconds.

Since "only some providers" case is valid, it should not generate
warrnings if it is an ImportError. Those warnings are now
turned into debug messages.

Fixes: apache#14286
@potiuk potiuk force-pushed the remove-warnings-from-providers-manager branch from c0196c8 to 146d4d4 Compare March 19, 2021 22:18
@potiuk
Copy link
Member Author

potiuk commented Mar 19, 2021

Should be updaed now.

@github-actions
Copy link

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest master or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Mar 19, 2021
@potiuk potiuk merged commit 2f32df7 into apache:master Mar 20, 2021
@potiuk potiuk deleted the remove-warnings-from-providers-manager branch March 20, 2021 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
okay to merge It's ok to merge this PR as it does not require more tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

from 'apache-airflow-providers-google' package: No module named 'airflow.providers.postgres'
2 participants