spin icon indicating copy to clipboard operation
spin copied to clipboard

Handle versioned interfaces

Open radu-matei opened this issue 3 years ago • 6 comments

There should be a clean way for users to target a specific Spin trigger interface, and for the runtime to select the versioned interface to execute a guest module.

radu-matei avatar Feb 06 '22 21:02 radu-matei

I predict this is going to be a problem very soon after open sourcing.

lann avatar Mar 22 '22 18:03 lann

Why soon after open sourcing? I was thinking we needed to fix this as we approach the first stable release, at v1. Then, when we introduce v2, we'd need to make sure we can safely execute v1 components.

radu-matei avatar Mar 22 '22 19:03 radu-matei

We can't make any backward-incompatible changes to an interface (including things as simple as reordering struct fields I think) without running into this right?

lann avatar Mar 22 '22 19:03 lann

That is correct, if we make any changes to anything in the interface, all components targeting it would have to be rebuilt.

The main question here is less related avoiding breaking changes this early on, and more to making sure the configuration is structured such that we can introduce the versioned objects at some point.

One option this could go is: at some point we decide on V1 for the current interfaces, and tag the current corresponding executors as V1 as well. If we want to make any backwards incompatible change, we start V2 for both interfaces and executors, and, if everything went as expected, we could run V1 and V2 components side-by-side.

(one big thing here is that even for V1 executors, we will need to keep the Wasmtime versions in sync for us to be able to run them in the same Cargo project.)

Is this aligned with what you were thinking about?

radu-matei avatar Mar 24 '22 04:03 radu-matei

Yeah, I think this plays into a larger theme of stability guarantees. We should be explicit about how (un)stable these interfaces are.

lann avatar Mar 24 '22 12:03 lann

Removed "for entry points" from title as I envisage it being an issue for outbound interfaces too!

itowlson avatar Sep 22 '22 03:09 itowlson