Skip to content

Conversation

@afbjorklund
Copy link
Member

@afbjorklund afbjorklund commented Jan 21, 2023

After hiding the INFO messages, enable some progress.

Starting "default"

READY.

Showing the requirements as a progress bar, using pb.

Closes #1311

@afbjorklund
Copy link
Member Author

The first commit is from #1308, it messes up the progress bar to have both that and the log at the same time.

INFO[0105] [hostagent] Waiting for the essential requirement 1 of 5: "ssh" 
Waiting 1 / 8 [--->________________________]  "ssh" (essential 1/5)             INFO[0115] [hostagent] Waiting for the essential requirement 1 of 5: "ssh" 
Waiting 1 / 8 [--->________________________]  "ssh" (essential 1/5)             INFO[0132] [hostagent] Waiting for the essential requirement 1 of 5: "ssh" 
Waiting 1 / 8 [--->________________________]  "ssh" (essential 1/5)             INFO[0133] [hostagent] The essential requirement 1 of 5 is satisfied 
Waiting 1 / 8 [--->________________________]  "ssh" (essential 1/5)             
INFO[0133] [hostagent] Waiting for the essential requirement 2 of 5: "user session is ready for ssh" 
INFO[0133] [hostagent] The essential requirement 2 of 5 is satisfied 
Waiting 2 / 8 [------>_____________________]  "user session is ready for ssh" (essential 2/5)

@afbjorklund
Copy link
Member Author

Fixed the width, when not keeping the output but cleaning the progress bar.

Haven't yet fully decided, which option is the best - there are pros and cons...

startCommand.Flags().Bool("tty", isatty.IsTerminal(os.Stdout.Fd()), "enable TUI interactions such as opening an editor, defaults to true when stdout is a terminal")
startCommand.Flags().String("name", "", "override the instance name")
startCommand.Flags().String("set", "", "modify the template inplace, using yq syntax")
startCommand.Flags().Bool("progress", false, "show progress")
Copy link
Member

@AkihiroSuda AkihiroSuda Apr 7, 2023

Choose a reason for hiding this comment

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

This is confusing, because the progress is shown in the default mode.

What about taking a ternary value (auto|true|false)?
e.g., limactl (default) implies --progress=true, and limactl --log-level=warn implies --progress=false.
For your usecase you might want to use limactl --log-level=warn --progress=true.

Copy link
Member Author

Choose a reason for hiding this comment

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

Needs to be split

Signed-off-by: Anders F Björklund <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show more user-friendly output, from the start command

2 participants