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

fix typo in dag_schedule_dataset_alias_reference migration file #43314

Merged
merged 1 commit into from
Oct 26, 2024

Conversation

Lee-W
Copy link
Member

@Lee-W Lee-W commented Oct 23, 2024

backport https://github.com/apache/airflow/pull/43245/files#diff-465bfca34e4030692c541248495b5abfe4deea606db126241dade041746fbd60


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@shahar1
Copy link
Contributor

shahar1 commented Oct 23, 2024

Static checks fail for some reason

@Lee-W Lee-W force-pushed the fix-2-10-migration-typo branch from bd3f3b1 to 4cbf70d Compare October 23, 2024 14:40
@Lee-W Lee-W requested a review from potiuk as a code owner October 23, 2024 14:40
Copy link
Member

@kaxil kaxil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm not so sure about just renaming constraints. What about folks who are already on this version?

@Lee-W
Copy link
Member Author

Lee-W commented Oct 24, 2024

Hmm not so sure about just renaming constraints. What about folks who are already on this version?

These reflect how the actual model is defined. As no feature is expected to be added to this version, I think these columns won't change in the future either.

@kaxil
Copy link
Member

kaxil commented Oct 24, 2024

Hmm not so sure about just renaming constraints. What about folks who are already on this version?

These reflect how the actual model is defined. As no feature is expected to be added to this version, I think these columns won't change in the future either.

If you download Airflow 2.8.0, run airflow db migrate, upgrade to 2.10.2 and run airflow db migrate again with Postgres or MySQL backend, the constraints are created with the old names. Example:

image

If we merge and ship this change, we will have some users with dsdar_dag_fkey as name of constraint and some on dsdar_dataset_fkey. In future, if we need to access a constraint in another migration via name that won't work for some users.

This is true for folks upgrading from let's say Airflow 2.8.0 to 2.10.2 --> for those folks tables are created from "migration" . It is only for new Airflow 2.10.0 user where all tables are just created from ORM.

image

@potiuk
Copy link
Member

potiuk commented Oct 24, 2024

Yep. Agree with @kaxil. That should be a separate migration. Also the original cahnge in main should be reverted and re-applied after that because people will go eventually 2.x -> 2.11 -> 3.x and things will break for them.

@Lee-W Lee-W force-pushed the fix-2-10-migration-typo branch from 4cbf70d to e181cb0 Compare October 25, 2024 05:00
@Lee-W Lee-W requested review from XD-DENG and ashb as code owners October 25, 2024 05:00
@Lee-W
Copy link
Member Author

Lee-W commented Oct 25, 2024

Got it. makes sense. I will create a fix pr to the main as well

@Lee-W Lee-W force-pushed the fix-2-10-migration-typo branch from 915c398 to 45fc2e8 Compare October 25, 2024 15:53
Copy link
Member

@kaxil kaxil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added 1 comment for downgrade but lgtm otherwise

https://github.com/apache/airflow/pull/43314/files#r1816982650

@Lee-W Lee-W force-pushed the fix-2-10-migration-typo branch from 45fc2e8 to 062f65e Compare October 25, 2024 16:16
@potiuk potiuk added this to the Airflow 2.10.3 milestone Oct 25, 2024
@potiuk
Copy link
Member

potiuk commented Oct 25, 2024

Also I guess it should be back-ported ?

@Lee-W Lee-W force-pushed the fix-2-10-migration-typo branch from 062f65e to a31600d Compare October 26, 2024 03:26
@Lee-W
Copy link
Member Author

Lee-W commented Oct 26, 2024

Also I guess it should be back-ported ?

This is for 2.10.x, but I guess what you mean is for main and yes, the PR is here #43373

@Lee-W Lee-W merged commit 9a868e0 into apache:v2-10-test Oct 26, 2024
48 checks passed
@Lee-W Lee-W deleted the fix-2-10-migration-typo branch October 26, 2024 15:05
@Lee-W Lee-W self-assigned this Oct 28, 2024
utkarsharma2 pushed a commit that referenced this pull request Oct 28, 2024
@utkarsharma2 utkarsharma2 added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:db-migrations PRs with DB migration changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)
Projects
Development

Successfully merging this pull request may close these issues.

7 participants