compose2pod 0.1.1 — accept Compose extension fields
A patch release that stops rejecting valid compose documents which carry
Compose x- extension fields. The validator was over-strict: a top-level
x- block — the idiomatic place to hold a YAML anchor for reuse across
services — raised unsupported top-level keys. Such documents now convert.
Fix
- Compose
x-extension fields are accepted. Per the Compose spec, any
mapping key prefixedx-is user data that tools ignore.validate()now
skipsx--prefixed keys silently at every level it inspects — top level,
service, and healthcheck — instead of raising. The common pattern of holding
shared config in a top-levelx-*anchor block and merging it into services
(&anchor/<<:) works as-is: PyYAML resolves anchors and merge keys at
load time, and the leftover top-levelx-key no longer trips the validator.
Downstream
No action needed — additive and backward compatible. Documents that previously
failed with unsupported top-level keys: ['x-...'] now emit a pod script;
nothing that converted before changes.
Internals
- New
architecture/supported-subset.mdpins the authoritative accept / ignore
/ reject matrix (including thex-rule and the note that abuildsection
is accepted but never built — the--imagevalue is substituted). - 82 tests at 100% line coverage (enforced);
ruff select=ALL,ty, and
eof-fixerclean.