Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions planning/releases/0.1.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# compose2pod 0.1.7 — variable interpolation

A patch release resolving Compose-spec `${VAR}` variable interpolation
against the process environment. Previously, a compose file using `${VAR}`
reached the container as the literal placeholder text — `shlex.quote`
correctly single-quoted the value for safe script embedding, which also
meant the shell never expanded it, so nothing in the pipeline ever
substituted the real value. Compose files that lean on host/CI environment
values now convert and run correctly, matching `docker compose`.

## Fix

- **`${VAR}`-style interpolation is resolved.** Every string leaf of the
compose document is checked against `os.environ` before validation: `$VAR`,
`${VAR}`, `${VAR:-default}`, `${VAR-default}`, `${VAR:?msg}`, `${VAR?msg}`,
`${VAR:+alt}`, `${VAR+alt}`, and `$$` (literal `$`) are all supported. An
unset `$VAR`/`${VAR}` with no default resolves to an empty string and
prints a warning rather than failing; `${VAR:?msg}`/`${VAR?msg}` raises a
clear error instead of silently defaulting.

## Downstream

No action needed — additive and backward compatible. A document with no
`$`-prefixed values is unaffected; one that already relied on the previous
literal pass-through (unlikely, since it's not useful behavior) would now see
the resolved value instead.

## Internals

- `architecture/supported-subset.md` documents the supported interpolation
forms and the explicit non-goal: no `.env` file loading, only the caller's
existing environment is consulted.
- 123 tests at 100% line coverage (enforced); `ruff select=ALL`, `ty`, and
`eof-fixer` clean.