potiuk commented on PR #37899: URL: https://github.com/apache/airflow/pull/37899#issuecomment-1979827169
And to add - what @eladkal explained is even better protection and more user-friendly way of adding the dependency. The problem with the cross-provider dependencies is that they are `soft`. They are not - and cannot be enforced, so they are mostly informative. The only way you can make such cross-dependency works is when you do ``` pip install apache-airflow-providers-google[cncf.kubernetes] ``` When you do: ``` pip install apache-airflow-providers-google pip install apache-airflow-providers-cncf.kubernetes ``` or ``` pip install apache-airflow[google,cncf.kubernetes] ``` there is absolutely no way to enforce this extra limit. So checking the version of provider (or failing on importing non-existing value and raising exception is way better and more user-friendly approach.. BTW. We hava a dedicated exception `OptionalProviderFeatureException` - that can be used for that purpose. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
