-
Notifications
You must be signed in to change notification settings - Fork 361
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
chore: use list instead of map for Provider Resources #2658
Conversation
arkodg
commented
Feb 20, 2024
- list adds order stability
/retest |
LGTM, tests need to be updated |
/retest |
@@ -20,41 +20,6 @@ import ( | |||
|
|||
type XdsIRMap map[string]*ir.Xds | |||
type InfraIRMap map[string]*ir.Infra | |||
type GatewayClassResources map[string]*Resources |
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.
list will hit a similar issue during Store operation,
it would need a DeepCopy func
panic: watchable.DeepCopy: type is not copiable: *[]*gatewayapi.Resources
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.
yeah I had to write my own DeepCopy
as well
@arkodg conflicts need to be resolved. |
* list adds order stability Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2658 +/- ##
==========================================
+ Coverage 63.53% 63.62% +0.09%
==========================================
Files 123 123
Lines 20169 20173 +4
==========================================
+ Hits 12814 12835 +21
+ Misses 6533 6516 -17
Partials 822 822 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
@@ -20,41 +24,6 @@ import ( | |||
|
|||
type XdsIRMap map[string]*ir.Xds |
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 also use list for xdsIR infraIR instead of map
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.
thats an internal structure, iirc each resource is unrelated and the map improves lookup
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.
Line 87 in 3e70498
func (x *Xds) Equal(y *Xds) bool { |
/retest |
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