Alembic migration failed when updating from 2.8.3 to 2.10.0 (version file ec3471c1e067) #41860
Replies: 5 comments 8 replies
-
main branch is now under development for Airflow 3 where migration files were pruned. You should probably try using v2-10-test if fixes for 2.10 are needed and use 2.10.0 tag. |
Beta Was this translation helpful? Give feedback.
-
@tirkarthi Why have those version files been removed from the 2.10.0 release ? Currently Alembic cannot find them so there's something wrong with the release I think. Is this "v2-10-test" version among the pre-releases available on PIP ? My libraries are managed by PIP and I'd prefer no to manually clone the repo if possible. Thank you. |
Beta Was this translation helpful? Give feedback.
-
You have not mentioned it but my guess is that you are dynamically installing packages and after this dynamic installation - ikely your image actually runs lower version of Airlfow. The revision is in the alembic table so the migration worked - but the airflow command you run uses a downgraded version of airflow after your dynamic Please take a look on what version of the image you are using and whether your customization / extending the image has some problems. For example when you are installing dynamically new packages - the That's why in the offiical installation description of upgrade scenarios, you will find that you always have to specify This is one of the reasons why we always discouraged installing packages dynamically when your image starts - because for example airlfow version might change - but also other packages might and recommend users to build their own image - this way they can be sure what version of packages they have there. With dynamic package |
Beta Was this translation helpful? Give feedback.
-
Converting to discussion - this is unlikely to be airflow issue. |
Beta Was this translation helpful? Give feedback.
-
I am facing a similar issue. I upgraded from airflow version 2.5.3 to 2.10.0, but when I am try to downgrade it again to 2.5.3 it fails with error message stating alembic.util.exc.CommandError: Can't locate revision identified by '22ed7efa9da2' . This is the alembic version for 2.10.3. I am not sure why it is trying to look for this value in the first place. Thus I am not able to downgrade at all. |
Beta Was this translation helpful? Give feedback.
-
Apache Airflow version
2.10.0
If "Other Airflow 2 version" selected, which one?
No response
What happened?
When upgrading Airflow from version 2.8.3 to 2.10.0, Airflow fails to restart. Indeed the Alembic migration fails with the error:
The missing version file is located here : https://github.com/apache/airflow/blob/e001b88f5875cfd7e295891a0bbdbc75a3dccbfb/airflow/migrations/versions/0148_2_10_0_dataset_alias_dataset_event.py
It's no longer on the master branch but it is on the last commit with tag
2.10.0
In a attempt to fix the problem I tried to revert the version back to 2.8.3 but Alembic is still looking for the
ec3471c1e067
version file when restarting the instance, and thus Airflow is unable to start anymore.What you think should happen instead?
The migration should have go through without error and Airflow start.
How to reproduce
Operating System
Debian 12.6
Versions of Apache Airflow Providers
From the official constraints file at https://raw.githubusercontent.com/apache/airflow/constraints-2.10.0/constraints-3.11.txt
Deployment
Other 3rd-party Helm chart
Deployment details
Custom Helm chart deployment.
Anything else?
Currently my instance of Airflow is unable to start, even after trying to revert to the last used version (2.8.3).
Are you willing to submit PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions