Skip to content

Commit ce7b3c2

Browse files
waleedlatif1claude
andcommitted
fix(supply-chain): fail a release whose version tag is not this run's index
`latest` is allowed to lag — the monotonic guard holds it back when the branch has moved on, and it then belongs to an older run that already attested it. A version tag has no such carve-out: this run published it, so a mismatch now fails rather than skipping, and a release can no longer ship a version image nothing has attested. The device-plugin mirror path was ambiguous. `sim.image` prepends the registry to the repository verbatim, so the plugin lands at `<registry>/nvcr.io/nvidia/k8s-device-plugin` — an operator who mirrored it without the embedded host would get ImagePullBackOff. The inventory now states the destination rule and offers the direct repository override for registries that cannot nest that path. Docs: - doctor needs no root .env from a source checkout; that guidance was Compose-specific. - The LM Studio commands hardcoded the production Compose file after the last round, which breaks an install started from the Ollama stack. They now take the file as a variable. - NODE_EXTRA_CA_CERTS does fix an incomplete chain by supplying the missing intermediate; only expiry and clock drift are beyond it. The section had ruled it out for all three. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015BwsJTEQRzWJaY4BRCkPZt
1 parent c8ffea8 commit ce7b3c2

4 files changed

Lines changed: 34 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,8 +744,17 @@ jobs:
744744
for alias in $alias_groups; do
745745
alias_index="$(digest_of "${image}:${alias}")"
746746
if [ "$alias_index" != "$sha_index" ]; then
747-
echo "Skipping ${alias}* for ${image}: it does not point at this run's index."
748-
continue
747+
# `latest` is legitimately allowed to lag: the monotonic guard in
748+
# create-ghcr-manifests holds it back when the branch has moved
749+
# on, and it then belongs to an older run that attested it.
750+
if [ "$alias" = "latest" ]; then
751+
echo "Skipping latest* for ${image}: it does not point at this run's index."
752+
continue
753+
fi
754+
# A version tag has no such carve-out. This run published it, so
755+
# a release must not ship a version image nothing has attested.
756+
echo "::error::${image}:${alias} does not resolve to this run's index (${sha_index:-none}); refusing to publish an unattested release image"
757+
exit 1
749758
fi
750759
for tag in "${alias}" "${alias}-amd64" "${alias}-arm64"; do
751760
digest="$(digest_of "${image}:${tag}")"

apps/docs/content/docs/platform/self-hosting/troubleshooting.mdx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ npx sim-setup doctor --fix # repair what it safely can
1313
npx sim-setup doctor --json # machine-readable, for CI
1414
```
1515

16-
Run it from the directory holding your `.env` and Compose file. It exits `1` if anything failed, so it drops straight into a script. See [Verify Your Install](/platform/self-hosting/verify#sim-setup-doctor) for what each group of checks covers.
16+
On a standalone Compose install, run it from the directory holding your `.env` and Compose file. From a source checkout, run it there — it resolves the per-application env files itself and needs no root `.env`. It exits `1` if anything failed, so it drops straight into a script. See [Verify Your Install](/platform/self-hosting/verify#sim-setup-doctor) for what each group of checks covers.
1717

1818
## Database connection failed
1919

@@ -61,11 +61,12 @@ Sim identifies dynamically discovered LM Studio and vLLM models by their `vllm/`
6161

6262
1. Set `VLLM_BASE_URL`, and `VLLM_API_KEY` too if you enabled LM Studio's API authentication — without the key, discovery requests omit the bearer token and fail. No Compose file sets either for you — `docker-compose.ollama.yml` only sets `OLLAMA_URL` — so add them to the `simstudio` service's `environment:` block (or to `.env` and interpolate them), then recreate the service and confirm it landed:
6363

64-
Use the Compose file that started your installation — `docker-compose.prod.yml` for the documented production setup:
64+
Use the Compose file that started your installation — `docker-compose.prod.yml` for the documented production setup, or `docker-compose.ollama.yml` if you started from the Ollama stack:
6565

6666
```bash
67-
docker compose -f docker-compose.prod.yml up -d --force-recreate simstudio
68-
docker compose -f docker-compose.prod.yml exec simstudio printenv VLLM_BASE_URL
67+
COMPOSE_FILE=docker-compose.prod.yml # or docker-compose.ollama.yml
68+
docker compose -f "$COMPOSE_FILE" up -d --force-recreate simstudio
69+
docker compose -f "$COMPOSE_FILE" exec simstudio printenv VLLM_BASE_URL
6970
```
7071

7172
An empty result means the variable never reached the container, and model discovery cannot run.
@@ -118,9 +119,11 @@ image: pgvector/pgvector:pg17 # NOT postgres:17
118119
119120
## Certificate errors (CERT_HAS_EXPIRED)
120121
121-
Rule out the ordinary causes first: the endpoint's certificate really has expired, its chain is incomplete, or the host's clock has drifted far enough to put a valid certificate outside its window. Check the certificate and the host date before changing any trust configuration — `NODE_EXTRA_CA_CERTS` does not fix any of them.
122+
Rule out expiry and clock drift first: the endpoint's certificate may genuinely have expired, or the host's clock may have drifted far enough to put a valid certificate outside its window. Check the certificate dates and the host date before changing any trust configuration — no CA bundle fixes either.
122123
123-
If the certificate is valid and current, the endpoint is presenting one signed by a private CA — a corporate TLS-inspecting proxy, or an internal service. The image already ships current CA certificates and runs as a non-root user, so installing packages inside it is not the fix. Mount your CA bundle and point Node at it:
124+
That leaves two cases a bundle does address: the endpoint is signed by a private CA — a corporate TLS-inspecting proxy, or an internal service — or it serves an incomplete chain, omitting an intermediate. Adding the private root, or the missing intermediate, to `NODE_EXTRA_CA_CERTS` resolves both, though repairing the server's chain is the better fix when it is yours to repair.
125+
126+
In either case, the image already ships current CA certificates and runs as a non-root user, so installing packages inside it is not the fix. Mount your CA bundle and point Node at it:
124127

125128
```yaml
126129
# docker-compose.prod.yml

helm/sim/images.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
# rewrites the `simstudioai/*` images, leaving the third-party ones pointing at
1010
# their public registries. Pin each image's `digest` to what your mirror
1111
# resolved.
12+
#
13+
# Mirror to `<your-registry>/<reference exactly as listed below>`. The chart
14+
# prepends your registry to the repository verbatim, so the device plugin lands
15+
# at `<your-registry>/nvcr.io/nvidia/k8s-device-plugin` — the `nvcr.io/`
16+
# segment is part of the path, not a source host to strip. If your registry
17+
# cannot nest that path, override the one image directly instead:
18+
# `ollama.gpu.devicePlugin.image.repository=<your-registry>/nvidia/k8s-device-plugin`.
1219
appVersion: v0.8.18
1320
images:
1421
- busybox:1.36

scripts/generate-image-manifest.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,13 @@ export function renderManifest(input: { appVersion: string; images: readonly str
101101
# rewrites the \`simstudioai/*\` images, leaving the third-party ones pointing at
102102
# their public registries. Pin each image's \`digest\` to what your mirror
103103
# resolved.
104+
#
105+
# Mirror to \`<your-registry>/<reference exactly as listed below>\`. The chart
106+
# prepends your registry to the repository verbatim, so the device plugin lands
107+
# at \`<your-registry>/nvcr.io/nvidia/k8s-device-plugin\` — the \`nvcr.io/\`
108+
# segment is part of the path, not a source host to strip. If your registry
109+
# cannot nest that path, override the one image directly instead:
110+
# \`ollama.gpu.devicePlugin.image.repository=<your-registry>/nvidia/k8s-device-plugin\`.
104111
appVersion: ${input.appVersion}
105112
images:
106113
${entries}

0 commit comments

Comments
 (0)