-
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
Ensure all legacy sharding commands are clearly deprecated #10281
Ensure all legacy sharding commands are clearly deprecated #10281
Conversation
Then they can be removed in v15 Signed-off-by: Matt Lord <[email protected]>
d451c74
to
9648a56
Compare
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
ee99372
to
c1be9da
Compare
ca = flag.String("vtworker_client_grpc_ca", "", "the server ca to use to validate servers when connecting") | ||
crl = flag.String("vtworker_client_grpc_crl", "", "the server crl to use to validate server certificates when connecting") | ||
name = flag.String("vtworker_client_grpc_server_name", "", "the server name to use to validate server certificate") | ||
cert = flag.String("vtworker_client_grpc_cert", "", "(DEPRECATED) the cert to use to connect") |
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.
Can we add a deprecation warning when the vtworker binary starts up?
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.
Sure. I'm assuming you mean print it to STDERR/console. I'll add something.
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.
$ vtworker
*** This is a legacy sharding tool that will soon be removed! Please use VReplication instead: https://vitess.io/docs/reference/vreplication/ ***
F0513 00:23:34.072379 42823 server.go:224] topo_global_server_address must be configured
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.
Please use VReplication instead
-> Please use MoveTables or Reshard commands instead
WDYT?
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.
Yeah, if that makes more sense to you — being somebody who is familiar with the legacy sharding stuff — then I'm all for it. I'll make this change shortly. Thanks!
@ajm188 can you review this too? |
Signed-off-by: Matt Lord <[email protected]>
9d99b45
to
f62d727
Compare
Signed-off-by: Matt Lord <[email protected]>
f5bfd26
to
4306bb8
Compare
Not great to tell users to use single dashes only to print a warning that they shouldn't do that. :-) Signed-off-by: Matt Lord <[email protected]>
4306bb8
to
6ab90d0
Compare
Signed-off-by: Matt Lord <[email protected]>
I had done it for the command flag, but not for the long help output. Signed-off-by: Matt Lord <[email protected]>
@@ -510,31 +512,33 @@ var commands = []commandGroup{ | |||
{ | |||
name: "VDiff", | |||
method: commandVDiff, | |||
params: "[-source_cell=<cell>] [-target_cell=<cell>] [-tablet_types=PRIMARY,REPLICA,RDONLY] [-filtered_replication_wait_time=30s] [-max_extra_rows_to_compare=1000] <keyspace.workflow>", | |||
params: "[--source_cell=<cell>] [--target_cell=<cell>] [--tablet_types=in_order:RDONLY,REPLICA,PRIMARY] [--filtered_replication_wait_time=30s] [--max_extra_rows_to_compare=1000] <keyspace.workflow>", |
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 --tablet_types
default was changed in #10040 (v14+) but I missed this location.
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
DisableFlagsInUseLine: true, | ||
Args: cobra.ExactArgs(2), | ||
RunE: commandSetKeyspaceServedFrom, | ||
Deprecated: "and will soon be removed! Please use VReplication instead: https://vitess.io/docs/reference/vreplication", |
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.
You can see what will get printed here: https://github.com/spf13/cobra/blob/9e88759b19cd358e9af6f0d778b9a23990cf7f51/command.go#L785-L787
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 left a suggestion for the deprecation warning.
The rest LGTM
Signed-off-by: Matt Lord <[email protected]>
Description
The legacy sharding code — e.g.
SplitClone
— has long since been replaced by VReplication based workflows likeMoveTables
.This PR ensures that all related user commands are clearly marked as deprecated so that all related code can be removed in v15.
Related Issue(s)
Checklist