Skip to content

Enhance init interface by reducing an input#2292

Merged
cb-github-robot merged 1 commit intocloud-barista:mainfrom
seokho-son:main
Jan 26, 2026
Merged

Enhance init interface by reducing an input#2292
cb-github-robot merged 1 commit intocloud-barista:mainfrom
seokho-son:main

Conversation

@seokho-son
Copy link
Copy Markdown
Member

image

Signed-off-by: Seokho Son <shsongist@gmail.com>
Copilot AI review requested due to automatic review settings January 26, 2026 15:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +258 to +262
# 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)
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
# 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): ")
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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").

Suggested change
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): ")

Copilot uses AI. Check for mistakes.
@seokho-son
Copy link
Copy Markdown
Member Author

/approve

@github-actions github-actions bot added the approved This PR is approved and will be merged soon. label Jan 26, 2026
@cb-github-robot cb-github-robot merged commit 29d7d7c into cloud-barista:main Jan 26, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved This PR is approved and will be merged soon.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants