-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[major] Vald V1 New Design APIs #740
Conversation
Signed-off-by: kpango <[email protected]>
[CHATOPS:HELP] ChatOps commands.
|
Signed-off-by: kpango <[email protected]>
…s/vald into feature/all/new-design-apis
Co-authored-by: Rintaro Okamura <[email protected]>
Signed-off-by: kpango <[email protected]>
reviewed |
Signed-off-by: kpango <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
golangci
pkg/gateway/meta/handler/grpc/handler.go|308| line is 128 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|313| line is 131 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|325| line is 133 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|330| line is 126 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|394| line is 127 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|416| line is 122 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|442| line is 123 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|477| line is 122 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|489| line is 122 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|694| line is 130 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|721| line is 135 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|728| line is 125 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|285 col 2| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
pkg/gateway/meta/handler/grpc/handler.go|366 col 3| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
pkg/gateway/meta/handler/grpc/option.go|30 col 24| mnd: Magic number: 20, in detected (gomnd)
internal/io/ioutil/ioutil.go|32 col 15| Error return value of f.Close
is not checked (errcheck)
internal/io/ioutil/ioutil.go|28 col 12| G304: Potential file inclusion via variable (gosec)
internal/tls/option.go|24 col 5| defaultOptions
is a global variable (gochecknoglobals)
internal/worker/queue_option.go|28 col 5| defaultQueueOpts
is a global variable (gochecknoglobals)
internal/worker/worker_option.go|26 col 5| defaultWorkerOpts
is a global variable (gochecknoglobals)
hack/helm/schema/gen/main.go|36 col 5| aliases
is a global variable (gochecknoglobals)
hack/helm/schema/gen/main.go|102 col 12| G304: Potential file inclusion via variable (gosec)
pkg/agent/core/ngt/handler/grpc/handler.go|291| 291-314 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:349-374
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|349| 349-374 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:291-314
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|186| 186-220 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:222-256
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|222| 222-256 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:186-220
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|210| line is 173 characters (lll)
pkg/agent/core/ngt/handler/grpc/handler.go|246| line is 177 characters (lll)
pkg/agent/core/ngt/handler/grpc/option.go|40 col 24| mnd: Magic number: 20, in detected (gomnd)
internal/rand/rand.go|31 col 5| pool
is a global variable (gochecknoglobals)
internal/k8s/metrics/node/option.go|24 col 5| defaultOpts
is unused (deadcode)
internal/client/v1/client/vald/option.go|24 col 5| defaultOpts
is unused (deadcode)
internal/net/grpc/pool/option.go|28 col 11| mnd: Magic number: 3, in detected (gomnd)
internal/net/grpc/pool/option.go|29 col 16| mnd: Magic number: 80, in detected (gomnd)
internal/net/grpc/pool/option.go|30 col 14| mnd: Magic number: 65535, in detected (gomnd)
internal/k8s/node/option.go|24 col 5| defaultOpts
is unused (deadcode)
pkg/gateway/meta/service/meta.go|400| 400-430 lines are duplicate of pkg/gateway/meta/service/meta.go:462-492
(dupl)
pkg/gateway/meta/service/meta.go|462| 462-492 lines are duplicate of pkg/gateway/meta/service/meta.go:400-430
(dupl)
pkg/gateway/meta/service/meta.go|136| 136-219 lines are duplicate of pkg/gateway/meta/service/meta.go:221-304
(dupl)
pkg/gateway/meta/service/meta.go|221| 221-304 lines are duplicate of pkg/gateway/meta/service/meta.go:136-219
(dupl)
internal/net/grpc/client_test.go|206 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/client_test.go|342 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/client_test.go|343 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/client_test.go|482 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/client_test.go|483 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
pkg/manager/compressor/service/registerer.go|64 col 51| S1019: should use make(map[string]*payload.Backup_Vector) instead (gosimple)
pkg/manager/backup/cassandra/handler/grpc/handler.go|250 col 83| toBackupVector
- result err
is always nil
(unparam)
pkg/manager/backup/cassandra/handler/grpc/handler.go|258 col 79| toModelVector
- result err
is always nil
(unparam)
pkg/manager/backup/mysql/handler/grpc/handler.go|241 col 83| toBackupVector
- result err
is always nil
(unparam)
pkg/manager/backup/mysql/handler/grpc/handler.go|249 col 79| toModelVector
- result err
is always nil
(unparam)
internal/db/rdb/mysql/mysql.go|40 col 2| vectorColumnName
is unused (deadcode)
pkg/gateway/backup/router/router.go|33| Function 'New' is too long (133 > 60) (funlen)
internal/backoff/backoff.go|67| Function 'Do' is too long (65 > 60) (funlen)
internal/backoff/option.go|33 col 20| mnd: Magic number: 1.5, in detected (gomnd)
pkg/gateway/backup/handler/grpc/handler.go|154| Function 'Insert' has too many statements (45 > 40) (funlen)
pkg/gateway/backup/handler/grpc/handler.go|240| Function 'MultiInsert' has too many statements (42 > 40) (funlen)
pkg/gateway/backup/handler/grpc/handler.go|474| Function 'MultiUpsert' is too long (90 > 60) (funlen)
pkg/gateway/backup/handler/grpc/handler.go|433 col 5| sloppyLen: len(ips) <= 0 can be len(ips) == 0 (gocritic)
pkg/gateway/backup/handler/grpc/handler.go|517 col 5| sloppyLen: len(updateReqs) <= 0 can be len(updateReqs) == 0 (gocritic)
pkg/gateway/backup/handler/grpc/handler.go|535 col 5| sloppyLen: len(insertReqs) <= 0 can be len(insertReqs) == 0 (gocritic)
pkg/gateway/backup/handler/grpc/handler.go|585 col 6| sloppyLen: len(ips) <= 0 can be len(ips) == 0 (gocritic)
pkg/gateway/backup/handler/grpc/handler.go|649 col 7| sloppyLen: len(ips) <= 0 can be len(ips) == 0 (gocritic)
pkg/gateway/backup/handler/grpc/handler.go|170 col 2| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
internal/errors/errors.go|124 col 24| err113: do not compare errors directly, use errors.Is() instead: "err == target" (goerr113)
pkg/gateway/lb/handler/grpc/handler.go|336| 336-370 lines are duplicate of pkg/gateway/lb/handler/grpc/handler.go:372-406
(dupl)
pkg/gateway/lb/handler/grpc/handler.go|291 col 20| appendAssign: append result not assigned to the same slice (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|759 col 6| sloppyLen: len(updateReqs) <= 0 can be len(updateReqs) == 0 (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|779 col 6| sloppyLen: len(insertReqs) <= 0 can be len(insertReqs) == 0 (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|457 col 7| err113: do not compare errors directly, use errors.Is() instead: "err == errors.ErrRPCCallFailed(target, context.Canceled)" (goerr113)
pkg/manager/backup/cassandra/service/cassandra.go|74 col 28| (*client).getVector
- ctx
is unused (unparam)
Signed-off-by: kpango <[email protected]>
Signed-off-by: kpango <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
golangci
internal/compress/lz4/lz4_test.go|354| internal/compress/lz4/lz4_test.go:354: Line contains TODO/BUG/FIXME: "TODO test cases" (godox)
internal/compress/lz4/lz4_test.go|329 col 3| c
is unused (structcheck)
internal/compress/lz4/lz4_test.go|180 col 3| c
is unused (structcheck)
internal/compress/lz4/lz4_test.go|256 col 3| c
is unused (structcheck)
internal/compress/lz4/lz4_mock_test.go|16 col 9| package should be lz4_test
instead of lz4
(testpackage)
internal/compress/lz4/lz4_test.go|16 col 9| package should be lz4_test
instead of lz4
(testpackage)
pkg/gateway/vald/service/backup_option.go|24 col 5| defaultBackupOpts
is a global variable (gochecknoglobals)
pkg/gateway/vald/service/filter_option.go|24 col 5| defaultFilterOpts
is a global variable (gochecknoglobals)
pkg/gateway/vald/service/gateway_option.go|27 col 5| defaultGWOpts
is a global variable (gochecknoglobals)
pkg/gateway/vald/service/meta_option.go|30 col 5| defaultMetaOpts
is a global variable (gochecknoglobals)
pkg/meta/redis/service/option_test.go|266 col 3| name
is unused (structcheck)
pkg/meta/redis/service/option_test.go|500 col 3| del
is unused (structcheck)
pkg/meta/redis/service/option_test.go|149 col 3| connector
is unused (structcheck)
pkg/meta/redis/service/option_test.go|32 col 3| r
is unused (structcheck)
pkg/meta/redis/service/option_test.go|383 col 3| name
is unused (structcheck)
pkg/manager/compressor/service/backup_option.go|24 col 5| defaultBackupOpts
is a global variable (gochecknoglobals)
pkg/manager/compressor/service/compress_option.go|27 col 5| defaultCompressorOpts
is a global variable (gochecknoglobals)
pkg/manager/compressor/service/registerer_option.go|28 col 5| defaultRegistererOpts
is a global variable (gochecknoglobals)
pkg/manager/compressor/service/registerer.go|64 col 51| S1019: should use make(map[string]*payload.Backup_Vector) instead (gosimple)
pkg/manager/compressor/service/registerer_test.go|191 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/pkg/manager/compressor/service.test contains github.com/vdaas/vald/pkg/manager/compressor/service.fields contains sync.Mutex (govet)
pkg/manager/compressor/service/registerer_test.go|192 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/pkg/manager/compressor/service.test contains github.com/vdaas/vald/pkg/manager/compressor/service.fields contains sync.Mutex (govet)
pkg/manager/compressor/service/registerer_test.go|213 col 17| copylocks: literal copies lock value from test.fields.vecsMu: sync.Mutex (govet)
pkg/manager/compressor/service/registerer_test.go|309 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/pkg/manager/compressor/service.test contains github.com/vdaas/vald/pkg/manager/compressor/service.fields contains sync.Mutex (govet)
pkg/manager/compressor/service/registerer_test.go|310 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/pkg/manager/compressor/service.test contains github.com/vdaas/vald/pkg/manager/compressor/service.fields contains sync.Mutex (govet)
pkg/manager/compressor/service/registerer_test.go|331 col 17| copylocks: literal copies lock value from test.fields.vecsMu: sync.Mutex (govet)
pkg/manager/compressor/service/registerer_test.go|423 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/pkg/manager/compressor/service.test contains github.com/vdaas/vald/pkg/manager/compressor/service.fields contains sync.Mutex (govet)
pkg/manager/compressor/service/registerer_test.go|424 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/pkg/manager/compressor/service.test contains github.com/vdaas/vald/pkg/manager/compressor/service.fields contains sync.Mutex (govet)
pkg/manager/compressor/service/registerer_test.go|445 col 17| copylocks: literal copies lock value from test.fields.vecsMu: sync.Mutex (govet)
internal/runner/option_test.go|30 col 5| goleakIgnoreOptions
is a global variable (gochecknoglobals)
pkg/gateway/lb/service/option.go|27 col 5| defaultGWOpts
is a global variable (gochecknoglobals)
pkg/manager/backup/cassandra/handler/grpc/handler.go|250 col 83| toBackupVector
- result err
is always nil
(unparam)
pkg/manager/backup/cassandra/handler/grpc/handler.go|258 col 79| toModelVector
- result err
is always nil
(unparam)
internal/backoff/backoff.go|67| Function 'Do' is too long (65 > 60) (funlen)
internal/backoff/option.go|33 col 20| mnd: Magic number: 1.5, in detected (gomnd)
internal/backoff/option.go|34 col 17| mnd: Magic number: 50, in detected (gomnd)
internal/backoff/backoff_test.go|426 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/backoff.test contains github.com/vdaas/vald/internal/backoff.fields contains sync.WaitGroup contains sync.noCopy (govet)
internal/backoff/backoff_test.go|427 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/backoff.test contains github.com/vdaas/vald/internal/backoff.fields contains sync.WaitGroup contains sync.noCopy (govet)
internal/backoff/backoff_test.go|534 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/backoff.test contains github.com/vdaas/vald/internal/backoff.fields contains sync.WaitGroup contains sync.noCopy (govet)
internal/backoff/backoff_test.go|535 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/backoff.test contains github.com/vdaas/vald/internal/backoff.fields contains sync.WaitGroup contains sync.noCopy (govet)
internal/net/tcp/dialer_test.go|265 col 24| copylocks: call of cmp.AllowUnexported copies lock value: github.com/vdaas/vald/internal/net/tcp.dialer contains sync.Map contains sync.Mutex (govet)
internal/net/tcp/dialer_test.go|266 col 25| copylocks: call of cmpopts.IgnoreFields copies lock value: github.com/vdaas/vald/internal/net/tcp.dialer contains sync.Map contains sync.Mutex (govet)
internal/worker/queue_option.go|29 col 18| mnd: Magic number: 10, in detected (gomnd)
hack/helm/schema/gen/main.go|102 col 12| G304: Potential file inclusion via variable (gosec)
pkg/agent/core/ngt/handler/grpc/handler.go|291| 291-314 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:349-374
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|349| 349-374 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:291-314
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|186| 186-220 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:222-256
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|222| 222-256 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:186-220
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|210| line is 173 characters (lll)
pkg/agent/core/ngt/handler/grpc/handler.go|246| line is 177 characters (lll)
pkg/agent/core/ngt/handler/grpc/option.go|40 col 24| mnd: Magic number: 20, in detected (gomnd)
pkg/gateway/meta/handler/grpc/handler.go|285 col 2| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
pkg/gateway/meta/handler/grpc/handler.go|366 col 3| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
pkg/gateway/meta/handler/grpc/option.go|30 col 24| mnd: Magic number: 20, in detected (gomnd)
internal/db/storage/blob/s3/writer/option.go|32 col 30| mnd: Magic number: 1024, in detected (gomnd)
pkg/gateway/lb/handler/grpc/handler.go|336| 336-370 lines are duplicate of pkg/gateway/lb/handler/grpc/handler.go:372-406
(dupl)
pkg/gateway/lb/handler/grpc/handler.go|372| 372-406 lines are duplicate of pkg/gateway/lb/handler/grpc/handler.go:336-370
(dupl)
pkg/gateway/lb/handler/grpc/handler.go|181| Function 'search' is too long (124 > 60) (funlen)
pkg/gateway/lb/handler/grpc/handler.go|408| Function 'Insert' is too long (69 > 60) (funlen)
pkg/gateway/lb/handler/grpc/handler.go|715| Function 'MultiUpsert' is too long (95 > 60) (funlen)
pkg/gateway/lb/handler/grpc/handler.go|291 col 20| appendAssign: append result not assigned to the same slice (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|759 col 6| sloppyLen: len(updateReqs) <= 0 can be len(updateReqs) == 0 (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|779 col 6| sloppyLen: len(insertReqs) <= 0 can be len(insertReqs) == 0 (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|457 col 7| err113: do not compare errors directly, use errors.Is() instead: "err == errors.ErrRPCCallFailed(target, context.Canceled)" (goerr113)
pkg/gateway/lb/handler/grpc/option.go|57 col 22| mnd: Magic number: 10, in detected (gomnd)
pkg/gateway/lb/router/router.go|33| Function 'New' is too long (133 > 60) (funlen)
hack/license/gen/main.go|154 col 12| G304: Potential file inclusion via variable (gosec)
internal/k8s/node/option.go|24 col 5| defaultOpts
is unused (deadcode)
pkg/manager/backup/mysql/handler/grpc/handler.go|241 col 83| toBackupVector
- result err
is always nil
(unparam)
pkg/manager/backup/mysql/handler/grpc/handler.go|249 col 79| toModelVector
- result err
is always nil
(unparam)
pkg/manager/index/service/option.go|36 col 23| mnd: Magic number: 10000, in detected (gomnd)
pkg/manager/index/service/indexer_test.go|204 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/pkg/manager/index/service.test contains github.com/vdaas/vald/pkg/manager/index/service.fields contains github.com/vdaas/vald/pkg/manager/index/service.indexInfos contains sync.Mutex (govet)
pkg/manager/index/service/indexer_test.go|205 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/pkg/manager/index/service.test contains github.com/vdaas/vald/pkg/manager/index/service.fields contains github.com/vdaas/vald/pkg/manager/index/service.indexInfos contains sync.Mutex (govet)
internal/k8s/metrics/pod/option.go|24 col 5| defaultOpts
is unused (deadcode)
pkg/gateway/lb/usecase/vald.go|47| Function 'New' is too long (105 > 60) (funlen)
pkg/gateway/lb/usecase/vald.go|163 col 26| mnd: Magic number: 6, in detected (gomnd)
pkg/gateway/backup/handler/grpc/handler.go|154| Function 'Insert' has too many statements (45 > 40) (funlen)
pkg/gateway/backup/handler/grpc/handler.go|240| Function 'MultiInsert' has too many statements (42 > 40) (funlen)
pkg/gateway/backup/handler/grpc/handler.go|474| Function 'MultiUpsert' is too long (90 > 60) (funlen)
pkg/gateway/backup/handler/grpc/handler.go|433 col 5| sloppyLen: len(ips) <= 0 can be len(ips) == 0 (gocritic)
pkg/gateway/backup/handler/grpc/handler.go|517 col 5| sloppyLen: len(updateReqs) <= 0 can be len(updateReqs) == 0 (gocritic)
pkg/gateway/backup/handler/grpc/handler.go|535 col 5| sloppyLen: len(insertReqs) <= 0 can be len(insertReqs) == 0 (gocritic)
pkg/gateway/backup/handler/grpc/handler.go|585 col 6| sloppyLen: len(ips) <= 0 can be len(ips) == 0 (gocritic)
pkg/gateway/backup/handler/grpc/handler.go|649 col 7| sloppyLen: len(ips) <= 0 can be len(ips) == 0 (gocritic)
pkg/gateway/backup/handler/grpc/handler.go|170 col 2| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
pkg/manager/backup/cassandra/service/cassandra.go|74 col 28| (*client).getVector
- ctx
is unused (unparam)
internal/errors/errors.go|124 col 24| err113: do not compare errors directly, use errors.Is() instead: "err == target" (goerr113)
internal/io/ioutil/ioutil.go|32 col 15| Error return value of f.Close
is not checked (errcheck)
pkg/gateway/backup/router/router.go|33| Function 'New' is too long (133 > 60) (funlen)
pkg/gateway/meta/router/router.go|33| Function 'New' is too long (133 > 60) (funlen)
internal/db/rdb/mysql/mysql.go|40 col 2| vectorColumnName
is unused (deadcode)
pkg/gateway/meta/service/meta.go|400| 400-430 lines are duplicate of pkg/gateway/meta/service/meta.go:462-492
(dupl)
pkg/gateway/meta/service/meta.go|462| 462-492 lines are duplicate of pkg/gateway/meta/service/meta.go:400-430
(dupl)
Signed-off-by: kpango <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
golangci
pkg/gateway/backup/handler/grpc/handler.go|670| line is 125 characters (lll)
pkg/gateway/backup/handler/grpc/handler.go|687| line is 121 characters (lll)
pkg/gateway/backup/handler/grpc/handler.go|170 col 2| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
pkg/gateway/backup/handler/grpc/handler.go|248 col 3| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
pkg/gateway/backup/handler/grpc/handler.go|575 col 2| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
pkg/gateway/backup/handler/grpc/option_test.go|161 col 3| want
is unused (structcheck)
pkg/gateway/backup/handler/grpc/option_test.go|44 col 3| want
is unused (structcheck)
pkg/gateway/backup/handler/grpc/option_test.go|385 col 3| c
is unused (structcheck)
pkg/gateway/backup/handler/grpc/option_test.go|268 col 3| eg
is unused (structcheck)
pkg/gateway/backup/handler/grpc/option_test.go|37 col 3| obj
is unused (structcheck)
pkg/gateway/backup/handler/grpc/option_test.go|388 col 3| obj
is unused (structcheck)
pkg/gateway/backup/handler/grpc/option_test.go|151 col 3| g
is unused (structcheck)
pkg/gateway/backup/handler/grpc/option_test.go|34 col 3| b
is unused (structcheck)
pkg/gateway/backup/handler/grpc/handler.go|61 col 2| defer statements should only be cuddled with expressions on same variable (wsl)
pkg/gateway/backup/handler/grpc/handler.go|67 col 2| only one cuddle assignment allowed before if statement (wsl)
pkg/gateway/backup/handler/grpc/handler.go|79 col 2| defer statements should only be cuddled with expressions on same variable (wsl)
pkg/gateway/backup/handler/grpc/handler.go|90 col 2| defer statements should only be cuddled with expressions on same variable (wsl)
pkg/gateway/backup/handler/grpc/handler.go|96 col 2| only one cuddle assignment allowed before if statement (wsl)
pkg/gateway/backup/handler/grpc/handler.go|165 col 3| if statements should only be cuddled with assignments used in the if statement itself (wsl)
pkg/gateway/backup/handler/grpc/handler.go|182 col 4| if statements should only be cuddled with assignments used in the if statement itself (wsl)
pkg/gateway/backup/handler/grpc/handler.go|247 col 2| only one cuddle assignment allowed before range statement (wsl)
pkg/gateway/backup/handler/grpc/handler.go|283 col 2| ranges should only be cuddled with assignments used in the iteration (wsl)
pkg/gateway/backup/handler/grpc/handler.go|380 col 2| only one cuddle assignment allowed before range statement (wsl)
pkg/gateway/backup/handler/grpc/handler.go|486 col 2| ranges should only be cuddled with assignments used in the iteration (wsl)
pkg/gateway/backup/handler/grpc/handler.go|636 col 2| only one cuddle assignment allowed before range statement (wsl)
pkg/gateway/backup/handler/grpc/option.go|30 col 24| mnd: Magic number: 20, in detected (gomnd)
pkg/gateway/backup/handler/grpc/handler.go|69 col 3| return with no blank line before (nlreturn)
pkg/gateway/backup/handler/grpc/handler_test.go|18 col 9| package should be grpc_test
instead of grpc
(testpackage)
pkg/gateway/backup/handler/grpc/option_test.go|18 col 9| package should be grpc_test
instead of grpc
(testpackage)
internal/db/rdb/mysql/dbr/dbr_mock_test.go|605 col 3| struct field InsertBySqlFunc
should be InsertBySQLFunc
(golint)
internal/db/rdb/mysql/dbr/dbr_mock_test.go|705 col 3| struct field InsertBySqlFunc
should be InsertBySQLFunc
(golint)
internal/db/rdb/mysql/dbr/dbr_test.go|17 col 9| package should be dbr_test
instead of dbr
(testpackage)
pkg/gateway/vald/service/backup_option.go|24 col 5| defaultBackupOpts
is a global variable (gochecknoglobals)
pkg/gateway/vald/service/filter_option.go|24 col 5| defaultFilterOpts
is a global variable (gochecknoglobals)
pkg/gateway/vald/service/gateway_option.go|27 col 5| defaultGWOpts
is a global variable (gochecknoglobals)
pkg/gateway/vald/service/meta_option.go|30 col 5| defaultMetaOpts
is a global variable (gochecknoglobals)
pkg/meta/redis/router/option.go|27 col 5| defaultOpts
is a global variable (gochecknoglobals)
internal/io/ioutil/ioutil.go|32 col 15| Error return value of f.Close
is not checked (errcheck)
internal/io/ioutil/ioutil.go|28 col 12| G304: Potential file inclusion via variable (gosec)
internal/io/ioutil/ioutil_test.go|18 col 9| package should be ioutil_test
instead of ioutil
(testpackage)
internal/net/grpc/pool/option_test.go|617 col 3| flg
is unused (structcheck)
internal/net/grpc/pool/option.go|28 col 11| mnd: Magic number: 3, in detected (gomnd)
internal/net/grpc/pool/option.go|29 col 16| mnd: Magic number: 80, in detected (gomnd)
internal/net/grpc/pool/option.go|30 col 14| mnd: Magic number: 65535, in detected (gomnd)
pkg/gateway/internal/location/location_test.go|16 col 9| package should be location_test
instead of location
(testpackage)
internal/net/grpc/client_test.go|206 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/client_test.go|342 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/client_test.go|343 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/client_test.go|482 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/client_test.go|483 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/grpcconns_test.go|178 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains sync.Mutex (govet)
internal/net/grpc/grpcconns_test.go|179 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains sync.Mutex (govet)
internal/net/grpc/grpcconns_test.go|355 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains sync.Mutex (govet)
internal/net/grpc/grpcconns_test.go|356 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains sync.Mutex (govet)
internal/net/grpc/grpcconns_test.go|693 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains sync.Mutex (govet)
internal/net/grpc/grpcconns_test.go|694 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains sync.Mutex (govet)
pkg/gateway/lb/handler/grpc/handler.go|336| 336-370 lines are duplicate of pkg/gateway/lb/handler/grpc/handler.go:372-406
(dupl)
pkg/gateway/lb/handler/grpc/handler.go|372| 372-406 lines are duplicate of pkg/gateway/lb/handler/grpc/handler.go:336-370
(dupl)
pkg/gateway/lb/handler/grpc/handler.go|181| Function 'search' is too long (124 > 60) (funlen)
pkg/gateway/lb/handler/grpc/handler.go|408| Function 'Insert' is too long (69 > 60) (funlen)
pkg/gateway/lb/handler/grpc/handler.go|715| Function 'MultiUpsert' is too long (95 > 60) (funlen)
pkg/gateway/lb/handler/grpc/handler.go|291 col 20| appendAssign: append result not assigned to the same slice (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|759 col 6| sloppyLen: len(updateReqs) <= 0 can be len(updateReqs) == 0 (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|779 col 6| sloppyLen: len(insertReqs) <= 0 can be len(insertReqs) == 0 (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|72| line is 122 characters (lll)
pkg/gateway/lb/handler/grpc/handler.go|100| line is 134 characters (lll)
pkg/gateway/lb/handler/grpc/handler.go|155| line is 125 characters (lll)
pkg/gateway/lb/handler/grpc/handler.go|210| line is 125 characters (lll)
pkg/gateway/lb/handler/grpc/handler.go|360| line is 173 characters (lll)
pkg/gateway/lb/handler/grpc/handler.go|396| line is 177 characters (lll)
pkg/gateway/lb/handler/grpc/handler.go|445| line is 137 characters (lll)
pkg/gateway/lb/handler/grpc/handler.go|474| line is 131 characters (lll)
pkg/gateway/lb/handler/grpc/handler.go|494| line is 130 characters (lll)
pkg/gateway/lb/handler/grpc/handler.go|526| line is 137 characters (lll)
pkg/gateway/lb/handler/grpc/handler.go|588| line is 133 characters (lll)
pkg/gateway/lb/handler/grpc/handler.go|607| line is 129 characters (lll)
pkg/gateway/lb/handler/grpc/handler.go|645| line is 142 characters (lll)
pkg/gateway/lb/handler/grpc/handler.go|838| line is 128 characters (lll)
pkg/gateway/lb/handler/grpc/handler.go|911| line is 122 characters (lll)
pkg/gateway/lb/handler/grpc/handler.go|950| line is 122 characters (lll)
pkg/gateway/lb/handler/grpc/handler.go|977| line is 124 characters (lll)
pkg/gateway/lb/handler/grpc/handler.go|279 col 5| for statements should only be cuddled with assignments used in the iteration (wsl)
pkg/gateway/lb/handler/grpc/handler.go|285 col 5| only one cuddle assignment allowed before switch statement (wsl)
pkg/gateway/lb/handler/grpc/handler.go|268 col 4| only one cuddle assignment allowed before switch statement (wsl)
pkg/gateway/lb/handler/grpc/handler.go|457 col 7| err113: do not compare errors directly, use errors.Is() instead: "err == errors.ErrRPCCallFailed(target, context.Canceled)" (goerr113)
pkg/gateway/lb/handler/grpc/option.go|33 col 24| mnd: Magic number: 20, in detected (gomnd)
pkg/gateway/lb/handler/grpc/option.go|57 col 22| mnd: Magic number: 10, in detected (gomnd)
pkg/gateway/lb/handler/grpc/handler.go|282 col 7| break with no blank line before (nlreturn)
pkg/gateway/lb/config/config_test.go|18 col 9| package should be config_test
instead of config
(testpackage)
internal/runner/option_test.go|30 col 5| goleakIgnoreOptions
is a global variable (gochecknoglobals)
internal/compress/zstd/option_test.go|16 col 9| package should be zstd_test
instead of zstd
(testpackage)
internal/compress/zstd/zstd_mock_test.go|16 col 9| package should be zstd_test
instead of zstd
(testpackage)
internal/compress/zstd/zstd_test.go|16 col 9| package should be zstd_test
instead of zstd
(testpackage)
internal/client/v1/client/vald/option.go|24 col 5| defaultOpts
is unused (deadcode)
internal/client/v1/client/vald/vald.go|56| line is 141 characters (lll)
internal/client/v1/client/vald/vald.go|69| line is 147 characters (lll)
internal/client/v1/client/vald/vald.go|108| line is 152 characters (lll)
internal/client/v1/client/vald/vald.go|121| line is 158 characters (lll)
internal/client/v1/client/vald/vald.go|134| line is 141 characters (lll)
internal/client/v1/client/vald/vald.go|160| line is 152 characters (lll)
internal/client/v1/client/vald/vald.go|173| line is 141 characters (lll)
internal/client/v1/client/vald/vald.go|199| line is 152 characters (lll)
internal/client/v1/client/vald/vald.go|290| line is 137 characters (lll)
internal/client/v1/client/vald/vald.go|303| line is 131 characters (lll)
pkg/gateway/meta/router/router.go|33| Function 'New' is too long (133 > 60) (funlen)
pkg/manager/backup/cassandra/service/cassandra.go|35 col 5| columns
is a global variable (gochecknoglobals)
pkg/manager/backup/cassandra/service/cassandra.go|74 col 28| (*client).getVector
- ctx
is unused (unparam)
internal/k8s/metrics/pod/option.go|24 col 5| defaultOpts
is unused (deadcode)
hack/helm/schema/gen/main.go|36 col 5| aliases
is a global variable (gochecknoglobals)
hack/helm/schema/gen/main.go|102 col 12| G304: Potential file inclusion via variable (gosec)
pkg/gateway/meta/usecase/vald.go|48| Function 'New' is too long (103 > 60) (funlen)
pkg/gateway/meta/usecase/vald.go|162 col 26| mnd: Magic number: 6, in detected (gomnd)
pkg/gateway/lb/usecase/vald.go|47| Function 'New' is too long (105 > 60) (funlen)
pkg/gateway/lb/usecase/vald.go|163 col 26| mnd: Magic number: 6, in detected (gomnd)
pkg/agent/core/ngt/handler/grpc/handler.go|291| 291-314 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:349-374
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|349| 349-374 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:291-314
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|186| 186-220 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:222-256
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|222| 222-256 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:186-220
(dupl)
pkg/agent/core/ngt/handler/grpc/option.go|40 col 24| mnd: Magic number: 20, in detected (gomnd)
pkg/gateway/backup/router/router.go|33| Function 'New' is too long (133 > 60) (funlen)
pkg/gateway/meta/service/meta.go|400| 400-430 lines are duplicate of pkg/gateway/meta/service/meta.go:462-492
(dupl)
pkg/gateway/meta/service/meta.go|462| 462-492 lines are duplicate of pkg/gateway/meta/service/meta.go:400-430
(dupl)
pkg/gateway/meta/service/meta.go|136| 136-219 lines are duplicate of pkg/gateway/meta/service/meta.go:221-304
(dupl)
pkg/gateway/meta/service/meta.go|221| 221-304 lines are duplicate of pkg/gateway/meta/service/meta.go:136-219
(dupl)
pkg/manager/index/service/option.go|36 col 23| mnd: Magic number: 10000, in detected (gomnd)
pkg/manager/compressor/service/registerer.go|64 col 51| S1019: should use make(map[string]*payload.Backup_Vector) instead (gosimple)
pkg/manager/backup/mysql/handler/grpc/handler.go|241 col 83| toBackupVector
- result err
is always nil
(unparam)
pkg/manager/backup/mysql/handler/grpc/handler.go|249 col 79| toModelVector
- result err
is always nil
(unparam)
pkg/gateway/lb/router/router.go|33| Function 'New' is too long (133 > 60) (funlen)
internal/errors/errors.go|124 col 24| err113: do not compare errors directly, use errors.Is() instead: "err == target" (goerr113)
internal/db/rdb/mysql/mysql.go|40 col 2| vectorColumnName
is unused (deadcode)
pkg/manager/backup/cassandra/handler/grpc/handler.go|250 col 83| toBackupVector
- result err
is always nil
(unparam)
pkg/manager/backup/cassandra/handler/grpc/handler.go|258 col 79| toModelVector
- result err
is always nil
(unparam)
Signed-off-by: kpango <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
golangci
internal/worker/queue_option.go|29 col 18| mnd: Magic number: 10, in detected (gomnd)
internal/worker/worker_option.go|28 col 17| mnd: Magic number: 10, in detected (gomnd)
internal/db/storage/blob/s3/sdk/s3/s3manager/s3manager_test.go|16 col 9| package should be s3manager_test
instead of s3manager
(testpackage)
internal/net/tcp/option.go|31 col 5| defaultDialerOptions
is a global variable (gochecknoglobals)
internal/net/tcp/dialer_test.go|265 col 24| copylocks: call of cmp.AllowUnexported copies lock value: github.com/vdaas/vald/internal/net/tcp.dialer contains sync.Map contains sync.Mutex (govet)
internal/net/tcp/dialer_test.go|266 col 25| copylocks: call of cmpopts.IgnoreFields copies lock value: github.com/vdaas/vald/internal/net/tcp.dialer contains sync.Map contains sync.Mutex (govet)
pkg/gateway/meta/usecase/vald.go|48| Function 'New' is too long (103 > 60) (funlen)
pkg/gateway/meta/usecase/vald.go|162 col 26| mnd: Magic number: 6, in detected (gomnd)
internal/k8s/metrics/pod/option.go|24 col 5| defaultOpts
is unused (deadcode)
internal/net/grpc/client_test.go|206 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/client_test.go|342 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/client_test.go|343 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/client_test.go|482 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/client_test.go|483 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/grpcconns_test.go|178 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains sync.Mutex (govet)
internal/net/grpc/grpcconns_test.go|179 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains sync.Mutex (govet)
internal/net/grpc/grpcconns_test.go|355 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains sync.Mutex (govet)
internal/net/grpc/grpcconns_test.go|356 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains sync.Mutex (govet)
internal/net/grpc/grpcconns_test.go|693 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains sync.Mutex (govet)
internal/net/grpc/grpcconns_test.go|694 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains sync.Mutex (govet)
pkg/gateway/lb/usecase/vald.go|47| Function 'New' is too long (105 > 60) (funlen)
pkg/gateway/lb/usecase/vald.go|163 col 26| mnd: Magic number: 6, in detected (gomnd)
pkg/manager/compressor/service/registerer.go|64 col 51| S1019: should use make(map[string]*payload.Backup_Vector) instead (gosimple)
pkg/manager/compressor/service/registerer_test.go|191 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/pkg/manager/compressor/service.test contains github.com/vdaas/vald/pkg/manager/compressor/service.fields contains sync.Mutex (govet)
pkg/manager/compressor/service/registerer_test.go|192 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/pkg/manager/compressor/service.test contains github.com/vdaas/vald/pkg/manager/compressor/service.fields contains sync.Mutex (govet)
pkg/manager/compressor/service/registerer_test.go|213 col 17| copylocks: literal copies lock value from test.fields.vecsMu: sync.Mutex (govet)
pkg/manager/compressor/service/registerer_test.go|309 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/pkg/manager/compressor/service.test contains github.com/vdaas/vald/pkg/manager/compressor/service.fields contains sync.Mutex (govet)
pkg/manager/compressor/service/registerer_test.go|310 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/pkg/manager/compressor/service.test contains github.com/vdaas/vald/pkg/manager/compressor/service.fields contains sync.Mutex (govet)
pkg/manager/compressor/service/registerer_test.go|331 col 17| copylocks: literal copies lock value from test.fields.vecsMu: sync.Mutex (govet)
pkg/manager/compressor/service/registerer_test.go|423 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/pkg/manager/compressor/service.test contains github.com/vdaas/vald/pkg/manager/compressor/service.fields contains sync.Mutex (govet)
pkg/manager/compressor/service/registerer_test.go|424 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/pkg/manager/compressor/service.test contains github.com/vdaas/vald/pkg/manager/compressor/service.fields contains sync.Mutex (govet)
pkg/manager/compressor/service/registerer_test.go|445 col 17| copylocks: literal copies lock value from test.fields.vecsMu: sync.Mutex (govet)
pkg/gateway/meta/handler/grpc/handler.go|196| 196-230 lines are duplicate of pkg/gateway/meta/handler/grpc/handler.go:232-266
(dupl)
pkg/gateway/meta/handler/grpc/handler.go|232| 232-266 lines are duplicate of pkg/gateway/meta/handler/grpc/handler.go:196-230
(dupl)
pkg/gateway/meta/handler/grpc/handler.go|268| Function 'Insert' has too many statements (45 > 40) (funlen)
pkg/gateway/meta/handler/grpc/handler.go|349| Function 'MultiInsert' has too many statements (45 > 40) (funlen)
pkg/gateway/meta/handler/grpc/handler.go|550| Function 'MultiUpsert' is too long (90 > 60) (funlen)
pkg/gateway/meta/handler/grpc/handler.go|593 col 5| sloppyLen: len(updateReqs) <= 0 can be len(updateReqs) == 0 (gocritic)
pkg/gateway/meta/handler/grpc/handler.go|611 col 5| sloppyLen: len(insertReqs) <= 0 can be len(insertReqs) == 0 (gocritic)
pkg/gateway/meta/handler/grpc/handler.go|75| line is 134 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|97| line is 129 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|125| line is 121 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|127| line is 129 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|220| line is 173 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|256| line is 177 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|313| line is 131 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|325| line is 133 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|330| line is 126 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|394| line is 127 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|416| line is 122 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|442| line is 123 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|461| line is 129 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|694| line is 130 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|721| line is 135 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|728| line is 125 characters (lll)
pkg/gateway/meta/handler/grpc/handler.go|285 col 2| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
pkg/gateway/meta/handler/grpc/handler.go|366 col 3| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
pkg/gateway/meta/handler/grpc/option.go|30 col 24| mnd: Magic number: 20, in detected (gomnd)
internal/db/storage/blob/s3/writer/option.go|32 col 30| mnd: Magic number: 1024, in detected (gomnd)
hack/helm/schema/gen/main.go|102 col 12| G304: Potential file inclusion via variable (gosec)
internal/backoff/backoff.go|67| Function 'Do' is too long (65 > 60) (funlen)
internal/backoff/option.go|33 col 20| mnd: Magic number: 1.5, in detected (gomnd)
internal/backoff/option.go|34 col 17| mnd: Magic number: 50, in detected (gomnd)
internal/backoff/backoff_test.go|426 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/backoff.test contains github.com/vdaas/vald/internal/backoff.fields contains sync.WaitGroup contains sync.noCopy (govet)
internal/backoff/backoff_test.go|427 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/backoff.test contains github.com/vdaas/vald/internal/backoff.fields contains sync.WaitGroup contains sync.noCopy (govet)
internal/io/ioutil/ioutil.go|32 col 15| Error return value of f.Close
is not checked (errcheck)
pkg/manager/index/service/option.go|36 col 23| mnd: Magic number: 10000, in detected (gomnd)
internal/client/v1/client/vald/option.go|24 col 5| defaultOpts
is unused (deadcode)
pkg/gateway/lb/handler/grpc/handler.go|336| 336-370 lines are duplicate of pkg/gateway/lb/handler/grpc/handler.go:372-406
(dupl)
pkg/gateway/lb/handler/grpc/handler.go|372| 372-406 lines are duplicate of pkg/gateway/lb/handler/grpc/handler.go:336-370
(dupl)
pkg/gateway/lb/handler/grpc/handler.go|181| Function 'search' is too long (124 > 60) (funlen)
pkg/gateway/lb/handler/grpc/handler.go|408| Function 'Insert' is too long (69 > 60) (funlen)
pkg/gateway/lb/handler/grpc/handler.go|715| Function 'MultiUpsert' is too long (95 > 60) (funlen)
pkg/gateway/lb/handler/grpc/handler.go|291 col 20| appendAssign: append result not assigned to the same slice (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|759 col 6| sloppyLen: len(updateReqs) <= 0 can be len(updateReqs) == 0 (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|779 col 6| sloppyLen: len(insertReqs) <= 0 can be len(insertReqs) == 0 (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|457 col 7| err113: do not compare errors directly, use errors.Is() instead: "err == errors.ErrRPCCallFailed(target, context.Canceled)" (goerr113)
pkg/gateway/lb/handler/grpc/option.go|33 col 24| mnd: Magic number: 20, in detected (gomnd)
pkg/gateway/lb/handler/grpc/option.go|57 col 22| mnd: Magic number: 10, in detected (gomnd)
pkg/gateway/lb/handler/grpc/handler.go|282 col 7| break with no blank line before (nlreturn)
pkg/agent/core/ngt/handler/grpc/handler.go|291| 291-314 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:349-374
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|349| 349-374 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:291-314
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|186| 186-220 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:222-256
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|222| 222-256 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:186-220
(dupl)
pkg/agent/core/ngt/handler/grpc/option.go|40 col 24| mnd: Magic number: 20, in detected (gomnd)
pkg/gateway/vald/handler/grpc/handler.go|303| Function 'Insert' has too many statements (51 > 40) (funlen)
pkg/gateway/vald/handler/grpc/handler.go|410| Function 'MultiInsert' has too many statements (54 > 40) (funlen)
pkg/gateway/vald/handler/grpc/handler.go|512| Function 'Update' is too long (68 > 60) (funlen)
pkg/gateway/vald/handler/grpc/handler.go|687| Function 'MultiUpsert' is too long (64 > 60) (funlen)
pkg/gateway/vald/handler/grpc/handler.go|831| Function 'MultiRemove' is too long (64 > 60) (funlen)
internal/errors/errors.go|124 col 24| err113: do not compare errors directly, use errors.Is() instead: "err == target" (goerr113)
pkg/manager/backup/mysql/handler/grpc/handler.go|241 col 83| toBackupVector
- result err
is always nil
(unparam)
pkg/manager/backup/mysql/handler/grpc/handler.go|249 col 79| toModelVector
- result err
is always nil
(unparam)
pkg/gateway/backup/handler/grpc/handler.go|170 col 2| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
pkg/gateway/meta/service/meta.go|400| 400-430 lines are duplicate of pkg/gateway/meta/service/meta.go:462-492
(dupl)
pkg/gateway/meta/service/meta.go|462| 462-492 lines are duplicate of pkg/gateway/meta/service/meta.go:400-430
(dupl)
pkg/gateway/meta/service/meta.go|136| 136-219 lines are duplicate of pkg/gateway/meta/service/meta.go:221-304
(dupl)
pkg/manager/backup/cassandra/handler/grpc/handler.go|250 col 83| toBackupVector
- result err
is always nil
(unparam)
pkg/manager/backup/cassandra/handler/grpc/handler.go|258 col 79| toModelVector
- result err
is always nil
(unparam)
pkg/manager/backup/cassandra/service/cassandra.go|74 col 28| (*client).getVector
- ctx
is unused (unparam)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
golangci
internal/errors/option_test.go|30 col 3| val
is unused (structcheck)
internal/errors/option_test.go|31 col 3| errs
is unused (structcheck)
internal/errors/option_test.go|640 col 3| fields
is unused (structcheck)
internal/errors/option_test.go|630 col 3| err
is unused (structcheck)
internal/errors/option_test.go|631 col 3| origin
is unused (structcheck)
internal/errors/option_test.go|280 col 3| fields
is unused (structcheck)
internal/errors/errors.go|124 col 24| err113: do not compare errors directly, use errors.Is() instead: "err == target" (goerr113)
internal/backoff/backoff.go|67| Function 'Do' is too long (65 > 60) (funlen)
internal/backoff/option.go|33 col 20| mnd: Magic number: 1.5, in detected (gomnd)
internal/backoff/option.go|34 col 17| mnd: Magic number: 50, in detected (gomnd)
internal/backoff/backoff_test.go|426 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/backoff.test contains github.com/vdaas/vald/internal/backoff.fields contains sync.WaitGroup contains sync.noCopy (govet)
internal/backoff/backoff_test.go|427 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/backoff.test contains github.com/vdaas/vald/internal/backoff.fields contains sync.WaitGroup contains sync.noCopy (govet)
internal/backoff/backoff_test.go|534 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/backoff.test contains github.com/vdaas/vald/internal/backoff.fields contains sync.WaitGroup contains sync.noCopy (govet)
internal/backoff/backoff_test.go|535 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/backoff.test contains github.com/vdaas/vald/internal/backoff.fields contains sync.WaitGroup contains sync.noCopy (govet)
pkg/gateway/meta/handler/rest/option_test.go|32 col 3| v
is unused (structcheck)
pkg/gateway/meta/handler/rest/handler_test.go|18 col 9| package should be rest_test
instead of rest
(testpackage)
hack/helm/schema/gen/main.go|36 col 5| aliases
is a global variable (gochecknoglobals)
hack/helm/schema/gen/main.go|102 col 12| G304: Potential file inclusion via variable (gosec)
pkg/gateway/backup/handler/rest/option_test.go|32 col 3| v
is unused (structcheck)
pkg/gateway/meta/config/config_test.go|18 col 9| package should be config_test
instead of config
(testpackage)
pkg/gateway/vald/handler/grpc/handler.go|303| Function 'Insert' has too many statements (51 > 40) (funlen)
pkg/gateway/vald/handler/grpc/handler.go|410| Function 'MultiInsert' has too many statements (54 > 40) (funlen)
pkg/gateway/vald/handler/grpc/handler.go|512| Function 'Update' is too long (68 > 60) (funlen)
pkg/gateway/vald/handler/grpc/handler.go|687| Function 'MultiUpsert' is too long (64 > 60) (funlen)
pkg/gateway/vald/handler/grpc/handler.go|831| Function 'MultiRemove' is too long (64 > 60) (funlen)
pkg/gateway/vald/handler/grpc/handler.go|170| line is 127 characters (lll)
pkg/gateway/vald/handler/grpc/handler.go|347| line is 139 characters (lll)
pkg/gateway/vald/handler/grpc/handler.go|469| line is 141 characters (lll)
pkg/gateway/vald/handler/grpc/option.go|32 col 23| mnd: Magic number: 3, in detected (gomnd)
pkg/gateway/vald/handler/grpc/option.go|33 col 24| mnd: Magic number: 20, in detected (gomnd)
pkg/gateway/internal/location/location_test.go|16 col 9| package should be location_test
instead of location
(testpackage)
internal/io/ioutil/ioutil.go|32 col 15| Error return value of f.Close
is not checked (errcheck)
internal/io/ioutil/ioutil.go|28 col 12| G304: Potential file inclusion via variable (gosec)
internal/io/ioutil/ioutil_test.go|18 col 9| package should be ioutil_test
instead of ioutil
(testpackage)
pkg/gateway/vald/service/backup_option.go|24 col 5| defaultBackupOpts
is a global variable (gochecknoglobals)
pkg/gateway/vald/service/filter_option.go|24 col 5| defaultFilterOpts
is a global variable (gochecknoglobals)
pkg/gateway/vald/service/gateway_option.go|27 col 5| defaultGWOpts
is a global variable (gochecknoglobals)
pkg/gateway/vald/service/meta_option.go|30 col 5| defaultMetaOpts
is a global variable (gochecknoglobals)
internal/client/v1/client/vald/option.go|24 col 5| defaultOpts
is unused (deadcode)
internal/client/v1/client/vald/option_test.go|18 col 9| package should be vald_test
instead of vald
(testpackage)
internal/net/grpc/metric/client_option.go|22 col 5| clientDefaultOpts
is a global variable (gochecknoglobals)
internal/net/tcp/dialer_test.go|265 col 24| copylocks: call of cmp.AllowUnexported copies lock value: github.com/vdaas/vald/internal/net/tcp.dialer contains sync.Map contains sync.Mutex (govet)
internal/net/tcp/dialer_test.go|266 col 25| copylocks: call of cmpopts.IgnoreFields copies lock value: github.com/vdaas/vald/internal/net/tcp.dialer contains sync.Map contains sync.Mutex (govet)
internal/k8s/node/option.go|24 col 5| defaultOpts
is unused (deadcode)
internal/net/grpc/client_test.go|206 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/client_test.go|342 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/client_test.go|343 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/worker/queue_option.go|29 col 18| mnd: Magic number: 10, in detected (gomnd)
internal/k8s/metrics/node/option.go|24 col 5| defaultOpts
is unused (deadcode)
pkg/agent/core/ngt/handler/grpc/handler.go|291| 291-314 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:349-374
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|349| 349-374 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:291-314
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|186| 186-220 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:222-256
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|222| 222-256 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:186-220
(dupl)
pkg/agent/core/ngt/handler/grpc/option.go|40 col 24| mnd: Magic number: 20, in detected (gomnd)
pkg/gateway/meta/router/router.go|33| Function 'New' is too long (133 > 60) (funlen)
pkg/manager/backup/cassandra/handler/grpc/handler.go|250 col 83| toBackupVector
- result err
is always nil
(unparam)
pkg/manager/backup/cassandra/handler/grpc/handler.go|258 col 79| toModelVector
- result err
is always nil
(unparam)
pkg/gateway/lb/handler/grpc/handler.go|336| 336-370 lines are duplicate of pkg/gateway/lb/handler/grpc/handler.go:372-406
(dupl)
pkg/gateway/lb/handler/grpc/handler.go|372| 372-406 lines are duplicate of pkg/gateway/lb/handler/grpc/handler.go:336-370
(dupl)
pkg/gateway/lb/handler/grpc/handler.go|181| Function 'search' is too long (124 > 60) (funlen)
pkg/gateway/lb/handler/grpc/handler.go|408| Function 'Insert' is too long (69 > 60) (funlen)
pkg/gateway/lb/handler/grpc/handler.go|715| Function 'MultiUpsert' is too long (95 > 60) (funlen)
pkg/gateway/lb/handler/grpc/handler.go|291 col 20| appendAssign: append result not assigned to the same slice (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|759 col 6| sloppyLen: len(updateReqs) <= 0 can be len(updateReqs) == 0 (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|779 col 6| sloppyLen: len(insertReqs) <= 0 can be len(insertReqs) == 0 (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|457 col 7| err113: do not compare errors directly, use errors.Is() instead: "err == errors.ErrRPCCallFailed(target, context.Canceled)" (goerr113)
pkg/gateway/meta/service/meta.go|400| 400-430 lines are duplicate of pkg/gateway/meta/service/meta.go:462-492
(dupl)
pkg/gateway/meta/service/meta.go|462| 462-492 lines are duplicate of pkg/gateway/meta/service/meta.go:400-430
(dupl)
pkg/gateway/meta/service/meta.go|136| 136-219 lines are duplicate of pkg/gateway/meta/service/meta.go:221-304
(dupl)
pkg/gateway/meta/service/meta.go|221| 221-304 lines are duplicate of pkg/gateway/meta/service/meta.go:136-219
(dupl)
pkg/gateway/meta/handler/grpc/handler.go|196| 196-230 lines are duplicate of pkg/gateway/meta/handler/grpc/handler.go:232-266
(dupl)
pkg/gateway/meta/handler/grpc/handler.go|232| 232-266 lines are duplicate of pkg/gateway/meta/handler/grpc/handler.go:196-230
(dupl)
pkg/gateway/meta/handler/grpc/handler.go|593 col 5| sloppyLen: len(updateReqs) <= 0 can be len(updateReqs) == 0 (gocritic)
pkg/gateway/meta/handler/grpc/handler.go|611 col 5| sloppyLen: len(insertReqs) <= 0 can be len(insertReqs) == 0 (gocritic)
pkg/gateway/meta/handler/grpc/handler.go|285 col 2| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
pkg/gateway/meta/handler/grpc/handler.go|366 col 3| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
pkg/gateway/backup/handler/grpc/handler.go|170 col 2| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
pkg/manager/compressor/service/registerer.go|64 col 51| S1019: should use make(map[string]*payload.Backup_Vector) instead (gosimple)
pkg/manager/backup/cassandra/service/cassandra.go|74 col 28| (*client).getVector
- ctx
is unused (unparam)
Signed-off-by: kpango <[email protected]>
…s/vald into feature/all/new-design-apis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
golangci
internal/client/v1/client/vald/vald_test.go|333 col 3| if statements should only be cuddled with assignments (wsl)
internal/client/v1/client/vald/vald.go|48 col 3| return with no blank line before (nlreturn)
internal/client/v1/client/vald/vald.go|61 col 3| return with no blank line before (nlreturn)
internal/client/v1/client/vald/vald.go|74 col 3| return with no blank line before (nlreturn)
internal/client/v1/client/vald/option_test.go|18 col 9| package should be vald_test
instead of vald
(testpackage)
internal/client/v1/client/vald/vald_test.go|18 col 9| package should be vald_test
instead of vald
(testpackage)
internal/errors/net.go|34 col 2| comment on exported var ErrNoPortAvailable
should be of the form ErrNoPortAvailable ...
(golint)
internal/errors/observability.go|20 col 5| exported var ErrCollectorNotFound
should have comment or be unexported (golint)
internal/errors/option_test.go|34 col 3| obj
is unused (structcheck)
internal/errors/option_test.go|151 col 3| err
is unused (structcheck)
internal/errors/option_test.go|152 col 3| origin
is unused (structcheck)
internal/errors/option_test.go|521 col 3| fields
is unused (structcheck)
internal/errors/option_test.go|522 col 3| want
is unused (structcheck)
internal/errors/option_test.go|640 col 3| fields
is unused (structcheck)
internal/errors/option_test.go|30 col 3| val
is unused (structcheck)
internal/errors/option_test.go|31 col 3| errs
is unused (structcheck)
internal/errors/option_test.go|630 col 3| err
is unused (structcheck)
internal/errors/option_test.go|631 col 3| origin
is unused (structcheck)
internal/errors/option_test.go|280 col 3| fields
is unused (structcheck)
internal/errors/errors.go|124 col 24| err113: do not compare errors directly, use errors.Is() instead: "err == target" (goerr113)
pkg/gateway/meta/usecase/vald.go|48| Function 'New' is too long (103 > 60) (funlen)
pkg/gateway/meta/usecase/vald.go|64 col 3| append only allowed to cuddle with appended value (wsl)
pkg/gateway/meta/usecase/vald.go|84 col 2| only one cuddle assignment allowed before if statement (wsl)
pkg/gateway/meta/usecase/vald.go|165 col 2| only one cuddle assignment allowed before if statement (wsl)
pkg/gateway/meta/usecase/vald.go|162 col 26| mnd: Magic number: 6, in detected (gomnd)
pkg/gateway/meta/usecase/vald.go|17 col 1| ST1000: at least one file in a package should have a package comment (stylecheck)
pkg/gateway/meta/usecase/vald_test.go|17 col 9| package should be usecase_test
instead of usecase
(testpackage)
internal/backoff/backoff.go|67| Function 'Do' is too long (65 > 60) (funlen)
internal/backoff/option.go|28 col 5| defaultOpts
is a global variable (gochecknoglobals)
internal/backoff/backoff.go|74 col 2| defer statements should only be cuddled with expressions on same variable (wsl)
internal/backoff/backoff.go|96 col 5| defer statements should only be cuddled with expressions on same variable (wsl)
internal/backoff/option.go|33 col 20| mnd: Magic number: 1.5, in detected (gomnd)
internal/backoff/option.go|34 col 17| mnd: Magic number: 50, in detected (gomnd)
internal/backoff/backoff_test.go|426 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/backoff.test contains github.com/vdaas/vald/internal/backoff.fields contains sync.WaitGroup contains sync.noCopy (govet)
internal/backoff/backoff_test.go|427 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/backoff.test contains github.com/vdaas/vald/internal/backoff.fields contains sync.WaitGroup contains sync.noCopy (govet)
internal/backoff/backoff_test.go|534 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/backoff.test contains github.com/vdaas/vald/internal/backoff.fields contains sync.WaitGroup contains sync.noCopy (govet)
internal/backoff/backoff_test.go|535 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/backoff.test contains github.com/vdaas/vald/internal/backoff.fields contains sync.WaitGroup contains sync.noCopy (govet)
internal/compress/zstd/zstd_test.go|188 col 3| c
is unused (structcheck)
internal/compress/zstd/zstd_test.go|104 col 3| c
is unused (structcheck)
internal/compress/zstd/option_test.go|29 col 3| level
is unused (structcheck)
internal/compress/zstd/option_test.go|16 col 9| package should be zstd_test
instead of zstd
(testpackage)
internal/compress/zstd/zstd_mock_test.go|16 col 9| package should be zstd_test
instead of zstd
(testpackage)
internal/compress/zstd/zstd_test.go|16 col 9| package should be zstd_test
instead of zstd
(testpackage)
pkg/discoverer/k8s/router/option.go|27 col 5| defaultOpts
is a global variable (gochecknoglobals)
pkg/manager/replication/controller/service/discover_test.go|197 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/pkg/manager/replication/controller/service.test contains github.com/vdaas/vald/pkg/manager/replication/controller/service.fields contains sync.Map contains sync.Mutex (govet)
pkg/manager/replication/controller/service/discover_test.go|198 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/pkg/manager/replication/controller/service.test contains github.com/vdaas/vald/pkg/manager/replication/controller/service.fields contains sync.Map contains sync.Mutex (govet)
pkg/manager/replication/controller/service/discover_test.go|305 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/pkg/manager/replication/controller/service.test contains github.com/vdaas/vald/pkg/manager/replication/controller/service.fields contains sync.Map contains sync.Mutex (govet)
pkg/manager/replication/controller/service/discover_test.go|306 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/pkg/manager/replication/controller/service.test contains github.com/vdaas/vald/pkg/manager/replication/controller/service.fields contains sync.Map contains sync.Mutex (govet)
pkg/manager/replication/controller/service/discover_test.go|419 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/pkg/manager/replication/controller/service.test contains github.com/vdaas/vald/pkg/manager/replication/controller/service.fields contains sync.Map contains sync.Mutex (govet)
pkg/manager/replication/controller/service/discover_test.go|420 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/pkg/manager/replication/controller/service.test contains github.com/vdaas/vald/pkg/manager/replication/controller/service.fields contains sync.Map contains sync.Mutex (govet)
pkg/manager/replication/controller/service/nodemap_test.go|177 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/pkg/manager/replication/controller/service.test contains github.com/vdaas/vald/pkg/manager/replication/controller/service.fields contains sync.Mutex (govet)
pkg/manager/replication/controller/service/nodemap_test.go|178 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/pkg/manager/replication/controller/service.test contains github.com/vdaas/vald/pkg/manager/replication/controller/service.fields contains sync.Mutex (govet)
pkg/manager/replication/controller/service/nodemap_test.go|354 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/pkg/manager/replication/controller/service.test contains github.com/vdaas/vald/pkg/manager/replication/controller/service.fields contains sync.Mutex (govet)
pkg/manager/replication/controller/service/nodemap_test.go|355 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/pkg/manager/replication/controller/service.test contains github.com/vdaas/vald/pkg/manager/replication/controller/service.fields contains sync.Mutex (govet)
pkg/manager/replication/controller/service/nodemap_test.go|703 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/pkg/manager/replication/controller/service.test contains github.com/vdaas/vald/pkg/manager/replication/controller/service.fields contains sync.Mutex (govet)
pkg/manager/replication/controller/service/nodemap_test.go|704 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/pkg/manager/replication/controller/service.test contains github.com/vdaas/vald/pkg/manager/replication/controller/service.fields contains sync.Mutex (govet)
pkg/gateway/vald/service/backup_option.go|24 col 5| defaultBackupOpts
is a global variable (gochecknoglobals)
pkg/gateway/vald/service/filter_option.go|24 col 5| defaultFilterOpts
is a global variable (gochecknoglobals)
pkg/gateway/vald/service/gateway_option.go|27 col 5| defaultGWOpts
is a global variable (gochecknoglobals)
pkg/gateway/vald/service/meta_option.go|30 col 5| defaultMetaOpts
is a global variable (gochecknoglobals)
internal/db/storage/blob/s3/reader/io/io_test.go|16 col 9| package should be io_test
instead of io
(testpackage)
pkg/gateway/meta/service/meta.go|400| 400-430 lines are duplicate of pkg/gateway/meta/service/meta.go:462-492
(dupl)
pkg/gateway/meta/service/meta.go|462| 462-492 lines are duplicate of pkg/gateway/meta/service/meta.go:400-430
(dupl)
pkg/gateway/meta/service/meta.go|136| 136-219 lines are duplicate of pkg/gateway/meta/service/meta.go:221-304
(dupl)
pkg/gateway/meta/service/meta.go|221| 221-304 lines are duplicate of pkg/gateway/meta/service/meta.go:136-219
(dupl)
pkg/gateway/vald/handler/grpc/handler.go|303| Function 'Insert' has too many statements (51 > 40) (funlen)
pkg/gateway/vald/handler/grpc/handler.go|410| Function 'MultiInsert' has too many statements (54 > 40) (funlen)
pkg/gateway/vald/handler/grpc/handler.go|512| Function 'Update' is too long (68 > 60) (funlen)
pkg/gateway/vald/handler/grpc/handler.go|687| Function 'MultiUpsert' is too long (64 > 60) (funlen)
pkg/gateway/vald/handler/grpc/handler.go|831| Function 'MultiRemove' is too long (64 > 60) (funlen)
pkg/gateway/vald/handler/grpc/handler.go|170| line is 127 characters (lll)
pkg/gateway/vald/handler/grpc/handler.go|347| line is 139 characters (lll)
pkg/gateway/vald/handler/grpc/handler.go|546| line is 124 characters (lll)
pkg/gateway/vald/handler/grpc/handler.go|597| line is 124 characters (lll)
pkg/gateway/vald/handler/grpc/option.go|32 col 23| mnd: Magic number: 3, in detected (gomnd)
pkg/gateway/vald/handler/grpc/option.go|33 col 24| mnd: Magic number: 20, in detected (gomnd)
internal/k8s/node/option.go|24 col 5| defaultOpts
is unused (deadcode)
pkg/gateway/backup/handler/grpc/handler.go|170 col 2| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
pkg/gateway/backup/handler/grpc/handler.go|248 col 3| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
pkg/gateway/backup/handler/grpc/handler.go|575 col 2| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
pkg/gateway/backup/handler/grpc/option.go|30 col 24| mnd: Magic number: 20, in detected (gomnd)
pkg/manager/index/service/option.go|36 col 23| mnd: Magic number: 10000, in detected (gomnd)
pkg/manager/index/service/indexer_test.go|204 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/pkg/manager/index/service.test contains github.com/vdaas/vald/pkg/manager/index/service.fields contains github.com/vdaas/vald/pkg/manager/index/service.indexInfos contains sync.Mutex (govet)
pkg/manager/index/service/indexer_test.go|205 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/pkg/manager/index/service.test contains github.com/vdaas/vald/pkg/manager/index/service.fields contains github.com/vdaas/vald/pkg/manager/index/service.indexInfos contains sync.Mutex (govet)
pkg/manager/index/service/indexer_test.go|333 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/pkg/manager/index/service.test contains github.com/vdaas/vald/pkg/manager/index/service.fields contains github.com/vdaas/vald/pkg/manager/index/service.indexInfos contains sync.Mutex (govet)
pkg/manager/index/service/indexer_test.go|334 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/pkg/manager/index/service.test contains github.com/vdaas/vald/pkg/manager/index/service.fields contains github.com/vdaas/vald/pkg/manager/index/service.indexInfos contains sync.Mutex (govet)
pkg/manager/index/service/indexer_test.go|459 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/pkg/manager/index/service.test contains github.com/vdaas/vald/pkg/manager/index/service.fields contains github.com/vdaas/vald/pkg/manager/index/service.indexInfos contains sync.Mutex (govet)
pkg/manager/index/service/indexer_test.go|460 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/pkg/manager/index/service.test contains github.com/vdaas/vald/pkg/manager/index/service.fields contains github.com/vdaas/vald/pkg/manager/index/service.indexInfos contains sync.Mutex (govet)
pkg/manager/index/service/indexinfos_test.go|177 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/pkg/manager/index/service.test contains github.com/vdaas/vald/pkg/manager/index/service.fields contains sync.Mutex (govet)
pkg/manager/index/service/indexinfos_test.go|178 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/pkg/manager/index/service.test contains github.com/vdaas/vald/pkg/manager/index/service.fields contains sync.Mutex (govet)
pkg/manager/index/service/indexinfos_test.go|354 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/pkg/manager/index/service.test contains github.com/vdaas/vald/pkg/manager/index/service.fields contains sync.Mutex (govet)
pkg/manager/index/service/indexinfos_test.go|355 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/pkg/manager/index/service.test contains github.com/vdaas/vald/pkg/manager/index/service.fields contains sync.Mutex (govet)
pkg/manager/index/service/indexinfos_test.go|692 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/pkg/manager/index/service.test contains github.com/vdaas/vald/pkg/manager/index/service.fields contains sync.Mutex (govet)
pkg/manager/backup/cassandra/service/cassandra.go|74 col 28| (*client).getVector
- ctx
is unused (unparam)
pkg/manager/backup/cassandra/service/cassandra.go|109 col 53| mnd: Magic number: 3, in detected (gomnd)
pkg/gateway/backup/router/router.go|33| Function 'New' is too long (133 > 60) (funlen)
pkg/gateway/lb/router/router.go|33| Function 'New' is too long (133 > 60) (funlen)
pkg/manager/backup/cassandra/handler/grpc/handler.go|250 col 83| toBackupVector
- result err
is always nil
(unparam)
pkg/manager/backup/cassandra/handler/grpc/handler.go|258 col 79| toModelVector
- result err
is always nil
(unparam)
hack/license/gen/main.go|154 col 12| G304: Potential file inclusion via variable (gosec)
pkg/manager/compressor/service/registerer.go|64 col 51| S1019: should use make(map[string]*payload.Backup_Vector) instead (gosimple)
internal/k8s/metrics/node/option.go|24 col 5| defaultOpts
is unused (deadcode)
pkg/manager/backup/mysql/handler/grpc/handler.go|241 col 83| toBackupVector
- result err
is always nil
(unparam)
pkg/manager/backup/mysql/handler/grpc/handler.go|249 col 79| toModelVector
- result err
is always nil
(unparam)
pkg/gateway/meta/handler/grpc/handler.go|196| 196-230 lines are duplicate of pkg/gateway/meta/handler/grpc/handler.go:232-266
(dupl)
pkg/gateway/meta/handler/grpc/handler.go|232| 232-266 lines are duplicate of pkg/gateway/meta/handler/grpc/handler.go:196-230
(dupl)
pkg/gateway/meta/handler/grpc/handler.go|268| Function 'Insert' has too many statements (45 > 40) (funlen)
pkg/gateway/meta/handler/grpc/handler.go|349| Function 'MultiInsert' has too many statements (45 > 40) (funlen)
pkg/gateway/meta/handler/grpc/handler.go|550| Function 'MultiUpsert' is too long (90 > 60) (funlen)
pkg/gateway/meta/handler/grpc/handler.go|593 col 5| sloppyLen: len(updateReqs) <= 0 can be len(updateReqs) == 0 (gocritic)
pkg/gateway/meta/handler/grpc/handler.go|611 col 5| sloppyLen: len(insertReqs) <= 0 can be len(insertReqs) == 0 (gocritic)
pkg/gateway/meta/handler/grpc/option.go|30 col 24| mnd: Magic number: 20, in detected (gomnd)
internal/db/rdb/mysql/mysql.go|172| File is not gofmt
-ed with -s
(gofmt)
internal/db/rdb/mysql/mysql_test.go|571| File is not gofmt
-ed with -s
(gofmt)
pkg/agent/core/ngt/handler/grpc/handler.go|291| 291-314 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:349-374
(dupl)
pkg/gateway/lb/handler/grpc/handler.go|291 col 20| appendAssign: append result not assigned to the same slice (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|759 col 6| sloppyLen: len(updateReqs) <= 0 can be len(updateReqs) == 0 (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|779 col 6| sloppyLen: len(insertReqs) <= 0 can be len(insertReqs) == 0 (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|457 col 7| err113: do not compare errors directly, use errors.Is() instead: "err == errors.ErrRPCCallFailed(target, context.Canceled)" (goerr113)
Signed-off-by: kpango <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
LanguageTool
charts/vald/README.md|92 col 61| This sentence does not start with an uppercase letter (UPPERCASE_SENTENCE_START)
Suggestions: It
Rule: https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US
Category: CASING
charts/vald/README.md|92 col 168| This sentence does not start with an uppercase letter (UPPERCASE_SENTENCE_START)
Suggestions: For
Rule: https://community.languagetool.org/rule/show/UPPERCASE_SENTENCE_START?lang=en-US
Category: CASING
Signed-off-by: kpango <[email protected]>
Signed-off-by: kpango <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
golangci
pkg/gateway/meta/service/meta.go|400| 400-430 lines are duplicate of pkg/gateway/meta/service/meta.go:462-492
(dupl)
pkg/gateway/meta/service/meta.go|462| 462-492 lines are duplicate of pkg/gateway/meta/service/meta.go:400-430
(dupl)
pkg/gateway/meta/service/meta.go|136| 136-219 lines are duplicate of pkg/gateway/meta/service/meta.go:221-304
(dupl)
pkg/gateway/meta/service/meta.go|221| 221-304 lines are duplicate of pkg/gateway/meta/service/meta.go:136-219
(dupl)
pkg/gateway/meta/service/option.go|30 col 5| defaultOpts
is a global variable (gochecknoglobals)
pkg/gateway/meta/service/meta.go|33 col 6| exported type Meta
should have comment or be unexported (golint)
pkg/gateway/meta/service/meta.go|64 col 1| exported function New
should have comment or be unexported (golint)
pkg/gateway/meta/service/option.go|17 col 1| package comment should be of the form "Package service ..." (golint)
pkg/gateway/meta/service/option.go|28 col 6| exported type Option
should have comment or be unexported (golint)
pkg/gateway/meta/service/option.go|36 col 1| exported function WithMetaAddr
should have comment or be unexported (golint)
pkg/gateway/meta/service/option.go|43 col 1| exported function WithMetaHostPort
should have comment or be unexported (golint)
pkg/gateway/meta/service/option.go|50 col 1| exported function WithMetaClient
should have comment or be unexported (golint)
pkg/gateway/meta/service/option.go|59 col 1| exported function WithMetaCacheEnabled
should have comment or be unexported (golint)
pkg/gateway/meta/service/option.go|66 col 1| exported function WithMetaCache
should have comment or be unexported (golint)
pkg/gateway/meta/service/option.go|75 col 1| exported function WithMetaCacheExpireDuration
should have comment or be unexported (golint)
pkg/gateway/meta/service/option.go|86 col 1| exported function WithMetaCacheExpiredCheckDuration
should have comment or be unexported (golint)
pkg/gateway/meta/service/option_test.go|738 col 3| dur
is unused (structcheck)
pkg/gateway/meta/service/option_test.go|387 col 3| flg
is unused (structcheck)
pkg/gateway/meta/service/option_test.go|33 col 3| addr
is unused (structcheck)
pkg/gateway/meta/service/option_test.go|621 col 3| dur
is unused (structcheck)
pkg/gateway/meta/service/option_test.go|270 col 3| client
is unused (structcheck)
pkg/gateway/meta/service/option_test.go|150 col 3| host
is unused (structcheck)
pkg/gateway/meta/service/option_test.go|151 col 3| port
is unused (structcheck)
pkg/gateway/meta/service/meta.go|66 col 2| ranges should only be cuddled with assignments used in the iteration (wsl)
pkg/gateway/meta/service/meta.go|95 col 2| defer statements should only be cuddled with expressions on same variable (wsl)
pkg/gateway/meta/service/meta.go|120 col 2| only one cuddle assignment allowed before if statement (wsl)
pkg/gateway/meta/service/meta.go|138 col 2| defer statements should only be cuddled with expressions on same variable (wsl)
pkg/gateway/meta/service/meta.go|160 col 2| only one cuddle assignment allowed before if statement (wsl)
pkg/gateway/meta/service/meta.go|174 col 2| defer statements should only be cuddled with expressions on same variable (wsl)
pkg/gateway/meta/service/meta.go|187 col 5| append only allowed to cuddle with appended value (wsl)
pkg/gateway/meta/service/meta.go|250 col 2| if statements should only be cuddled with assignments used in the if statement itself (wsl)
pkg/gateway/meta/service/meta.go|272 col 5| append only allowed to cuddle with appended value (wsl)
pkg/gateway/meta/service/meta_test.go|18 col 9| package should be service_test
instead of service
(testpackage)
pkg/gateway/meta/service/option_test.go|18 col 9| package should be service_test
instead of service
(testpackage)
internal/db/nosql/cassandra/cassandra_test.go|38 col 5| clientComparatorOpts
is a global variable (gochecknoglobals)
internal/db/nosql/cassandra/option_test.go|50 col 5| goleakIgnoreOptions
is a global variable (gochecknoglobals)
internal/db/nosql/cassandra/cassandra_mock.go|1 col 1| package comment should be of the form "Package cassandra ..." (golint)
internal/db/nosql/cassandra/observer.go|24 col 2| exported type QueryObserver
should have comment or be unexported (golint)
internal/db/nosql/cassandra/observer.go|25 col 2| exported type ObservedQuery
should have comment or be unexported (golint)
internal/db/nosql/cassandra/cassandra_test.go|83 col 32| copylocks: func passes lock by value: crypto/tls.Config contains sync.RWMutex (govet)
internal/db/nosql/cassandra/cassandra_test.go|84 col 28| copylocks: call of reflect.DeepEqual copies lock value: crypto/tls.Config contains sync.RWMutex (govet)
internal/k8s/metrics/node/option.go|24 col 5| defaultOpts
is unused (deadcode)
pkg/gateway/meta/handler/rest/option_test.go|32 col 3| v
is unused (structcheck)
pkg/gateway/meta/handler/rest/handler_test.go|18 col 9| package should be rest_test
instead of rest
(testpackage)
pkg/gateway/meta/handler/rest/option_test.go|18 col 9| package should be rest_test
instead of rest
(testpackage)
internal/core/algorithm/ngt/ngt.go|547 col 3| only one cuddle assignment allowed before range statement (wsl)
pkg/manager/compressor/handler/grpc/handler.go|50| line is 128 characters (lll)
pkg/meta/cassandra/service/option_test.go|149 col 3| name
is unused (structcheck)
pkg/meta/cassandra/service/option_test.go|32 col 3| db
is unused (structcheck)
internal/servers/server/server.go|311 col 3| only one cuddle assignment allowed before defer statement (wsl)
internal/net/grpc/client_test.go|206 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/client_test.go|342 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/client_test.go|343 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/client_test.go|482 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/client_test.go|483 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains github.com/vdaas/vald/internal/net/grpc.grpcConns contains sync.Mutex (govet)
internal/net/grpc/grpcconns_test.go|178 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains sync.Mutex (govet)
internal/net/grpc/grpcconns_test.go|179 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains sync.Mutex (govet)
internal/net/grpc/grpcconns_test.go|355 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains sync.Mutex (govet)
internal/net/grpc/grpcconns_test.go|356 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains sync.Mutex (govet)
internal/net/grpc/grpcconns_test.go|693 col 9| copylocks: range var tc copies lock: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains sync.Mutex (govet)
internal/net/grpc/grpcconns_test.go|694 col 11| copylocks: assignment copies lock value to test: github.com/vdaas/vald/internal/net/grpc.test contains github.com/vdaas/vald/internal/net/grpc.fields contains sync.Mutex (govet)
pkg/gateway/backup/config/config_test.go|18 col 9| package should be config_test
instead of config
(testpackage)
pkg/gateway/lb/router/router.go|33| Function 'New' is too long (133 > 60) (funlen)
internal/compress/zstd_option.go|29 col 27| mnd: Magic number: 3, in detected (gomnd)
pkg/manager/backup/cassandra/handler/grpc/handler.go|250 col 83| toBackupVector
- result err
is always nil
(unparam)
pkg/manager/backup/cassandra/handler/grpc/handler.go|258 col 79| toModelVector
- result err
is always nil
(unparam)
internal/backoff/backoff.go|67| Function 'Do' is too long (65 > 60) (funlen)
internal/backoff/option.go|33 col 20| mnd: Magic number: 1.5, in detected (gomnd)
internal/backoff/option.go|34 col 17| mnd: Magic number: 50, in detected (gomnd)
pkg/gateway/vald/handler/grpc/handler.go|303| Function 'Insert' has too many statements (51 > 40) (funlen)
pkg/gateway/vald/handler/grpc/handler.go|410| Function 'MultiInsert' has too many statements (54 > 40) (funlen)
pkg/gateway/vald/handler/grpc/handler.go|512| Function 'Update' is too long (68 > 60) (funlen)
pkg/gateway/vald/handler/grpc/handler.go|687| Function 'MultiUpsert' is too long (64 > 60) (funlen)
pkg/gateway/vald/handler/grpc/handler.go|831| Function 'MultiRemove' is too long (64 > 60) (funlen)
pkg/gateway/vald/handler/grpc/option.go|33 col 24| mnd: Magic number: 20, in detected (gomnd)
internal/config/config.go|77 col 12| G304: Potential file inclusion via variable (gosec)
pkg/gateway/meta/router/router.go|33| Function 'New' is too long (133 > 60) (funlen)
pkg/manager/backup/cassandra/service/cassandra.go|74 col 28| (*client).getVector
- ctx
is unused (unparam)
pkg/manager/backup/mysql/handler/grpc/handler.go|241 col 83| toBackupVector
- result err
is always nil
(unparam)
pkg/manager/backup/mysql/handler/grpc/handler.go|249 col 79| toModelVector
- result err
is always nil
(unparam)
internal/worker/queue_option.go|29 col 18| mnd: Magic number: 10, in detected (gomnd)
pkg/agent/sidecar/service/restorer/restorer.go|122 col 40| (*restorer).startRestore$1 - result 0 (interface{}) is always nil (unparam)
pkg/agent/core/ngt/handler/grpc/handler.go|291| 291-314 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:349-374
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|349| 349-374 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:291-314
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|186| 186-220 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:222-256
(dupl)
pkg/agent/core/ngt/handler/grpc/handler.go|222| 222-256 lines are duplicate of pkg/agent/core/ngt/handler/grpc/handler.go:186-220
(dupl)
pkg/agent/core/ngt/handler/grpc/option.go|40 col 24| mnd: Magic number: 20, in detected (gomnd)
pkg/manager/compressor/service/registerer.go|64 col 51| S1019: should use make(map[string]*payload.Backup_Vector) instead (gosimple)
pkg/gateway/meta/handler/grpc/handler.go|196| 196-230 lines are duplicate of pkg/gateway/meta/handler/grpc/handler.go:232-266
(dupl)
pkg/gateway/meta/handler/grpc/handler.go|232| 232-266 lines are duplicate of pkg/gateway/meta/handler/grpc/handler.go:196-230
(dupl)
pkg/gateway/meta/handler/grpc/handler.go|268| Function 'Insert' has too many statements (45 > 40) (funlen)
pkg/gateway/meta/handler/grpc/handler.go|349| Function 'MultiInsert' has too many statements (45 > 40) (funlen)
pkg/gateway/meta/handler/grpc/handler.go|550| Function 'MultiUpsert' is too long (90 > 60) (funlen)
pkg/gateway/meta/handler/grpc/handler.go|593 col 5| sloppyLen: len(updateReqs) <= 0 can be len(updateReqs) == 0 (gocritic)
pkg/gateway/meta/handler/grpc/handler.go|611 col 5| sloppyLen: len(insertReqs) <= 0 can be len(insertReqs) == 0 (gocritic)
pkg/gateway/meta/handler/grpc/handler.go|285 col 2| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
pkg/gateway/meta/handler/grpc/handler.go|366 col 3| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
pkg/gateway/meta/handler/grpc/option.go|30 col 24| mnd: Magic number: 20, in detected (gomnd)
pkg/gateway/backup/handler/grpc/handler.go|154| Function 'Insert' has too many statements (45 > 40) (funlen)
pkg/gateway/backup/handler/grpc/handler.go|240| Function 'MultiInsert' has too many statements (42 > 40) (funlen)
pkg/gateway/backup/handler/grpc/handler.go|474| Function 'MultiUpsert' is too long (90 > 60) (funlen)
pkg/gateway/backup/handler/grpc/handler.go|433 col 5| sloppyLen: len(ips) <= 0 can be len(ips) == 0 (gocritic)
pkg/gateway/backup/handler/grpc/handler.go|517 col 5| sloppyLen: len(updateReqs) <= 0 can be len(updateReqs) == 0 (gocritic)
pkg/gateway/backup/handler/grpc/handler.go|535 col 5| sloppyLen: len(insertReqs) <= 0 can be len(insertReqs) == 0 (gocritic)
pkg/gateway/backup/handler/grpc/handler.go|585 col 6| sloppyLen: len(ips) <= 0 can be len(ips) == 0 (gocritic)
pkg/gateway/backup/handler/grpc/handler.go|649 col 7| sloppyLen: len(ips) <= 0 can be len(ips) == 0 (gocritic)
pkg/gateway/backup/handler/grpc/handler.go|170 col 2| if !req.GetConfig().GetSkipStrictExistCheck()
is deeply nested (complexity: 6) (nestif)
hack/helm/schema/gen/main.go|102 col 12| G304: Potential file inclusion via variable (gosec)
internal/io/ioutil/ioutil.go|32 col 15| Error return value of f.Close
is not checked (errcheck)
internal/k8s/node/option.go|24 col 5| defaultOpts
is unused (deadcode)
pkg/gateway/lb/handler/grpc/handler.go|336| 336-370 lines are duplicate of pkg/gateway/lb/handler/grpc/handler.go:372-406
(dupl)
pkg/gateway/lb/handler/grpc/handler.go|372| 372-406 lines are duplicate of pkg/gateway/lb/handler/grpc/handler.go:336-370
(dupl)
pkg/gateway/lb/handler/grpc/handler.go|181| Function 'search' is too long (124 > 60) (funlen)
pkg/gateway/lb/handler/grpc/handler.go|408| Function 'Insert' is too long (69 > 60) (funlen)
pkg/gateway/lb/handler/grpc/handler.go|715| Function 'MultiUpsert' is too long (95 > 60) (funlen)
pkg/gateway/lb/handler/grpc/handler.go|291 col 20| appendAssign: append result not assigned to the same slice (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|759 col 6| sloppyLen: len(updateReqs) <= 0 can be len(updateReqs) == 0 (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|779 col 6| sloppyLen: len(insertReqs) <= 0 can be len(insertReqs) == 0 (gocritic)
pkg/gateway/lb/handler/grpc/handler.go|457 col 7| err113: do not compare errors directly, use errors.Is() instead: "err == errors.ErrRPCCallFailed(target, context.Canceled)" (goerr113)
internal/net/http/transport/roundtrip.go|55 col 24| response body must be closed (bodyclose)
internal/errors/errors.go|124 col 24| err113: do not compare errors directly, use errors.Is() instead: "err == target" (goerr113)
Signed-off-by: kpango <[email protected]>
Signed-off-by: kpango [email protected]
Description:
This PR include Vald's new design APIs
This change includes a lot of features.
I'll make sub PRs (I'll add links below) for this branch please review each PRs.
Related Issue:
How Has This Been Tested?:
Environment:
Types of changes:
Changes to Core Features:
Checklist: