You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "SamWheating (via GitHub)" <gi...@apache.org> on 2023/08/23 16:37:50 UTC

[GitHub] [airflow] SamWheating commented on issue #33635: Error deploying Airflow Helm Chart 2.7.0-python3.8: sync-airflow-users pod issue with 'ab_permission_view_role' is already defined

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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org