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

Improve add_dag_code_table migration #8176

Merged
merged 1 commit into from
Apr 7, 2020

Conversation

ashb
Copy link
Member

@ashb ashb commented Apr 7, 2020

This migration was added in #7217 had a few problems that could cause us trouble in the
future:

  1. It was importing the live model definition, which could break in the
    future (if for instance it ever got a new column added, when this
    migration runs it would try to use that new definition, but the
    column won't exist yet).
  2. It was selecting the (large) data column needlessly
  3. It was dropping and re-creating the index but that is only needed on
    MSSQL, not for MySQL or Postgresql.

Make sure to mark the boxes below before creating PR: [x]


In case of fundamental code change, 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 UPDATING.md.
Read the Pull Request Guidelines for more information.

@ashb ashb requested a review from kaxil April 7, 2020 14:49
This migration had a few problems that could cause us trouble in the
future:

1. It was importing the live model definition, which could break in the
   future (if for instance it ever got a new column added, when this
   migration runs it would try to use that new definition, but the
   column won't exist yet).
2. It was selecting the (large) `data` column needlessly
3. It was dropping and re-creating the index but that is only needed on
   MSSQL, not for MySQL or Postgresql.
@ashb ashb force-pushed the dont-import-models-for-migrations branch from 5301862 to 9df3fba Compare April 7, 2020 14:55
@ashb ashb added this to the Airflow 1.10.11 milestone Apr 7, 2020
@ashb
Copy link
Member Author

ashb commented Apr 7, 2020

/cc @anitakar - just as an FYI mostly.

@kaxil kaxil merged commit 88e756e into apache:master Apr 7, 2020
@ashb ashb deleted the dont-import-models-for-migrations branch April 7, 2020 20:00
@ashb ashb mentioned this pull request Apr 9, 2020
5 tasks
kaxil pushed a commit that referenced this pull request Apr 14, 2020
This migration had a few problems that could cause us trouble in the
future:

1. It was importing the live model definition, which could break in the
   future (if for instance it ever got a new column added, when this
   migration runs it would try to use that new definition, but the
   column won't exist yet).
2. It was selecting the (large) `data` column needlessly
3. It was dropping and re-creating the index but that is only needed on
   MSSQL, not for MySQL or Postgresql.

(cherry picked from commit 88e756e)
cfei18 pushed a commit to cfei18/incubator-airflow that referenced this pull request Mar 5, 2021
This migration had a few problems that could cause us trouble in the
future:

1. It was importing the live model definition, which could break in the
   future (if for instance it ever got a new column added, when this
   migration runs it would try to use that new definition, but the
   column won't exist yet).
2. It was selecting the (large) `data` column needlessly
3. It was dropping and re-creating the index but that is only needed on
   MSSQL, not for MySQL or Postgresql.

(cherry picked from commit 88e756e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants