-
Notifications
You must be signed in to change notification settings - Fork 119
Reinstall prompt tweaks #1268
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
Reinstall prompt tweaks #1268
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
system-reinstall-bootc/src/prompt.rs:31
- [nitpick] The prompt message may be ambiguous if multiple keys are possible. Consider clarifying whether this message applies solely when a single key is imported or if it also applies when multiple keys are selected.
This is the key that will be used to access the bootc system.
system-reinstall-bootc/src/prompt.rs:31
- [nitpick] Since the multi-select prompt allows for choosing several keys, this singular phrasing may confuse users. It might help to adjust the wording to clarify how the selected key is used or if only one can be effective.
This is the key that will be used to access the bootc system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing blocking really, OK to merge as is
system-reinstall-bootc/src/main.rs
Outdated
@@ -52,6 +52,9 @@ fn run() -> Result<()> { | |||
.run_with_cmd_context() | |||
.context("running reinstall command")?; | |||
|
|||
println!(); | |||
println!("Reboot to start using the bootc image"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just thinking about this more...I wonder if we should instead default to rebooting, with the option to press e.g. ctrl-c/escape to exit?
We already prompt them in temporary_developer_protection_prompt
"hey this will replace your system" earlier so I think we could actually change it to say...
diff --git i/system-reinstall-bootc/src/prompt.rs w/system-reinstall-bootc/src/prompt.rs
index 6308450a..ec73ae85 100644
--- i/system-reinstall-bootc/src/prompt.rs
+++ w/system-reinstall-bootc/src/prompt.rs
@@ -44,7 +44,7 @@ pub(crate) fn temporary_developer_protection_prompt() -> Result<()> {
// Print an empty line so that the warning stands out from the rest of the output
println!();
- let prompt = "THIS WILL REINSTALL YOUR SYSTEM! Are you sure you want to continue?";
+ let prompt = "NOTICE: This will replace the installed operating system and reboot. Are you sure you want to continue?";
let answer = ask_yes_no(prompt, false)?;
if !answer {
And then here at the end we have a timer like:
Operation complete, rebooting in {n} seconds. Press Ctrl-C to cancel reboot, any other key to continue immediately.
With a value of n=10 perhaps?
system-reinstall-bootc/src/prompt.rs
Outdated
@@ -9,7 +9,8 @@ fn prompt_single_user(user: &crate::users::UserKeys) -> Result<Vec<&crate::users | |||
let prompt = indoc::formatdoc! { | |||
"Found only one user ({user}) with {num_keys} SSH authorized keys. | |||
Would you like to import its SSH authorized keys | |||
into the root user on the new bootc system?", | |||
into the root user on the new bootc system? | |||
This is the key that will be used to access the bootc system.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"bootc system" stutters here. I wonder if we even need to clarify "bootc" system in this context, I think it's implicitly understood. Maybe:
Would you like to copy the SSH authorized keys for the root user on the new system? Then you can log in as
root@
using those keys.
7ea1880
to
6c217e5
Compare
Signed-off-by: ckyrouac <ckyrouac@redhat.com>
Trying to make the purpose of selecting a user more clear. Signed-off-by: ckyrouac <ckyrouac@redhat.com>
6c217e5
to
d457c25
Compare
We were playing with this but it isn't quite right
|
quay.io bad gateway is ruining our CI 😦 |
See commit messages, just some prompt tweaks to clarify usage of system-reinstall-bootc.
Closes: #1269