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

Reduce user interaction in verdi quicksetup for pre-existing user/database #5766

Closed
ltalirz opened this issue Nov 16, 2022 · 1 comment · Fixed by #5768
Closed

Reduce user interaction in verdi quicksetup for pre-existing user/database #5766

ltalirz opened this issue Nov 16, 2022 · 1 comment · Fixed by #5768
Assignees
Labels
type/feature request status undecided

Comments

@ltalirz
Copy link
Member

ltalirz commented Nov 16, 2022

Is your feature request related to a problem? Please describe

When verdi quicksetup detects that a database user or database already exists, it prompts the user whether to use those and, if not, to pick a new name.

Novice users likely do not know what exactly this choice entails; furthermore, choosing to reuse the database user may actually not be possible if the correct password for this user is not known in the config.json.

Furthermore, if the user decides not to reuse the db user/db, there is no point in letting them choose the new name. It is much easier to autogenerate it (if the user really wants to choose the name, they can pass it in via the --db-username/--db-name options to verdi quicksetup).

Describe the solution you'd like

verdi quicksetup should ideally behave as follows:

  • if a database user with the suggested name already exists, check whether you can log in as this user. if so, use it. if not, create a new user with an autogenerated name (printing a message to the cli about this)
  • if a database with the suggested name already exists, ask the user whether to reuse it. if they answer no, create a new db with an autogenerated name.

Additional context

@ltalirz ltalirz added the type/feature request status undecided label Nov 16, 2022
@ltalirz ltalirz self-assigned this Nov 16, 2022
@ltalirz
Copy link
Member Author

ltalirz commented Nov 16, 2022

On second thought, let's not reuse a database if it exists.
Quicksetup should only be used to create new databases - for existing ones, one can use verdi setup.

@ltalirz ltalirz linked a pull request Nov 16, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature request status undecided
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant