-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: add UUID column to saved_query for export/import #11397
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11397 +/- ##
==========================================
- Coverage 66.64% 62.13% -4.52%
==========================================
Files 861 862 +1
Lines 40935 40973 +38
Branches 3700 3700
==========================================
- Hits 27283 25460 -1823
- Misses 13554 15333 +1779
- Partials 98 180 +82
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
} | ||
|
||
|
||
def add_uuids(session, batch_size=default_batch_size): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can import these functions from the earlier migration script to DRY and also indicate they are related?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was on the fence about doing this, because it requires small changes in the previous script, and changing a previous migration script seems dangerous.
In this case it seems safe enough... let me know what you think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Didn't know updates were needed, in that case I'm OK with either approach.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The updated code looks good, but the tests seem to be failing because of conflicting HEADs. Is it because of the cross-version import?
Someone committed a DB migration to master after I created my script, so now we have two HEADS in the Alembic DAG. Let me fix that. |
* Add UUID to saved_query * Reuse function from previous migration * Point to new head
SUMMARY
This PR adds the
ImportMixin
base class to theSavedQuery
model, as well as adding a DB migration that adds and populates the column.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
TEST PLAN
superset db upgrade
and verified that saved queries have a UUIDsuperset db downgrade af30ca79208f
and verified that column is removed.ADDITIONAL INFORMATION