-
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
Add vtctldclient missing cmds and remove remaining vtctl[client] usage in e2e tests #17442
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17442 +/- ##
==========================================
- Coverage 67.71% 67.70% -0.02%
==========================================
Files 1584 1586 +2
Lines 254721 255059 +338
==========================================
+ Hits 172473 172675 +202
- Misses 82248 82384 +136 ☔ View full report in Codecov by Sentry. |
9824c10
to
ec59343
Compare
Signed-off-by: Matt Lord <[email protected]>
ec59343
to
851ccac
Compare
Signed-off-by: Matt Lord <[email protected]>
8c5f3e9
to
05c4c1d
Compare
Signed-off-by: Matt Lord <[email protected]>
3018fa3
to
4465813
Compare
This reverts commit a091042. Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
c158a65
to
e89ca17
Compare
…cmds Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
…cmds Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
64a98e3
to
f0d6c1e
Compare
Signed-off-by: Matt Lord <[email protected]>
f0d6c1e
to
1073206
Compare
Signed-off-by: Matt Lord <[email protected]>
Signed-off-by: Matt Lord <[email protected]>
// Use internal vtctld server implementation. | ||
// Register a nil grpc handler -- we will not use tmclient at all but | ||
// a factory still needs to be registered. |
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.
Was this comment just incorrect?
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.
It was correct. It is no longer. Now we do make some tmclient calls and register the grpc handler separately.
// ValidateSchemaKeyspace makes a ValidateSchemaKeyspace gRPC call to a vtctld. | ||
ValidateSchemaKeyspace = &cobra.Command{ | ||
Use: "ValidateSchemaKeyspace [--exclude-tables=<exclude_tables>] [--include-views] [--skip-no-primary] [--include-vschema] <keyspace>", | ||
Short: "Validates that the schema on the primary tablet for the first shard matches the schema on all other tablets in the keyspace.", |
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.
Short: "Validates that the schema on the primary tablet for the first shard matches the schema on all other tablets in the keyspace.", | |
Short: "Validates that the schema on the primary tablet for the first shard matches the schema on all other shards in the keyspace.", |
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 copied the text from the legacy client, and the server code actually does compare against all tablets.
@@ -36,12 +39,30 @@ var ( | |||
RunE: commandGetTopologyPath, | |||
} | |||
|
|||
// WriteTopologyPath writes the contents of a local file to a path | |||
// in the topology server. | |||
WriteTopologyPath = &cobra.Command{ |
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.
Is this a net new command?
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.
It's replacing one:
❯ vtctlclient TopoCp -- --to_topo /tmp/foo.txt "/tmp"
W0102 09:19:10.219407 42425 log.go:39] Failed to read in config : Config File "vtconfig" Not Found in "[/Users/matt/git/vitess]". This is optional, and can be ignored if you are not using config files. For a detailed explanation, see https://github.com/vitessio/vitess/blob/main/doc/viper/viper.md#config-files.
❯ vtctldclient --server=internal WriteTopologyPath "/tmp" /tmp/foo.txt
completion Generate the autocompletion script for the specified shell | ||
help Help about any command | ||
|
||
Flags: | ||
--action_timeout duration timeout to use for the command (default 1h0m0s) |
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.
What changed in these flags? I can't tell from the diff.
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 tmclient related flags were added because of go/cmd/vtctldclient/plugin_grpctmclient.go. Which was needed for vtctldclient to be a full replacement for vtctl.
Description
This implements client commands in
vtctldclient
that were never ported during the client migration. These are things that were identified while moving all endtoend tests to usevtctldclient
exclusively in #17441. The missing commands being:Command examples:
CopySchemaShard
ValidatePermissionsKeyspace
,ValidatePermissionsShard
ValidateSchemaShard
WriteTopologyPath
With these in place (and after merging in
main
after #17441 was merged) we then also replace all remainingvtctl[client]
usage in the e2e tests with usage ofvtctldclient
.Related Issue(s)
Checklist