feat(compute): add install-viceroy command to pre-install Viceroy#1833
Open
mschfh wants to merge 1 commit into
Open
feat(compute): add install-viceroy command to pre-install Viceroy#1833mschfh wants to merge 1 commit into
mschfh wants to merge 1 commit into
Conversation
8749b02 to
beef7c1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 explicitfastly compute install-viceroycommand that downloads andinstalls 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 serveand the new command call it, so every version/overridemechanism (the manifest's
[local_server] viceroy_version,FASTLY_VICEROY_USE_PATH)applies identically during a pre-install.
ServeCommand.GetViceroyis now a thinwrapper, so behavior is unchanged.
This is intentionally simpler than #1805 (which embeds binaries into the CLI binary).
All Submissions:
New Feature Submissions:
Changes to Core Features:
User Impact
A new
fastly compute install-viceroycommand lets users (and the containerimages) pre-install Viceroy ahead of time, so
compute servecan start withoutneeding to download it. No change to existing behavior -
compute servestillinstalls 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.