From 3018fa351225731ecdd466f085cf42f57f8dc397 Mon Sep 17 00:00:00 2001 From: Matt Lord Date: Wed, 1 Jan 2025 15:30:08 -0500 Subject: [PATCH] Align old and new client resp handling Signed-off-by: Matt Lord --- go/cmd/vtctldclient/command/schema.go | 4 ++++ go/vt/vtctl/grpcvtctldserver/server.go | 1 + 2 files changed, 5 insertions(+) diff --git a/go/cmd/vtctldclient/command/schema.go b/go/cmd/vtctldclient/command/schema.go index 4715835d66b..9622febc141 100644 --- a/go/cmd/vtctldclient/command/schema.go +++ b/go/cmd/vtctldclient/command/schema.go @@ -388,6 +388,10 @@ func commandValidateSchemaKeyspace(cmd *cobra.Command, args []string) error { return err } + if len(resp.Results) > 0 { + return fmt.Errorf("%s", resp.Results[0]) + } + data, err := cli.MarshalJSON(resp) if err != nil { return err diff --git a/go/vt/vtctl/grpcvtctldserver/server.go b/go/vt/vtctl/grpcvtctldserver/server.go index 275437343ea..3709e3a3b8b 100644 --- a/go/vt/vtctl/grpcvtctldserver/server.go +++ b/go/vt/vtctl/grpcvtctldserver/server.go @@ -4801,6 +4801,7 @@ func (s *VtctldServer) ValidateSchemaKeyspace(ctx context.Context, req *vtctldat defer panicHandler(&err) span.Annotate("keyspace", req.Keyspace) + span.Annotate("shards", req.Shards) keyspace := req.Keyspace resp = &vtctldatapb.ValidateSchemaKeyspaceResponse{