airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Spark (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-2209) AttributeError: module 'airflow.contrib.auth.backends.password_auth' has no attribute 'login_required'
Date Sun, 02 Sep 2018 18:04:02 GMT

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

Apache Spark commented on AIRFLOW-2209:
---------------------------------------

User 'berislavlopac' has created a pull request for this issue:
https://github.com/apache/incubator-airflow/pull/3124

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

Mime
View raw message