[vtctld] migrate tablet getters#7311
Merged
rohit-nayak-ps merged 5 commits intovitessio:masterfrom Jan 18, 2021
Merged
Conversation
added 5 commits
January 15, 2021 19:43
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>
doeg
approved these changes
Jan 18, 2021
Contributor
doeg
left a comment
There was a problem hiding this comment.
Two non-blocking questions. This looks great!
| Format string | ||
| }{} | ||
|
|
||
| func commandGetTablets(cmd *cobra.Command, args []string) error { |
Contributor
There was a problem hiding this comment.
We can't/don't test the CLI output in commands.go, right? Not a leading question, just curious!
| rootCmd.AddCommand(getKeyspacesCmd) | ||
|
|
||
| rootCmd.AddCommand(getTabletCmd) | ||
| getTabletsCmd.Flags().StringSliceVarP(&getTabletsArgs.Cells, "cell", "c", nil, "TODO") |
Contributor
There was a problem hiding this comment.
Are these left as TODOs on purpose?
| ) | ||
|
|
||
| func fmtMapAwkable(m map[string]string) string { | ||
| pairs := make([]string, len(m)) |
Contributor
There was a problem hiding this comment.
missed opportunity to call these awkWords tbh
ajm188
pushed a commit
to tinyspeck/vitess
that referenced
this pull request
Feb 11, 2021
[vtctld] migrate tablet getters
setassociative
pushed a commit
to tinyspeck/vitess
that referenced
this pull request
Mar 11, 2021
[vtctld] migrate tablet getters
ajm188
pushed a commit
to tinyspeck/vitess
that referenced
this pull request
Apr 6, 2021
[vtctld] migrate tablet getters Signed-off-by: Andrew Mason <amason@slack-corp.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This migrates all tablet read-only vtctl commands, as follows:
GetTablet $alias=>GetTablet $aliasListShardTablets $ks/$shard=>GetTablets --keyspace $ks --shard $shard(also new:GetTablets --keyspace $ks)ListAllTablets -cells="c1,c2,c3"=>GetTablets --cells c1 --cells "c2,c3" # both workNo 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: