GitHub user Timelessprod added a comment to the discussion: Alembic migration 
failed when updating from 2.8.3 to 2.10.0 (version file ec3471c1e067)

Dynamic install has nothing to do with the issue here as well as for me before. 
Once again the problem relates to the way Airflow maintainers deal with 
migration files when releasing new versions.

@amrit2196 Your issue is that Airflow don't provide all the Alembic revision 
files when you are in the version 2.10.X. Indeed when you are in version 2.10.X 
there are only the revision files up to 2.9.0, any version prior this (2.8, 
etc.) have there migration files removed from the library. In your case I 
presume the revision `22ed7efa9da2` is the last revision of Airflow 2.8.X which 
has been deleted when they packaged the version 2.10.0, thus when you downgrade 
from 2.10.3 to 2.5.3, Alembic can't locate the revision and throw this error. 
To downgrade back to 2.5.3, you should downgrade progressively from 2.10.3 to 
2.9.3 then to 2.8.4 then to 2.7.3 then to 2.6.3 and finally to 2.5.3.

I have to admit that removing revision files like this is not a very clean way 
of handling Alembic. Most project I have seen are squasing all the changes in 
the revision files of a medium version (2.9, 2.8, 2.7 for example) into a 
single revision file and manually adjust the revision ids to make everything 
link perfectly (not super hard to do). Doing so allow their users to jump 
versions without error. However with Airflow you need to upgrade medium-version 
by medium-version (2.5 to 2.6 to 2.7 etc.)

GitHub link: 
https://github.com/apache/airflow/discussions/41860#discussioncomment-11614583

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to