Skip to content
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

Registry tool: "Available plugins" obscures relevant help information and could be more helpfully formatted #1180

Open
timburks opened this issue Jun 3, 2023 · 1 comment
Assignees

Comments

@timburks
Copy link
Contributor

timburks commented Jun 3, 2023

Here I was looking for help for a registry subcommand:

$ registry label
Usage:
registry label RESOURCE KEY_1=VAL_1 ... KEY_N=VAL_N [flags]

Available Plugins:
compute-summary
connect
convert
experimental
postman

Flags:
      --filter string   filter selected resources
  -h, --help            help for label
  -j, --jobs int        number of actions to perform concurrently (default 10)
      --overwrite       overwrite existing labels

Global Flags:
      --address string             the server and port of the Registry API (eg. localhost:8080)
  -c, --config string              name of a configuration profile or path to config file
      --registry.address string    the server and port of the Registry API (eg. localhost:8080)
      --registry.insecure          if specified, client connects via http (not https)
      --registry.location string   the API Registry location
      --registry.project string    the API Registry project
      --registry.token string      the token to use for authorization to the API Registry

Need more help?
https://github.com/apigee/registry/wiki

Error: requires at least 2 arg(s), only received 0
Run 'registry --help' for usage.

Note how the Available Plugins section breaks the flow of information about registry label. In between the command usage and list of flags, we print a list of plugins which are almost always going to be less relevant. If we ordered information by relevance, from "local" to "global", I think the plugins list would appear after "Global Flags" and before the wiki link. Also, can we indent the plugin names (two spaces?) to make it clearer that they are in a list?

Like this:

$ registry label
Usage:
registry label RESOURCE KEY_1=VAL_1 ... KEY_N=VAL_N [flags]

Flags:
      --filter string   filter selected resources
  -h, --help            help for label
  -j, --jobs int        number of actions to perform concurrently (default 10)
      --overwrite       overwrite existing labels

Global Flags:
      --address string             the server and port of the Registry API (eg. localhost:8080)
  -c, --config string              name of a configuration profile or path to config file
      --registry.address string    the server and port of the Registry API (eg. localhost:8080)
      --registry.insecure          if specified, client connects via http (not https)
      --registry.location string   the API Registry location
      --registry.project string    the API Registry project
      --registry.token string      the token to use for authorization to the API Registry

Available Plugins:
  compute-summary
  connect
  convert
  experimental
  postman

Need more help?
https://github.com/apigee/registry/wiki

Error: requires at least 2 arg(s), only received 0
Run 'registry --help' for usage.

(reviewing the proposed rearrangement, I'm not sure that the plugins list is appropriate to show at all in usage for registry label... looking at this in isolation, it seems to suggest that registry label accepts plugins)

@timburks timburks changed the title Registry tool: "Available plugins" obscures relevant help information and could be more helpfully formatted Registry tool: "Available plugins" obscures relevant help information and could be more helpfully organized Jun 3, 2023
@timburks timburks changed the title Registry tool: "Available plugins" obscures relevant help information and could be more helpfully organized Registry tool: "Available plugins" obscures relevant help information and could be more helpfully formatted Jun 3, 2023
@timburks timburks self-assigned this Jun 6, 2023
@timburks
Copy link
Contributor Author

timburks commented Jun 8, 2023

After reviewing the usage template, I think we can address this in a different way. The "Available Commands" section is only displayed when a command has available subcommands. Similarly, we could only print the available plugins when they are plugins of the command being described. Generally, this means that only "registry" would have available plugins (or maybe others if we start taking apart plugin names using dashes as separators). But this does mean that "registry label" would have no plugins, so no distracting plugin information would be displayed. If we do this, then I don't think we need to move the plugin section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Inbox
Development

No branches or pull requests

1 participant