Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

tschneidereit
Copy link
Contributor

@tschneidereit tschneidereit commented Aug 7, 2025

This SIP describes and motivates the functionality introduced in #2806.

Rendered

This SIP describes and motivates the functionality introduced in spinframework#2806.

Signed-off-by: Till Schneidereit <till@tillschneidereit.net>
@tschneidereit tschneidereit force-pushed the sip-validate-target-environment branch from ad2a273 to be389fb Compare August 7, 2025 09:57
Signed-off-by: Till Schneidereit <till@tillschneidereit.net>

Each entry in the list can be:
- A string that identifies an environment in the default registry (e.g., `"spin-up:3.3"`).
- A table with `registry` and `id` keys to identify an environment in a custom OCI registry.
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should permit wkg registry names (bare domain) here with the /.well-known/wasm-pkg/registry.json indirection.

Copy link
Collaborator

@lann lann Aug 8, 2025

Choose a reason for hiding this comment

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

Alternatively we could specify a slightly different syntax that implies this lookup, like

targets = ["my.org/my-env@1.0"]

This would look up the oci prefix at https://my.org/.well-known/wasm-pkg/registry.json and use it to construct an oci reference like ghcr.io/my-org/my-env:1.0. If we wanted to mechanically avoid conflicts between environments and regular wasm packages we could stick another substring in there e.g. ghcr.io/my-org/my-env:spin-env-1.0 or ghcr.io/my-org/spin-env/my-env:1.0 or something.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@lann These entries point to TOML documents not WIT documents. (The TOML documents then point onward to WIT documents, which are typically wkg package references.)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure; I'm suggesting that we could reuse the domain -> OCI mapping that wkg already implements to allow nicer specifications of targets from registries.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah sorry thanks for the clarification

Copy link
Collaborator

Choose a reason for hiding this comment

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

This feels like a convenience feature we could add without breaking back compat if the feature achieves traction? Or are we sufficiently confident that other folks will be publishing environment TOMLs that we need to offer this in the first drop?

Comment on lines +52 to +53
[triggers.redis]
worlds = ["spin:up/redis-trigger@3.2.0"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

This makes me wonder if we should accept e.g. { trigger_type = "redis", world = "spin:up/redis-trigger@3.2.0" } as a valid target.

Copy link
Collaborator

@lann lann Aug 8, 2025

Choose a reason for hiding this comment

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

I guess a slightly more verbose but flexible way to get the same effect would be allowing inline environment definitions. 🤷

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or maybe the target could be just the world reference? While that wouldn't have explicit trigger types those can be sort of inferred from the manifest itself. 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

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

@lann I am wary of that for two reasons:

  1. It breaks down as soon as multi-trigger-type enters play - you find yourself needing to infer which world corresponds to which trigger type. We tried that and it was terrible.
  2. It breaks the "I want to make sure I can deploy to..." abstraction. The goal here is for the developer to say "I want this to run on Wasmtime 35, Spin 3.2, and SpinKube 3.1." If I want to target spin:up/http-trigger@3.2.0, and figure out for myself whether that's compatible with SpinKube 3.1, then I have the tools to do that. The idea is to take care of "knowing which worlds a host supports" for you.

I'm not opposed to inline environments as an escape hatch, but I'd like them to be defined in the same way as other environments, and at that point I don't see a vast amount of value compared to putting them in a my-environment.toml file.

@itowlson
Copy link
Collaborator

@lann There's a couple of conversation chains here that end with me saying "could we not, or at least not now." Do those remain concerns for you, or is it okay to merge as is, and iterate on improvements as the spirit moves us?

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.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.