-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
I attempted to try out obsctl and failed.
(I believe I failed because I configured Observatorium-API to use dex. I will try again with Keycloak later.)
This is how I really tried to use it; I didn't purposely make mistakes.
obsctl metrics get labels
Error: getting current client: getting current context: current context is empty
// confusing/distracting usage message -- my flags were correct. Showing the flags obscures the actual error message.
// Would be better to say there are no contexts, rather than saying it is an error to list them.
obsctl context list
Error: current context is empty
// confusing usage message -- my flags were correct.
// Should probably say "none" and perhaps suggest the user do obsctl login --tenant <tenant> --api <name>
obsctl context current
Error: current context is empty
// confusing usage message -- my flags were correct. Should probably say "none", and perhaps suggest how to create one.
obsctl context api add
Error: required flag(s) "url" not set
obsctl context api add --url localhost:8080
Error: localhost:8080 is not a valid URL (scheme: localhost,host: )
// distracting usage message -- my flags were correct
// Gives no output; a confirmation message would be nice. A suggestion to do "obsctl login" would also be nice.
obsctl context api add --url http://localhost:8080
// I would assumed the above would have set this; the error message should probably suggest doing "obsctl login"
obsctl context current
Error: current context is empty
obsctl login
Error: required flag(s) "api", "tenant" not set
// What's confusing here is that the name is optional for `api add`, but the `--api` is not optional. It is also confusing that the "name" is called `--name" in `obsctl context api add` but called `--api` in `obsctl login`.
// The error message makes me wonder if the nameless `obsctl context api add` above had any effect.
obsctl login --tenant test-oidc --api ""
Error: api name does not exist, please add it in via 'context api add'
obsctl context api add --url http://localhost:8080 --name localhost
// (It might be good to disallow "" for --oidc.issuer-url)
obsctl login --tenant test-oidc --api localhost
Error: creating authenticated client: constructing oidc provider: Get "/.well-known/openid-configuration": unsupported protocol scheme ""
// This message is confusing because there is no grant-type option. (I realize it comes from dex; others may not)
obsctl login --tenant test-oidc --api localhost --oidc.issuer-url http://localhost:5556/dex
Error: creating authenticated client: fetching token: oauth2: cannot fetch token: 400 Bad Request
Response: {"error":"unsupported_grant_type"}
obsctl login --tenant test-oidc --api dummy
Error: api name dummy does not exist, please add it in via 'context api add'
// It would be helpful if the error message included the valid values for --api
You might also consider a obsctl context api list command.
saswatamcode
Metadata
Metadata
Assignees
Labels
No labels