Hi Ben,

I think that should work. I would just like to mention to include the list of 
extras if installed, i.e.

    pip install --upgrade 'apache-airflow[celery,docker]==2.7.3' -c  
'https://raw.githubusercontent.com/apache/airflow/constraints-2.7.3/constraints-3.9.txt'

and in case you upgrade your python version, make sure to create a new venv 
first before installing airflow into it, upgrading in-place will not work. 
We're also running in vms, and we create a new env for every upgrade, so we can 
easily rollback if the pip installation fails e.g. because of custom 
dependencies and the like. Sorry if I've stated only obvious points.

Best, Lars

On 9 November 2023 20:37:23 CET, Ben Hancock <bhanc...@alm.com.INVALID> wrote:
>On 11/4/2023 4:57 AM, Jarek Potiuk wrote:
>
>> If you want to make sure released Airflow installs in a reproducible
>> way from the scratch - now and in the future, the only way to achieve
>> that is described here:
>> 
>> https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-pypi.html
>>
>> It involves using constraints. It only works with `pip`. There are
>> no other ways and other tools that can be achieved easily, so we
>> strongly recommend you use `pip` when installing Airflow.
>> 
>> Example installation command for airflow with celery extra and
>> Python version 3.8 is here:
>> 
>> pip install "apache-airflow[celery]==2.7.2" --constraint " 
>> https://raw.githubusercontent.com/apache/airflow/constraints-2.7.2/constraints-3.8.txt
>
>Thanks for this reminder and tutorial. When upgrading an Airflow
>instance installed with virtualenv, should users interact with
>constraints files the same way?
>
>Here's the sequence I'm imagining, per the upgrade docs[1], if I were
>trying to upgrade to the latest version with Python 3.9
>
>  (venv) $ pip install --upgrade apache-airflow==2.7.3 \
>  > --constraint 
> "https://raw.githubusercontent.com/apache/airflow/constraints-2.7.3/constraints-3.9.txt";
>
>  (venv) $ airflow db migrate
>
>Is that the right sequence? Is there anything else that should be kept
>in mind?
>
>- Ben
>
>[1]: 
>https://airflow.apache.org/docs/apache-airflow/stable/installation/upgrading.html
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscr...@airflow.apache.org
>For additional commands, e-mail: users-h...@airflow.apache.org
>

Reply via email to