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
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>
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 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>
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 modulo ci being sorted out and release notes (glad you found the right file, and the other additions are fantastic!)
Also as I'm out tomorrow feel free to ping snow for merge once those two are addressed!
Signed-off-by: Michael Meng <mmeng@lyft.com>
Signed-off-by: Michael Meng <mmeng@lyft.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.
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>
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! 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.
setRoute
method into the Filter API, addingsetRoute
into HCMActiveStream
where it is implemented as aStreamFilterCallbacks
for filters to callDelegatingRoute
/DelegatingRouteEntry
mechanism 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
/RouteEntry
API (ininclude/envoy/router
) must also be changed in theDelegatingRoute
/DelegatingRouteEntry
API. 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.