compose/pkg
Nicolas De Loof 0d206e6704 fix(compose): move the job-target refusal into projectOrName itself
The previous fix only covered create/start. projectOrName backs every
other service-targeting command too (stop, kill, pause, unpause, logs,
rm, down, ps, events), so they still surfaced the same two problems: a
raw "no such service" error for a job name, and -- when
COMPOSE_PROJECT_NAME is set -- a silent no-op, since projectOrName's
label-driven fallback swallows the load error entirely.

Fold the check into projectOrName so every caller is fixed at once,
instead of duplicating the wiring per command. start.go's own
job-handling code, now redundant, is removed; jobTargetErr and
unselectedJobs (cmd/compose/run.go) are unchanged, just called from one
more place.

Adds unit coverage for projectOrName itself (including the
COMPOSE_PROJECT_NAME path and the typo-correlation edge case) and e2e
coverage for two more callers (stop, down) to confirm the fix lives in
the shared helper rather than being re-implemented per command.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-09-21 16:35:20 +02:00
..
api build(deps): adopt compose-go jobs and the container-spec layering 2026-09-21 16:35:20 +02:00
bridge build(deps): adopt compose-go jobs and the container-spec layering 2026-09-21 16:35:20 +02:00
compose fix(compose): adapt relay/start tests to the container-spec layering 2026-09-21 16:35:20 +02:00
dryrun fix(dry-run): commit no longer creates a real image; the interception set becomes declarative 2026-09-16 13:44:21 +02:00
e2e fix(compose): move the job-target refusal into projectOrName itself 2026-09-21 16:35:20 +02:00
mocks PRIVATE_PORT optional for docker compose port 2026-09-11 11:35:18 +02:00
remote golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00
utils fix: make e2e tests pass reliably locally with Docker Desktop 2026-05-18 10:55:41 +02:00
watch golangci-lint: enable perfsprint linter 2026-09-10 10:25:34 +02:00