-
Notifications
You must be signed in to change notification settings - Fork 290
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
fix: implement comparable interface for ir.Xds to skip unnecessary updates #1795
Conversation
Signed-off-by: David Boslee <david@goteleport.com>
74d296b
to
9b86b34
Compare
Codecov Report
@@ Coverage Diff @@
## main #1795 +/- ##
==========================================
+ Coverage 64.95% 65.00% +0.05%
==========================================
Files 84 84
Lines 12209 12230 +21
==========================================
+ Hits 7930 7950 +20
+ Misses 3773 3768 -5
- Partials 506 512 +6
|
there's a lint error
probably can be recreated by running |
Signed-off-by: David Boslee <david@goteleport.com>
19e842d
to
6b4d5ac
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.
LGTM thanks for adding this
would also be great to see if watchable
is actually leveraging this Equal
method with a test in
https://github.com/envoyproxy/gateway/blob/main/internal/message/watchutil_test.go
Sure thing. I will add a test for this. |
Signed-off-by: David Boslee <david@goteleport.com>
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.
awesome, thanks !
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.
Looks good, thanks for contributing 🚀
What this PR does / why we need it:
This change implements the comparable interface used by watchable to sort ir.Xds listeners when checking for differences. This reduces the number of xds updates that get pushed to envoy during re-syncs of k8s resources.
Which issue(s) this PR fixes:
fixes #1634