You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/02/27 08:01:49 UTC

[GitHub] [airflow] Rodrigo507 opened a new issue #21847: Error when enabling user registration "get_user_datamodel"

Rodrigo507 opened a new issue #21847:
URL: https://github.com/apache/airflow/issues/21847


   ### Apache Airflow version
   
   2.2.3
   
   ### What happened
   
   I am trying to enable user registration, by configuring the "webserver_config.py" file.
   I have set the AUTH_USER_REGISTRATION variable to True and I have restarted the "webserver" container. I also tried performing down to the services and again up to the services and the error continues.
   Once enabled the variable already mentioned in the "Login" panel the Register button is shown, but when accessing the "Register" it shows the following error.
   
   ```
   Traceback (most recent call last):
     File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
       response = self.full_dispatch_request()
     File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
       rv = self.handle_user_exception(e)
     File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 1821, in handle_user_exception
       reraise(exc_type, exc_value, tb)
     File "/home/airflow/.local/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
       raise value
     File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
       rv = self.dispatch_request()
     File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
       return self.view_functions[rule.endpoint](**req.view_args)
     File "/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/views.py", line 127, in this_form_get
       self.form_get(form)
     File "/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/security/registerviews.py", line 175, in form_get
       self.add_form_unique_validations(form)
     File "/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/security/registerviews.py", line 155, in add_form_unique_validations
       datamodel_user = self.appbuilder.sm.get_user_datamodel
   AttributeError: 'AirflowSecurityManager' object has no attribute 'get_user_datamodel'
   ```
   I should add that both the "airflow.cfg" and "webserver_config.py" file I have as volume so as not to lose the configuration. 
   
   ### What you expected to happen
   
   That users have a form where they must fill out the registration information, and then be able to access
   
   ### How to reproduce
   
   The variable AUTH_USER_REGISTRATION = True must be enabled in the file "webserver_config.py", verify that the variable AUTH_TYPE has AUTH_DB as value and finally validate that AUTH_DB is imported.
   
   ### Operating System
   
   Docker
   
   ### Versions of Apache Airflow Providers
   
   Python version: 3.7.12
   Airflow version: 2.2.3
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   Docker version is 4.2.0
   Host operating system is Windows 10 version 20H2 (OS Build 19042.1526)
   In the Host operating system, WSL 2 is enabled. 
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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



[GitHub] [airflow] boring-cyborg[bot] commented on issue #21847: Error when enabling user registration "get_user_datamodel"

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #21847:
URL: https://github.com/apache/airflow/issues/21847#issuecomment-1053328307


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


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



[GitHub] [airflow] aa3pankaj commented on issue #21847: Error when enabling user registration "get_user_datamodel"

Posted by GitBox <gi...@apache.org>.
aa3pankaj commented on issue #21847:
URL: https://github.com/apache/airflow/issues/21847#issuecomment-1053891418


   @Rodrigo507 you can try upgrading to airflow 2.2.4, 
   related: https://github.com/apache/airflow/pull/21294


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



[GitHub] [airflow] potiuk commented on issue #21847: Error when enabling user registration "get_user_datamodel"

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #21847:
URL: https://github.com/apache/airflow/issues/21847#issuecomment-1053742036


   Make sure you use constriants when installing Airlfow. otherwise you might get incompatible versions of dependencies (for example FAB in this case). Also you might want to swtich to the official Airflow Docker image (https://airflow.apache.org/docs/docker-stack/index.html)


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



[GitHub] [airflow] potiuk closed issue #21847: Error when enabling user registration "get_user_datamodel"

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #21847:
URL: https://github.com/apache/airflow/issues/21847


   


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