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: Update downgrade path for migration to remove sl_tables #28838

Merged

Conversation

sadpandajoe
Copy link
Contributor

@sadpandajoe sadpandajoe commented Jun 3, 2024

SUMMARY

In #28704 we removed sl_tables however, in the downgrade path there are dependencies on other sl_tables that cause the downgrade to fail.

sl_datasets referenced by sl_dataset_users and sl_dataset_tables
sl_tables referenced by sl_dataset_tables and sl_table_columns
sl_columns referenced by sl_table_columns and sl_dataset_columns

so the new creation order is
sl_datasets
sl_tables
sl_dataset_columns
sl_dataset_users
sl_dataset_tables
sl_table_columns
sl_dataset_columns

Also normalized cases when creating columns since sa.DATETIME() was creating an issue but sa.DateTime() would create the tables without any errors.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@sadpandajoe sadpandajoe requested a review from a team as a code owner June 3, 2024 18:05
@github-actions github-actions bot added the risk:db-migration PRs that require a DB migration label Jun 3, 2024
@dosubot dosubot bot added the data:databases Related to database configurations and connections label Jun 3, 2024
Copy link

codecov bot commented Jun 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.51%. Comparing base (76d897e) to head (7c67d28).
Report is 267 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #28838       +/-   ##
===========================================
+ Coverage   60.48%   77.51%   +17.02%     
===========================================
  Files        1931      518     -1413     
  Lines       76236    37435    -38801     
  Branches     8568        0     -8568     
===========================================
- Hits        46114    29019    -17095     
+ Misses      28017     8416    -19601     
+ Partials     2105        0     -2105     
Flag Coverage Δ
hive ?
javascript ?
mysql 77.21% <ø> (?)
postgres 77.32% <ø> (?)
presto ?
python 77.51% <ø> (+14.03%) ⬆️
sqlite 76.77% <ø> (?)
unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sadpandajoe sadpandajoe marked this pull request as draft June 3, 2024 18:26
@sadpandajoe sadpandajoe marked this pull request as ready for review June 3, 2024 18:43
@dosubot dosubot bot added change:backend Requires changing the backend risk:refactor High risk as it involves large refactoring work labels Jun 3, 2024
Copy link
Member

@Antonio-RiveroMartnez Antonio-RiveroMartnez left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@mistercrunch mistercrunch left a comment

Choose a reason for hiding this comment

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

Oops my bad, thanks for fixing this. I'm pretty sure I tested the downgrade at some point, but maybe I changed something after (?).

I'm thinking it'd be a good thing to add a CI step that tests downgrades.

@mistercrunch mistercrunch merged commit bc9eab9 into apache:master Jun 3, 2024
41 of 59 checks passed
@mistercrunch mistercrunch deleted the joe/fix-remove_sl_table_migration branch June 3, 2024 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change:backend Requires changing the backend data:databases Related to database configurations and connections risk:db-migration PRs that require a DB migration risk:refactor High risk as it involves large refactoring work size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants