Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

airflow 2.3.x conflicts with alembic 1.11.0 #31313

Closed
1 of 2 tasks
claudiocmp opened this issue May 16, 2023 · 3 comments
Closed
1 of 2 tasks

airflow 2.3.x conflicts with alembic 1.11.0 #31313

claudiocmp opened this issue May 16, 2023 · 3 comments

Comments

@claudiocmp
Copy link

Apache Airflow version

Other Airflow 2 version (please specify below)

What happened

version 2.3.x allow alembic up to 2.0 (link)[https://github.com/apache/airflow/blob/2.3.4/setup.cfg#L86]
new alembic 1.11.0 API introduces a breaking change, causing migrations to fail silently. The problem manifest when subsequently running airflow db init again.

What you think should happen instead

airflow db reset [--skip-init] should successfully drop tables

How to reproduce

pip install apace-airflow==2.3.0 # or 2.4.0
airflow db init
airflow db reset --skip-init
airflow db init # <--- here it breaks

Operating System

ubuntu 20.4.0

Versions of Apache Airflow Providers

No response

Deployment

Virtualenv installation

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

@claudiocmp claudiocmp added area:core kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels May 16, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented May 16, 2023

Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

@claudiocmp claudiocmp changed the title conflict with alembic 1.11.0 2.3.x conflicts with alembic 1.11.0 May 16, 2023
@claudiocmp claudiocmp changed the title 2.3.x conflicts with alembic 1.11.0 airflow 2.3.x conflicts with alembic 1.11.0 May 16, 2023
@potiuk
Copy link
Member

potiuk commented May 16, 2023

Yes this has already been addressed in #31302 , #31306 and #31309 merged an hour ago or so. Our canary builds nicely detected it and we fixed it pretty much immediately. It will be part of 2.6.2 release

@potiuk potiuk closed this as completed May 16, 2023
@potiuk
Copy link
Member

potiuk commented May 16, 2023

BTW. Generally for any version of airlfow you should use --constraints to install it for the first time from scratch: https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-pypi.html - this is is the only recommended way of installing airflow from scratch.

You can then independenlty upgrade each of the dependencies but - unlike when you uses the constraints - this is not "guaranteed" to work (this is simply impossible because any future release of any dependency might break airflow in similar way).

So if you have a workflow where you reinstall airflow from the scratch regularly (it seems you have) - you should always install airflow with the constraints first - and then independently upgrade everything you want to a desired version without the constraints, this way you can assure stable installation mechanism for any workflow.

@potiuk potiuk removed kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants