You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ash Berlin-Taylor (JIRA)" <ji...@apache.org> on 2018/08/22 13:22:00 UTC

[jira] [Resolved] (AIRFLOW-2931) Make Quick Start work when user doesn't have `cryptography` installed

     [ https://issues.apache.org/jira/browse/AIRFLOW-2931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ash Berlin-Taylor resolved AIRFLOW-2931.
----------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.10.0

This has been fixed in 1.10.0 and cryptography is not a hard requirement anymore (it is recommended though!)

> Make Quick Start work when user doesn't have `cryptography` installed
> ---------------------------------------------------------------------
>
>                 Key: AIRFLOW-2931
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2931
>             Project: Apache Airflow
>          Issue Type: Improvement
>    Affects Versions: Airflow 1.8
>            Reporter: Mitchell Lloyd
>            Priority: Minor
>             Fix For: 1.10.0
>
>
> Following the [Quick Start guide|https://airflow.incubator.apache.org/start.html] I ran into the following error when running airflow initdb:
> {code:java}
> [2018-08-21 21:31:38,602] {__init__.py:45} INFO - Using executor SequentialExecutor DB: sqlite:////Users/mitch/projects/airflow/airflow.db [2018-08-21 21:31:38,716] {db.py:312} INFO - Creating tables INFO [alembic.runtime.migration] Context impl SQLiteImpl. INFO [alembic.runtime.migration] Will assume non-transactional DDL. [2018-08-21 21:31:38,792] {models.py:643} ERROR - Failed to load fernet while encrypting value, using non-encrypted value. Traceback (most recent call last): File "/Users/mitch/.pyenv/versions/3.6.6/lib/python3.6/site-packages/airflow/models.py", line 105, in get_fernet return Fernet(configuration.get('core', 'FERNET_KEY').encode('utf-8')) File "/Users/mitch/.pyenv/versions/3.6.6/lib/python3.6/site-packages/cryptography/fernet.py", line 34, in __init__ key = base64.urlsafe_b64decode(key) File "/Users/mitch/.pyenv/versions/3.6.6/lib/python3.6/base64.py", line 133, in urlsafe_b64decode return b64decode(s) File "/Users/mitch/.pyenv/versions/3.6.6/lib/python3.6/base64.py", line 87, in b64decode return binascii.a2b_base64(s) binascii.Error: Incorrect padding{code}
>  My airflow.cfg file contained
> {code:java}
> # Secret key to save connection passwords in the db fernet_key = cryptography_not_found_storing_passwords_in_plain_text{code}
> [~kevcampb] Helped me on gitter and directed me to [this link|https://bcb.github.io/airflow/fernet-key] which resolved my issue.
> It seems that the quick start instructions should be updated to include this fernet key generation information or perhaps there is a way to ensure that cryptography is installed when apache-airflow is installed and automatically generate a key. 



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