[PR #265] [MERGED] fix: align compose checks with docker compose #278

Closed
opened 2026-06-06 22:10:01 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/vxcontrol/pentagi/pull/265
Author: @mason5052
Created: 4/15/2026
Status: Merged
Merged: 4/22/2026
Merged by: @asdek

Base: feature/next-releaseHead: codex/issue-254-compose-check-alignment


📝 Commits (2)

  • eea0a86 fix: align compose checks with docker compose
  • 92232f5 fix: accept compose version output on error

📊 Changes

3 files changed (+85 additions, -16 deletions)

View changed files

📝 backend/cmd/installer/checker/helpers.go (+9 -8)
📝 backend/cmd/installer/checker/helpers_test.go (+64 -0)
📝 backend/cmd/installer/wizard/locale/locale.go (+12 -8)

📄 Description

Summary

  • remove the install-time fallback to legacy docker-compose --version
  • align Docker Compose validation with the actual installer execution path, which already uses docker compose
  • add unit coverage for the compose version check and update troubleshooting text accordingly

Problem

Issue #254 reports installation trouble on Windows, and the current installer logic contains a confusing mismatch.

The checker accepts either docker compose version or legacy docker-compose --version, but the processor later executes only docker compose .... That means the preflight check can succeed in environments where the actual install command will still fail.

Solution

Make the checker validate the same command path that PentAGI actually uses at runtime.

  • checkDockerComposeVersion() now treats docker compose version as the only source of truth
  • a small testable helper was added so the compose validation path can be unit tested without shelling out in tests
  • installer troubleshooting text now explains that PentAGI requires the Docker Compose v2 plugin and that legacy docker-compose alone is not enough

This keeps the fix narrowly focused on validation/runtime alignment without changing the existing minimum version policy or the compose processor itself.

User Impact

Users now get an earlier and more accurate failure when the Docker Compose v2 plugin is missing, instead of passing preflight checks and failing later during execution. The installer guidance is also clearer about what needs to be installed.

Closes #254.

Test Plan

  • go test ./cmd/installer/checker/... -run 'TestCheckDockerComposeVersionWithRunner|TestExtractVersionFromOutput|TestCheckVersionCompatibility'
  • go test ./cmd/installer/wizard/locale
  • git diff --check

Notes

go test ./cmd/installer/checker/... still fails on this Windows host because of a pre-existing TestCheckFileExistsAndReadable issue unrelated to this PR. The targeted compose/version tests added in this change pass successfully.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/vxcontrol/pentagi/pull/265 **Author:** [@mason5052](https://github.com/mason5052) **Created:** 4/15/2026 **Status:** ✅ Merged **Merged:** 4/22/2026 **Merged by:** [@asdek](https://github.com/asdek) **Base:** `feature/next-release` ← **Head:** `codex/issue-254-compose-check-alignment` --- ### 📝 Commits (2) - [`eea0a86`](https://github.com/vxcontrol/pentagi/commit/eea0a86c85d6e2a6a614f2cb7072a28ac99cd172) fix: align compose checks with docker compose - [`92232f5`](https://github.com/vxcontrol/pentagi/commit/92232f57553c6fb14fb61346bc6980794f6e181a) fix: accept compose version output on error ### 📊 Changes **3 files changed** (+85 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `backend/cmd/installer/checker/helpers.go` (+9 -8) 📝 `backend/cmd/installer/checker/helpers_test.go` (+64 -0) 📝 `backend/cmd/installer/wizard/locale/locale.go` (+12 -8) </details> ### 📄 Description ## Summary - remove the install-time fallback to legacy `docker-compose --version` - align Docker Compose validation with the actual installer execution path, which already uses `docker compose` - add unit coverage for the compose version check and update troubleshooting text accordingly ## Problem Issue #254 reports installation trouble on Windows, and the current installer logic contains a confusing mismatch. The checker accepts either `docker compose version` or legacy `docker-compose --version`, but the processor later executes only `docker compose ...`. That means the preflight check can succeed in environments where the actual install command will still fail. ## Solution Make the checker validate the same command path that PentAGI actually uses at runtime. - `checkDockerComposeVersion()` now treats `docker compose version` as the only source of truth - a small testable helper was added so the compose validation path can be unit tested without shelling out in tests - installer troubleshooting text now explains that PentAGI requires the Docker Compose v2 plugin and that legacy `docker-compose` alone is not enough This keeps the fix narrowly focused on validation/runtime alignment without changing the existing minimum version policy or the compose processor itself. ## User Impact Users now get an earlier and more accurate failure when the Docker Compose v2 plugin is missing, instead of passing preflight checks and failing later during execution. The installer guidance is also clearer about what needs to be installed. Closes #254. ## Test Plan - [x] `go test ./cmd/installer/checker/... -run 'TestCheckDockerComposeVersionWithRunner|TestExtractVersionFromOutput|TestCheckVersionCompatibility'` - [x] `go test ./cmd/installer/wizard/locale` - [x] `git diff --check` ## Notes `go test ./cmd/installer/checker/...` still fails on this Windows host because of a pre-existing `TestCheckFileExistsAndReadable` issue unrelated to this PR. The targeted compose/version tests added in this change pass successfully. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-06 22:10:01 -04:00
yindo closed this issue 2026-06-06 22:10:01 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vxcontrol/pentagi#278