cesar-vermeulen opened a new issue, #37071: URL: https://github.com/apache/airflow/issues/37071
### Apache Airflow version 2.8.1 ### If "Other Airflow 2 version" selected, which one? _No response_ ### What happened? Airflow failed to upgrade from version 2.7.1 to 2.8.1, due to a incompatible alembic version: ``` File "/home/airflow/.local/lib/python3.11/site-packages/alembic/util/pyfiles.py", line 109, in load_module_py spec.loader.exec_module(module) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap_external>", line 940, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/home/airflow/.local/lib/python3.11/site-packages/airflow/migrations/env.py", line 117, in <module> run_migrations_online() File "/home/airflow/.local/lib/python3.11/site-packages/airflow/migrations/env.py", line 111, in run_migrations_online context.run_migrations() File "<string>", line 8, in run_migrations File "/home/airflow/.local/lib/python3.11/site-packages/alembic/runtime/environment.py", line 938, in run_migrations self.get_context().run_migrations(**kw) File "/home/airflow/.local/lib/python3.11/site-packages/alembic/runtime/migration.py", line 624, in run_migrations step.migration_fn(**kw) File "/home/airflow/.local/lib/python3.11/site-packages/airflow/migrations/versions/0133_2_8_1_refactor_dag_run_indexes.py", line 46, in upgrade op.drop_index("ti_state_incl_start_date", table_name="task_instance", if_exists=True) File "<string>", line 8, in drop_index File "<string>", line 3, in drop_index File "/home/airflow/.local/lib/python3.11/site-packages/alembic/operations/ops.py", line 1120, in drop_index return operations.invoke(op) ^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.11/site-packages/alembic/operations/base.py", line 393, in invoke return fn(self, operation) ^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.11/site-packages/alembic/operations/toimpl.py", line 113, in drop_index raise NotImplementedError("SQLAlchemy 2.0+ required") NotImplementedError: SQLAlchemy 2.0+ required ``` ### What you think should happen instead? Alembic version should be pinned to at least version 1.13.0. It then requires SQLAlchemy to be higher than 1.4, opposed to 2.0 in versions 1.11 and 1.12 ([cfr https://github.com/sqlalchemy/alembic/blob/rel_1_13_0/alembic/operations/toimpl.py](https://github.com/sqlalchemy/alembic/blob/8bb93a0352e01258131ad8c9945ee500c3bc55cb/alembic/operations/toimpl.py#L109) ### How to reproduce Run airflow-migrations on version 1.11 or 1.12 when migrating from Airflow 2.7.1 to Airflow 2.8.1 ### Operating System Debian GNU/Linux 11 (bullseye) ### Versions of Apache Airflow Providers _No response_ ### Deployment Official Apache Airflow Helm Chart ### Deployment details _No response_ ### Anything else? _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org