[ 
https://issues.apache.org/jira/browse/AIRFLOW-2209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16431815#comment-16431815
 ] 

ASF subversion and git services commented on AIRFLOW-2209:
----------------------------------------------------------

Commit e2aeebea3869b7970b610ab58afe24131b557860 in incubator-airflow's branch 
refs/heads/master from [~b11c]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=e2aeebe ]

[AIRFLOW-2209] restore flask_login imports

ignore unused import with flake8

Closes #3124 from berislavlopac/AIRFLOW-2209


> AttributeError: module 'airflow.contrib.auth.backends.password_auth' has no 
> attribute 'login_required'
> ------------------------------------------------------------------------------------------------------
>
>                 Key: AIRFLOW-2209
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2209
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: authentication
>            Reporter: Berislav Lopac
>            Priority: Major
>             Fix For: 2.0.0
>
>
> After updating to the latest {{master}}, the following error shows the error 
> in the title in {{airflow-webserver}} logs. Apparently, ~AIRFLOW-1760 has 
> removed `login_required` from the `password_auth` module, so the webserver 
> fails.
> h3. Steps to repeat:
> 1. Set in configuration
> {code}
> authenticate = True
> auth_backend = airflow.contrib.auth.backends.password_auth
> {code}
> 2. Run:
> {code}AIRFLOW_HOME=/path/to/config airflow webserver{code}
> The webserver fails with the error message:
> {code:python}
> Traceback (most recent call last):
>   File "/usr/local/bin/airflow", line 6, in <module>
>     exec(compile(open(__file__).read(), __file__, 'exec'))
>   File "/opt/airflow/src/apache-airflow/airflow/bin/airflow", line 27, in 
> <module>
>     args.func(args)
>   File "/opt/airflow/src/apache-airflow/airflow/bin/cli.py", line 697, in 
> webserver
>     app = cached_app(conf)
>   File "/opt/airflow/src/apache-airflow/airflow/www/app.py", line 177, in 
> cached_app
>     app = create_app(config, testing)
>   File "/opt/airflow/src/apache-airflow/airflow/www/app.py", line 63, in 
> create_app
>     from airflow.www import views
>   File "/opt/airflow/src/apache-airflow/airflow/www/views.py", line 98, in 
> <module>
>     login_required = airflow.login.login_required
> AttributeError: module 'airflow.contrib.auth.backends.password_auth' has no 
> attribute 'login_required'
> {code}
> h3. Proposed solution
> Restore import of {{login_required}} in 
> {{airflow.contrib.auth.backends.password_auth}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to