Commit graph

5 commits

Author SHA1 Message Date
Nicolas De Loof
15553d9604 refactor(compose): share how a container is folded into a service
internal/projectloader and pkg/compose each rebuilt a service definition from the containers of a project with the same bootstrap and replica counting. Keep it in internal/projectloader and call it from both.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-29 11:59:43 +01:00
Nicolas De Loof
4d6f2dbff7 docs(projectloader): point the comments to the new home of the dependency wait
Some checks are pending
ci / validate (lint) (push) Waiting to run
ci / validate (relay-lint) (push) Waiting to run
ci / validate (relay-test) (push) Waiting to run
ci / validate (validate-docs) (push) Waiting to run
ci / validate (validate-go-mod) (push) Waiting to run
ci / validate (validate-headers) (push) Waiting to run
ci / validate (validate-mocks) (push) Waiting to run
ci / binary (push) Waiting to run
ci / binary-finalize (push) Blocked by required conditions
ci / bin-image-test (push) Waiting to run
ci / relay-image-test (push) Waiting to run
ci / test (push) Waiting to run
ci / e2e (plugin, oldstable, graphdriver) (push) Waiting to run
ci / e2e (standalone, oldstable, graphdriver) (push) Waiting to run
ci / e2e (plugin, stable, containerd) (push) Waiting to run
ci / e2e (plugin, stable, graphdriver) (push) Waiting to run
ci / e2e (standalone, stable, containerd) (push) Waiting to run
ci / e2e (standalone, stable, graphdriver) (push) Waiting to run
ci / coverage (push) Blocked by required conditions
ci / ci-ok (push) Blocked by required conditions
ci / release (push) Blocked by required conditions
merge / bin-image-prepare (push) Waiting to run
merge / bin-image (push) Blocked by required conditions
merge / relay-image (push) Waiting to run
merge / module-image (push) Waiting to run
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
zizmor / zizmor (push) Waiting to run
Two comments still located waitDependency's runtime fallback in
service_containers.go.

Comments only.

Part of #14081

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-27 12:23:43 +01:00
huang
06035c08f0 Apply review suggestions for the dotted service name fix
Unescape the remaining path in both branches and cover the
ports[].mode reporting path with a dotted service name.

Signed-off-by: huang <13165998033@163.com>
2026-10-26 12:05:06 +01:00
huang
12c1012334 fix(projectloader): unescape service names in unsupported attribute warnings
compose-go escapes a literal dot in a path segment as an internal
sentinel, and splitServicePath returned the raw segment. A service named
"my.service" was therefore reported as "my👻service" in warnings.

Unescape the segment with tree.Path(...).String().

Signed-off-by: huang <13165998033@163.com>
2026-10-26 12:05:06 +01:00
Nicolas De Loof
6698708752 refactor(projectloader): move project loading and generation to internal/projectloader
LoadProject and Generate (the api.ProjectLoader operations) need two things
from the engine: the Docker API, to read the containers a project is
generated from, and the Docker CLI, which resolves remote Compose files.

They now live in internal/projectloader, along with the unsupported
attributes detection only the loader uses, behind a Backend interface that
composeService implements in a new file of pkg/compose, like internal/inspect.
The tests move with the code; their assertions are unchanged, only the way
the service is built differs.

The canonical container name, which both this package and internal/inspect
need, moves to a tiny internal/naming package instead of being copied a
third time. pkg/compose keeps its own copy until the shared kernel is
extracted.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-13 10:03:53 +02:00