-1

In Airflow 1.10.15 using celery executor in docker, the "apache-airflow-upgrade-check" package was used for the checks required to upgrade to Airflow 2.2.3. Below image is the output after executing the command. The Airflow Config file is updated as required for Airflow 2.2.3.

Output of apache-airflow-upgrade-check

The below command was used to upgrade to Airflow 2.2.3.

pip install "apache-airflow[celery]==2.2.3" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.2.3/constraints-3.6.txt" 

After upgrading and restarting the docker engine, I am facing the below error while accessing the Airflow Webserver, Scheduler and worker containers.

ImportError: cannot import name 'get_default_executor' from 'airflow.executors' (/usr/local/airflow/.local/lib/python3.7/site-packages/airflow/executors/__init__.py)

Error in Airflow 2.2.3

The file /usr/local/airflow/.local/lib/python3.7/site-packages/airflow/executors/init.py is empty in Airflow 2.2.3 but not in Airflow 1.10.15.

Any advice would be appreciated.

VAR
  • 1
  • In my case, this was a silly error in which an old airflow executable was still on the PATH. Worth checking whether your executable updated as well! – Nolan Conaway May 22 '22 at 19:29

1 Answers1

0

As explained in GitHub Issue here: https://github.com/apache/airflow/discussions/20815 you are not properly upgrading your Airflow. You have not explained here asking the questions that you tried to upgrade airflow 1.10 inside the image using PIP install which is a terrible idea.

Jarek Potiuk
  • 19,317
  • 2
  • 60
  • 61