Host target environment TOMLs in git instead of registry#3508
Merged
Conversation
Collaborator
Author
|
I know this needs work on error messages and stuff but I want to agree the approach and iron out any other concerns before I invest too much time in those! |
f8d4d9f to
5d8d66e
Compare
karthik2804
reviewed
May 13, 2026
Comment on lines
740
to
+747
| pub enum TargetEnvironmentRef { | ||
| /// Environment definition doc reference e.g. `spin-up:3.2`, `my-host`. This is looked up | ||
| /// in the default environment catalogue (registry). | ||
| DefaultRegistry(String), | ||
| /// An environment definition doc in an OCI registry other than the default | ||
| Registry { | ||
| /// Registry or prefix hosting the environment document e.g. `ghcr.io/my/environments`. | ||
| registry: String, | ||
| /// Environment definition document name e.g. `my-spin-env:1.2`. For hosted environments | ||
| /// where you always want `latest`, omit the version tag e.g. `my-host`. | ||
| id: String, | ||
| /// in the default environment catalogue (the `spin-environments` repo, `env` directory). | ||
| Catalogue(String), | ||
| /// An environment definition doc HTTP URL | ||
| Http { | ||
| /// The environment document URL e.g. `https://github.com/me/environments/blob/main/target-envs/spin-up.3.6.toml`. | ||
| url: String, |
Contributor
There was a problem hiding this comment.
This is a breaking change right?
Collaborator
Author
There was a problem hiding this comment.
Yes, explicit registry refs will break. I can either put them back or we can roll this into a 4.0.1 and pretend it's part of the 4.0 family of breaking changes.
Default registry refs will NOT break because all existing default registry envs will be in the repo, and I translate syntax for compatibility.
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
5d8d66e to
b794927
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the underlying code for #3504.
The corresponding Git repo is https://github.com/spinframework/spin-environments.
bikeshed go brrr