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

🗣️ Pass verbosity flag along to viceroy binary #878

Merged
merged 1 commit into from
Mar 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/commands/compute/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@ func local(bin, file, addr, env string, debug, watch bool, watchDir cmd.Optional
text.Break(out)
text.Output(out, "Wasm file: %s", file)
text.Output(out, "Manifest: %s", manifestPath)
args = append(args, "-v")
Copy link
Collaborator

Choose a reason for hiding this comment

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

👋 Thanks for opening this PR to address this issue.

CLI users very rarely use --verbose mode because of the extra noise, so I think the default behaviour should be to pass the -v flag regardless of whether the verbose mode was set in the CLI (we've already had a few users confused by the missing output because they no longer see the local server address so they don't know where to go).

An alternative would be to keep this change -v (as it might address other issues raised specifically for Viceroy, see this PR's description) and instead have the CLI additionally print the address unless the user sets CLI to use verbose mode. This is because on line 71 we set a default address .Default("127.0.0.1:7676") so the CLI does know the address up front but we'd want to avoid the duplication of information if viceroy also is in verbose mode.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually, thinking about this a little more I'm going to go with the 'alternative' option as I think that makes the most sense. So I'll approve/merge this PR and open a separate PR to address the other aspects of the alternative approach.

}

s := &fstexec.Streaming{
Expand Down