fix(tools): migrate docker-compose to docker compose plugin - #95
Draft
rhanka wants to merge 1 commit into
Draft
Conversation
Modernize the two remaining laggards to the Docker CLI compose plugin,
aligning them with the root Makefile and deces-backend/deces-infra/
dataprep-frontend which already use `docker compose`.
- packages/tools/Makefile: set `export DC ?= docker compose` (overridable)
and remove the `sudo tee /usr/local/bin/docker-compose` wrapper install
from the `config` target. That sudo step blocked non-interactive
`make config` on dev machines lacking a `docker-compose` binary. It is
replaced by a non-sudo plugin presence check that mirrors the style used
elsewhere in the repo.
- packages/dataprep-backend/Makefile: set `DC ?= docker compose` (drop the
quoted `'docker-compose'`) and route the one literal `docker-compose logs`
call site in `start` through `${DC}`.
Deferred intentionally: the offline binary bundling in dataprep-backend
(`package`/`depackage` download and ship docker-compose 1.27.4 for
air-gapped installs) and the base-image `docker-compose version` smoke
parity checks (root Makefile / deces-dataprep) — both encode deployment
assumptions out of scope for this dev-blocker fix.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
PR #94 reverted an earlier
docker composemigration back todocker-composeand re-added asudo tee /usr/local/bin/docker-composewrapper install inside theconfigtarget ofpackages/tools/Makefile. Thatsudostep blocks non-interactivemake configon dev machines that don't already have adocker-composebinary.This PR removes that dev-facing blocker and modernizes the two remaining laggards to the Docker CLI
docker composeplugin. The rootMakefile,deces-backend,deces-infra, anddataprep-frontendalready usedocker compose; onlypackages/toolsandpackages/dataprep-backendstill forced the obsolete standalone binary.Changes
packages/tools/Makefileexport DC := docker-compose→export DC ?= docker compose(overridable, so a parent make's exported value still wins; consistent withdeces-backend/deces-infra).ifeq … sudo tee /usr/local/bin/docker-compose … endifwrapper-install block from theconfigtarget (the dev blocker). Replaced it with a non-sudo plugin presence check that mirrors the style already used in the repo:docker compose version >/dev/null 2>&1 || { echo "docker compose plugin required (install docker-compose-plugin)" >&2; exit 1; }packages/dataprep-backend/MakefileDC := 'docker-compose'→DC ?= docker compose(dropped the quotes; a quoted two-word value would break${DC}invocation).docker-compose logscall site (starttarget) through${DC}.Intentionally deferred (out of scope for a targeted dev-blocker fix)
packages/dataprep-backend/Makefile(package/depackage): these curl-download and ship adocker-compose1.27.4 binary for air-gapped installs. Migrating changes a deployment assumption (target hosts must ship the compose plugin) and is left untouched.Makefile(deces-ui-base-image-smoke) andpackages/deces-dataprep/Makefile(remote-base-image-smoke) each assert bothdocker compose versionand the legacydocker-compose versionover SSH against provisioned base images. These are not${DC}call sites, not dev blockers, and are not part of PR CI. Dropping the legacy line flips a base-image contract and belongs in a separate base-image change.@echo docker-compose …display strings (pervasive across packages) — no functional effect, left as-is to keep the diff surgical.packages/tools/.travis.yml(installs standalone docker-compose 1.19.0) — Travis appears inactive: every sibling package disabled it via.travis.yml.old/.off, GitHub Actions is the live CI, and this file ismaster-gated while the repo deploys frommain. Left untouched.Validation
make -C packages/tools -n config→ runs the non-sudodocker compose versioncheck, nosudo teewrapper install.make -C packages/tools -n docker-build→docker compose config/docker compose build --pull --no-cache.make -C packages/dataprep-backend -n start→docker compose logs.ci.ymltools-swiftjob runsmake -C packages/tools configonubuntu-latest(compose plugin present + apt-installsdocker-compose-plugin), so the new check passes with no sudo prompt.🤖 Generated with Claude Code