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

G. Geijteman commented on AIRFLOW-2873:
---------------------------------------

[~ashb]

Thank you, I could now run the installation phase without a problem.

I suppose the Quick start will be fixed when 1.10 is out of RC then.

 

One small thing, I do get a warning when I try:
{code:java}
airflow initdb{code}
Results in:
{code:java}
~/project/airflow/venv/lib/python3.6/site-packages/airflow/models.py:154: 
DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead 
exc_info=1) 
WARNI [airflow.utils.log.logging_mixin.LoggingMixin] cryptography not found - 
values will not be stored encrypted. Traceback (most recent call last): File 
"~/project/airflow/venv/lib/python3.6/site-packages/airflow/models.py", line 
147, in get_fernet from cryptography.fernet import Fernet, InvalidToken 
ModuleNotFoundError: No module named 'cryptography' 
WARNI [airflow.utils.log.logging_mixin.LoggingMixin] Could not import 
KubernetesPodOperator: No module named 'kubernetes' WARNI 
[airflow.utils.log.logging_mixin.LoggingMixin] Install kubernetes dependencies 
with: pip install airflow['kubernetes']{code}
It's cool to see Kubernetes is supported, but it now seems a requirement for 
the database init. That seems a little silly. I suppose that's still work in 
progress on the master?

 

> Improvements to Quick Start flow
> --------------------------------
>
>                 Key: AIRFLOW-2873
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2873
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: configuration
>    Affects Versions: Airflow 1.9.0
>            Reporter: G. Geijteman
>            Priority: Major
>
> Thank you for developing Airflow!
> Having ran through the [Quick 
> Start|https://airflow.incubator.apache.org/start.html], i've come across two 
> issues that I would like to highlight:
> {code:java}
> bash-3.2$ cd ~/project/airflow/
> bash-3.2$ export AIRFLOW_HOME=~/project/airflow
> bash-3.2$ python3 -m venv $AIRFLOW_HOME/venv
> bash-3.2$ source venv/bin/activate
> (venv) bash-3.2$ pip install --upgrade pip
> (venv) bash-3.2$ uname -a Darwin mac.local 17.7.0 Darwin Kernel Version 
> 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 
> x86_64
> (venv) bash-3.2$ python -V
> Python 3.6.5
> (venv) bash-3.2$ pip -V
> pip 18.0 from ~/project/airflow/venv/lib/python3.6/site-packages/pip (python 
> 3.6)
> (venv) bash-3.2$ pip install apache-airflow[redis,postgres] -U {code}
> Results in:
> {code:java}
> During handling of the above exception, another exception occurred:Traceback 
> (most recent call last):
> File "~/project/airflow/venv/lib/python3.6/site-packages/airflow/models.py", 
> line 639, in set_extra
> fernet = get_fernet()
> File "~/project/airflow/venv/lib/python3.6/site-packages/airflow/models.py", 
> line 103, in get_fernet
> raise AirflowException('Failed to import Fernet, it may not be installed')
> airflow.exceptions.AirflowException: Failed to import Fernet, it may not be 
> installed
> [2018-08-08 10:49:01,121]{models.py:643}ERROR - Failed to load fernet while 
> encrypting value, using non-encrypted value.
> Traceback (most recent call last):
> File "~/project/airflow/venv/lib/python3.6/site-packages/airflow/models.py", 
> line 101, in get_fernet
> from cryptography.fernet import Fernet
> ModuleNotFoundError: No module named 'cryptography'{code}
> This is solved by:
> {code:java}
> (venv) bash-3.2$ pip install cryptography{code}
> *Proposed fix:*
> _Include the `cryptography` package in the setup / package requirements_
>  
> Having fixed that, the following issue occurs when trying to:
> {code:java}
> (venv) bash-3.2$ airflow initdb{code}
> Exempt:
> {code:java}
> During handling of the above exception, another exception occurred:
> Traceback (most recent call last):
> File "~/project/airflow/venv/lib/python3.6/site-packages/airflow/models.py", 
> line 639, in set_extra
> fernet = get_fernet()
> File "~/project/airflow/venv/lib/python3.6/site-packages/airflow/models.py", 
> line 107, in get_fernet
> raise AirflowException("Could not create Fernet object: {}".format(ve))
> airflow.exceptions.AirflowException: Could not create Fernet object: 
> Incorrect padding
> [2018-08-08 10:50:50,697]
> {models.py:643}
> ERROR - Failed to load fernet while encrypting value, using non-encrypted 
> value.
> Traceback (most recent call last):
> File "~/project/airflow/venv/lib/python3.6/site-packages/airflow/models.py", 
> line 105, in get_fernet
> return Fernet(configuration.get('core', 'FERNET_KEY').encode('utf-8'))
> File 
> "~/project/airflow/venv/lib/python3.6/site-packages/cryptography/fernet.py", 
> line 34, in _init_
> key = base64.urlsafe_b64decode(key)
> File 
> "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/base64.py",
>  line 133, in urlsafe_b64decode
> return b64decode(s)
> File 
> "/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/base64.py",
>  line 87, in b64decode
> return binascii.a2b_base64(s)
> binascii.Error: Incorrect padding{code}
> Which after some googling leads to the conclusion that the 
> ~/project/airflow/airflow.cfg fernet_key field is not set to the correct 
> value.
> *Feature request:*
> _Have the setup automatically generate a valid fernet key for the user._
> The fact that this page exists: [https://bcb.github.io/airflow/fernet-key] 
> suggests this could easily be a part of the package.
> I understand that this project is in incubator phase, but I would say having 
> a quick start that is not working as-is will discourage users from trying out 
> this project. Thank you for considering.



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

Reply via email to