-
Notifications
You must be signed in to change notification settings - Fork 29
Improve import updates with slice change plans and port deltas #116
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #116 +/- ##
==========================================
+ Coverage 70.30% 74.98% +4.68%
==========================================
Files 14 15 +1
Lines 1357 1443 +86
==========================================
+ Hits 954 1082 +128
+ Misses 330 287 -43
- Partials 73 74 +1
Continue to review full report at Codecov.
|
db1ca36
to
c1373c3
Compare
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.
Overall looks good. Few minor comments.
pkg/controllers/common_test.go
Outdated
@@ -0,0 +1,83 @@ | |||
package controllers |
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.
Should we rename this file into something else? There is package called common, this may create confusion.
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.
renamed to controllers_common_test.go
pkg/controllers/utils.go
Outdated
} | ||
|
||
for _, portB := range b { | ||
if !portB.Equals(aMap[portB.GetID()]) { |
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.
should we add check if portB.GetID()
key is not found in the aMap
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.
Good catch.
DeepEqual will handle it, but it's good to be explicit.
ServiceImportName string | ||
|
||
// Current EndpontSlices | ||
Current []discovery.EndpointSlice |
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.
Could be optimal to use list of pointers here so we don't copy the complete list.
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.
That's fair.
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.
Issue #, if available:
#101
Description of changes:
Multiple improvements to service import logic.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.