Skip to content

fix: accept Docker Compose newer than 2.x in docker-compose start scripts#2504

Merged
erichare merged 1 commit into
mainfrom
fix/compose-version-gate
Jun 15, 2026
Merged

fix: accept Docker Compose newer than 2.x in docker-compose start scripts#2504
erichare merged 1 commit into
mainfrom
fix/compose-version-gate

Conversation

@erichare

Copy link
Copy Markdown
Contributor

What this fixes

start_dse69.sh and start_hcd.sh gate on Docker Compose v2 with:

if [[ ! $(docker compose version --short) =~ ^2. ]]; then

The regex matches the literal prefix 2., so any Compose release past the 2.x line — e.g. current Homebrew docker-compose 5.1.4 — is rejected with "Docker compose v2 required. Please upgrade Docker Desktop to the latest version." The original intent was to reject Compose v1, not to pin to 2.x forever.

The old check also fails confusingly when the compose CLI plugin isn't discoverable at all (common with a brew-installed docker CLI, where the plugin lands in /opt/homebrew/lib/docker/cli-plugins, a directory the CLI doesn't search by default):

unknown flag: --short

Usage:  docker [OPTIONS] COMMAND [ARG...]
...
Docker compose v2 required. Please upgrade Docker Desktop to the latest version.

The change

Both scripts now parse the major version and require it to be >= 2, tolerate a leading v, and report what was actually found when rejecting:

Docker Compose v2 or newer required (found: none).
docker compose version --short before after
2.39.2 accept accept
v2.24.5 accept accept
5.1.4 reject accept
1.29.2 reject reject
(plugin missing) stray unknown flag + misleading hint reject with found: none

Test plan

  • bash -n on both scripts
  • Gate logic exercised against the version strings in the table above
  • ./start_dse69.sh -d end-to-end with Compose 5.1.4 on macOS (colima): DSE container starts and reaches healthy via --wait
  • ./start_hcd.sh smoke run (same gate, identical change)

The start_dse69.sh / start_hcd.sh version gate matched the literal
prefix "2.", so Compose releases past the 2.x line (e.g. 5.1.4) were
rejected with "Docker compose v2 required". The intent was to reject
Compose v1 — check the major version numerically (>= 2) instead.

Also handle a missing/undiscoverable compose plugin gracefully: the
old check leaked "unknown flag: --short" from the docker CLI before
printing a misleading upgrade hint; the gate now reports the version
it actually found (or "none").
@github-actions

Copy link
Copy Markdown
Contributor

➡️ Unit Test Coverage Delta vs Main Branch

Metric Value
Main Branch 52.50%
This PR 52.50%
Delta ⚪ 0.00%
ℹ️ Coverage unchanged

@github-actions

Copy link
Copy Markdown
Contributor

Unit Test Coverage Report

Overall Project 52.5% 🍏

There is no coverage information present for the Files changed

@erichare erichare marked this pull request as ready for review June 12, 2026 16:21
@erichare erichare requested a review from a team as a code owner June 12, 2026 16:21
@github-actions

Copy link
Copy Markdown
Contributor

➡️ Integration Test Coverage Delta vs Main Branch (dse69-it)

Metric Value
Main Branch 72.50%
This PR 72.50%
Delta ⚪ 0.00%
ℹ️ Coverage unchanged

@github-actions

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (dse69-it)

Overall Project 72.5% 🍏

There is no coverage information present for the Files changed

@github-actions

Copy link
Copy Markdown
Contributor

➡️ Integration Test Coverage Delta vs Main Branch (hcd-it)

Metric Value
Main Branch 73.84%
This PR 73.84%
Delta ⚪ 0.00%
ℹ️ Coverage unchanged

@github-actions

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (hcd-it)

Overall Project 73.84% 🍏

There is no coverage information present for the Files changed

@erichare erichare merged commit a46dd3c into main Jun 15, 2026
3 checks passed
@erichare erichare deleted the fix/compose-version-gate branch June 15, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants