Enhance init interface by reducing an input#2292
Enhance init interface by reducing an input#2292cb-github-robot merged 1 commit intocloud-barista:mainfrom
Conversation
seokho-son
commented
Jan 26, 2026
Signed-off-by: Seokho Son <shsongist@gmail.com>
There was a problem hiding this comment.
Pull request overview
Updates the init script flow to reduce interactive prompts by using credential decryption as implicit confirmation and by delaying the server health check until after user inputs are collected.
Changes:
- Reworded the credential decryption password prompt.
- Moved the Tumblebug server health check to run after user confirmation/input collection.
- Adjusted confirmation flow so password entry can replace the separate “proceed?” prompt in some cases.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Determine if password input will be required | ||
| # If password is needed, it serves as confirmation (skip "proceed?" prompt) | ||
| password_required = run_credentials and not os.path.isfile(KEY_FILE) | ||
|
|
||
| # Get decryption key BEFORE health check (if credentials are being registered) |
There was a problem hiding this comment.
password_required is determined solely by the presence of KEY_FILE, but get_decryption_key() can still fall back to prompting for a password when the key file exists but is invalid/expired (decrypt fails). In that case password_required remains False, and the script will still ask the separate "Do you want to proceed?" confirmation later, defeating the intended prompt reduction. Consider having get_decryption_key() return whether a password prompt was actually used (or validate/decrypt with the key file before computing password_required) and base the confirmation-skip logic on that actual outcome.
| # Prompt for password up to 3 times if the key file is not used or fails | ||
| for attempt in range(3): | ||
| password = getpass(f"Enter the password to decrypt the credentials file (attempt {attempt + 1}/3): ") | ||
| password = getpass(f"Enter the password of the encrypted credential to continue (attempt {attempt + 1}/3): ") |
There was a problem hiding this comment.
The password prompt text is ambiguous/grammatically off ("password of the encrypted credential"); it’s asking for the password to decrypt the encrypted credentials file. Consider rewording to explicitly reference the encrypted credentials file (and keep terminology consistent with earlier messages like "credentials file").
| password = getpass(f"Enter the password of the encrypted credential to continue (attempt {attempt + 1}/3): ") | |
| password = getpass(f"Enter the password to decrypt the encrypted credentials file (attempt {attempt + 1}/3): ") |
|
/approve |