Skip to content

feat(compute): add install-viceroy command to pre-install Viceroy#1833

Open
mschfh wants to merge 1 commit into
fastly:mainfrom
mschfh:viceroy-install
Open

feat(compute): add install-viceroy command to pre-install Viceroy#1833
mschfh wants to merge 1 commit into
fastly:mainfrom
mschfh:viceroy-install

Conversation

@mschfh

@mschfh mschfh commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Change summary

The container images (Dockerfile-go, Dockerfile-node, Dockerfile-rust) re-download Viceroy on each container start (raised in #1828 (review)), this PR adds an explicit fastly compute install-viceroy command that downloads and
installs the Viceroy local-testing binary.

Implementation

Rather than duplicate the download logic, the existing installer was extracted out into a shared viceroyInstaller (pkg/commands/compute/viceroy.go).

Both compute serve and the new command call it, so every version/override
mechanism (the manifest's [local_server] viceroy_version, FASTLY_VICEROY_USE_PATH)
applies identically during a pre-install. ServeCommand.GetViceroy is now a thin
wrapper, so behavior is unchanged.

This is intentionally simpler than #1805 (which embeds binaries into the CLI binary).

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  • Does your submission pass tests?

Changes to Core Features:

  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

User Impact

A new fastly compute install-viceroy command lets users (and the container
images) pre-install Viceroy ahead of time, so compute serve can start without
needing to download it. No change to existing behavior - compute serve still
installs Viceroy on demand if it isn't already present.

Are there any considerations that need to be addressed for release?

None. No breaking changes - the command is purely additive and the shared
extraction keeps compute serve's install path identical.

@mschfh mschfh force-pushed the viceroy-install branch 3 times, most recently from 8749b02 to beef7c1 Compare June 25, 2026 07:27
@mschfh mschfh force-pushed the viceroy-install branch from beef7c1 to 84bb5c1 Compare June 25, 2026 07:34
@mschfh mschfh marked this pull request as ready for review June 25, 2026 07:45
@mschfh mschfh requested a review from a team as a code owner June 25, 2026 07:45
@mschfh mschfh requested a review from rcaril June 25, 2026 07:45
@mschfh mschfh mentioned this pull request Jun 25, 2026
2 tasks
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.

1 participant