-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
ads: pause and resume v3 apis #11300
Conversation
Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.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.
Thanks. Patch looks good but I wonder we should probably leave a TODO to make this a bit more robust by allowing pause/resume of the latest message type and then chain backwards inside the pause/resume implementation to cover earlier versions.
On the test front, this behavior does have tests, e.g. see #1991. Most of the ones that matter in that PR were the integration tests, but it should be possible to do unit/mock tests as well if that's simpler.
/wait
@htuch i'd like to make integration tests with v3, i was thinking about adding a parameter the integration tests (as with delta vs sotw) and making the whole suit run with v2 and v3. Does that seem correct? |
@sschepens the tests are pretty slow, so if we do this for all the ADS integration tests, that might be a bit much. You can parameterize on v2/v3 resource type for just a pause/resume test, subclassing |
Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
@htuch sorry for the delay, had a hard time understanding why the test i created was failing, had to duplicate some logic to be able to send v3 messages in integration tests, don't know if that's ok though |
Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.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.
Thanks, a few comments. I think it's going to be very desirable to avoid the copy+paste.
/wait
Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
fixes #11512 Thanks! |
Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
@htuch clang_tidy is complaining about the case for the static function |
Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.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.
Yep, the approach taken here looks good. Would be good to figure out if we can get rid of some of the remaining boiler plate in AdsClusterV3
test, but this is on the right track IMHO.
sendDeltaDiscoveryResponse(type_url, added_or_updated, removed, version, xds_stream_); | ||
} | ||
|
||
template <class T> |
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.
Why are these templated? Aren't they all v3? Do we need these wrappers?
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.
These are templated because they receive any type of proto message to encode in the response.
I needed to create these to enforce V3 DiscoveryResponses
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'm still a bit confused; these belong to AdsClusterV3Test
, which is only doing v3 AFAICT. So, why do they need templating?
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.
The templating is not for the api version but for the resource type this methods receive clusters, cluster load assignements, routes, etc.
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'm still wondering if we really need these. There is a transport/resource version distinction in xDS, here we only care about v3 xDS resource API version, there should be no need to have specialized methods for the v3 API transport to validate the pause/resume behavior.
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.
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 could probably make those two methods virtual and override only those, would that be ok?
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.
Sure, or even just parameterize the downgrade in the function args.
Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.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.
Other than the thread on ADS integration test, this looks awesome and ready to ship! Thanks for iterating.
sendDeltaDiscoveryResponse(type_url, added_or_updated, removed, version, xds_stream_); | ||
} | ||
|
||
template <class T> |
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'm still wondering if we really need these. There is a transport/resource version distinction in xDS, here we only care about v3 xDS resource API version, there should be no need to have specialized methods for the v3 API transport to validate the pause/resume behavior.
Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
@htuch addressed the last comment and added another batching test, let me know if that's ok |
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 @sschepens for iterating on this. This will have a real benefit to users of v3.
Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
Pause and resune V3 Api Verions as well as V2 when using ads. Currently only V2 Api is being paused, this causes envoy to send a separate discovery request for every resource on CDS/LDS/SRDS updates. Risk Level: Medium? Testing: Fixes: envoyproxy#11267 Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com> Signed-off-by: yashwant121 <yadavyashwant36@gmail.com>
Pause and resune V3 Api Verions as well as V2 when using ads. Currently only V2 Api is being paused, this causes envoy to send a separate discovery request for every resource on CDS/LDS/SRDS updates. Risk Level: Medium? Testing: Fixes: envoyproxy#11267 Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com>
Add mocks to MockGrpcMuxWatch. follow-up to #11300. Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
Pause and resune V3 Api Verions as well as V2 when using ads. Currently only V2 Api is being paused, this causes envoy to send a separate discovery request for every resource on CDS/LDS/SRDS updates. Risk Level: Medium? Testing: Fixes: envoyproxy#11267 Signed-off-by: Sebastian Schepens <sebastian.schepens@mercadolibre.com> Signed-off-by: yashwant121 <yadavyashwant36@gmail.com>
Add mocks to MockGrpcMuxWatch. follow-up to envoyproxy#11300. Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com> Signed-off-by: scheler <santosh.cheler@appdynamics.com>
Pause and resune V3 Api Verions as well as V2 when using ads.
Currently only V2 Api is being paused, this causes envoy to send a separate discovery request for every resource on CDS/LDS/SRDS updates.
Risk Level: Medium?
Testing:
Fixes: #11267