From 9066143040b7d97113eaee9392d135f3b3ec69a9 Mon Sep 17 00:00:00 2001 From: Tanmay Jain Date: Thu, 11 Apr 2024 19:33:37 +0530 Subject: [PATCH 1/7] export functions --- asconfig/schema.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/asconfig/schema.go b/asconfig/schema.go index 8e16489..efe5e76 100644 --- a/asconfig/schema.go +++ b/asconfig/schema.go @@ -133,9 +133,9 @@ func baseVersion(ver string) (string, error) { return baseVersion, nil } -// getDynamic return the map of values which are dynamic +// GetDynamic return the map of values which are dynamic // values. -func getDynamic(ver string) (sets.Set[string], error) { +func GetDynamic(ver string) (sets.Set[string], error) { flatSchema, err := getFlatSchema(ver) if err != nil { return nil, err @@ -178,14 +178,14 @@ func getDynamicSchema(flatSchema map[string]interface{}) sets.Set[string] { // IsAllDynamicConfig returns true if all the fields in the given configMap are dynamically configured. func IsAllDynamicConfig(log logr.Logger, configMap DynamicConfigMap, version string) (bool, error) { - dynamic, err := getDynamic(version) + dynamic, err := GetDynamic(version) if err != nil { // retry error fall back to rolling restart. return false, err } for confKey := range configMap { - if !isDynamicConfig(log, dynamic, confKey, configMap[confKey]) { + if !IsDynamicConfig(log, dynamic, confKey, configMap[confKey]) { return false, nil } } @@ -193,8 +193,8 @@ func IsAllDynamicConfig(log logr.Logger, configMap DynamicConfigMap, version str return true, nil } -// isDynamicConfig returns true if the given field is dynamically configured. -func isDynamicConfig(log logr.Logger, dynamic sets.Set[string], conf string, +// IsDynamicConfig returns true if the given field is dynamically configured. +func IsDynamicConfig(log logr.Logger, dynamic sets.Set[string], conf string, valueMap map[Operation]interface{}) bool { tokens := SplitKey(log, conf, sep) baseKey := tokens[len(tokens)-1] From 779149c17afc40d623cee2deeb45f2ba89a7b4ea Mon Sep 17 00:00:00 2001 From: Tanmay Jain Date: Fri, 12 Apr 2024 19:32:04 +0530 Subject: [PATCH 2/7] handle geo2dsphere-within suncontext --- asconfig/as_setconfig.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/asconfig/as_setconfig.go b/asconfig/as_setconfig.go index 4be4774..38534b1 100644 --- a/asconfig/as_setconfig.go +++ b/asconfig/as_setconfig.go @@ -191,10 +191,14 @@ func createSetConfigNamespaceCmdList(tokens []string, operationValueMap map[Oper cmd += strings.Trim(token, "{}") } } else { - if prevToken == "index-type" || prevToken == "sindex-type" { + switch prevToken { + case "index-type", "sindex-type": cmd += fmt.Sprintf(";%s.%s", prevToken, token) prevToken = "" - } else { + case "geo2dsphere-within": + cmd += fmt.Sprintf(";%s-%s", prevToken, token) + prevToken = "" + default: prevToken = token } } From 0110ff00625c4b630b604989979f424576c746e3 Mon Sep 17 00:00:00 2001 From: Tanmay Jain Date: Fri, 12 Apr 2024 21:44:14 +0530 Subject: [PATCH 3/7] enabling xdr config dynamically --- asconfig/as_setconfig.go | 24 ++++++++++-------------- asconfig/as_setconfig_test.go | 8 ++++---- asconfig/schema.go | 11 +++++------ 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/asconfig/as_setconfig.go b/asconfig/as_setconfig.go index 38534b1..6991858 100644 --- a/asconfig/as_setconfig.go +++ b/asconfig/as_setconfig.go @@ -1,21 +1,23 @@ package asconfig import ( + "container/list" "fmt" "strings" aero "github.com/aerospike/aerospike-client-go/v7" "github.com/aerospike/aerospike-management-lib/deployment" "github.com/aerospike/aerospike-management-lib/info" + "github.com/go-logr/logr" ) const ( cmdSetConfigNetwork = "set-config:context=network;" // ConfigNetwork cmdSetConfigService = "set-config:context=service;" // ConfigService cmdSetConfigNamespace = "set-config:context=namespace;id=" // ConfigNamespace - // cmdSetConfigXDR = "set-config:context=xdr" // ConfigXDR - cmdSetConfigSecurity = "set-config:context=security;" // ConfigSecurity - cmdSetLogging = "log-set:id=" // ConfigLogging + cmdSetConfigXDR = "set-config:context=xdr" // ConfigXDR + cmdSetConfigSecurity = "set-config:context=security;" // ConfigSecurity + cmdSetLogging = "log-set:id=" // ConfigLogging ) // convertValueToString converts the value of a config to a string. @@ -251,7 +253,6 @@ func createLogSetCmdList(tokens []string, operationValueMap map[Operation][]stri return cmdList, nil } -/* // createSetConfigXDRCmdList creates set-config commands for XDR context. func createSetConfigXDRCmdList(tokens []string, operationValueMap map[Operation][]string) []string { cmdList := make([]string, 0, len(operationValueMap)) @@ -316,15 +317,15 @@ func createSetConfigXDRCmdList(tokens []string, operationValueMap map[Operation] return cmdList } -*/ // CreateSetConfigCmdList creates set-config commands for given config. -func CreateSetConfigCmdList(configMap DynamicConfigMap, conn deployment.ASConnInterface, +func CreateSetConfigCmdList(log logr.Logger, configMap DynamicConfigMap, conn deployment.ASConnInterface, aerospikePolicy *aero.ClientPolicy, ) ([]string, error) { cmdList := make([]string, 0, len(configMap)) - for c := range configMap { + orderedConfList := rearrangeConfigMap(log, configMap) + for _, c := range orderedConfList { tokens := strings.Split(c, sep) context := tokens[0] @@ -343,11 +344,8 @@ func CreateSetConfigCmdList(configMap DynamicConfigMap, conn deployment.ASConnIn case info.ConfigNamespaceContext: cmdList = append(cmdList, createSetConfigNamespaceCmdList(tokens, val)...) - /* - Commenting out XDR context for now because of ordering issues. - case info.ConfigXDRContext: - cmdList = append(cmdList, createSetConfigXDRCmdList(tokens, val)...) - */ + case info.ConfigXDRContext: + cmdList = append(cmdList, createSetConfigXDRCmdList(tokens, val)...) case info.ConfigLoggingContext: cmds, err := createLogSetCmdList(tokens, val, conn, aerospikePolicy) @@ -365,7 +363,6 @@ func CreateSetConfigCmdList(configMap DynamicConfigMap, conn deployment.ASConnIn return cmdList, nil } -/* // Returns a list of config keys in the order in which they should be applied. // The order is as follows: // 1. Removed Namespaces -- If user has to change some of the DC direct fields, they will have to remove the namespace @@ -463,4 +460,3 @@ func rearrangeConfigMap(log logr.Logger, configMap DynamicConfigMap) []string { return finalList } -*/ diff --git a/asconfig/as_setconfig_test.go b/asconfig/as_setconfig_test.go index 9774c6b..98fd57d 100644 --- a/asconfig/as_setconfig_test.go +++ b/asconfig/as_setconfig_test.go @@ -3,6 +3,7 @@ package asconfig import ( "testing" + "github.com/go-logr/logr" "github.com/stretchr/testify/suite" "go.uber.org/mock/gomock" @@ -62,11 +63,12 @@ func (s *AsSetConfigTestSuite) TestCreateSetConfigCmdList() { for _, tc := range testCases { s.Run(tc.name, func() { + logger := logr.Discard() policy := &aero.ClientPolicy{} s.mockASConn.EXPECT().RunInfo(gomock.Any(), gomock.Any()).Return(map[string]string{ "logs": "0:stderr"}, nil).AnyTimes() - result, err := CreateSetConfigCmdList(tc.inputConf, s.mockASConn, policy) + result, err := CreateSetConfigCmdList(logger, tc.inputConf, s.mockASConn, policy) s.Assert().Nil(err) s.Assert().True(gomock.InAnyOrder(result).Matches(tc.expected)) @@ -74,7 +76,6 @@ func (s *AsSetConfigTestSuite) TestCreateSetConfigCmdList() { } } -/* func (s *AsSetConfigTestSuite) TestCreateSetConfigCmdListOrdered() { testCases := []struct { name string @@ -87,7 +88,7 @@ func (s *AsSetConfigTestSuite) TestCreateSetConfigCmdListOrdered() { "xdr.dcs.{DC1}.namespaces.{ns1}.bin-policy": {Update: "no-bins"}, "xdr.dcs.{DC3}.name": {Add: "DC3"}, "xdr.dcs.{DC1}.namespaces.{ns2}.name": {Remove: "ns2"}, - "xdr.dcs.{DC1}.node-address-ports": {Add: []string{"1.1.1.1:3000:tls-name"}, + "xdr.dcs.{DC1}.node-address-ports": {Add: []string{"1.1.1.1:3000:tls-name"}}, "xdr.dcs.{DC1}.namespaces.{ns1}.name": {Add: "ns1"}, "xdr.dcs.{DC1}.tls-name": {Update: "tls-name"}, }, @@ -114,7 +115,6 @@ func (s *AsSetConfigTestSuite) TestCreateSetConfigCmdListOrdered() { }) } } -*/ func TestAsSetConfigTestSuite(t *testing.T) { suite.Run(t, new(AsSetConfigTestSuite)) diff --git a/asconfig/schema.go b/asconfig/schema.go index efe5e76..26e0bf4 100644 --- a/asconfig/schema.go +++ b/asconfig/schema.go @@ -3,6 +3,7 @@ package asconfig import ( "encoding/json" "fmt" + "github.com/aerospike/aerospike-management-lib/info" "os" "path/filepath" "reflect" @@ -12,8 +13,6 @@ import ( sets "github.com/deckarep/golang-set/v2" "github.com/go-logr/logr" - - "github.com/aerospike/aerospike-management-lib/info" ) // map of version to schema @@ -200,12 +199,12 @@ func IsDynamicConfig(log logr.Logger, dynamic sets.Set[string], conf string, baseKey := tokens[len(tokens)-1] context := tokens[0] - if context == info.ConfigXDRContext { - // XDR context is always considered static. - return false + if baseKey == "replication-factor" || baseKey == keyNodeAddressPorts { + return true } - if baseKey == "replication-factor" { + // Name key for XDR context is considered as dynamic, as both DCs and Namespaces in DCs can be added dynamically. + if context == info.ConfigXDRContext && baseKey == KeyName { return true } From a11e7fe7c3ec0cf7e42eef2b478f38f66e9db61f Mon Sep 17 00:00:00 2001 From: Tanmay Jain Date: Sun, 14 Apr 2024 15:07:35 +0530 Subject: [PATCH 4/7] exporting more functions --- asconfig/as_setconfig.go | 20 ++++++++------------ asconfig/schema.go | 7 ++++--- asconfig/utils.go | 2 +- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/asconfig/as_setconfig.go b/asconfig/as_setconfig.go index 6991858..8f5e054 100644 --- a/asconfig/as_setconfig.go +++ b/asconfig/as_setconfig.go @@ -398,7 +398,7 @@ func rearrangeConfigMap(log logr.Logger, configMap DynamicConfigMap) []string { // If namespace is removed, directly add it to the final list finalList = append(finalList, k) } else { - // If namespace is added, add it after all DCs and their direct fields + // If namespace is added, add it after all DCs and their direct configs if lastDCConfig == nil { if lastDC != nil { rearrangedConfigMap.InsertAfter(k, lastDC) @@ -419,23 +419,19 @@ func rearrangeConfigMap(log logr.Logger, configMap DynamicConfigMap) []string { // Handle DC direct fields if tokens[len(tokens)-3] == info.ConfigDCContext { var nap *list.Element - // Check if the key is related to 'node-address-ports' - isNodeAddressPortsKey := strings.HasSuffix(k, sep+keyNodeAddressPorts) - - if isNodeAddressPortsKey { + // Check if the key is 'node-address-ports' + if strings.HasSuffix(k, sep+keyNodeAddressPorts) { if _, ok := v[Remove]; ok { dc := rearrangedConfigMap.PushFront(k) if lastDC == nil { lastDC = dc } continue - } else { - if lastDCConfig != nil { - // Add 'node-address-ports' after all DC direct fields - // There are certain fields that must be set before 'node-address-ports', for example, 'tls-name'. - lastDCConfig = rearrangedConfigMap.InsertAfter(k, lastDCConfig) - continue - } + } else if lastDCConfig != nil { + // Add 'node-address-ports' after all DC direct fields + // There are certain fields that must be set before 'node-address-ports', for example, 'tls-name'. + lastDCConfig = rearrangedConfigMap.InsertAfter(k, lastDCConfig) + continue } } diff --git a/asconfig/schema.go b/asconfig/schema.go index 26e0bf4..99232d8 100644 --- a/asconfig/schema.go +++ b/asconfig/schema.go @@ -3,7 +3,6 @@ package asconfig import ( "encoding/json" "fmt" - "github.com/aerospike/aerospike-management-lib/info" "os" "path/filepath" "reflect" @@ -13,6 +12,8 @@ import ( sets "github.com/deckarep/golang-set/v2" "github.com/go-logr/logr" + + "github.com/aerospike/aerospike-management-lib/info" ) // map of version to schema @@ -222,14 +223,14 @@ func IsDynamicConfig(log logr.Logger, dynamic sets.Set[string], conf string, } } - return dynamic.Contains(getFlatKey(tokens)) + return dynamic.Contains(GetFlatKey(tokens)) } // getDefaultValue returns the default value of a particular config func getDefaultValue(defaultMap map[string]interface{}, conf string) interface{} { tokens := strings.Split(conf, ".") - return defaultMap[getFlatKey(tokens)] + return defaultMap[GetFlatKey(tokens)] } // GetDefault return the map of default values. diff --git a/asconfig/utils.go b/asconfig/utils.go index c2071b2..90da60c 100644 --- a/asconfig/utils.go +++ b/asconfig/utils.go @@ -1070,7 +1070,7 @@ func getContextAndName(log logr.Logger, key, _ string) (context, name string) { return strings.Trim(ctx, "/"), keys[len(keys)-1] } -func getFlatKey(tokens []string) string { +func GetFlatKey(tokens []string) string { var key string for _, token := range tokens { From 6fef589e1a20e05fde00b5095ac020ce5573b6ca Mon Sep 17 00:00:00 2001 From: Tanmay Jain Date: Mon, 22 Apr 2024 18:01:58 +0530 Subject: [PATCH 5/7] exporting recluster function --- deployment/cluster.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deployment/cluster.go b/deployment/cluster.go index 9c6c2aa..5cf2ec3 100644 --- a/deployment/cluster.go +++ b/deployment/cluster.go @@ -311,7 +311,7 @@ func (c *cluster) InfoQuiesce(hostsToBeQuiesced, hostIDs, removedNamespaces []st } } - if err := c.infoRecluster(hostIDs); err != nil { + if err := c.InfoRecluster(hostIDs); err != nil { return err } @@ -718,10 +718,10 @@ func (c *cluster) InfoQuiesceUndo(hostIDs []string) error { } } - return c.infoRecluster(hostIDs) + return c.InfoRecluster(hostIDs) } -func (c *cluster) infoRecluster(hostIDs []string) error { +func (c *cluster) InfoRecluster(hostIDs []string) error { lg := c.log.WithValues("nodes", hostIDs) lg.V(1).Info("Running recluster command") From b1907adc89bc3527f838dd10ffd5a4e0b29f0e77 Mon Sep 17 00:00:00 2001 From: Tanmay Jain Date: Mon, 22 Apr 2024 18:12:22 +0530 Subject: [PATCH 6/7] exporting recluster function --- deployment/aeroinfo.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/deployment/aeroinfo.go b/deployment/aeroinfo.go index 5ab0b0e..e8f0db9 100644 --- a/deployment/aeroinfo.go +++ b/deployment/aeroinfo.go @@ -39,6 +39,16 @@ func InfoQuiesceUndo(log logr.Logger, policy *aero.ClientPolicy, allHosts []*Hos return c.InfoQuiesceUndo(getHostIDsFromHostConns(allHosts)) } +// InfoRecluster recluster hosts. +func InfoRecluster(log logr.Logger, policy *aero.ClientPolicy, allHosts []*HostConn) error { + c, err := newCluster(log, policy, allHosts, allHosts) + if err != nil { + return fmt.Errorf("unable to create a cluster copy for running aeroinfo: %v", err) + } + + return c.InfoRecluster(getHostIDsFromHostConns(allHosts)) +} + // GetQuiescedNodes returns a list of node hostIDs of all nodes that are pending_quiesce=true. func GetQuiescedNodes(log logr.Logger, policy *aero.ClientPolicy, allHosts []*HostConn) ([]string, error) { c, err := newCluster(log, policy, allHosts, allHosts) From 92c4d186a795d0f4785dcf2786d426df259b92fa Mon Sep 17 00:00:00 2001 From: Tanmay Jain Date: Tue, 23 Apr 2024 12:46:40 +0530 Subject: [PATCH 7/7] fix vul --- go.mod | 29 ++++++++++------ go.sum | 83 ++++++++++++++++++++++++++++++---------------- test/containers.go | 8 ++--- 3 files changed, 76 insertions(+), 44 deletions(-) diff --git a/go.mod b/go.mod index a6cc700..334b8f8 100644 --- a/go.mod +++ b/go.mod @@ -6,20 +6,22 @@ require ( github.com/aerospike/aerospike-client-go/v7 v7.1.0 github.com/deckarep/golang-set/v2 v2.3.1 github.com/docker/go-connections v0.4.0 - github.com/go-logr/logr v1.2.4 + github.com/go-logr/logr v1.4.1 github.com/xeipuuv/gojsonschema v1.2.0 go.uber.org/mock v0.3.0 - k8s.io/apimachinery v0.27.2 + k8s.io/apimachinery v0.29.0 ) require ( github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/containerd/log v0.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.5.0 // indirect - github.com/docker/distribution v2.8.3+incompatible // indirect github.com/docker/go-units v0.5.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/kr/text v0.2.0 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/term v0.5.0 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect @@ -27,26 +29,31 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.50.0 // indirect + go.opentelemetry.io/otel v1.25.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 // indirect + go.opentelemetry.io/otel/metric v1.25.0 // indirect + go.opentelemetry.io/otel/sdk v1.25.0 // indirect + go.opentelemetry.io/otel/trace v1.25.0 // indirect golang.org/x/mod v0.13.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect ) require ( - github.com/docker/docker v24.0.7+incompatible - github.com/golang/protobuf v1.5.3 // indirect - github.com/stretchr/testify v1.8.4 + github.com/docker/docker v26.1.0+incompatible + github.com/stretchr/testify v1.9.0 github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/yuin/gopher-lua v1.1.1 // indirect - golang.org/x/net v0.20.0 // indirect + golang.org/x/net v0.24.0 // indirect golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.16.0 // indirect + golang.org/x/sys v0.19.0 // indirect golang.org/x/text v0.14.0 // indirect - google.golang.org/grpc v1.59.0 // indirect + google.golang.org/grpc v1.63.0 // indirect google.golang.org/protobuf v1.33.0 // indirect ) diff --git a/go.sum b/go.sum index 3961c2f..3321d97 100644 --- a/go.sum +++ b/go.sum @@ -4,7 +4,10 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/aerospike/aerospike-client-go/v7 v7.1.0 h1:yvCTKdbpqZxHvv7sWsFHV1j49jZcC8yXRooWsDFqKtA= github.com/aerospike/aerospike-client-go/v7 v7.1.0/go.mod h1:AkHiKvCbqa1c16gCNGju3c5X/yzwLVvblNczqjxNwNk= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -12,36 +15,39 @@ github.com/deckarep/golang-set/v2 v2.3.1 h1:vjmkvJt/IV27WXPyYQpAh4bRyWJc5Y435D17 github.com/deckarep/golang-set/v2 v2.3.1/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= -github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v24.0.7+incompatible h1:Wo6l37AuwP3JaMnZa226lzVXGA3F9Ig1seQen0cKYlM= -github.com/docker/docker v24.0.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v26.1.0+incompatible h1:W1G9MPNbskA6VZWL7b3ZljTh0pXI68FpINx0GKaOdaM= +github.com/docker/docker v26.1.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 h1:Wqo399gCIufwto+VfwCSvsnfGpF/w5E9CNxSwbpD6No= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0/go.mod h1:qmOFXW2epJhM0qSnUUYpldc7gVz2KMQwJ/QYCDIa7XU= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= @@ -60,12 +66,14 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -77,6 +85,22 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M= github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.50.0 h1:cEPbyTSEHlQR89XVlyo78gqluF8Y3oMeBkXGWzQsfXY= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.50.0/go.mod h1:DKdbWcT4GH1D0Y3Sqt/PFXt2naRKDWtU+eE6oLdFNA8= +go.opentelemetry.io/otel v1.25.0 h1:gldB5FfhRl7OJQbUHt/8s0a7cE8fbsPAtdpRaApKy4k= +go.opentelemetry.io/otel v1.25.0/go.mod h1:Wa2ds5NOXEMkCmUou1WA7ZBfLTHWIsp034OVD7AO+Vg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 h1:dT33yIHtmsqpixFsSQPwNeY5drM9wTcoL8h0FWF4oGM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0/go.mod h1:h95q0LBGh7hlAC08X2DhSeyIG02YQ0UyioTCVAqRPmc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 h1:Mbi5PKN7u322woPa85d7ebZ+SOvEoPvoiBu+ryHWgfA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0/go.mod h1:e7ciERRhZaOZXVjx5MiL8TK5+Xv7G5Gv5PA2ZDEJdL8= +go.opentelemetry.io/otel/metric v1.25.0 h1:LUKbS7ArpFL/I2jJHdJcqMGxkRdxpPHE0VU/D4NuEwA= +go.opentelemetry.io/otel/metric v1.25.0/go.mod h1:rkDLUSd2lC5lq2dFNrX9LGAbINP5B7WBkC78RXCpH5s= +go.opentelemetry.io/otel/sdk v1.25.0 h1:PDryEJPC8YJZQSyLY5eqLeafHtG+X7FWnf3aXMtxbqo= +go.opentelemetry.io/otel/sdk v1.25.0/go.mod h1:oFgzCM2zdsxKzz6zwpTZYLLQsFwc+K0daArPdIhuxkw= +go.opentelemetry.io/otel/trace v1.25.0 h1:tqukZGLwQYRIFtSQM2u2+yfMVTgGVeqRLPUYx1Dq6RM= +go.opentelemetry.io/otel/trace v1.25.0/go.mod h1:hCCs70XM/ljO+BeQkyFnbK28SBIJ/Emuha+ccrCRT7I= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo= go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -90,8 +114,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -100,8 +124,8 @@ golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= @@ -118,12 +142,13 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 h1:DC7wcm+i+P1rN3Ff07vL+OndGg5OhNddHyTA+ocPqYE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1:jFNzHPIeuzhdRwVhbZdiym9q0ory/xY3sA+v2wPg8I0= +google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= +google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -135,5 +160,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= -k8s.io/apimachinery v0.27.2 h1:vBjGaKKieaIreI+oQwELalVG4d8f3YAMNpWLzDXkxeg= -k8s.io/apimachinery v0.27.2/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= +k8s.io/apimachinery v0.29.0 h1:+ACVktwyicPz0oc6MTMLwa2Pw3ouLAfAon1wPLtG48o= +k8s.io/apimachinery v0.29.0/go.mod h1:eVBxQ/cwiJxH58eK/jd/vAk4mrxmVlnpBH5J2GbMeis= diff --git a/test/containers.go b/test/containers.go index e0b4664..e0a7804 100644 --- a/test/containers.go +++ b/test/containers.go @@ -11,8 +11,8 @@ import ( "time" "github.com/aerospike/aerospike-client-go/v7" - "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" + "github.com/docker/docker/api/types/image" "github.com/docker/docker/api/types/mount" "github.com/docker/docker/client" "github.com/docker/go-connections/nat" @@ -105,7 +105,7 @@ func Start(size int) error { ctx := context.Background() containers.dockerCLI = cli containers.workDir, _ = filepath.Abs(WordDirAbs) - reader, err := cli.ImagePull(ctx, Image, types.ImagePullOptions{}) + reader, err := cli.ImagePull(ctx, Image, image.PullOptions{}) if err != nil { log.Printf("Unable to pull aerospike image: %s", err) @@ -340,7 +340,7 @@ func RunAerospikeContainer( return nil, err } - err = cli.ContainerStart(ctx, name, types.ContainerStartOptions{}) + err = cli.ContainerStart(ctx, name, container.StartOptions{}) if err != nil { log.Printf("Unable to start container %s: %s", name, err) @@ -403,5 +403,5 @@ func RmAerospikeContainer(name string) error { cli := containers.dockerCLI ctx := context.Background() - return cli.ContainerRemove(ctx, name, types.ContainerRemoveOptions{Force: true}) + return cli.ContainerRemove(ctx, name, container.RemoveOptions{Force: true}) }