From a43ebc8fc8fd858d6117a1fe0bb6f7330037dc51 Mon Sep 17 00:00:00 2001 From: Eray Arslan Date: Sun, 3 Dec 2023 02:27:12 +0300 Subject: [PATCH] feat: support 5.x.x --- .github/workflows/benchmark.yml | 23 ----- .github/workflows/build.yml | 2 +- README.md | 9 ++ config/dcp.go | 16 ++-- couchbase/client.go | 2 +- dcp_test.go | 152 ++++++++++++++++++++++++-------- example/go.mod | 14 +-- example/go.sum | 28 +++--- go.mod | 14 +-- go.sum | 28 +++--- scripts/entrypoint_5.sh | 63 +++++++++++++ stream/stream.go | 16 +++- test/couchbase/Dockerfile | 3 +- test/integration/go.mod | 14 +-- test/integration/go.sum | 28 +++--- 15 files changed, 277 insertions(+), 135 deletions(-) delete mode 100644 .github/workflows/benchmark.yml create mode 100644 scripts/entrypoint_5.sh diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml deleted file mode 100644 index 2eb8e7a..0000000 --- a/.github/workflows/benchmark.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Benchmark - -on: - push: - branches: - - master - -jobs: - benchmark: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.20' - - - name: Bench - run: go test -v ./... -bench . -benchmem diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4b5091b..c76a146 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,4 +36,4 @@ jobs: run: go build -v ./... - name: Test - run: go test -v ./... + run: go test -parallel 1 -v ./... diff --git a/README.md b/README.md index cf8752f..5a2ee87 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,8 @@ $ go get github.com/Trendyol/go-dcp | `dcp.group.membership.totalMembers` | int | no | 1 | Set this if membership is `static` or `kubernetesStatefulSet`. Other methods will ignore this field. | | `dcp.group.membership.rebalanceDelay` | time.Duration | no | 20s | Works for autonomous mode. | | `dcp.group.membership.config` | map[string]string | no | *not set | Set key-values of config. `expirySeconds`,`heartbeatInterval`,`heartbeatToleranceDuration`,`monitorInterval`,`timeout` for `couchbase` type | +| `dcp.config.disableExpiryOpcode` | bool | no | false | Set this to true if Couchbase Server lower then 6.5.0 | +| `dcp.config.disableStreamEndByClient` | bool | no | false | Set this to true if Couchbase Server lower then 5.5.0 | | `leaderElection.enabled` | bool | no | false | Set this true for memberships `kubernetesHa`. | | `leaderElection.type` | string | no | kubernetes | Leader Election types. `kubernetes` | | `leaderElection.config` | map[string]string | no | *not set | Set key-values of config. `leaseLockName`,`leaseLockNamespace`, `leaseDuration`, `renewDeadline`, `retryPeriod` for `kubernetes` type. | @@ -164,6 +166,13 @@ In case you haven't configured a metric.path, the metrics will be exposed at the | cbgo_offset_write_current | The latest number of the offset write | N/A | Gauge | | cbgo_offset_write_latency_ms_current | The latest offset write latency in milliseconds | N/A | Gauge | +### Compatibility + +| Go DCP Version | Minimum Couchbase Server Version | +|----------------|----------------------------------| +| x<1.1.16 | 6.5.x | +| 1.1.16>=x | 5.x.x | + ### Examples - [example with couchbase membership](example/main.go) diff --git a/config/dcp.go b/config/dcp.go index e014aca..5f8a38f 100644 --- a/config/dcp.go +++ b/config/dcp.go @@ -53,12 +53,18 @@ type DCPListener struct { BufferSize uint `yaml:"bufferSize"` } +type ExternalDcpConfig struct { + DisableExpiryOpcode bool `yaml:"disableExpiryOpcode"` + DisableStreamEndByClient bool `yaml:"disableStreamEndByClient"` +} + type ExternalDcp struct { - BufferSize any `yaml:"bufferSize"` - ConnectionBufferSize any `yaml:"connectionBufferSize"` - Group DCPGroup `yaml:"group"` - ConnectionTimeout time.Duration `yaml:"connectionTimeout"` - Listener DCPListener `yaml:"listener"` + BufferSize any `yaml:"bufferSize"` + ConnectionBufferSize any `yaml:"connectionBufferSize"` + Group DCPGroup `yaml:"group"` + ConnectionTimeout time.Duration `yaml:"connectionTimeout"` + Listener DCPListener `yaml:"listener"` + Config ExternalDcpConfig `yaml:"config"` } type API struct { diff --git a/couchbase/client.go b/couchbase/client.go index 18c96d5..8a30c23 100644 --- a/couchbase/client.go +++ b/couchbase/client.go @@ -290,7 +290,7 @@ func (s *client) DcpConnect() error { }, DCPConfig: gocbcore.DCPConfig{ BufferSize: helpers.ResolveUnionIntOrStringValue(s.config.Dcp.BufferSize), - UseExpiryOpcode: true, + UseExpiryOpcode: !s.config.Dcp.Config.DisableExpiryOpcode, }, IoConfig: gocbcore.IoConfig{ UseCollections: true, diff --git a/dcp_test.go b/dcp_test.go index ed0fc39..dad2e0a 100644 --- a/dcp_test.go +++ b/dcp_test.go @@ -3,50 +3,111 @@ package dcp import ( "context" "fmt" + "strconv" + "strings" "sync" "testing" "time" + "github.com/Trendyol/go-dcp/models" + "github.com/Trendyol/go-dcp/logger" "github.com/Trendyol/go-dcp/config" "github.com/Trendyol/go-dcp/couchbase" - "github.com/Trendyol/go-dcp/models" - "github.com/couchbase/gocbcore/v10" "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/wait" ) -var c = &config.Dcp{ - Hosts: []string{"localhost:8091"}, - Username: "user", - Password: "password", - BucketName: "dcp-test", - Dcp: config.ExternalDcp{ - Group: config.DCPGroup{ - Name: "groupName", - Membership: config.DCPGroupMembership{ - RebalanceDelay: 3 * time.Second, +func panicVersion(version string) { + panic(fmt.Sprintf("invalid version: %v", version)) +} + +func parseVersion(version string) (int, int, int) { + parse := strings.Split(version, ".") + if len(parse) < 3 { + panicVersion(version) + } + + major, err := strconv.Atoi(parse[0]) + if err != nil { + panicVersion(version) + } + + minor, err := strconv.Atoi(parse[1]) + if err != nil { + panicVersion(version) + } + + patch, err := strconv.Atoi(parse[2]) + if err != nil { + panicVersion(version) + } + + return major, minor, patch +} + +// true when version lower than 6.5.0 +func disableExpiryOpcode(c *config.Dcp, version string) { + major, minor, _ := parseVersion(version) + + if major < 6 || (major == 6 && minor < 5) { + c.Dcp.Config.DisableExpiryOpcode = true + } +} + +// true when version lower than 5.5.0 +func disableStreamEndByClient(c *config.Dcp, version string) { + major, minor, _ := parseVersion(version) + + if major < 5 || (major == 5 && minor < 5) { + c.Dcp.Config.DisableStreamEndByClient = true + } +} + +func isVersion5xx(version string) bool { + major, _, _ := parseVersion(version) + return major == 5 +} + +func getConfig() *config.Dcp { + return &config.Dcp{ + Hosts: []string{"localhost:8091"}, + Username: "user", + Password: "password", + BucketName: "dcp-test", + Dcp: config.ExternalDcp{ + Group: config.DCPGroup{ + Name: "groupName", + Membership: config.DCPGroupMembership{ + RebalanceDelay: 3 * time.Second, + }, }, }, - }, - Debug: true, + Debug: true, + } } -func setupContainer(ctx context.Context) (testcontainers.Container, error) { +func setupContainer(c *config.Dcp, ctx context.Context, version string) (testcontainers.Container, error) { + var entrypoint string + if isVersion5xx(version) { + entrypoint = "scripts/entrypoint_5.sh" + } else { + entrypoint = "scripts/entrypoint.sh" + } + req := testcontainers.ContainerRequest{ - Image: "couchbase:6.5.1", + Image: fmt.Sprintf("couchbase:%v", version), ExposedPorts: []string{"8091:8091/tcp", "8093:8093/tcp", "11210:11210/tcp"}, - WaitingFor: wait.ForLog("/entrypoint.sh couchbase-server").WithStartupTimeout(20 * time.Second), + WaitingFor: wait.ForLog("/entrypoint.sh couchbase-server").WithStartupTimeout(30 * time.Second), Env: map[string]string{ "USERNAME": c.Username, "PASSWORD": c.Password, "BUCKET_NAME": c.BucketName, "BUCKET_TYPE": "couchbase", "BUCKET_RAMSIZE": "1024", - "SERVICES": "data,index,query,fts,analytics,eventing", "CLUSTER_RAMSIZE": "1024", "CLUSTER_INDEX_RAMSIZE": "512", "CLUSTER_EVENTING_RAMSIZE": "256", @@ -66,7 +127,7 @@ func setupContainer(ctx context.Context) (testcontainers.Container, error) { }, Files: []testcontainers.ContainerFile{ { - HostFilePath: "scripts/entrypoint.sh", + HostFilePath: entrypoint, ContainerFilePath: "/config-entrypoint.sh", FileMode: 600, }, @@ -79,14 +140,14 @@ func setupContainer(ctx context.Context) (testcontainers.Container, error) { }) } -func insertDataToContainer(b *testing.B, iteration int, chunkSize int, bulkSize int) { +func insertDataToContainer(c *config.Dcp, t *testing.T, iteration int, chunkSize int, bulkSize int) { logger.Log.Info("mock data stream started with iteration=%v", iteration) client := couchbase.NewClient(c) err := client.Connect() if err != nil { - b.Fatal(err) + t.Fatal(err) } var iter int @@ -114,13 +175,13 @@ func insertDataToContainer(b *testing.B, iteration int, chunkSize int, bulkSize err = opm.Wait(op, err) if err != nil { - b.Error(err) + t.Error(err) } err = <-ch if err != nil { - b.Error(err) + t.Error(err) } wg.Done() @@ -139,32 +200,32 @@ func insertDataToContainer(b *testing.B, iteration int, chunkSize int, bulkSize } //nolint:funlen -func BenchmarkDcp(b *testing.B) { +func test(t *testing.T, version string) { chunkSize := 4 bulkSize := 1024 - iteration := 24 + iteration := 96 mockDataSize := iteration * bulkSize * chunkSize totalNotify := 10 notifySize := mockDataSize / totalNotify + c := getConfig() + c.ApplyDefaults() + + disableExpiryOpcode(c, version) + disableStreamEndByClient(c, version) + ctx := context.Background() - container, err := setupContainer(ctx) + container, err := setupContainer(c, ctx, version) if err != nil { - b.Fatal(err) + t.Fatal(err) } counter := 0 finish := make(chan struct{}, 1) - c.ApplyDefaults() - dcp, err := NewDcp(c, func(ctx *models.ListenerContext) { if _, ok := ctx.Event.(models.DcpMutation); ok { - if counter == 0 { - b.ResetTimer() - } - ctx.Ack() counter++ @@ -179,12 +240,12 @@ func BenchmarkDcp(b *testing.B) { } }) if err != nil { - b.Fatal(err) + t.Fatal(err) } go func() { <-dcp.WaitUntilReady() - insertDataToContainer(b, iteration, chunkSize, bulkSize) + insertDataToContainer(c, t, iteration, chunkSize, bulkSize) }() go func() { @@ -196,6 +257,25 @@ func BenchmarkDcp(b *testing.B) { err = container.Terminate(ctx) if err != nil { - b.Fatal(err) + t.Fatal(err) + } +} + +func TestDcp(t *testing.T) { + for _, version := range []string{ + "5.0.1", + "5.1.0", + "5.5.0", + "6.0.0", + "6.5.0", + "6.6.0", + "7.0.0", + "7.1.0", + "7.2.0", + "7.2.3", + } { + t.Run(version, func(t *testing.T) { + test(t, version) + }) } } diff --git a/example/go.mod b/example/go.mod index 143b0ff..039a040 100644 --- a/example/go.mod +++ b/example/go.mod @@ -12,7 +12,7 @@ require ( github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/couchbase/gocbcore/v10 v10.2.9 // indirect + github.com/couchbase/gocbcore/v10 v10.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/emicklei/go-restful/v3 v3.10.1 // indirect github.com/go-logr/logr v1.2.4 // indirect @@ -20,7 +20,7 @@ require ( github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/gofiber/adaptor/v2 v2.2.1 // indirect - github.com/gofiber/fiber/v2 v2.50.0 // indirect + github.com/gofiber/fiber/v2 v2.51.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect @@ -33,7 +33,7 @@ require ( github.com/klauspost/compress v1.16.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mhmtszr/concurrent-swiss-map v1.0.5 // indirect @@ -52,7 +52,7 @@ require ( golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.11.0 // indirect golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.13.0 // indirect + golang.org/x/sys v0.14.0 // indirect golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect @@ -61,9 +61,9 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.28.3 // indirect - k8s.io/apimachinery v0.28.3 // indirect - k8s.io/client-go v0.28.3 // indirect + k8s.io/api v0.28.4 // indirect + k8s.io/apimachinery v0.28.4 // indirect + k8s.io/client-go v0.28.4 // indirect k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect diff --git a/example/go.sum b/example/go.sum index 68a4a14..301097e 100644 --- a/example/go.sum +++ b/example/go.sum @@ -15,8 +15,8 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/containerd/containerd v1.7.7 h1:QOC2K4A42RQpcrZyptP6z9EJZnlHfHJUfZrAAHe15q4= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= -github.com/couchbase/gocbcore/v10 v10.2.9 h1:zph/+ceu3JtZEDKhJMTRc6lGrahq+mnlQY/1dSepJuE= -github.com/couchbase/gocbcore/v10 v10.2.9/go.mod h1:lYQIIk+tzoMcwtwU5GzPbDdqEkwkH3isI2rkSpfL0oM= +github.com/couchbase/gocbcore/v10 v10.3.0 h1:cu5KWP5Yq9cANw0UitpKWmb8mv9NDhC0ApIf9rMrVq8= +github.com/couchbase/gocbcore/v10 v10.3.0/go.mod h1:lYQIIk+tzoMcwtwU5GzPbDdqEkwkH3isI2rkSpfL0oM= github.com/couchbaselabs/gocaves/client v0.0.0-20230307083111-cc3960c624b1 h1:H7OK4q4WsDxqNIB/Ba8BQBXBHFilZnyItHrLr3qmsKA= github.com/couchbaselabs/gocaves/client v0.0.0-20230307083111-cc3960c624b1/go.mod h1:AVekAZwIY2stsJOMWLAS/0uA/+qdp7pjO8EHnl61QkY= github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= @@ -44,8 +44,8 @@ github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+ github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/gofiber/adaptor/v2 v2.2.1 h1:givE7iViQWlsTR4Jh7tB4iXzrlKBgiraB/yTdHs9Lv4= github.com/gofiber/adaptor/v2 v2.2.1/go.mod h1:AhR16dEqs25W2FY/l8gSj1b51Azg5dtPDmm+pruNOrc= -github.com/gofiber/fiber/v2 v2.50.0 h1:ia0JaB+uw3GpNSCR5nvC5dsaxXjRU5OEu36aytx+zGw= -github.com/gofiber/fiber/v2 v2.50.0/go.mod h1:21eytvay9Is7S6z+OgPi7c7n4++tnClWmhpimVHMimw= +github.com/gofiber/fiber/v2 v2.51.0 h1:JNACcZy5e2tGApWB2QrRpenTWn0fq0hkFm6k0C86gKQ= +github.com/gofiber/fiber/v2 v2.51.0/go.mod h1:xaQRZQJGqnKOQnbQw+ltvku3/h8QxvNi8o6JiJ7Ll0U= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= @@ -89,8 +89,8 @@ github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= @@ -185,8 +185,8 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -224,12 +224,12 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= -k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= -k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= +k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= +k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= +k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= +k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= +k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= +k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= diff --git a/go.mod b/go.mod index 0c95154..37cd47b 100644 --- a/go.mod +++ b/go.mod @@ -5,8 +5,8 @@ go 1.20 require ( github.com/ansrivas/fiberprometheus/v2 v2.6.1 github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef - github.com/couchbase/gocbcore/v10 v10.2.9 - github.com/gofiber/fiber/v2 v2.50.0 + github.com/couchbase/gocbcore/v10 v10.3.0 + github.com/gofiber/fiber/v2 v2.51.0 github.com/google/uuid v1.4.0 github.com/json-iterator/go v1.1.12 github.com/mhmtszr/concurrent-swiss-map v1.0.5 @@ -15,8 +15,8 @@ require ( github.com/testcontainers/testcontainers-go v0.26.0 golang.org/x/sync v0.5.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/apimachinery v0.28.3 - k8s.io/client-go v0.28.3 + k8s.io/apimachinery v0.28.4 + k8s.io/client-go v0.28.4 ) require ( @@ -55,7 +55,7 @@ require ( github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/moby/patternmatcher v0.6.0 // indirect @@ -86,7 +86,7 @@ require ( golang.org/x/mod v0.10.0 // indirect golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.11.0 // indirect - golang.org/x/sys v0.13.0 // indirect + golang.org/x/sys v0.14.0 // indirect golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect @@ -97,7 +97,7 @@ require ( google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/api v0.28.3 // indirect + k8s.io/api v0.28.4 // indirect k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect diff --git a/go.sum b/go.sum index 31558ac..a65f75e 100644 --- a/go.sum +++ b/go.sum @@ -28,8 +28,8 @@ github.com/containerd/containerd v1.7.7/go.mod h1:3c4XZv6VeT9qgf9GMTxNTMFxGJrGpI github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/couchbase/gocbcore/v10 v10.2.9 h1:zph/+ceu3JtZEDKhJMTRc6lGrahq+mnlQY/1dSepJuE= -github.com/couchbase/gocbcore/v10 v10.2.9/go.mod h1:lYQIIk+tzoMcwtwU5GzPbDdqEkwkH3isI2rkSpfL0oM= +github.com/couchbase/gocbcore/v10 v10.3.0 h1:cu5KWP5Yq9cANw0UitpKWmb8mv9NDhC0ApIf9rMrVq8= +github.com/couchbase/gocbcore/v10 v10.3.0/go.mod h1:lYQIIk+tzoMcwtwU5GzPbDdqEkwkH3isI2rkSpfL0oM= github.com/couchbaselabs/gocaves/client v0.0.0-20230307083111-cc3960c624b1 h1:H7OK4q4WsDxqNIB/Ba8BQBXBHFilZnyItHrLr3qmsKA= github.com/couchbaselabs/gocaves/client v0.0.0-20230307083111-cc3960c624b1/go.mod h1:AVekAZwIY2stsJOMWLAS/0uA/+qdp7pjO8EHnl61QkY= github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= @@ -70,8 +70,8 @@ github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofiber/adaptor/v2 v2.2.1 h1:givE7iViQWlsTR4Jh7tB4iXzrlKBgiraB/yTdHs9Lv4= github.com/gofiber/adaptor/v2 v2.2.1/go.mod h1:AhR16dEqs25W2FY/l8gSj1b51Azg5dtPDmm+pruNOrc= -github.com/gofiber/fiber/v2 v2.50.0 h1:ia0JaB+uw3GpNSCR5nvC5dsaxXjRU5OEu36aytx+zGw= -github.com/gofiber/fiber/v2 v2.50.0/go.mod h1:21eytvay9Is7S6z+OgPi7c7n4++tnClWmhpimVHMimw= +github.com/gofiber/fiber/v2 v2.51.0 h1:JNACcZy5e2tGApWB2QrRpenTWn0fq0hkFm6k0C86gKQ= +github.com/gofiber/fiber/v2 v2.51.0/go.mod h1:xaQRZQJGqnKOQnbQw+ltvku3/h8QxvNi8o6JiJ7Ll0U= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= @@ -119,8 +119,8 @@ github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= @@ -263,8 +263,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= @@ -309,12 +309,12 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C 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.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= -k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= -k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= +k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= +k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= +k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= +k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= +k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= +k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= diff --git a/scripts/entrypoint_5.sh b/scripts/entrypoint_5.sh new file mode 100644 index 0000000..d65c287 --- /dev/null +++ b/scripts/entrypoint_5.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# https://github.com/Trendyol/couchbase-docker-image-for-testcontainers/blob/master/entrypoint.sh + +rm -rf /opt/couchbase/var/lib/couchbase/config/config.dat + +echo '{rest_port, '${REST_PORT}'}.' >> /opt/couchbase/etc/couchbase/static_config +echo '{capi_port, '${CAPI_PORT}'}.' >> /opt/couchbase/etc/couchbase/static_config +echo '{query_port, '${QUERY_PORT}'}.' >> /opt/couchbase/etc/couchbase/static_config +echo '{fts_http_port, '${FTS_PORT}'}.' >> /opt/couchbase/etc/couchbase/static_config +echo '{memcached_ssl_port, '${MEMCACHED_SSL_PORT}'}.' >> /opt/couchbase/etc/couchbase/static_config +echo '{memcached_port, '${MEMCACHED_PORT}'}.' >> /opt/couchbase/etc/couchbase/static_config +echo '{ssl_rest_port, '${SSL_REST_PORT}'}.' >> /opt/couchbase/etc/couchbase/static_config + +sleep 1 + +set -m + +/entrypoint.sh couchbase-server & + +check_db() { + curl --silent http://127.0.0.1:${REST_PORT}/pools > /dev/null + echo $? +} + +check_cluster_init(){ + bash /opt/couchbase/bin/couchbase-cli cluster-init -c 127.0.0.1:${REST_PORT} \ + --cluster-username ${USERNAME} --cluster-password ${PASSWORD} \ + --services data,index,query,fts \ + --cluster-ramsize ${CLUSTER_RAMSIZE} --cluster-index-ramsize ${CLUSTER_INDEX_RAMSIZE} \ + --cluster-fts-ramsize ${CLUSTER_FTS_RAMSIZE} \ + --index-storage-setting ${INDEX_STORAGE_SETTING} > /dev/null + echo $? +} + +until [[ $(check_db) = 0 ]]; do + >&2 echo "Waiting for Couchbase Server to be available" + sleep 1 +done + +echo "Couchbase server is online" + +until [[ $(check_cluster_init) = 0 ]]; do + >&2 echo "Waiting for cluster init" + sleep 1 +done + +echo "Cluster initialized" + +bash /opt/couchbase/bin/couchbase-cli user-manage -c 127.0.0.1:${REST_PORT} -u ${USERNAME} -p ${PASSWORD} \ + --set --rbac-username ${BUCKET_NAME} --rbac-password ${PASSWORD} \ + --rbac-name ${BUCKET_NAME} --roles admin --auth-domain local +sleep 3 + +echo "Bucket create" +bash /opt/couchbase/bin/couchbase-cli bucket-create -c 127.0.0.1:${REST_PORT} --username ${USERNAME} --password ${PASSWORD} \ +--bucket ${BUCKET_NAME} --bucket-type ${BUCKET_TYPE} --bucket-ramsize ${BUCKET_RAMSIZE} --enable-flush 1 --bucket-replica 0 --wait + +sleep 3 + +# Attach to couchbase entrypoint +echo "Attaching to couchbase-server entrypoint" +echo "couchbase-dev started" +fg 1 \ No newline at end of file diff --git a/stream/stream.go b/stream/stream.go index 21c9469..7b20981 100644 --- a/stream/stream.go +++ b/stream/stream.go @@ -135,7 +135,11 @@ func (s *stream) reopenStream(vbID uint16) { func (s *stream) listenEnd() { for endContext := range s.observer.ListenEnd() { if !s.closeWithCancel && endContext.Err != nil { - logger.Log.Error("end stream vbId: %v got error: %v", endContext.Event.VbID, endContext.Err) + if !errors.Is(endContext.Err, gocbcore.ErrDCPStreamClosed) { + logger.Log.Error("end stream vbId: %v got error: %v", endContext.Event.VbID, endContext.Err) + } else { + logger.Log.Debug("end stream vbId: %v got error: %v", endContext.Event.VbID, endContext.Err) + } } if endContext.Err == nil { @@ -260,7 +264,7 @@ func (s *stream) openAllStreams(vbIds []uint16) { openWg.Wait() } -func (s *stream) closeAllStreams() error { +func (s *stream) closeAllStreams(internal bool) error { ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() @@ -274,7 +278,11 @@ func (s *stream) closeAllStreams() error { s.offsets.Range(func(vbID uint16, _ *models.Offset) bool { go func(vbID uint16) { defer wg.Done() - err = s.client.CloseStream(vbID) + if internal { + s.observer.End(models.DcpStreamEnd{VbID: vbID}, nil) + } else { + err = s.client.CloseStream(vbID) + } }(vbID) return true }) @@ -316,7 +324,7 @@ func (s *stream) Close(closeWithCancel bool) { s.checkpoint.StopSchedule() } - err := s.closeAllStreams() + err := s.closeAllStreams(s.config.Dcp.Config.DisableStreamEndByClient) if err != nil { logger.Log.Error("cannot close all streams: %v", err) } diff --git a/test/couchbase/Dockerfile b/test/couchbase/Dockerfile index 17d8c01..d2e6670 100644 --- a/test/couchbase/Dockerfile +++ b/test/couchbase/Dockerfile @@ -1,5 +1,4 @@ -#FROM couchbase/server:community-7.1.0-aarch64 -FROM couchbase:community-7.1.0 +FROM couchbase:7.2.3 ADD configure.sh /configure.sh RUN chmod +x /configure.sh diff --git a/test/integration/go.mod b/test/integration/go.mod index 5c59d14..af3e2e1 100644 --- a/test/integration/go.mod +++ b/test/integration/go.mod @@ -12,7 +12,7 @@ require ( github.com/asaskevich/EventBus v0.0.0-20200907212545-49d423059eef // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/couchbase/gocbcore/v10 v10.2.9 // indirect + github.com/couchbase/gocbcore/v10 v10.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/emicklei/go-restful/v3 v3.10.1 // indirect github.com/go-logr/logr v1.2.4 // indirect @@ -20,7 +20,7 @@ require ( github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.22.3 // indirect github.com/gofiber/adaptor/v2 v2.2.1 // indirect - github.com/gofiber/fiber/v2 v2.50.0 // indirect + github.com/gofiber/fiber/v2 v2.51.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect @@ -33,7 +33,7 @@ require ( github.com/klauspost/compress v1.16.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mhmtszr/concurrent-swiss-map v1.0.5 // indirect @@ -52,7 +52,7 @@ require ( golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.11.0 // indirect golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.13.0 // indirect + golang.org/x/sys v0.14.0 // indirect golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect @@ -61,9 +61,9 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.28.3 // indirect - k8s.io/apimachinery v0.28.3 // indirect - k8s.io/client-go v0.28.3 // indirect + k8s.io/api v0.28.4 // indirect + k8s.io/apimachinery v0.28.4 // indirect + k8s.io/client-go v0.28.4 // indirect k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect diff --git a/test/integration/go.sum b/test/integration/go.sum index 68a4a14..301097e 100644 --- a/test/integration/go.sum +++ b/test/integration/go.sum @@ -15,8 +15,8 @@ github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/containerd/containerd v1.7.7 h1:QOC2K4A42RQpcrZyptP6z9EJZnlHfHJUfZrAAHe15q4= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= -github.com/couchbase/gocbcore/v10 v10.2.9 h1:zph/+ceu3JtZEDKhJMTRc6lGrahq+mnlQY/1dSepJuE= -github.com/couchbase/gocbcore/v10 v10.2.9/go.mod h1:lYQIIk+tzoMcwtwU5GzPbDdqEkwkH3isI2rkSpfL0oM= +github.com/couchbase/gocbcore/v10 v10.3.0 h1:cu5KWP5Yq9cANw0UitpKWmb8mv9NDhC0ApIf9rMrVq8= +github.com/couchbase/gocbcore/v10 v10.3.0/go.mod h1:lYQIIk+tzoMcwtwU5GzPbDdqEkwkH3isI2rkSpfL0oM= github.com/couchbaselabs/gocaves/client v0.0.0-20230307083111-cc3960c624b1 h1:H7OK4q4WsDxqNIB/Ba8BQBXBHFilZnyItHrLr3qmsKA= github.com/couchbaselabs/gocaves/client v0.0.0-20230307083111-cc3960c624b1/go.mod h1:AVekAZwIY2stsJOMWLAS/0uA/+qdp7pjO8EHnl61QkY= github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= @@ -44,8 +44,8 @@ github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+ github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/gofiber/adaptor/v2 v2.2.1 h1:givE7iViQWlsTR4Jh7tB4iXzrlKBgiraB/yTdHs9Lv4= github.com/gofiber/adaptor/v2 v2.2.1/go.mod h1:AhR16dEqs25W2FY/l8gSj1b51Azg5dtPDmm+pruNOrc= -github.com/gofiber/fiber/v2 v2.50.0 h1:ia0JaB+uw3GpNSCR5nvC5dsaxXjRU5OEu36aytx+zGw= -github.com/gofiber/fiber/v2 v2.50.0/go.mod h1:21eytvay9Is7S6z+OgPi7c7n4++tnClWmhpimVHMimw= +github.com/gofiber/fiber/v2 v2.51.0 h1:JNACcZy5e2tGApWB2QrRpenTWn0fq0hkFm6k0C86gKQ= +github.com/gofiber/fiber/v2 v2.51.0/go.mod h1:xaQRZQJGqnKOQnbQw+ltvku3/h8QxvNi8o6JiJ7Ll0U= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= @@ -89,8 +89,8 @@ github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJ github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= @@ -185,8 +185,8 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -224,12 +224,12 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= -k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= -k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= -k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= -k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= -k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= +k8s.io/api v0.28.4 h1:8ZBrLjwosLl/NYgv1P7EQLqoO8MGQApnbgH8tu3BMzY= +k8s.io/api v0.28.4/go.mod h1:axWTGrY88s/5YE+JSt4uUi6NMM+gur1en2REMR7IRj0= +k8s.io/apimachinery v0.28.4 h1:zOSJe1mc+GxuMnFzD4Z/U1wst50X28ZNsn5bhgIIao8= +k8s.io/apimachinery v0.28.4/go.mod h1:wI37ncBvfAoswfq626yPTe6Bz1c22L7uaJ8dho83mgg= +k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= +k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ=