Skip to content

fix(compose): update to docker compose v2.40.2 and use api.Compose interface#3456

Merged
mdelapenya merged 1 commit intotestcontainers:mainfrom
mdelapenya:fix-compose
Oct 24, 2025
Merged

fix(compose): update to docker compose v2.40.2 and use api.Compose interface#3456
mdelapenya merged 1 commit intotestcontainers:mainfrom
mdelapenya:fix-compose

Conversation

@mdelapenya
Copy link
Copy Markdown
Member

@mdelapenya mdelapenya commented Oct 24, 2025

Summary

  • Update Docker Compose dependencies to v2.40.2 and related packages
  • Change composeService field type from api.Service to api.Compose to align with the new Docker Compose API structure

Changes

  • Upgrade compose-spec/compose-go/v2 from v2.6.0 to v2.9.0
  • Upgrade docker/compose/v2 from v2.35.0 to v2.40.2
  • Upgrade docker/cli from v28.0.4 to v28.5.1
  • Upgrade docker/docker from v28.3.3 to v28.5.1
  • Update Go version to 1.24.9
  • Update composeService field in compose_api.go from api.Service to api.Compose

Related issues

Test plan

  • Run existing compose module tests
  • Verify compose functionality with updated API

🤖 Generated with Claude Code

…terface

  Updated Docker Compose dependencies to resolve API compatibility issues.
  Changed composeService field type from api.Service to api.Compose to align
  with the new Docker Compose API structure in v2.40.2.

  - Upgrade compose-spec/compose-go/v2 from v2.6.0 to v2.9.0
  - Upgrade docker/compose/v2 from v2.35.0 to v2.40.2
  - Upgrade docker/cli from v28.0.4 to v28.5.1
  - Upgrade docker/docker from v28.3.3 to v28.5.1
  - Update Go version to 1.24.9

  🤖 Generated with [Claude Code](https://claude.com/claude-code)

  Co-Authored-By: Claude <noreply@anthropic.com>
@mdelapenya mdelapenya requested a review from a team as a code owner October 24, 2025 10:29
@mdelapenya mdelapenya added dependencies Dependencies or external services compose Docker Compose. bug An issue with the library labels Oct 24, 2025
@mdelapenya mdelapenya self-assigned this Oct 24, 2025
@netlify
Copy link
Copy Markdown

netlify Bot commented Oct 24, 2025

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit 028b91e
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-go/deploys/68fb550031011600082eeeeb
😎 Deploy Preview https://deploy-preview-3456--testcontainers-go.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Oct 24, 2025

Summary by CodeRabbit

  • Chores
    • Updated Go toolchain to version 1.24.9
    • Upgraded Docker and Compose ecosystem dependencies to latest compatible versions
    • Modernized indirect dependencies across logging, networking, and runtime libraries for improved compatibility and stability

Walkthrough

The PR updates the DockerCompose.composeService field type from api.Service to api.Compose and performs a significant dependency modernization, including Go version bumps (1.24.0 to 1.24.9), compose-go/v2 (v2.6.0 to v2.9.0), docker/cli and docker/docker (v28.0.4 to v28.5.1), and numerous transitive dependency upgrades.

Changes

Cohort / File(s) Summary
API Type Update
modules/compose/compose_api.go
Field signature updated: composeService type changed from api.Service to api.Compose
Dependency Modernization
modules/compose/go.mod
Go toolchain bumped from 1.24.0 to 1.24.9; compose-go/v2 upgraded from v2.6.0 to v2.9.0; docker/cli and docker/docker updated to v28.5.1+incompatible; docker/compose/v2 to v2.40.2; numerous transitive dependencies updated across protobuf, gRPC, Kubernetes, OpenTelemetry, and ecosystem libraries

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Suggested labels

chore

Poem

🐰 Compose fields hop and shift with grace,
Dependencies dance to a faster pace,
From v2.6 to v2.9 we bound,
With Docker's new version, fresh and sound,
The toolchain climbs, the ecosystem thrives,
Our little module now joyfully survives!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "fix(compose): update to docker compose v2.40.2 and use api.Compose interface" directly aligns with the changeset. It captures both primary objectives of the PR: updating Docker Compose dependencies to v2.40.2 and changing the composeService field type from api.Service to api.Compose. The title is concise, specific, and clearly communicates the main changes without unnecessary details or vague language. A teammate scanning the commit history would immediately understand the nature and purpose of this change.
Description Check ✅ Passed The pull request description clearly and specifically describes the changes made in the changeset. It accurately identifies both modified files: it explains the dependency version upgrades in go.mod (compose-go/v2 v2.6.0 → v2.9.0, docker/compose/v2 v2.35.0 → v2.40.2, docker/cli v28.0.4 → v28.5.1, docker/docker v28.3.3 → v28.5.1, and Go version 1.24.0 → 1.24.9) and the field type change in compose_api.go (composeService from api.Service to api.Compose). The description provides specific version numbers and context about alignment with the new Docker Compose API structure, demonstrating it is both related to the changeset and sufficiently detailed.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mdelapenya mdelapenya merged commit 55092df into testcontainers:main Oct 24, 2025
18 checks passed
@mdelapenya mdelapenya deleted the fix-compose branch October 24, 2025 10:40
mdelapenya added a commit to LaurentGoderre/testcontainers-go that referenced this pull request Oct 24, 2025
* main:
  chore(dockermcpgateway): skip testable example as it's not deterministic (testcontainers#3457)
  fix(compose): update to docker compose v2.40.2 and use api.Compose interface (testcontainers#3456)
  chore(deps): bump mkdocs-include-markdown-plugin from 7.1.6 to 7.1.8 (testcontainers#3455)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug An issue with the library compose Docker Compose. dependencies Dependencies or external services

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: undefined: api.Service with github.com/docker/compose/v2 v2.40.2

1 participant