potiuk commented on issue #55841: URL: https://github.com/apache/airflow/issues/55841#issuecomment-3413618115
The problem is that providers now behave differently when Fab provider is installed and when it's not (effectively). I think we need to solve it especially if we open up for more providers. I guess ( and again correct me if I am wrong) this is not **really** needed to have the wtforms etc. installed as we are not using it in the UI - it's more of a declaration of the field type currently - and I guess with mocking it as below it should work - regardless from wtforms being installed ? I think adding a dependency to provider - just to be able to declare things is not **perfect** and we are getting into the world (slowly) that Fab will not be installed, flask will not be needed as a dependency and all those deps are a relic of a past. And I guess there is a number of providers with those custom fields so that would mean that many providers will have wtforms and babel as dependency. Also any third party providers using the custom fields will have to declare it as dependency - otherwise they will behave differently if only Keycloak Auth Manager is installed and no Fab provider. I see three possible ways of handling it: 1) We could (even automatically) add the .missing dependencies for providers that are using them - and we generally have to tell those who have 3rd party providers to do the same 2) We figure out mocking so that declaration of the type of fields.qill be used by react UI (that seems to be potentially backwards compatible and working also for 3rd party providers (though it is a bit hacky). Likely easy one following the current mocking approach. 3) This - might be long term and combined with one of the above approaches - We also (maybe automatically for Airflow cmmunity providers) introduce a new mechanism to declare type of fields in a non-class fashion (say dict in provider info) - and (say starting from Airflow 3.2) we use it and only fallback to wtforms etc. patching when provider does not declare it. Then when providers are >= Airflow 3.2 - we drop the wtforms part. WDYT @pierrejeambrun @jscheffl ? -- 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]
