-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
ApplySchema: deprecate '--skip_preflight' flag #10716
ApplySchema: deprecate '--skip_preflight' flag #10716
Conversation
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
I feel that deprecating the flag would be setting the default to true and adding a deprecation warning in the CLI and docs while removal would be removing the code done here along the the preflight tablet manager client code. The PR seems to be in the middle. Do we need to do a deprecation cycle? What's the value of keeping the flag if you can't set it? Please keep in mind that I am glad we're getting rid of this and appreciate you working on that. 🙂 |
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
@mattlord we have to have a deprecation cycle. So in You're also right that the easiest way forward would be to just take care of the flag, force it to UPDATE v16 is already released, so this work applies to |
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Added deprecation warning |
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
@@ -141,7 +141,7 @@ func commandApplySchema(cmd *cobra.Command, args []string) error { | |||
AllowLongUnavailability: applySchemaOptions.AllowLongUnavailability, | |||
DdlStrategy: applySchemaOptions.DDLStrategy, | |||
Sql: parts, | |||
SkipPreflight: applySchemaOptions.SkipPreflight, | |||
SkipPreflight: true, |
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.
same comments I made in #10717 (comment), but for this flag
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.
👍
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.
Comments addressed
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
@@ -3110,7 +3112,7 @@ func commandApplySchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *fl | |||
AllowLongUnavailability: *allowLongUnavailability, | |||
DdlStrategy: *ddlStrategy, | |||
Sql: parts, | |||
SkipPreflight: *skipPreflight, | |||
SkipPreflight: true, |
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.
Perhaps we should be deprecating the protobuf field for this as well? I'm not certain about that though - whether we do this now and deprecate the protobuf field in the next release.
@ajm188 what do you suggest?
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 know i just said "yes" on the other PR, but i think we need to wait one more cycle, since old tablets will be consuming this field, which will take the zero value (false
) instead of what we unconditionally pass here (true
).
so deprecate flag + always pass true
(v15) => remove flag + deprecate protobuf field + tablets ignore value and always skip-preflight (v16)
|
This PR is being marked as stale because it has been open for 30 days with no activity. To rectify, you may do any of the following:
If no action is taken within 7 days, this PR will be closed. |
This is not stale. I'm just stuck. Can't solve the CI issue. |
Still stuck here. |
This PR is being marked as stale because it has been open for 30 days with no activity. To rectify, you may do any of the following:
If no action is taken within 7 days, this PR will be closed. |
This PR is being marked as stale because it has been open for 30 days with no activity. To rectify, you may do any of the following:
If no action is taken within 7 days, this PR will be closed. |
This PR was closed because it has been stale for 7 days with no activity. |
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Fashionably late, this PR is ready for review! |
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.
Yay code cleanup!
Current error in
|
|
Description
This PR deprecates the flag
--skip_preflight
invtctlclient ApplySchema
. The new behavior is as if--skip_preflight=true
. That is, to always skip preflight. In fact, the preflight code is completely removed in this PR.The Vitess team discussed deprecating
--skip_preflight
a long time ago, with the advent of Online DDL. Moreover, we have noticed that in production environments we always set the flag. And furthermore, the logic used by--skip_preflight
is not on par with new schema change logic: Online DDL andschemadiff
, and we've encountered scenarios where the logic was flawed.As
Vitess
now recommends running migrations via Online DDL, we should move away frompreflight
checks.Related Issue(s)
#6926
Checklist
Deployment Notes