v0.16.0
What's Changed
⚠️ Breaking Changes
-
feat: support native docker compose api (#476) @baez90
Docker Compose v2 is implemented in Go, and for that reason we have decided to provide native Go support to Compose, deprecating the shell-escape based
LocalDockerCompose
, which was invoking the local binary of compose. Given the version includes the Compose dependency, and the Docker folks added a replace directive until the upcoming Docker 22.06 release is out, we were forced to add it too, causing consumers of Testcontainers for Go to add the following replace directive too.
replace (
github.com/docker/cli => github.com/docker/cli v20.10.3-0.20221013132413-1d6c6e2367e2+incompatible // 22.06 master branch
github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221013203545-33ab36d6b304+incompatible // 22.06 branch
github.com/moby/buildkit => github.com/moby/buildkit v0.10.1-0.20220816171719-55ba9d14360a // same as buildx
github.com/opencontainers/runc => github.com/opencontainers/runc v1.1.2 // Can be removed on next bump of containerd to > 1.6.4
// For k8s dependencies, we use a replace directive, to prevent them being
// upgraded to the version specified in containerd, which is not relevant to the
// version needed.
// See https://github.com/docker/buildx/pull/948 for details.
// https://github.com/docker/buildx/blob/v0.8.1/go.mod#L62-L64
k8s.io/api => k8s.io/api v0.22.4
k8s.io/apimachinery => k8s.io/apimachinery v0.22.4
k8s.io/client-go => k8s.io/client-go v0.22.4
)
-
fix: do not prepend garbage in the container.Exec response (#624) @mdelapenya
The signature of the
Exec
function on a container created by the library has been changed in what we thought it was a non-breaking change manner, using variadic arguments. But we confirmed that it could be a breaking change in the rare case where the Exec function is assigned to a variable.
// The original Exec function works here because its type is func(context.Context, []string),
// but the new Exec function’s type is func(context.Context, []string, ...ProcessOption),
// so the assignment fails at compile time. For that reason we are moving it to this section.
var execFn func(ctx context.Context, cmd []string) = myContainer.Exec
🚀 Features
-
feat: implement new MultiStrategy design (#580) @hhsnopek
This PR enhances how the
wait.ForAll
strategy behaves: it will control the startup timeout and the deadline for all inner wait strategies, using two methods:WithStartupTimeoutDefault
, which sets the default timeout for all inner wait strategies; andWithDeadline
, which sets a time.Duration which limits all wait strategies. As a consequence, the already existing functionWithStartupTimeout
has been deprecated from the multi-strategy struct. -
feat: Auth config for build images (#602) @paulozenida
-
feat: log docker info from compose (#591) @mdelapenya
🐛 Bug Fixes
- fix: support parallel execution of reusable containers (#593) @mdelapenya
📖 Documentation
- README: update
nginxC.Terminate
(#627) @ofey404 - update gotest.md - fix errors in the example (#623) @pantafive
- docs: fix syntax (#615) @mdelapenya
- docs: networking basics (#612) @mdelapenya
- docs: wording in project name (#610) @mdelapenya
- add example of using Pulsar with testcontainers-go (#597) @clive-jevons
- docs: add languages to docs site (#599) @mdelapenya
- docs: Rename the MkDocs site name to match other Testcontainers languages (#598) @HofmeisterAn
- chore: sync governance files (#589) @mdelapenya
- chore: sync governance files (#586) @mdelapenya
🧹 Housekeeping
- chore: sync governance files (#622) @testcontainersbot
- chore: use a fixed version of MySQL (#617) @mdelapenya
- feat: add golangci-lint (#569) @hhsnopek
- chore: sync governance files (#608) @mdelapenya
- chore: sync governance files (#586) @mdelapenya
- Remove codecov and test coverage file (#584) @misantron
📦 Dependency updates
- chore: retire podman pipeline (#625) @mdelapenya
- chore(deps): bump github.com/docker/compose/v2 from 2.12.0 to 2.12.2 (#588) @dependabot
- feat: bump version of test-summary (#596) @Bablzz