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

Update after parameter name change in Viceroy #1033

Merged
merged 2 commits into from
Oct 11, 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
4 changes: 2 additions & 2 deletions pkg/commands/compute/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func NewServeCommand(parent cmd.Registerer, g *global.Data, build *BuildCommand,
c.CmdClause.Flag("include-source", "Include source code in built package").Action(c.includeSrc.Set).BoolVar(&c.includeSrc.Value)
c.CmdClause.Flag("language", "Language type").Action(c.lang.Set).StringVar(&c.lang.Value)
c.CmdClause.Flag("package-name", "Package name").Action(c.packageName.Set).StringVar(&c.packageName.Value)
c.CmdClause.Flag("profile-guest", "Profile the Wasm guest under Viceroy. View profiles at https://profiler.firefox.com/.").BoolVar(&c.profileGuest)
c.CmdClause.Flag("profile-guest", "Profile the Wasm guest under Viceroy (requires Viceroy 0.9.1 or higher). View profiles at https://profiler.firefox.com/.").BoolVar(&c.profileGuest)
c.CmdClause.Flag("profile-guest-dir", "The directory where the per-request profiles are saved to. Defaults to guest-profiles.").Action(c.profileGuestDir.Set).StringVar(&c.profileGuestDir.Value)
c.CmdClause.Flag("skip-build", "Skip the build step").BoolVar(&c.skipBuild)
c.CmdClause.Flag("timeout", "Timeout, in seconds, for the build compilation step").Action(c.timeout.Set).IntVar(&c.timeout.Value)
Expand Down Expand Up @@ -577,7 +577,7 @@ func local(opts localOpts) error {
if opts.profileGuestDir.WasSet {
directory = opts.profileGuestDir.Value
}
args = append(args, "--profile-guest="+directory)
args = append(args, "--profile=guest,"+directory)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will this cause a break for users with an older Viceroy version?

Copy link
Member Author

@fgsch fgsch Oct 10, 2023

Choose a reason for hiding this comment

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

Yes, it will if they have a specific (old) version pinned down somehow.

I say pinned down because Viceroy 0.9.0, the version that contains this change, was released yesterday, and the CLI update mechanism should have updated Viceroy by the time a CLI release includes the compute serve --profile-guest parameter.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah yes, #1019 was merged but hasn't actually been published in a release yet.

So this PR doesn't break anything because the thing it changes hasn't yet been released.

So by the time we cut a new CLI release, most users will have the newer version of Viceroy installed.

As for users who have an older Viceroy pinned, I think you could update the --profile-guest flag description to state that the flag is for Viceroy 0.9.1+.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea. Thank you. Updated.

if opts.verbose {
text.Info(opts.out, "Saving per-request profiles to %s.", directory)
}
Expand Down
Loading