Open kate-goldenring opened 6 months ago
@dicej are we handling componentization in Spin differently for Python components in a way that we would need to port over to the shim?
Componentization (i.e. converting a module into a component) doesn't really enter into it in this case -- the binaries generated by componentize-py
already are components, so they don't need to be converted. I just ran the following to verify the correct magic number is present:
spin new pyapp -a -t http-py
cd pyapp
python3 -m venv .venv
source ../.venv/bin/activate
pip install -r requirements.txt
spin build
hexdump app.wasm|head
I also validated the file using wasm-tools
with no errors:
wasm-tools validate app.wasm
My guess is the shim is looking at the wrong file for some reason. There's certainly nothing Python-specific in Spin, and there's nothing unusal about the components that componentize-py
is producing, as demonstrated by wasm-tools validate
and spin up
.
I think it may have to do with improperly streaming chunks of the file in these changes. This file is over the 15MB chunk size -- its 15 MB. I'd bet we could reproduce this with other languages with larger file sizes
I remember testing ^^ back when it was merged — do you think this is a regression at some point? Or something else.
(regardless of whether it's because of those changes, a test for that would be really good)
I tested it with a 200 MB js spin app at the time. I am digging more deeply into the logs now
This might be the case for containerd-shim-spin as well: https://github.com/fermyon/feedback/issues/51#issuecomment-2058639070
I'm able to run an app using the 2.0.0
version of the python SDK using the shim.
Same, using 2.0 template is a workaround for me too
I just tested a Python app with the v3 SDK against a build of the shim that imports Spin v2.4.2 and it works. So once we cut a new release of the shim, this should be fixed.
The shim appears to not support python applications.
Repro
Debugging
Containerd logs
Fails at
failed to build spin trigger
And disabling precompilation surfaces better logs:
@dicej are we handling componentization in Spin differently for Python components in a way that we would need to port over to the shim?