Skip to content

Commit 1d4ecf3

Browse files
committed
fix: keep reading initial_image, without documenting it
Systems in the field still carry the pre-2025-10 name, so app-init.sh reads it again as a fallback. It stays out of the schema and out of the docs: one documented key, not two spellings to choose between. #include is written as an array everywhere in the docs.
1 parent a6b67f3 commit 1d4ecf3

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

‎docs/common/cuos-app-init.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Setting `init_image` yourself replaces it:
3232

3333
```json
3434
{
35-
"#include": "cuos-release/release.json",
35+
"#include": ["cuos-release/release.json"],
3636
"init_image": "your-registry/your-app",
3737
"init_image_version": "1.2.3",
3838
"init_image_digest": "sha256:..."

‎docs/quickstart.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ checkouts, which is where `output/` appears.
5454
Place it beside the two checkouts, as `system.json`.
5555

5656
> Tip: For production pin versions & use digests — or
57-
> `"#include": "cuos-release/release.json"`, which pins them for you. It also
57+
> `"#include": ["cuos-release/release.json"]`, which pins them for you. It also
5858
> pins CuOS IaC as `init_image`, so leave that key out unless you bring your own
5959
> container — see
6060
> [Your Application Init Container](./common/cuos-app-init.md#cuos-iac-is-the-default-one).

‎system/cuos/app-init.sh‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,15 @@ fi
100100
init_dialogs
101101

102102
CONTAINER_NAME="cuos-app"
103-
if ! INITIAL_IMAGE="$(image_url "init")"; then
103+
# "initial_image" is the pre-2025-10 name and stays readable for systems in the
104+
# field that still carry it. It is deliberately absent from the schema and the
105+
# docs - not an alternative spelling to choose from.
106+
if ! INITIAL_IMAGE="$(image_url "init" || image_url "initial")"; then
104107
report_err "cuos:application:image_not_defined" "Application image not defined"
105108
action_on_failure
106109
fi
107110
INITIAL_IMAGE_VERSION="$(image_version "${INITIAL_IMAGE}")"
108-
INITIAL_DIGEST="$(jq -r '.init_image_digest // empty' "${CONFIG_PATH}")"
111+
INITIAL_DIGEST="$(jq -r '.init_image_digest // .initial_image_digest // empty' "${CONFIG_PATH}")"
109112

110113
LAST_INITIAL_IMAGE="$(docker inspect --format='{{.Config.Image}}' "${CONTAINER_NAME}" 2>/dev/null)" || true
111114
LAST_INITIAL_IMAGE_VERSION="$(image_version "${LAST_INITIAL_IMAGE}")" || true

0 commit comments

Comments
 (0)