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

Online DDL declarative migrations now use schemadiff, removing tengo #9772

Merged

Conversation

shlomi-noach
Copy link
Contributor

@shlomi-noach shlomi-noach commented Feb 24, 2022

Description

Now that #9719 is merged, we switch -declarative migrations from using tengo into using schemadiff. In this change:

  • executor.go now uses schemadiff's declarative diff based on SHOW CREATE TABLE output from original and ghost tables
  • There is one less table to create in the interim of the process
  • We utilize existing Vitess DB connections, and remove use of sqlx
  • No need to create a temporary account
  • No longer using tengo library
  • Removed some boilerplate parsing code
  • Removed many package dependencies (see go.mod)

Tests-wise, the PR remains covered by onlineddl_declarative.

Related Issue(s)

Checklist

  • Should this PR be backported?
  • Tests were added or are not required
  • Documentation was added or is not required

…ency

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Copy link
Collaborator

@vmg vmg left a comment

Choose a reason for hiding this comment

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

This is, again, great just from the sheer amount of dependencies it removes. I don't have a good enough understanding of the subsystem to approve the changes so I'm basically giving my thumbs up to the go.mod diff. :)

@deepthi
Copy link
Member

deepthi commented Feb 25, 2022

/assign @vitessio/query-serving

@deepthi deepthi removed their request for review February 25, 2022 18:20
@shlomi-noach shlomi-noach requested review from a team and removed request for a team March 2, 2022 09:11
@shlomi-noach
Copy link
Contributor Author

call for review 🙏

@shlomi-noach
Copy link
Contributor Author

Tracking issue: #10203

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature) Type: Internal Cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants