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

Precompilation breaks Spin applications distributed in scratch containers #31

Closed
radu-matei opened this issue Mar 8, 2024 · 2 comments · Fixed by #32
Closed

Precompilation breaks Spin applications distributed in scratch containers #31

radu-matei opened this issue Mar 8, 2024 · 2 comments · Fixed by #32
Labels
bug Something isn't working

Comments

@radu-matei
Copy link
Member

radu-matei commented Mar 8, 2024

Building a branch of #16 and running with the default sample for distributing apps in scratch containers, ghcr.io/deislabs/containerd-wasm-shims/examples/spin-rust-hello:v0.10.0:

$ ctr run --rm --net-host --runtime io.containerd.spin.v2 ghcr.io/deislabs/containerd-wasm-shims/examples/spin-rust-hello:v0.10.0 test shim.wasm

time="2024-03-08T12:29:33.665338975Z" level=info msg="found manifest with WASM OCI image format"

time="2024-03-08T12:29:33.665495766Z" level=info msg="precompiling layers for image: ghcr.io/deislabs/containerd-wasm-shims/examples/spin-rust-hello:v0.10.0"

The precompilation support assumes the content that should be precompiled is its own layer, which is not the case with Spin applications distributed as (actual) container images.

This raises two options:

  • only allow apps distributed with spin registry push to run with this version of the shim
  • not merge the precompilation support yet and figure out a way to opt out of precompilation

If we continue to support apps distributed in scratch containers, those will likely never support precompilation (or not without effort that I would argue is not necessary -- this is of course my opinion).

@radu-matei radu-matei added the bug Something isn't working label Mar 8, 2024
@endocrimes
Copy link

not merge the precompilation support yet and figure out a way to opt out of precompilation

this gets my vote - although I think it is probably worth the effort of supporting precompilation for them.

@radu-matei
Copy link
Member Author

Fix (by skipping precompilation for scratch containers) in #32.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants