Skip to content

Push component to registry #2536

Open
Open
@itowlson

Description

@itowlson

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions