Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 03fb4b2

Browse files
committed
Merge branch '240-test-containers-version' into 'master'
fix: downgrade the test-containers lib because of required Docker version (#240) Closes #240 See merge request postgres-ai/database-lab!290
2 parents b330355 + d3eff87 commit 03fb4b2

File tree

8 files changed

+188
-43
lines changed

8 files changed

+188
-43
lines changed

‎go.mod‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ require (
77
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
88
github.com/araddon/dateparse v0.0.0-20210207001429-0eec95c9db7e
99
github.com/aws/aws-sdk-go v1.33.8
10+
github.com/containerd/containerd v1.5.2 // indirect
1011
github.com/docker/cli v0.0.0-20200721130541-80fd48bcb7e7
11-
github.com/docker/docker v20.10.5+incompatible
12+
github.com/docker/docker v1.13.1
1213
github.com/docker/go-connections v0.4.0
1314
github.com/dustin/go-humanize v1.0.0
1415
github.com/go-ole/go-ole v1.2.4 // indirect
@@ -19,18 +20,18 @@ require (
1920
github.com/jackc/pgx/v4 v4.9.0
2021
github.com/lib/pq v1.8.0
2122
github.com/morikuni/aec v1.0.0 // indirect
22-
github.com/opencontainers/image-spec v1.0.1
2323
github.com/pkg/errors v0.9.1
2424
github.com/robfig/cron/v3 v3.0.1
2525
github.com/rs/xid v1.2.1
2626
github.com/sergi/go-diff v1.1.0
2727
github.com/sethvargo/go-password v0.2.0
2828
github.com/shirou/gopsutil v2.20.9+incompatible
2929
github.com/stretchr/testify v1.7.0
30-
github.com/testcontainers/testcontainers-go v0.10.0
30+
github.com/testcontainers/testcontainers-go v0.8.0
3131
github.com/urfave/cli/v2 v2.1.1
32-
golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392
32+
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
3333
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
34+
google.golang.org/grpc v1.38.0 // indirect
3435
gopkg.in/yaml.v2 v2.4.0
3536
)
3637

‎go.sum‎

Lines changed: 180 additions & 27 deletions
Large diffs are not rendered by default.

‎pkg/retrieval/engine/postgres/logical/dump.go‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"github.com/docker/docker/api/types/container"
1717
"github.com/docker/docker/api/types/network"
1818
"github.com/docker/docker/client"
19-
specs "github.com/opencontainers/image-spec/specs-go/v1"
2019
"github.com/pkg/errors"
2120

2221
"gitlab.com/postgres-ai/database-lab/v2/pkg/config/global"
@@ -242,7 +241,7 @@ func (d *DumpJob) Run(ctx context.Context) (err error) {
242241
}
243242

244243
dumpCont, err := d.dockerClient.ContainerCreate(ctx, d.buildContainerConfig(pwd), hostConfig, &network.NetworkingConfig{},
245-
&specs.Platform{}, d.dumpContainerName(),
244+
d.dumpContainerName(),
246245
)
247246
if err != nil {
248247
log.Err(err)

‎pkg/retrieval/engine/postgres/logical/restore.go‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"github.com/docker/docker/api/types/container"
1818
"github.com/docker/docker/api/types/network"
1919
"github.com/docker/docker/client"
20-
specs "github.com/opencontainers/image-spec/specs-go/v1"
2120
"github.com/pkg/errors"
2221

2322
"gitlab.com/postgres-ai/database-lab/v2/pkg/config/global"
@@ -153,7 +152,6 @@ func (r *RestoreJob) Run(ctx context.Context) (err error) {
153152
r.buildContainerConfig(pwd),
154153
hostConfig,
155154
&network.NetworkingConfig{},
156-
&specs.Platform{},
157155
r.restoreContainerName(),
158156
)
159157
if err != nil {

‎pkg/retrieval/engine/postgres/physical/physical.go‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
"github.com/docker/docker/api/types/container"
1919
"github.com/docker/docker/api/types/network"
2020
"github.com/docker/docker/client"
21-
specs "github.com/opencontainers/image-spec/specs-go/v1"
2221
"github.com/pkg/errors"
2322

2423
"gitlab.com/postgres-ai/database-lab/v2/pkg/config/global"
@@ -269,7 +268,7 @@ func (r *RestoreJob) startContainer(ctx context.Context, containerName string, c
269268
}
270269

271270
newContainer, err := r.dockerClient.ContainerCreate(ctx, containerConfig, hostConfig, &network.NetworkingConfig{},
272-
&specs.Platform{}, containerName)
271+
containerName)
273272
if err != nil {
274273
return "", errors.Wrapf(err, "failed to create container %s", containerName)
275274
}

‎pkg/retrieval/engine/postgres/snapshot/logical.go‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
"github.com/docker/docker/api/types/container"
1515
"github.com/docker/docker/api/types/network"
1616
"github.com/docker/docker/client"
17-
specs "github.com/opencontainers/image-spec/specs-go/v1"
1817
"github.com/pkg/errors"
1918

2019
"gitlab.com/postgres-ai/database-lab/v2/pkg/config/global"
@@ -182,7 +181,6 @@ func (s *LogicalInitial) runPreprocessingQueries(ctx context.Context, dataDir st
182181
s.buildContainerConfig(dataDir, patchImage, pwd),
183182
hostConfig,
184183
&network.NetworkingConfig{},
185-
&specs.Platform{},
186184
s.patchContainerName(),
187185
)
188186
if err != nil {

‎pkg/retrieval/engine/postgres/snapshot/physical.go‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"github.com/docker/docker/api/types/container"
2323
"github.com/docker/docker/api/types/network"
2424
"github.com/docker/docker/client"
25-
specs "github.com/opencontainers/image-spec/specs-go/v1"
2625
"github.com/pkg/errors"
2726
"github.com/robfig/cron/v3"
2827

@@ -535,7 +534,6 @@ func (p *PhysicalInitial) promoteInstance(ctx context.Context, clonePath string,
535534
p.buildContainerConfig(clonePath, promoteImage, pwd, recoveryConfig[targetActionOption]),
536535
hostConfig,
537536
&network.NetworkingConfig{},
538-
&specs.Platform{},
539537
p.promoteContainerName(),
540538
)
541539

‎pkg/runci/handlers.go‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
"github.com/docker/docker/api/types/container"
1919
"github.com/docker/docker/api/types/mount"
2020
"github.com/docker/docker/api/types/network"
21-
specs "github.com/opencontainers/image-spec/specs-go/v1"
2221
"github.com/pkg/errors"
2322
"github.com/rs/xid"
2423

@@ -191,7 +190,7 @@ func (s *Server) runCommands(ctx context.Context, clone *models.Clone, runID str
191190
networkConfig.EndpointsConfig = map[string]*network.EndpointSettings{"clone_network": {NetworkID: s.networkID}}
192191
}
193192

194-
contRunner, err := s.docker.ContainerCreate(ctx, containerCfg, hostConfig, networkConfig, &specs.Platform{}, containerName)
193+
contRunner, err := s.docker.ContainerCreate(ctx, containerCfg, hostConfig, networkConfig, containerName)
195194

196195
if err != nil {
197196
return nil, errors.Wrap(err, "failed to create container")

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /