-
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
[agent-NGT] refactor pkg/agent/core/service using FOP #566
[agent-NGT] refactor pkg/agent/core/service using FOP #566
Conversation
Signed-off-by: Rintaro Okamura <[email protected]>
Best reviewed: commit by commit
Optimal code review plan
|
[CHATOPS:HELP] ChatOps commands.
|
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.
others LGTM
Signed-off-by: Rintaro Okamura <[email protected]>
Codecov Report
@@ Coverage Diff @@
## refactor/agent-ngt-sidecar/improve-s3-backup-behavior #566 +/- ##
=========================================================================================
+ Coverage 10.16% 10.44% +0.28%
=========================================================================================
Files 405 403 -2
Lines 21007 20437 -570
=========================================================================================
Hits 2135 2135
+ Misses 18612 18042 -570
Partials 260 260
Continue to review full report at Codecov.
|
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.
LGTM
Signed-off-by: Rintaro Okamura <[email protected]>
type args struct { | ||
opts []core.Option | ||
} | ||
type fields struct { |
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.
[golangci] reported by reviewdog 🐶
struct of size 224 bytes could be of size 216 bytes (maligned)
type args struct { | ||
ctx context.Context | ||
} | ||
type fields struct { |
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.
[golangci] reported by reviewdog 🐶
struct of size 224 bytes could be of size 216 bytes (maligned)
*/ | ||
} | ||
|
||
for _, test := range tests { |
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.
[golangci] reported by reviewdog 🐶
copylocks: range var test copies lock: github.com/vdaas/vald/pkg/agent/core/ngt/service.test contains github.com/vdaas/vald/pkg/agent/core/ngt/service.fields contains sync.Mutex (govet)
ivc: test.fields.ivc, | ||
dvc: test.fields.dvc, | ||
indexing: test.fields.indexing, | ||
saveMu: test.fields.saveMu, |
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.
[golangci] reported by reviewdog 🐶
copylocks: literal copies lock value from test.fields.saveMu: sync.Mutex (govet)
*/ | ||
} | ||
|
||
for _, test := range tests { |
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.
[golangci] reported by reviewdog 🐶
copylocks: range var test copies lock: github.com/vdaas/vald/pkg/agent/core/ngt/service.test contains github.com/vdaas/vald/pkg/agent/core/ngt/service.fields contains sync.Mutex (govet)
ivc: test.fields.ivc, | ||
dvc: test.fields.dvc, | ||
indexing: test.fields.indexing, | ||
saveMu: test.fields.saveMu, |
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.
[golangci] reported by reviewdog 🐶
copylocks: literal copies lock value from test.fields.saveMu: sync.Mutex (govet)
* 🔧 inject ngt service config from usecase layer Signed-off-by: Rintaro Okamura <[email protected]> * ♻️ use filepath.Clean Signed-off-by: Rintaro Okamura <[email protected]> * ✅ update tests Signed-off-by: Rintaro Okamura <[email protected]>
* 🔧 inject ngt service config from usecase layer Signed-off-by: Rintaro Okamura <[email protected]> * ♻️ use filepath.Clean Signed-off-by: Rintaro Okamura <[email protected]> * ✅ update tests Signed-off-by: Rintaro Okamura <[email protected]>
* 🔧 inject ngt service config from usecase layer Signed-off-by: Rintaro Okamura <[email protected]> * ♻️ use filepath.Clean Signed-off-by: Rintaro Okamura <[email protected]> * ✅ update tests Signed-off-by: Rintaro Okamura <[email protected]>
* 🔧 inject ngt service config from usecase layer Signed-off-by: Rintaro Okamura <[email protected]> * ♻️ use filepath.Clean Signed-off-by: Rintaro Okamura <[email protected]> * ✅ update tests Signed-off-by: Rintaro Okamura <[email protected]>
* ♻️ not to overwrite existing backup files Signed-off-by: Rintaro Okamura <[email protected]> * ✅ update tests for internal/compress Signed-off-by: Rintaro Okamura <[email protected]> * 🔧 add default_pool_size option / add internal/json package Signed-off-by: Rintaro Okamura <[email protected]> ♻️ fix import Signed-off-by: Rintaro Okamura <[email protected]> * ✨ Add metadata package to write agent metadata when the index saved. Signed-off-by: Rintaro Okamura <[email protected]> * ✨ revise file.Open interface Signed-off-by: Rintaro Okamura <[email protected]> * ✅ fix file test Signed-off-by: Rintaro Okamura <[email protected]> * ✅ fix json tests Signed-off-by: Rintaro Okamura <[email protected]> * 🎨 use filepath.Join Signed-off-by: Rintaro Okamura <[email protected]> * ✨ revise watching method for ngt index backup files Signed-off-by: Rintaro Okamura <[email protected]> * ✅ remove dps from ngt_test Signed-off-by: Rintaro Okamura <[email protected]> * ✨ kill own process when NGT index cannot be loaded within timeout Signed-off-by: Rintaro Okamura <[email protected]> * 🚨 fix deepsource issues Signed-off-by: Rintaro Okamura <[email protected]> * 🚚 move internal/json -> internal/encoding/json Signed-off-by: Rintaro Okamura <[email protected]> * [agent-NGT] refactor pkg/agent/core/service using FOP (#566) * 🔧 inject ngt service config from usecase layer Signed-off-by: Rintaro Okamura <[email protected]> * ♻️ use filepath.Clean Signed-off-by: Rintaro Okamura <[email protected]> * ✅ update tests Signed-off-by: Rintaro Okamura <[email protected]> * ♻️ refactor initNGT func Signed-off-by: Rintaro Okamura <[email protected]> * ✅ update Signed-off-by: Rintaro Okamura <[email protected]> * ✨ add isValid flag to metadata Signed-off-by: Rintaro Okamura <[email protected]> * 💚 revise fetch depth for run test workflow Signed-off-by: Rintaro Okamura <[email protected]> * ♻️ use isInvalid because it should be default to false Signed-off-by: Rintaro Okamura <[email protected]> * 🎨 fix tag format Signed-off-by: Rintaro Okamura <[email protected]> * ♻️ fix poststop logic Signed-off-by: Rintaro Okamura <[email protected]> * ✨ add Escape() method to errgroup Signed-off-by: Rintaro Okamura <[email protected]> * 📦 add *.containers field Signed-off-by: Rintaro Okamura <[email protected]> * Revert "📦 add *.containers field" This reverts commit f82d52e. * ✅ update Signed-off-by: Rintaro Okamura <[email protected]> * Revert "✅ update" This reverts commit 1c6bce6. * Revert ":sparkles: add Escape() method to errgroup" This reverts commit 6a4dad6. * ♻️ exit safely using goroutine Signed-off-by: Rintaro Okamura <[email protected]> * 🚚 move internal/metadata -> pkg/agent/internal/metadata Signed-off-by: Rintaro Okamura <[email protected]> * ♻️ add defaultPoolSize const Signed-off-by: Rintaro Okamura <[email protected]> * ♻️ pass cfg struct to agent service Signed-off-by: Rintaro Okamura <[email protected]> * 🐳 fix dockerfiles Signed-off-by: Rintaro Okamura <[email protected]> * ♻️ add watch_enabled & auto_backup_enabled options Signed-off-by: Rintaro Okamura <[email protected]> * ✅ fix tests Signed-off-by: Rintaro Okamura <[email protected]> * ♻️ revise agent-ngt codes based on suggestions Signed-off-by: Rintaro Okamura <[email protected]> * ✅ update Signed-off-by: Rintaro Okamura <[email protected]> * ♻️ revise observer poststop Signed-off-by: Rintaro Okamura <[email protected]>
Description:
SSIA
further refactoring will be done with branch #556.
Related Issue:
nothing.
How Has This Been Tested?:
nothing
Environment:
Types of changes:
Changes to Core Features:
Checklist: