You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airflow.apache.org by Ping Zhang <pi...@umich.edu> on 2022/02/10 21:28:19 UTC
[DISCUSS] change the warning to debug in _sanity_check providers_manager.py
Hi all,
I am thinking if we can make the warning level to debug level or make it
configurable to ignore those warnings from:
```
except ImportError as e:
# When there is an ImportError we turn it into debug warnings as
this is
# an expected case when only some providers are installed
log.warning(
"Exception when importing '%s' from '%s' package",
class_name,
provider_package,
exc_info=e,
)
return None
```
in `def _sanity_check`
https://github.com/apache/airflow/blob/main/airflow/providers_manager.py#L171-L176
It is distracting when launching the webserver.
What's your thoughts?
Thanks,
Ping
Re: [DISCUSS] change the warning to debug in _sanity_check providers_manager.py
Posted by Ping Zhang <pi...@umich.edu>.
Hi Jarek,
Appreciate the background of this move. That makes sense to keep it as
warning.
Thanks,
Ping
On Thu, Feb 10, 2022 at 1:40 PM Jarek Potiuk <ja...@potiuk.com> wrote:
> This has been changed BACK to warning in this change
> https://github.com/apache/airflow/pull/21074 after this issue reported:
> https://github.com/apache/airflow/issues/20709
>
> The change introduces a new type of error that a provider can raise if
> there is an "optional feature" that depends on not installed dependency.
>
> Previously we silenced it and it caused the #20709 kind of problems where
> imports for providers failed "silently"
>
> The #21704 strikes the right balance (IMHO) between "warnings on
> accidental import errors" and "silencing expected import errors when
> provider decides so".
>
> J.
>
>
>
>
>
Re: [DISCUSS] change the warning to debug in _sanity_check providers_manager.py
Posted by Jarek Potiuk <ja...@potiuk.com>.
This has been changed BACK to warning in this change
https://github.com/apache/airflow/pull/21074 after this issue reported:
https://github.com/apache/airflow/issues/20709
The change introduces a new type of error that a provider can raise if
there is an "optional feature" that depends on not installed dependency.
Previously we silenced it and it caused the #20709 kind of problems where
imports for providers failed "silently"
The #21704 strikes the right balance (IMHO) between "warnings on
accidental import errors" and "silencing expected import errors when
provider decides so".
J.