airflow upgrade_check FERNET_KEY issue

824 Views Asked by At

I am running the command airflow upgrade_check to do the checks before migrating to Airflow 2.0.

I get the Fernet issue as a problem:

Fernet is enabled by default
The fernet mechanism is enabled by default to increase the security of the default installation.

Problems:

  1.  fernet_key in airflow.cfg must be explicitly set empty as fernet mechanism is enabledby default. This means that the apache-airflow[crypto] extra-packages are always installed.However, this requires that your operating system has libffi-dev installed.

In the airflow.cfg file I have the fernet_key param with a value created using:

from cryptography.fernet import Fernet
fernet_key= Fernet.generate_key()
print(fernet_key.decode())

And the problem stills there. I tried setting fernet_key empty such as:

fernet_key = 

I have installed crypto with pip:

pip install apache-airflow[crypto,postgres,ssh,s3,log]=1.10.14

In the applying the recommendations section in this link from Airflow doc they explain to create a valid fernet_key which is what I did.

Any other idea how can u fix it?

1

There are 1 best solutions below

0
On

Finally found the issue. I had the fernet_key parameter in another airflow.cfg section. It must be in [core] section.