Skip to content

Add image override variables for third-party services - #60

Merged
hannahhoward merged 1 commit into
mainfrom
feat/third-party-image-vars
Sep 27, 2026
Merged

hannahhoward merged 1 commit into
mainfrom
feat/third-party-image-vars

Conversation

@hannahhoward

Copy link
Copy Markdown
Contributor

Summary

  • Postgres, OpenBao, Redis, DynamoDB Local and smtp4dev now read POSTGRES_IMAGE, OPENBAO_IMAGE, REDIS_IMAGE, DYNAMODB_LOCAL_IMAGE and SMTP4DEV_IMAGE, with today's tag as each default. A benchmark host can pin them by digest from the environment instead of a compose override file.
  • With the variables unset, docker compose config output is byte-identical to main for every tracked manifest and for a mixed postgres+s3 / sqlite+filesystem manifest.
  • Setting each variable changes the image: of exactly the expected services and nothing else.

Deliverables

File Status Summary
systems/ingot/compose.yml Modified ingot-openbao, ingot-openbao-init read OPENBAO_IMAGE; ingot-postgres reads POSTGRES_IMAGE
systems/hilt/compose.yml Modified hilt-vault reads OPENBAO_IMAGE; hilt-postgres reads POSTGRES_IMAGE
systems/upload/compose.yml Modified postgres reads POSTGRES_IMAGE
systems/swarf/compose.yml Modified swarf-postgres reads POSTGRES_IMAGE
systems/plc/compose.yml Modified plc-postgres reads POSTGRES_IMAGE
systems/common/compose.yml Modified dynamodb-local reads DYNAMODB_LOCAL_IMAGE; email reads SMTP4DEV_IMAGE
systems/indexing/indexer/compose.yml Modified redis reads REDIS_IMAGE
pkg/generate/compose.go Modified piri-postgres and piri-postgres-init emit ${POSTGRES_IMAGE:-postgres:16-alpine}
pkg/generate/generate_test.go Modified Asserts the generated postgres services use the interpolated image
images_test.go New Pins each third-party service to its variable and default; fails if any image in the root stack has no override variable
.env Modified Commented "Third-party" block listing the variables

Test plan

  • go vet ./... and go test ./...: 6 packages ok (4 without test files), 0 failures.
  • New tests fail against main's compose files (checked by restoring systems/common/compose.yml from main: TestIncludedComposeImagesAreInterpolated reports dynamodb-local and email).
  • Render diff: go run ./cmd/smelt generate then docker compose config (Compose 2.31) for smelt.yml, manifests/piri-1-postgres-filesystem.yml and a mixed two-node manifest, on main and on this branch, variables unset: 3/3 identical.
  • Per variable, set to a dummy ref, compared with the unset render; only image: lines differ:
Variable Services changed
POSTGRES_IMAGE hilt-postgres, ingot-postgres, piri-postgres, piri-postgres-init, plc-postgres, postgres, swarf-postgres
OPENBAO_IMAGE hilt-vault, ingot-openbao, ingot-openbao-init
REDIS_IMAGE redis
DYNAMODB_LOCAL_IMAGE dynamodb-local
SMTP4DEV_IMAGE email
  • No shell scripts touched, so no shellcheck run applies.

Decisions taken where the spec was silent

  • Names are unprefixed (POSTGRES_IMAGE, not SMELT_POSTGRES_IMAGE) to follow the existing <NAME>_IMAGE convention in .env. A SMELT_ prefix would avoid collisions with a variable already set in a developer's shell; maintainers may prefer it.
  • systems/telemetry/compose.yml keeps its literal tags: it is not included by the root compose.yml, and the new guard test covers only the root stack.
  • The .env block also lists MINIO_IMAGE, which the stack already reads but .env did not mention.
  • If the open central-OpenBao PR (feat: central vault ingot unlocks against #37) lands first, its OpenBao service should take OPENBAO_IMAGE too; the guard test will flag it.

🤖 Generated with Claude Code

Postgres, OpenBao, Redis, DynamoDB Local and smtp4dev were literal tags
that float, so a benchmark host could not pin them without a compose
override file. Each now reads a <NAME>_IMAGE variable, following the
existing PIRI_IMAGE and MINIO_IMAGE convention, with the current tag as
the default. With the variables unset, docker compose config renders
byte-identical output. The generator emits the same form for
piri-postgres and piri-postgres-init, and .env lists the new variables.

Tests pin each service to its variable and fail if any image in the
root stack lacks an override variable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hannahhoward
hannahhoward marked this pull request as ready for review September 27, 2026 15:35
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@hannahhoward
hannahhoward merged commit ae57d44 into main Sep 27, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant