fix(run): default service version to registry default; add ministack#366
Open
abezzub-dr wants to merge 4 commits into
Open
fix(run): default service version to registry default; add ministack#366abezzub-dr wants to merge 4 commits into
abezzub-dr wants to merge 4 commits into
Conversation
Service dependencies declared without an explicit version (e.g. `ministack` rather than `ministack@latest`) produced an empty image tag, so the runtime rejected the reference with "invalid reference format". buildServiceConfig now falls back to the registry `default`, matching the Dockerfile/install resolution paths (deps.resolve, dockerfile, script, builder). Also add the `ministack` service registry entry. Its readiness command uses python (the image ships no curl/wget) against /_ministack/health, mirroring the image's own Docker HEALTHCHECK.
- Bound the ministack readiness probe with timeout=2 so a stalled connection cannot consume the full 30s readiness window in one attempt. - Add ministack to the Available services and readiness-checks tables. - Add a registry smoke test for ministack covering image, port, env prefix, readiness, and default version. - Use require.True for the GetSpec ok return in the services test for a clearer failure message.
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.
Summary
Two fixes surfaced while wiring up ministack service support.
1. Empty image tag for versionless service deps
A service dependency declared without an explicit version (e.g.
ministackinstead ofministack@latest) leftServiceConfig.Versionempty, so the image reference was built asrepo:— which both runtimes reject withinvalid reference format.buildServiceConfignow falls back to the registrydefault, matching every other version-resolution path (deps.resolve,dockerfile,script,builder). The services path was the lone copy missing this fallback, and it's also the only path that turns a version into a container image tag — which is why versionless runtimes/meta deps (pnpm,cli-essentials) never hit it.Covered by
TestBuildServiceConfigDefaultsVersion.2. ministack registry entry + readiness command
Added the
ministackservice entry. The readiness command usespython3(the image ships nocurl/wget) against/_ministack/health, mirroring the image's own Docker HEALTHCHECK. Verified by running the image directly.Test plan
go test ./internal/run/ ./internal/deps/— passministackorg/ministack:latest: confirmedcurl/wgetabsent,python3present,/_ministack/healthreturns 200, and the readiness command exits 0 viash -c.Notes / follow-ups (not in this PR)
services.<name>.imageoverride is documented (02-moat-yaml.md) but not wired intobuildServiceConfig(onlyspec.Service.Imageis read). Separate pre-existing bug.🤖 Generated with Claude Code