momentohq / momento-cli

Official CLI for Momento Serverless Cache
Apache License 2.0
48 stars 10 forks source link

feat: Remove `momento account signup` #288

Closed rlinehan closed 1 year ago

rlinehan commented 1 year ago

Part of https://github.com/momentohq/user-management/issues/90.

Remove momento account signup command and replace with an error message pointing to the Console.

The subcommand and arguments are kept (and made options) so that if someone uses the command with these, they get a helpful error message:

$ cargo run -- account --help
Manage accounts

Usage: momento account [OPTIONS] <COMMAND>

Commands:
  signup  **DEPRECATED** Please go to the Momento Console to sign up
  help    Print this message or the help of the given subcommand(s)

Options:
      --verbose            Log more information
  -p, --profile <PROFILE>  User profile [default: default]
  -h, --help               Print help
$ cargo run -- account signup --help
**DEPRECATED** Please go to the Momento Console to sign up

Usage: momento account signup [OPTIONS] [COMMAND]

Commands:
  gcp   **DEPRECATED** Please go to the Momento Console to sign up
  aws   **DEPRECATED** Please go to the Momento Console to sign up
  help  Print this message or the help of the given subcommand(s)

Options:
      --verbose            Log more information
  -p, --profile <PROFILE>  User profile [default: default]
  -h, --help               Print help
$ cargo run -- account signup
ERROR: This command has been deprecated and removed!
Please go to the console to sign up for Momento and generate a token:
 https://console.gomomento.com
$ cargo run -- account signup aws
ERROR: This command has been deprecated and removed!
Please go to the console to sign up for Momento and generate a token:
 https://console.gomomento.com
$ cargo run -- account signup aws --email foo
ERROR: This command has been deprecated and removed!
Please go to the console to sign up for Momento and generate a token:
 https://console.gomomento.com
rlinehan commented 1 year ago

This is blocked on getting the new sdk version in but wanted to open it up to get feedback that this is the right approach to take.

danielamiao commented 1 year ago

Can we add a direct URL link to the console so people can easily cut and paste into browser? I would go a step further and just pop up the browser for them with the link but that might be harder / too much effort.

rlinehan commented 1 year ago

Can we add a direct URL link to the console so people can easily cut and paste into browser? I would go a step further and just pop up the browser for them with the link but that might be harder / too much effort.

@danielamiao it's in the error currently

ERROR: This command has been deprecated and removed!
Please go to the console to sign up for Momento and generate a token:
 https://console.gomomento.com

I could also do pop the browser, but personally I don't like that behavior that much? I don't think it's that hard though if you want that.

danielamiao commented 1 year ago

@rlinehan ah ok thanks! I think maybe just add it to help menu too?

cprice404 commented 1 year ago

can you please show what the main help screen looks like with these changes? I am curious whether you hid the old command and also would like to see what the current list of top level commands is. (Sorry I know I could glean this from the code but I haven't had time to go through it all yet.)

rlinehan commented 1 year ago

can you please show what the main help screen looks like with these changes? I am curious whether you hid the old command and also would like to see what the current list of top level commands is. (Sorry I know I could glean this from the code but I haven't had time to go through it all yet.)

@cprice404 I haven't hidden account from the top level of commands but I could, since signup is currently the only subcommand for that.

Here's what it looks like with the current set of changes:

$ cargo run -- --help
Command line tool for Momento Serverless Cache

Usage: momento [OPTIONS] <COMMAND>

Commands:
  cache      Interact with caches
  topic      Interact with topics
  configure  Configure credentials
  account    Manage accounts
  help       Print this message or the help of the given subcommand(s)

Options:
      --verbose            Log more information
  -p, --profile <PROFILE>  User profile [default: default]
  -h, --help               Print help
  -V, --version            Print version
rlinehan commented 1 year ago

@poppoerika I pushed a commit that updates the README... do you know what the process is for updating the japanese (and also portuguese I guess) version of this?