bytecodealliance / wasm-pkg-tools

Apache License 2.0
62 stars 13 forks source link

I'm able to push a wasm package with invalid semver tag #69

Closed asteurer closed 2 months ago

asteurer commented 4 months ago

I pushed a .wasm binary to an OCI registry, and used "canary" as the tag. The package pushed without any issues; however, when I attempted to pull and build the package, I get an invalid semver error. It would be helpful to have wkg throw an error when creating the package when we use invalid semvar.

Here's the command I used to push:

wkg oci push ghcr.io/mypackage:canary main.wasm

We are using the wasm_pkg_loader::Client::get_release to pull and build the image.

Tagging @itowlson just in case I missed something.

itowlson commented 4 months ago

To clarify, we are using get_release to pull the image, not to build it.

I checked the new wasm_pkg_client::Client::get_release function and it still requires that the version be semver.

thomastaylor312 commented 4 months ago

@asteurer I think this will definitely be something we do when we implement wkg publish. The wkg oci commands are meant to be more flexible, particularly because you could be pushing a deployment artifact (which could rightly need to be tagged as canary)

thomastaylor312 commented 2 months ago

This should be validated in wkg publish when pushing now. There must be a version set and it must be valid semver