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

Push component to registry #2536

Open
itowlson opened this issue May 30, 2024 · 5 comments
Open

Push component to registry #2536

itowlson opened this issue May 30, 2024 · 5 comments

Comments

@itowlson
Copy link
Contributor

itowlson commented May 30, 2024

Spin recently added experimental support for sourcing a component's Wasm from a registry. However, you can't yet upload such a component using spin registry push: you have to use a specific oras incantation. It would be good to have an end-to-end story around this.

One possible way of doing this is to extend the use of the -f flag to accept a Wasm file, as spin up now allows. Thus spin registry push ghcr.io/itowlson/fileserver:1.0.0 -f ./target/wasm32-wasi/release/fileserver.wasm would upload a single Wasm blob, which could then be reused via [component] source = { registry = "ghcr.io", package = "itowlson/fileserver", version = "1.0.0" }.

A risk here is confusion over whether "push a component" pushes the fully configured component or just the Wasm blob. Referencing a file hopefully makes that clear.

On the other hand, it's also arguably not something Spin needs to be involved in, because that could be any Wasm file, it doesn't have to be a Spin component. There should be and, and undoubtedly soon will be, other and more general tooling for that. Anyway jotting it down as a ponderable.

@lann

This comment was marked as resolved.

@radu-matei
Copy link
Member

Given that Spin can reference a single Wasm blob from a registry, it does make sense to me to enable pushing that to a registry using Spin; even if we do believe that tooling will evolve, until such tool is widespread across languages, I feel pretty strongly that Spin should provide this functionality.

@lann
Copy link
Collaborator

lann commented Jun 24, 2024

We could maybe reduce confusion by type-checking that the file implements a spin up-able component before pushing.

@radu-matei
Copy link
Member

@lann is that in the context of #2556?

@lann
Copy link
Collaborator

lann commented Jun 24, 2024

@lann is that in the context of #2556?

Sure!

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

No branches or pull requests

3 participants