http: support route mutability#15266
Conversation
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
|
I'm headed out (EoD EST) and out tomorrow but I'll check it out early Monday! |
Signed-off-by: Michael Meng <mmeng@lyft.com>
alyssawilk
left a comment
There was a problem hiding this comment.
Looks great!
I'd encourage adding this into the release notes as a new feature as I think it's useful enough we should call it out :-)
|
Oh also looks like CI is wedged -a new push should sort that out. |
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
…asString helper Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
|
Thanks for the review @alyssawilk! I think this is ready for another pass now.
On the topic of docs, I've added some notes about route mutation into the arch overview http filters docs. You think that's an appropriate place? Evening update: I'm also noticing CI things are failing with windows, will dive into sometime tomorrow. |
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
alyssawilk
left a comment
There was a problem hiding this comment.
LGTM! Will defer merge to snow since I'm headed out for a long weekend shortly :-)
|
@envoyproxy/windows-dev There seems to be some Windows only (I think tsan is unrelated? but not 100% sure) on this PR, any chance anyone of you could help debugging? The error message is unfortunately not very helpful |
|
I have some time now, I can take a look |
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.com>
snowp
left a comment
There was a problem hiding this comment.
LGTM, thanks! Happy to see this land!
Adds a setRoute method into the Filter API, adding setRoute into HCM ActiveStream where it is implemented as a StreamFilterCallbacks for filters to call Adds a DelegatingRoute / DelegatingRouteEntry mechanism to easily create a route that mutates specific properties of an existing route. Signed-off-by: Michael Meng <mmeng@lyft.com>
Commit Message: http: support route mutability
Additional Description: Implements #14904.
setRoutemethod into the Filter API, addingsetRouteinto HCMActiveStreamwhere it is implemented as aStreamFilterCallbacksfor filters to callDelegatingRoute/DelegatingRouteEntrymechanism to easily create a route that mutates specific properties of an existing route.Risk Level: Low, implemented as new feature (no behavior changes)
Testing:
HttpConnectionManagerImplTest: testing (1) happy path case of setting the route to a DelegatingRoute that overrides clusterName, (2) setRoute(nullptr), (3) all routeEntry calls are delegated correctly and exhibit the same behavior as the base route's routeEntry(IntegrationTest, SetRouteToDelegatingRouteWithClusterOverride)Docs Changes: "Life of a Request" docs, HTTP filters arch docs
Release Notes: Added to 1.18.0
Platform Specific Features: n/a
[Optional API Considerations:] Should be noted that all changes (e.g. addition of a new virtual method) to the
Route/RouteEntryAPI (ininclude/envoy/router) must also be changed in theDelegatingRoute/DelegatingRouteEntryAPI. Developers will see build errors if there are new virtual methods not implemented, which will act as a forcing function to maintain parity b/w the APIs.