Skip to content

Commit c8ffea8

Browse files
waleedlatif1claude
andcommitted
fix(supply-chain): retry absence too, so a slow alias is not mistaken for a missing one
digest_of accepted "manifest unknown" on the first attempt. GHCR can report a just-published alias as unknown for a moment, and taking that at face value would skip a tag this run did publish — leaving it unsigned while the workflow went green, which is the failure the retry existed to prevent. Absence is now retried like any other failure and only accepted when the registry still says so on the final attempt. Docs: - The LM Studio steps recreated services with docker-compose.ollama.yml, a development stack a production install does not run. They now use the file that started the installation. - Retention is not external work: its cleanup runs inline in the app process, and only data drains hand off to a background job. The endpoints start both, which is what the sentence should have said. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015BwsJTEQRzWJaY4BRCkPZt
1 parent bac091e commit c8ffea8

3 files changed

Lines changed: 15 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -673,20 +673,26 @@ jobs:
673673
# "absent" when the registry actually says the manifest is unknown.
674674
# Anything else fails the step.
675675
digest_of() {
676-
local ref="$1" attempt raw err
676+
local ref="$1" attempt raw err absent=0
677677
for attempt in 1 2 3; do
678678
if raw="$(docker buildx imagetools inspect "$ref" --format '{{json .Manifest}}' 2>/tmp/inspect.err)"; then
679679
printf '%s' "$raw" | jq -r '.digest // empty'
680680
return 0
681681
fi
682682
err="$(cat /tmp/inspect.err)"
683+
# Absence is retried like any other failure: GHCR can report a
684+
# just-published alias as unknown for a moment, and accepting that
685+
# on the first attempt would skip a tag this run did publish.
683686
case "$err" in
684-
*"not found"*|*MANIFEST_UNKNOWN*|*"no such manifest"*|*"NAME_UNKNOWN"*)
685-
return 0
686-
;;
687+
*"not found"*|*MANIFEST_UNKNOWN*|*"no such manifest"*|*"NAME_UNKNOWN"*) absent=1 ;;
688+
*) absent=0 ;;
687689
esac
688690
sleep "$((attempt * 3))"
689691
done
692+
# Only call it absent if the registry said so on the final attempt.
693+
if [ "$absent" -eq 1 ]; then
694+
return 0
695+
fi
690696
echo "::error::Could not inspect ${ref} after 3 attempts: ${err}" >&2
691697
return 1
692698
}

apps/docs/content/docs/platform/enterprise/self-hosted.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ See [Sandboxes](/platform/self-hosting/sandboxes) for the provider credentials,
6969

7070
## Schedule the background jobs
7171

72-
Two enterprise features do their work from a cron-driven HTTP endpoint rather than from the app process. All four endpoints authenticate with a bearer token equal to `CRON_SECRET`, and all four return `401` when it is unset:
72+
Two enterprise features are started by a cron-driven HTTP endpoint rather than by the app on its own schedule. What happens next differs: retention's cleanup runs inline in the app process, while each due data drain is handed to a background job. All four endpoints authenticate with a bearer token equal to `CRON_SECRET`, and all four return `401` when it is unset:
7373

7474
```bash
7575
openssl rand -hex 32

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,11 @@ 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:
65+
6466
```bash
65-
docker compose -f docker-compose.ollama.yml up -d --force-recreate simstudio
66-
docker compose -f docker-compose.ollama.yml exec simstudio printenv VLLM_BASE_URL
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
6769
```
6870

6971
An empty result means the variable never reached the container, and model discovery cannot run.

0 commit comments

Comments
 (0)