fix(tooler): detect both legacy docker-compose and the docker cli compose plugin#126
fix(tooler): detect both legacy docker-compose and the docker cli compose plugin#126smaEti wants to merge 3 commits into
Conversation
…mpose and docker compose plugin
|
Hey @smaEti, can you push a small commit (or an empty git commit --allow-empty -m "ci: retrigger" && git push) to retrigger CI? The postci labeler job failed due to a stale event payload, and a fresh push should clear it. Thanks! |
|
Hey @smaEti, thanks for this. It's approved, and the code checks are fine. The only thing blocking the merge is our branch protection requiring signed commits, and the commits on this PR are currently unsigned. Could you re-sign them and update the pr? |
Hey, Because of that, I’ll create a new PR with the same changes on a clean branch with properly signed commits. Could you close this PR and review the new one instead? |
|
Hey @smaEti, no issues. Please create a new PR. Thanks :) |
|
Works @smaEti :) |
Fixes
dockercomposetooler.Gaugenow detects the Docker CLI Compose plugin in addition to the legacydocker-composebinaryContext
Gaugepreviously calledAnyOneExecChecker(ctx, "docker-compose", "docker compose"), which resolves toexec.LookPathon each name. The"docker compose"arm could never succeed, the modern Compose ships as a Docker CLI plugin under Docker's plugin directory, not as a standalone binary on PATH. The check only passed incidentally on systems that also expose adocker-composeshim.Changes
internal/tooler/dockercomposetooler/tooler.go: replace the singleAnyOneExecCheckercall with explicit fallback:ExecChecker("docker-compose"): legacy binary (unchanged behaviour)ExecChecker("docker")+docker compose version: actually invokes the CLI so the plugin dispatch can resolve (mirrorsdockerswarmtooler)errors.Newf(errors.TypeNotFound, …)with a descriptive messageTest plan
docker-compose— passesdocker composeplugin — passesTypeNotFoundwith a clear message