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

Conversation

itsrainy
Copy link
Contributor

Putting this up as a possible solution to fastly/Viceroy#235.

With the 0.4.0 release, the default Viceroy verbosity is "OFF" rather than "INFO" (discussion here). This change would pass along the --verbose flag to viceroy when a user calls fastly compute serve --verbose.

Alternatively, we could just unconditionally pass the -v flag so the fastly compute serve output remains ~the same as before that Viceroy version.

@@ -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.

@Integralist Integralist merged commit 00e5298 into fastly:main Mar 20, 2023
@Integralist Integralist added the bug Something isn't working label Mar 20, 2023
@itsrainy itsrainy deleted the rainy/viceroy-verbosity branch March 28, 2023 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants