diff --git a/planning/releases/0.1.7.md b/planning/releases/0.1.7.md new file mode 100644 index 0000000..857c6b0 --- /dev/null +++ b/planning/releases/0.1.7.md @@ -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.