Conversation
|
There was a problem hiding this comment.
Pull request overview
This pull request successfully refactors the codebase to use the new moby/moby/client and moby/moby/api modules instead of the legacy docker/docker module. The goal is to reduce binary size by using the modularized Moby packages.
Key Changes
- Client initialization: Updated from
client.NewClientWithOpts()toclient.New()across Docker and Docker Swarm providers - API method signatures: Adapted to new API patterns including return value changes (e.g.,
ContainerStop,ContainerStartnow return results) and options structures (e.g.,client.ServiceUpdateOptionsnow wrapsVersionandSpec) - Data structure access: Updated to use new collection wrappers (e.g.,
services.Itemsinstead of direct slice access,spec.Container.Stateinstead ofspec.State) - Filters API: Migrated from
filters.NewArgs()toclient.Filters{}with the sameAdd()method pattern - Events API: Transitioned from dual-channel pattern to result object pattern (
result.Messagesandresult.Errinstead of separate channels)
Reviewed changes
Copilot reviewed 24 out of 25 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/testcontainers/pind/pind.go | Removed Docker-specific imports; critical container configuration commented out |
| pkg/sabliercmd/provider.go | Updated client initialization to use client.New() instead of client.NewClientWithOpts() |
| pkg/provider/dockerswarm/*.go | Updated imports, filters API, service list/inspect methods to use new collection wrappers, ServiceUpdate options structure |
| pkg/provider/docker/*.go | Updated imports, container methods to handle new return values, events pattern, inspect response structure |
| go.mod | Added moby/moby/api and moby/moby/client dependencies; moved docker/docker to indirect dependency |
| go.sum | Updated dependency checksums for new modules |
| Makefile | Added .PHONY: build directive for make target |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
❌ 3 Tests Failed:
View the top 3 failed tests by shortest run time
📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
❌ 3 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
|
Co-authored-by: Copilot <[email protected]>
Test Results✅ All tests passed! | 194 tests in 174.934s |
|





This should reduce the size of the binary by using the new
moby/moby/clientandmoby/moby/apimodules.testcontainers-go is still using the
docker/dockermodule, waiting for: testcontainers/testcontainers-go#3496