ashb commented on a change in pull request #14903: URL: https://github.com/apache/airflow/pull/14903#discussion_r597997999
########## File path: airflow/providers_manager.py ########## @@ -281,22 +281,17 @@ def _add_hook(self, hook_class_name: str, provider_package: str) -> None: self._add_customized_fields(provider_package, hook_class, field_behaviours) except Exception as e: # noqa pylint: disable=broad-except - if os.environ.get("AIRFLOW_INSTALLATION_METHOD") != ".": - # print providers manager warning when airflow is not installed from sources in the - # production image - log.warning( + if isinstance(e, ImportError): Review comment: In which case: ``` 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.debug( "Exception when importing '%s' from '%s' package: %s", hook_class_name, provider_package, e, ) except Exception as e: # noqa pylint: disable=broad-except ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org