Skip to content

Conversation

@itowlson
Copy link
Collaborator

Fixes #3360.

I tested this against wkg oci push:

$ wkg oci push ghcr.io/itowlson/v3vanilla40:1 ./target/wasm32-wasip2/release/v3vanilla40.wasm
$ spin up -f ghcr.io/itowlson/v3vanilla40:1

Note that I've only tested to the "hello world" level: if we believe we need to try this on a wider range of binaries then let's chat about desirable test coverage. I'm also not sure if there's a good way to automate testing - open to advice!

It would be nice to also do it for proper packages (wkg publish) but that's probably going to need a bit more investigation and thinky-designy-sort-of-work.

.with_context(|| format!("OCI config {} is not JSON", quoted_path(&lockfile_path)))?;

if locked_json.get("spin_lock_version").is_some() {
let mut locked_app = LockedApp::from_json(&locked_content).with_context(|| {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This chunk (to line 89) has not changed from line 51ff in the existing code: it has just moved down and been indented because of going inside the "is it a LockedApp" check. If I've made this function too long and/or intricate (as I strongly suspect I have), yell at me and I'll split the arms of the if into separate helpers.

Copy link
Contributor

@kate-goldenring kate-goldenring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but it would be great to add an integration test for this.

@itowlson itowlson force-pushed the oci-bare-wasm-packages branch from 651813b to 0e0a3c9 Compare November 24, 2025 18:42
@itowlson itowlson force-pushed the oci-bare-wasm-packages branch 2 times, most recently from 972ce24 to 263b318 Compare November 24, 2025 21:17
@itowlson itowlson force-pushed the oci-bare-wasm-packages branch from 263b318 to fd6022f Compare November 24, 2025 22:00
@itowlson
Copy link
Collaborator Author

@kate-goldenring integration test added (although right now it is going about as well as you'd expect, fie)

@itowlson itowlson enabled auto-merge November 24, 2025 22:42
@itowlson itowlson merged commit a9b418d into spinframework:main Nov 24, 2025
17 checks passed
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

Successfully merging this pull request may close these issues.

Support running components that export wasi:http/incoming-handler from registry

5 participants