-
Notifications
You must be signed in to change notification settings - Fork 365
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 and fix early return: HTTP Listener XDS translator #2981
Refactor and fix early return: HTTP Listener XDS translator #2981
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2981 +/- ##
==========================================
- Coverage 66.51% 58.94% -7.57%
==========================================
Files 161 162 +1
Lines 22673 27125 +4452
==========================================
+ Hits 15080 15990 +910
- Misses 6720 10182 +3462
- Partials 873 953 +80 ☔ View full report in Codecov by Sentry. |
Signed-off-by: huabing zhao <[email protected]>
53acda0
to
0688a1a
Compare
Signed-off-by: huabing zhao <[email protected]>
…issing-filters-refactor
ba79a3e
to
7fa68a2
Compare
…issing-filters-refactor
any test for this? |
@@ -194,7 +194,17 @@ func buildXdsQuicListener(name, address string, port uint32, accesslog *ir.Acces | |||
return xdsListener | |||
} | |||
|
|||
func (t *Translator) addXdsHTTPFilterChain(xdsListener *listenerv3.Listener, irListener *ir.HTTPListener, | |||
// addHCMToXDSListener adds a HCM filter to the listener's filter chain, and adds |
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.
LGTM thanks for this refactor ! much easier to read now
hope we didn't miss any lines while moving the function into other methods
This PR:
processHTTPListenerXdsTranslation
and extract anaddRouteToRouteConfig
sub-method to make the HTTPListener construction a bit easier to understand and maintain.addXdsHTTPFilterChain
toaddHCMToXDSListener
to better reflect what this method does.