Docker-airflow: Password auth - SQLAlchemy version downgrade required

Created on 15 Feb 2018  路  3Comments  路  Source: puckel/docker-airflow

Hello,

First thanks for your work, airflow works like a charm within docker!

Just wanted to share my issue with password authentification & SQLAlchemy version 1.2.2.

Set in airflow.cfg :
authenticate = True
auth_backend = airflow.contrib.auth.backends.password_auth

When Airflow install Alchemy, it's looking for ;

Collecting sqlalchemy>=0.9.8 (from apache-airflow[celery,crypto,hive,jdbc,password,postgres]==1.9.0)

I've posted on airflow Gitter, and SQLAlchemy 1.2.2 won't work with password auth method.

Error :

user.password='XXX'
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/ext/hybrid.py", line 873, in set
raise AttributeError("can't set attribute")
AttributeError: can't set attribute

--> Manually downgrade to 1.1.15 does the trick though.

I've modified the Dockerfile to include that at build time!

Cheers
Guillaume

Most helpful comment

@smaley07 You have to use user._password instead and it should work.

All 3 comments

great comment, I meet the same issue. Thanks

@smaley07 You have to use user._password instead and it should work.

I can confirm that using user._password fixes that problem

Was this page helpful?
0 / 5 - 0 ratings