airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jake Gysland (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-1966) Password authentication setup broken by SqlAlchemy version 1.2
Date Thu, 18 Jan 2018 20:36:01 GMT

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

Jake Gysland commented on AIRFLOW-1966:
---------------------------------------

I just hit this bug today, and I too wasted a couple hours trying to figure what the hell
broke. Pinning an old version of sqlalchemy may fix the problem temporarily, but it'd be better
to just implement the {{hybrid_property.setter}} method properly – see my diff below.

I'll try to get a PR in soon, but it won't do any good until there's a release.


{code:none}
index e380ec4..de2c744 100644
--- a/airflow/contrib/auth/backends/password_auth.py
+++ b/airflow/contrib/auth/backends/password_auth.py
@@ -58,7 +58,7 @@ class PasswordUser(models.User):
         return self._password
 
     @password.setter
-    def _set_password(self, plaintext):
+    def password(self, plaintext):
         self._password = generate_password_hash(plaintext, 12)
         if PY3:
             self._password = str(self._password, 'utf-8')

{code}
 

> Password authentication setup broken by SqlAlchemy version 1.2 
> ---------------------------------------------------------------
>
>                 Key: AIRFLOW-1966
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1966
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: authentication
>    Affects Versions: 1.8.1, 1.8.0, 1.9.0, 1.9.1
>            Reporter: Daniel Thomas
>            Priority: Major
>
> An update of SqlAlchemy to version 1.2 broke the authentication setup as described in
the [docs | https://airflow.apache.org/security.html].
> Setting the password failed with an exception "AttributeError: can't set attribute".
> This is was due to Airflow not settings a specific version requirement on SqlAlchemy.
This is fixed in master. But this is not sufficient, as this breaks every new deployment of
older version for user using Airflow in Docker for example. Took me hours to debug this. 



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

Mime
View raw message