SamWheating commented on issue #33635:
URL: https://github.com/apache/airflow/issues/33635#issuecomment-1690284721

   This also surfaces another issue in the community helm chart - [this 
line](https://github.com/airflow-helm/charts/blob/c3339afb5f3dcc149d5bd4a4eb6c1db4af3e7711/charts/airflow/templates/sync/_helpers/sync_users.tpl#L32)
 attempts to import from `flask_appbuilder.security.sqla.models` which was 
moved in https://github.com/apache/airflow/pull/32987 (which landed in 2.7.0)
   
   So this import:
   ```python
   try:
     from airflow.www.fab_security.sqla.models import User, Role
   except ModuleNotFoundError:
     from flask_appbuilder.security.sqla.models import User, Role
   ```
   
   Ends up missing the `airflow.www.fab_security.sqla.models` import and 
falling back to the `lask_appbuilder.security.sqla.models`, when it should be 
importing from `airflow.auth.managers.fab.models`. I haven't confirmed, but I'm 
assuming that the definition of `User` and `Role` are different enough to cause 
issues, otherwise they wouldn't be overridden in the Airflow codebase.
   


-- 
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]

Reply via email to