Skip to content

Commit ef189fb

Browse files
authored
chore(deps): combine and bump compose dependencies (#1787)
* chore(deps): bump compose replacement * chore: run compose for Go 1.21, only * chore: update test * chore(deps): bump github.com/compose-spec/compose-go from 1.18.3 to 1.19.0 in /modules/compose * chore(deps): bump golang.org/x/sync from 0.3.0 to 0.4.0 in /modules/compose * chore(deps): bump github.com/docker/compose from 2.22.0 to 2.23.0 in /modules/compose
1 parent d49ecc2 commit ef189fb

File tree

7 files changed

+119
-125
lines changed

7 files changed

+119
-125
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ jobs:
107107
go-version: [1.20.x, 1.x]
108108
platform: [ubuntu-latest, macos-latest]
109109
module: [artemis, cassandra, clickhouse, compose, couchbase, elasticsearch, gcloud, k3s, k6, kafka, localstack, mariadb, mongodb, mysql, nats, neo4j, postgres, pulsar, rabbitmq, redis, redpanda, vault]
110-
110+
exclude:
111+
- go-version: 1.20.x
112+
module: compose
111113
uses: ./.github/workflows/ci-test-go.yml
112114
with:
113115
go-version: ${{ matrix.go-version }}

docs/features/docker_compose.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,12 @@ dependent upon.
1010
## Using `docker-compose` directly
1111

1212
!!!warning
13-
The minimal version of Go required to use this module is **1.20**.
13+
The minimal version of Go required to use this module is **1.21**.
1414

1515
```
1616
go get github.com/testcontainers/testcontainers-go/modules/compose
1717
```
1818

19-
!!!warning
20-
21-
Given the version includes the Compose dependency, and the Docker folks added a replace directive in their [go.mod](https://github.com/docker/compose/blob/v2/go.mod#L175-L188),
22-
we were forced to add it as well. As a result, users of _Testcontainers for Go_ need to add the following replace directive to their `go.mod` files.
23-
24-
```
25-
replace (
26-
github.com/cucumber/godog => github.com/laurazard/godog v0.0.0-20220922095256-4c4b17abdae7
27-
)
28-
```
29-
3019
Because `docker-compose` v2 is implemented in Go it's possible for _Testcontainers for Go_ to
3120
use [`github.com/docker/compose`](https://github.com/docker/compose) directly and skip any process execution/_docker-compose-in-a-container_ scenario.
3221
The `ComposeStack` API exposes this variant of using `docker-compose` in an easy way.

modulegen/_template/ci.yml.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ jobs:
107107
go-version: [1.20.x, 1.x]
108108
platform: [ubuntu-latest, macos-latest]
109109
module: [{{ .Modules }}]
110+
exclude:
111+
- go-version: 1.20.x
112+
module: compose
110113
uses: ./.github/workflows/ci-test-go.yml
111114
with:
112115
go-version: {{ "${{ matrix.go-version }}" }}

modulegen/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ func assertModuleGithubWorkflowContent(t *testing.T, module context.Testcontaine
485485

486486
examplesList, err := ctx.GetExamples()
487487
assert.Nil(t, err)
488-
assert.Equal(t, " module: ["+strings.Join(examplesList, ", ")+"]", data[125])
488+
assert.Equal(t, " module: ["+strings.Join(examplesList, ", ")+"]", data[128])
489489
}
490490

491491
// assert content go.mod

modules/compose/compose_api.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ func (d *dockerCompose) Up(ctx context.Context, opts ...StackUpOption) (err erro
216216

217217
err = d.composeService.Up(ctx, d.project, api.UpOptions{
218218
Create: api.CreateOptions{
219+
Build: &api.BuildOptions{
220+
Services: upOptions.Services,
221+
},
219222
Services: upOptions.Services,
220223
Recreate: upOptions.Recreate,
221224
RecreateDependencies: upOptions.RecreateDependencies,

modules/compose/go.mod

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
module github.com/testcontainers/testcontainers-go/modules/compose
22

3-
go 1.20
3+
go 1.21
44

5-
replace (
6-
github.com/cucumber/godog => github.com/laurazard/godog v0.0.0-20220922095256-4c4b17abdae7
7-
github.com/testcontainers/testcontainers-go => ../..
8-
)
5+
toolchain go1.21.3
6+
7+
replace github.com/testcontainers/testcontainers-go => ../..
98

109
require (
11-
github.com/compose-spec/compose-go v1.18.3
10+
github.com/compose-spec/compose-go v1.20.0
1211
github.com/docker/cli v24.0.6+incompatible
13-
github.com/docker/compose/v2 v2.21.0
12+
github.com/docker/compose/v2 v2.23.0
1413
github.com/docker/docker v24.0.6+incompatible
1514
github.com/google/uuid v1.3.1
1615
github.com/stretchr/testify v1.8.4
1716
github.com/testcontainers/testcontainers-go v0.25.0
18-
golang.org/x/sync v0.3.0
17+
golang.org/x/sync v0.4.0
1918
gopkg.in/yaml.v3 v3.0.1
2019
)
2120

@@ -26,7 +25,7 @@ require (
2625
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
2726
github.com/Masterminds/semver/v3 v3.2.1 // indirect
2827
github.com/Microsoft/go-winio v0.6.1 // indirect
29-
github.com/Microsoft/hcsshim v0.11.0 // indirect
28+
github.com/Microsoft/hcsshim v0.11.1 // indirect
3029
github.com/aws/aws-sdk-go-v2 v1.17.6 // indirect
3130
github.com/aws/aws-sdk-go-v2/config v1.18.16 // indirect
3231
github.com/aws/aws-sdk-go-v2/credentials v1.13.16 // indirect
@@ -44,12 +43,13 @@ require (
4443
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
4544
github.com/cespare/xxhash/v2 v2.2.0 // indirect
4645
github.com/containerd/console v1.0.3 // indirect
47-
github.com/containerd/containerd v1.7.6 // indirect
46+
github.com/containerd/containerd v1.7.7 // indirect
4847
github.com/containerd/continuity v0.4.2 // indirect
48+
github.com/containerd/log v0.1.0 // indirect
4949
github.com/containerd/typeurl/v2 v2.1.1 // indirect
5050
github.com/cpuguy83/dockercfg v0.3.1 // indirect
5151
github.com/davecgh/go-spew v1.1.1 // indirect
52-
github.com/distribution/distribution/v3 v3.0.0-20230601133803-97b1d649c493 // indirect
52+
github.com/distribution/reference v0.5.0 // indirect
5353
github.com/docker/buildx v0.11.2 // indirect
5454
github.com/docker/distribution v2.8.2+incompatible // indirect
5555
github.com/docker/docker-credential-helpers v0.7.0 // indirect
@@ -73,7 +73,7 @@ require (
7373
github.com/golang/mock v1.6.0 // indirect
7474
github.com/golang/protobuf v1.5.3 // indirect
7575
github.com/google/gnostic v0.5.7-v3refs // indirect
76-
github.com/google/go-cmp v0.5.9 // indirect
76+
github.com/google/go-cmp v0.6.0 // indirect
7777
github.com/google/gofuzz v1.2.0 // indirect
7878
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
7979
github.com/gorilla/mux v1.8.0 // indirect
@@ -85,7 +85,6 @@ require (
8585
github.com/imdario/mergo v0.3.16 // indirect
8686
github.com/in-toto/in-toto-golang v0.5.0 // indirect
8787
github.com/inconshreveable/mousetrap v1.1.0 // indirect
88-
github.com/jmoiron/sqlx v1.3.5 // indirect
8988
github.com/jonboulle/clockwork v0.4.0 // indirect
9089
github.com/josharian/intern v1.0.0 // indirect
9190
github.com/json-iterator/go v1.1.12 // indirect
@@ -102,7 +101,7 @@ require (
102101
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
103102
github.com/miekg/pkcs11 v1.1.1 // indirect
104103
github.com/mitchellh/mapstructure v1.5.0 // indirect
105-
github.com/moby/buildkit v0.12.1 // indirect
104+
github.com/moby/buildkit v0.12.2 // indirect
106105
github.com/moby/locker v1.0.1 // indirect
107106
github.com/moby/patternmatcher v0.6.0 // indirect
108107
github.com/moby/spdystream v0.2.0 // indirect
@@ -116,7 +115,7 @@ require (
116115
github.com/morikuni/aec v1.0.0 // indirect
117116
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
118117
github.com/opencontainers/go-digest v1.0.0 // indirect
119-
github.com/opencontainers/image-spec v1.1.0-rc4 // indirect
118+
github.com/opencontainers/image-spec v1.1.0-rc5 // indirect
120119
github.com/opencontainers/runc v1.1.7 // indirect
121120
github.com/pelletier/go-toml v1.9.5 // indirect
122121
github.com/pkg/errors v0.9.1 // indirect
@@ -146,8 +145,6 @@ require (
146145
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
147146
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
148147
github.com/yusufpapurcu/wmi v1.2.3 // indirect
149-
github.com/zmap/zcrypto v0.0.0-20230310154051-c8b263fd8300 // indirect
150-
github.com/zmap/zlint/v3 v3.5.0 // indirect
151148
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.40.0 // indirect
152149
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.40.0 // indirect
153150
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.40.0 // indirect
@@ -164,18 +161,18 @@ require (
164161
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 // indirect
165162
golang.org/x/mod v0.11.0 // indirect
166163
golang.org/x/net v0.17.0 // indirect
167-
golang.org/x/oauth2 v0.7.0 // indirect
164+
golang.org/x/oauth2 v0.11.0 // indirect
168165
golang.org/x/sys v0.13.0 // indirect
169166
golang.org/x/term v0.13.0 // indirect
170167
golang.org/x/text v0.13.0 // indirect
171168
golang.org/x/time v0.3.0 // indirect
172169
golang.org/x/tools v0.7.0 // indirect
173170
google.golang.org/appengine v1.6.7 // indirect
174-
google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect
175-
google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect
176-
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
177-
google.golang.org/grpc v1.57.0 // indirect
178-
google.golang.org/protobuf v1.30.0 // indirect
171+
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
172+
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
173+
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect
174+
google.golang.org/grpc v1.59.0 // indirect
175+
google.golang.org/protobuf v1.31.0 // indirect
179176
gopkg.in/inf.v0 v0.9.1 // indirect
180177
gopkg.in/yaml.v2 v2.4.0 // indirect
181178
k8s.io/api v0.26.2 // indirect

0 commit comments

Comments
 (0)