Skip to content

Commit

Permalink
Merge #30747
Browse files Browse the repository at this point in the history
30747: cli: Mark zone command deprecated so it doesn't show up in help text r=a-robinson a=a-robinson

We had previously marked zone's subcommands as deprecated in
bfc190d, which meant they didn't show
up as available subcommands in the help text of `cockroach zone`.
However, there was no deprecation message on the zone command itself,
which made the lack of subcommands confusing, and also meant that it
showed up as a command in the help text of the top level `cockroach`
command. This fixes both issues.

Release note: None

---

cc @jseldess just as an additional reminder on top of the docs-todo label on this and #28612 that the `cockroach zone` command is being deprecated in favor of the `SHOW ZONE` and `CONFIGURE ZONE` sql syntax. If you think this is a big loss in usability, speak up before the release :)

Fixes #30728

Co-authored-by: Alex Robinson <alexdwanerobinson@gmail.com>
  • Loading branch information
craig[bot] and a-robinson committed Sep 30, 2018
2 parents 6692789 + f354323 commit 4e80b4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion pkg/cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1808,7 +1808,6 @@ Available Commands:
sql open a sql shell
user get, set, list and remove users
zone get, set, list and remove zones
node list, inspect or remove nodes
dump dump sql tables
Expand Down
7 changes: 4 additions & 3 deletions pkg/cli/zone.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,10 @@ var zoneCmds = []*cobra.Command{
}

var zoneCmd = &cobra.Command{
Use: "zone",
Short: "get, set, list and remove zones",
RunE: usageAndErr,
Use: "zone",
Short: "get, set, list and remove zones",
RunE: usageAndErr,
Deprecated: "use SHOW ZONE and CONFIGURE ZONE commands in a SQL client instead.",
}

func init() {
Expand Down

0 comments on commit 4e80b4a

Please sign in to comment.