Skip to content

v0.16.0

Compare
Choose a tag to compare
@release-drafter release-drafter released this 21 Nov 09:00
· 85 commits to refs/heads/main since this release
9ad2a50

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; and WithDeadline, which sets a time.Duration which limits all wait strategies. As a consequence, the already existing function WithStartupTimeout 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

🧹 Housekeeping

📦 Dependency updates