-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[vtctld] migrate tablet getters #7311
[vtctld] migrate tablet getters #7311
Conversation
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Andrew Mason <amason@slack-corp.com>
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.
Two non-blocking questions. This looks great!
Format string | ||
}{} | ||
|
||
func commandGetTablets(cmd *cobra.Command, args []string) error { |
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.
We can't/don't test the CLI output in commands.go, right? Not a leading question, just curious!
rootCmd.AddCommand(getKeyspaceCmd) | ||
rootCmd.AddCommand(getKeyspacesCmd) | ||
|
||
rootCmd.AddCommand(getTabletCmd) | ||
getTabletsCmd.Flags().StringSliceVarP(&getTabletsArgs.Cells, "cell", "c", nil, "TODO") |
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.
Are these left as TODOs on purpose?
) | ||
|
||
func fmtMapAwkable(m map[string]string) string { | ||
pairs := make([]string, len(m)) |
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.
missed opportunity to call these awkWords
tbh
[vtctld] migrate tablet getters
[vtctld] migrate tablet getters
[vtctld] migrate tablet getters Signed-off-by: Andrew Mason <amason@slack-corp.com>
Description
This migrates all tablet read-only vtctl commands, as follows:
GetTablet $alias
=>GetTablet $alias
ListShardTablets $ks/$shard
=>GetTablets --keyspace $ks --shard $shard
(also new:GetTablets --keyspace $ks
)ListAllTablets -cells="c1,c2,c3"
=>GetTablets --cells c1 --cells "c2,c3" # both work
No changes to the output format, plus support for json in the "list shard/all tablets" commands:
Related Issue(s)
Checklist
Deployment Notes
Impacted Areas in Vitess
Components that this PR will affect: