[vtctld] Custom build for vtctld development#195
[vtctld] Custom build for vtctld development#195setassociative wants to merge 21 commits intoslack-vitess-8-2021.03.03r0.wipfrom
Conversation
Initial implementation of vtctld service
Signed-off-by: Andrew Mason <amason@slack-corp.com>
…_keyspace Add FindAllShardsInKeyspace to vtctldserver
…ator [vtctldclient] vtctldclient generator
…nkeyspace [vtctld] Fix accidentally-broken legacy vtctl output format
[vtctld] Migrate cell getters
[vtctld] migrate tablet getters
…nd_pkg [vtctld] vtctldclient command pkg
[vtctld] Add GetSrvVSchema command
[vtctld] Migrate GetSchema Signed-off-by: Richard Bailey <rbailey@slack-corp.com>
[vtctld] Migrate ListBackups as GetBackups in new vtctld server
[vtctld] Migrate GetVSchema to VtctldServer
[vtctld] Migrate topo management RPCs Signed-off-by: Richard Bailey <rbailey@slack-corp.com>
…ce_errors [vtctldclient] Set `SilenceErrors` on the root command, so we don't double-log
Provide named function for squashing usage errors; start using it
Signed-off-by: Andrew Mason <amason@slack-corp.com>
[vtctld | tests only] testtmclient refactor Conflicts: go/vt/vtadmin/api_test.go go/vt/vtctl/reparentutil/emergency_reparenter_test.go go/vt/vtctl/reparentutil/planned_reparenter_test.go Resolved by `git rm -f` those files. Note: Also includes a change to grpcvtctldclient/client_test.go, not in the cherry-picked commit, to use the testutil constructor for vtctldservers. Signed-off-by: Andrew Mason <amason@slack-corp.com> wip test fixes Signed-off-by: Andrew Mason <amason@slack-corp.com> Signed-off-by: Richard Bailey <rbailey@slack-corp.com>
[vtctld] Add v0 GetWorkflows rpc and workflow/vexec packages
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Conflicts:
go/vt/proto/vtctldata/vtctldata.pb.go
go/vt/proto/vtctlservice/vtctlservice.pb.go
go/vt/vtctl/grpcvtctldclient/client_gen.go
go/vt/vtctl/grpcvtctldserver/server.go
go/vt/wrangler/vexec.go
proto/vtctldata.proto
proto/vtctlservice.proto
Signed-off-by: Andrew Mason <amason@slack-corp.com>
Signed-off-by: Richard Bailey <rbailey@slack-corp.com>
33ffe0b to
1f6f322
Compare
|
|
||
| package main | ||
|
|
||
| // Imports and register the gRPC vtctld client. |
|
|
||
| func (m *VEvent) GetDml() string { | ||
| if m != nil { | ||
| if m.Statement != "" { |
There was a problem hiding this comment.
Just calling out this diff because github hides it; a long time ago someone manually edited this proto file to include this check, which running make proto removes. Upstream was fine with this change.
| keyspace := subFlags.Arg(0) | ||
| keyspaceInfo, err := wr.TopoServer().GetKeyspace(ctx, keyspace) | ||
|
|
||
| keyspaceInfo, err := wr.VtctldServer().GetKeyspace(ctx, &vtctldatapb.GetKeyspaceRequest{ |
There was a problem hiding this comment.
calling this out as a code change in the legacy server, which is backwards compatible, but technically a change
|
|
||
| func commandGetKeyspaces(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { | ||
| keyspaces, err := wr.TopoServer().GetKeyspaces(ctx) | ||
| resp, err := wr.VtctldServer().GetKeyspaces(ctx, &vtctldatapb.GetKeyspacesRequest{}) |
There was a problem hiding this comment.
calling this out as a code change in the legacy server, which is backwards compatible, but technically a change
|
|
||
| keyspace := subFlags.Arg(0) | ||
| result, err := wr.TopoServer().FindAllShardsInKeyspace(ctx, keyspace) | ||
| result, err := wr.VtctldServer().FindAllShardsInKeyspace(ctx, &vtctldatapb.FindAllShardsInKeyspaceRequest{ |
There was a problem hiding this comment.
calling this out as a code change in the legacy server, which is backwards compatible, but technically a change
| } | ||
|
|
||
| sd, err := wr.GetSchema(ctx, tabletAlias, tableArray, excludeTableArray, *includeViews) | ||
| resp, err := wr.VtctldServer().GetSchema(ctx, &vtctldatapb.GetSchemaRequest{ |
There was a problem hiding this comment.
calling this out as a code change in the legacy server, which is backwards compatible, but technically a change
| } | ||
|
|
||
| // Service Vtctld exposes gRPC endpoints for each vt command. | ||
| service Vtctld { |
There was a problem hiding this comment.
confirming this has everything needed by vtadmin
* Merge pull request #187 from tinyspeck/backport-am_get_schema_sizes_only Add option to GetSchema to only send the row count and data length over the wire * whitespace! * derp, actually commit rm dead import Signed-off-by: Richard Bailey <rbailey@slack-corp.com> Co-authored-by: Andrew Mason <amason@slack-corp.com>
Branch construction -- cherry-pick results (
x- merged fine,c- conflict)