Skip to content

Commit

Permalink
vtctldclient,grpcvtctldserver ApplySchema: return unknown params from…
Browse files Browse the repository at this point in the history
… grpcvtctldserver.ApplySchema, log them in vtctldclient.ApplySchema (#14672)

Signed-off-by: Max Englander <max@planetscale.com>
Signed-off-by: Max Englander <max.englander@gmail.com>
Co-authored-by: Andrew Mason <amason@hey.com>
Co-authored-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 21, 2023
1 parent cfa2079 commit 750d04c
Show file tree
Hide file tree
Showing 10 changed files with 2,959 additions and 2,004 deletions.
9 changes: 7 additions & 2 deletions go/cmd/vtctldclient/command/vschemas.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,16 @@ func commandApplyVSchema(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
data, err := cli.MarshalJSON(res.VSchema)
vsData, err := cli.MarshalJSON(res.VSchema)
if err != nil {
return err
}
fmt.Printf("New VSchema object:\n%s\nIf this is not what you expected, check the input data (as JSON parsing will skip unexpected fields).\n", data)
fmt.Printf("New VSchema object:\n%s\nIf this is not what you expected, check the input data (as JSON parsing will skip unexpected fields).\n", vsData)
for vdxName, ups := range res.UnknownVindexParams {
for _, param := range ups.Params {
fmt.Printf("Unknown parameter in vindex %s: %s\n", vdxName, param)
}
}
return nil
}

Expand Down
4,071 changes: 2,083 additions & 1,988 deletions go/vt/proto/vtctldata/vtctldata.pb.go

Large diffs are not rendered by default.

Loading

0 comments on commit 750d04c

Please sign in to comment.