Expand description
One-way, lossy compose YAML → WorkloadSpec import shim.
Best-effort translation of a docker-compose v3 file into a set of
WorkloadSpec values, one per compose service. The output may need
hand-editing — compose’s expressiveness exceeds ours by design and we lose
the parts we don’t want. This shim is for one-time migration, not
round-trip authoring.
Lossy areas (each emits an ImportWarning keyed by compose path):
network_mode: host→ rejected asImportError::HostNetwork.build:blocks → ignored with warning (“build externally; provide animage:reference”).- Custom networks → flattened to the mesh; warns when topology can’t be preserved.
- Bind volumes → echoed as warning that yubaba requires
tier = "infra"(the importer auto-promotes the spec’s tier when bind mounts are present so the result still passes shape validation). - Healthcheck blocks → noted as warning; not translated in V1 (compose’s syntax is rich enough to deserve its own pass).
See .yah/docs/architecture/A054-yah-workload-spec.md §“Compose-import shim” for
the design contract.
Structs§
- Import
Result - Output of
import_compose. - Import
Warning - A non-fatal lossy translation noted during import.
Enums§
- Import
Error - A hard rejection during import.
Functions§
- import_
compose - Parse a compose v3 YAML string into a set of
WorkloadSpecvalues.