Skip to content
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

dubbo: support wildcard match for dubbo interface #15121

Merged
merged 3 commits into from
Mar 1, 2021

Conversation

wbpcode
Copy link
Member

@wbpcode wbpcode commented Feb 20, 2021

Signed-off-by: wbpcode [email protected]

Commit Message: support wildcard match for dubbo interface
Additional Description:
Support wildcard match、suffix match and prefix match for dubbo interface name. Check #14765 get more information.

Risk Level: Low
Testing: Unit Test
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]

@wbpcode wbpcode requested a review from lizan as a code owner February 20, 2021 06:00
@wbpcode
Copy link
Member Author

wbpcode commented Feb 20, 2021

@zyfjeff, Would you mind help me to take the first pass? Thanks!

@wbpcode wbpcode changed the title support wildcard match for dubbo interface dubbo: support wildcard match for dubbo interface Feb 20, 2021
@@ -129,14 +129,50 @@ class MethodRouteEntryImpl : public RouteEntryImplBase {

class SingleRouteMatcherImpl : public RouteMatcher, public Logger::Loggable<Logger::Id::dubbo> {
public:
class InterfaceMatcher {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/envoyproxy/envoy/blob/main/source/extensions/tracers/xray/util.cc#L26

Is it possible to reuse this existing implementation? Just add case-sensitive settings on top of this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need to add some comments in the proto file to indicate that the interface uses wildcards to match.

Copy link
Member Author

@wbpcode wbpcode Feb 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we only support the same prefix or suffix match as the HTTP virtual host, I don't think it's necessary to use such a relatively complex implementation in xray. The current implementation should have better performance.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add some new comments.

@zyfjeff
Copy link
Member

zyfjeff commented Feb 20, 2021

/assign @zyfjeff

Signed-off-by: wbpcode <[email protected]>
@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/envoy/.
API shepherd assignee is @htuch
CC @envoyproxy/api-watchers: FYI only for changes made to api/envoy/.

🐱

Caused by: #15121 was synchronize by wbpcode.

see: more, trace.

zyfjeff
zyfjeff previously approved these changes Feb 22, 2021
Signed-off-by: wbpcode <[email protected]>
@wbpcode
Copy link
Member Author

wbpcode commented Feb 22, 2021

@htuch When you have time, could you please review the API update? This PR does not directly modify any of the APIs, but extends the meaning and functionality of an existing configuration.

Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm api

Over to @lizan for owners review.

@wbpcode wbpcode requested a review from zyfjeff February 24, 2021 11:04
@lizan lizan merged commit 9c2d536 into envoyproxy:main Mar 1, 2021
@wbpcode wbpcode deleted the dubbo-interface-match branch April 6, 2021 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants