-
Notifications
You must be signed in to change notification settings - Fork 8.1k
refactor eds functions #37892
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
refactor eds functions #37892
Conversation
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
@@ -360,7 +361,7 @@ func (s *ServiceEntryStore) serviceEntryHandler(_, curr config.Config, event mod | |||
fullPush := len(configsUpdated) > 0 | |||
// if not full push needed, at least one service unchanged | |||
if !fullPush { | |||
s.edsUpdate(serviceInstances, true) | |||
s.queueEdsPush(serviceInstances) |
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 we call edsUpdate
and edsCacheUpdate
?
queueEdsPush can not express this is a doing cache update -> push in searial
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.
Sorry. I did not understand. We already have edsUpate and edsCacheUpdate that call xds update functions. What are you suggesting here?
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.
I mean keep the name edsUpdate
and edsCacheUpdate
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.
Changed a bit. PTAL
} | ||
|
||
// buildEndpoints builds endpoints for the instance keys. | ||
func (s *ServiceEntryStore) buildEndpoints(keys map[instancesKey]struct{}) map[instancesKey][]*model.IstioEndpoint { |
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.
I am all for this abstraction
/test integ-security_istio |
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.
Much better
* refactor eds functions Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * fix test Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * revert Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * fix Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * rename Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * rename Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
* refactor eds functions Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * fix test Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * revert Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * fix Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * rename Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * rename Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
* Fix TestEdsCache flake (#37824) * Run eds cache update synchrounously and wait for complete * update * Fix dead lock * Fix goroutine leak * make use of channel rather than waitgroup to prevent blocking * refactor eds functions (#37892) * refactor eds functions Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * fix test Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * revert Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * fix Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * rename Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * rename Signed-off-by: Rama Chavali <rama.rao@salesforce.com> * workload instance cause stale CDS clusters of type STRICT_DNS (#39947) * workload instance cause stale CDS clusters with of type STRICT_DNS * added release note * fewer full push triggers * code review comments for release note * extend logic for DNS_ROUND_ROBIN * update trigger reason to EndpointUpdate * add unit tests * resolve cherrypick conflicts Co-authored-by: Zhonghu Xu <xuzhonghu@huawei.com> Co-authored-by: Rama Chavali <rama.rao@salesforce.com>
Uh oh!
There was an error while loading. Please reload this page.