Skip to content

Commit c07f128

Browse files
committed
chore: update keydb dependency
- Update keydb dependency from v0.1.0-alpha to v0.2.0-alpha - Refactor dedup service initialization in test to use new constructor - Remove unused keydb cache import and factory function - Update mockedCloudStorage to implement new Download method signature
1 parent 478b2e1 commit c07f128

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ require (
8787
github.com/rudderlabs/analytics-go v3.3.3+incompatible
8888
github.com/rudderlabs/bing-ads-go-sdk v0.2.3
8989
github.com/rudderlabs/compose-test v0.1.3
90-
github.com/rudderlabs/keydb v0.1.0-alpha
90+
github.com/rudderlabs/keydb v0.2.0-alpha
9191
github.com/rudderlabs/rudder-go-kit v0.59.4
9292
github.com/rudderlabs/rudder-observability-kit v0.0.4
9393
github.com/rudderlabs/rudder-schemas v0.7.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,6 +1201,8 @@ github.com/rudderlabs/goqu/v10 v10.3.1 h1:rnfX+b4EwBWQ2UQfIGeEW299JBBkK5biEbnf7K
12011201
github.com/rudderlabs/goqu/v10 v10.3.1/go.mod h1:LH2vI5gGHBxEQuESqFyk5ZA2anGINc8o25hbidDWOYw=
12021202
github.com/rudderlabs/keydb v0.1.0-alpha h1:h87QGW9ut6jQExQjtZsp2BxPc0Hix58WELQ5OrzialM=
12031203
github.com/rudderlabs/keydb v0.1.0-alpha/go.mod h1:gnyirkn1FWIQPCvo/E6rFmfDQ2pjVkAYHF3hJvsBpC0=
1204+
github.com/rudderlabs/keydb v0.2.0-alpha h1:LcjiKWewZIO6OLeUvWwte8Qe3VeD1+/5jhzpHM7ZzVk=
1205+
github.com/rudderlabs/keydb v0.2.0-alpha/go.mod h1:7a49ZEx7gtZJYP9/sZoYQk2F3GlFaSoX3oubkyn+Hu8=
12041206
github.com/rudderlabs/parquet-go v0.0.3 h1:/zgRj929pGKHsthc0kw8stVEcFu1JUcpxDRlhxjSLic=
12051207
github.com/rudderlabs/parquet-go v0.0.3/go.mod h1:WmwBOdvwpXl2aZGRk3NxxgzC/DaWGfax3jrCRhKhtSo=
12061208
github.com/rudderlabs/rudder-go-kit v0.59.4 h1:iKtxLhRLvrfwck53l/2ZM1bnykuJ41l1ohreUpR9l6E=

services/dedup/dedup_test.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"golang.org/x/sync/errgroup"
1818
"google.golang.org/grpc"
1919

20-
keydbcache "github.com/rudderlabs/keydb/cache"
2120
keydbclient "github.com/rudderlabs/keydb/client"
2221
keydb "github.com/rudderlabs/keydb/node"
2322
keydbproto "github.com/rudderlabs/keydb/proto"
@@ -395,12 +394,8 @@ func startKeydb(t testing.TB, conf *config.Config) {
395394
SnapshotInterval: time.Minute,
396395
Addresses: []string{address},
397396
}
398-
cf := func(hashRange uint32) (keydb.Cache, error) {
399-
conf.Set("BadgerDB.Dedup.Path", t.TempDir())
400-
return keydbcache.BadgerFactory(conf, logger.NOP)(hashRange)
401-
}
402397
require.NoError(t, err)
403-
service, err = keydb.NewService(ctx, nodeConfig, cf, &mockedCloudStorage{}, logger.NOP)
398+
service, err = keydb.NewService(ctx, nodeConfig, &mockedCloudStorage{}, conf, stats.NOP, logger.NOP)
404399
require.NoError(t, err)
405400

406401
// Create a gRPC server
@@ -444,7 +439,9 @@ func (m *mockedFilemanagerSession) Next() (fileObjects []*filemanager.FileInfo,
444439

445440
type mockedCloudStorage struct{}
446441

447-
func (m *mockedCloudStorage) Download(_ context.Context, _ io.WriterAt, _ string) error { return nil }
442+
func (m *mockedCloudStorage) Download(_ context.Context, _ io.WriterAt, _ string, options ...filemanager.DownloadOption) error {
443+
return nil
444+
}
448445
func (m *mockedCloudStorage) UploadReader(_ context.Context, _ string, _ io.Reader) (filemanager.UploadedFile, error) {
449446
return filemanager.UploadedFile{}, nil
450447
}

0 commit comments

Comments
 (0)