You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2022/09/30 06:23:54 UTC

[GitHub] [servicecomb-java-chassis] gudelian941 opened a new pull request, #3377: add feature , request can be handle by self-defined class

gudelian941 opened a new pull request, #3377:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3377

   Follow this checklist to help us incorporate your contribution quickly and easily:
   
    - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
    - [ ] Each commit in the pull request should have a meaningful subject line and body.
    - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue.
    - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
    - [ ] Run `mvn clean install -Pit` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
    - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] WillemJiang commented on a diff in pull request #3377: add feature , request can be handle by self-defined class

Posted by GitBox <gi...@apache.org>.
WillemJiang commented on code in PR #3377:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3377#discussion_r991769272


##########
governance/src/main/java/org/apache/servicecomb/governance/utils/CustomMatch.java:
##########
@@ -22,5 +22,6 @@
 public interface CustomMatch {
     String errorMessageForNotImplements = " didn't implement interface org.apache.servicecomb.governance.utils.CustomMatch";
     String errorMessageForAbstractClass = " should be a instantiable class rather than abstract class or other else";
+    String infoMessageForCreatingClass = "is not in spring container, create one and register it to spring container";

Review Comment:
   If we don't let the user to use this constant string, it's better just put them into the log method. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] gudelian941 commented on a diff in pull request #3377: add feature , request can be handle by self-defined class

Posted by GitBox <gi...@apache.org>.
gudelian941 commented on code in PR #3377:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3377#discussion_r991748666


##########
governance/src/main/java/org/apache/servicecomb/governance/marker/RequestProcessor.java:
##########
@@ -103,4 +115,68 @@ private boolean operatorMatch(String str, RawOperator rawOperator) {
     }
     return true;
   }
+
+  private boolean customMatch(GovernanceRequest request, Matcher matcher) {
+    if (matcher.getCustomMatcher() == null) {
+      return true;
+    }
+    String customMatcherHandlerName = matcher.getCustomMatcher().getCustomMatcherHandler();
+    String customMatcherParameters = matcher.getCustomMatcher().getCustomMatcherParameters();
+
+    if (StringUtils.isEmpty(customMatcherHandlerName) || StringUtils.isEmpty(customMatcherParameters)) {
+      return true;
+    }
+
+    CustomMatch customMatcherHandler = generateHandler(customMatcherHandlerName);
+    return customMatcherHandler.matchRequest(request, customMatcherParameters);
+  }
+
+  private CustomMatch getBeanByHandlerName(String customMatcherHandler) {
+    Object extractObject = null;
+    if (applicationContext.containsBean(customMatcherHandler)) {
+      extractObject = applicationContext.getBean(customMatcherHandler);
+      if (!(extractObject instanceof CustomMatch)) {
+        LOGGER.error("{} {}", customMatcherHandler, CustomMatch.errorMessageForNotImplements);
+        throw new RuntimeException(customMatcherHandler + CustomMatch.errorMessageForNotImplements);
+      }
+      return (CustomMatch)extractObject;
+    }
+    return null;
+  }
+
+
+  public CustomMatch generateHandler(String customMatcherHandler) {
+    CustomMatch extractObject = getBeanByHandlerName(customMatcherHandler);
+    if (extractObject != null) {
+      return extractObject;
+    }
+

Review Comment:
   done



##########
governance/src/test/java/org/apache/servicecomb/governance/CustomMatchTest.java:
##########
@@ -0,0 +1,82 @@
+package org.apache.servicecomb.governance;

Review Comment:
   done



##########
governance/src/test/java/org/apache/servicecomb/governance/CustomMatchTest.java:
##########
@@ -0,0 +1,82 @@
+package org.apache.servicecomb.governance;
+
+import org.apache.servicecomb.governance.marker.CustomMatcher;
+import org.apache.servicecomb.governance.marker.GovernanceRequest;
+import org.apache.servicecomb.governance.marker.Matcher;
+import org.apache.servicecomb.governance.marker.RequestProcessor;
+import org.apache.servicecomb.governance.mockclasses.service.MockConfigurationForCustomMatcher;
+import org.apache.servicecomb.governance.service.MatchersService;
+import org.apache.servicecomb.governance.utils.CustomMatch;
+import org.junit.Assert;
+import org.junit.jupiter.api.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ContextConfiguration;
+
+@SpringBootTest
+@ContextConfiguration(classes = {GovernanceConfiguration.class, MockConfiguration.class, MockConfigurationForCustomMatcher.class})
+public class CustomMatchTest {
+
+    private RequestProcessor requestProcessor;
+
+    @Autowired
+    public void setRequestProcessor(RequestProcessor requestProcessor) {
+        this.requestProcessor = requestProcessor;
+    }
+
+    private Matcher generateMatcher(String customMatcherHandler, String customMatcherParameters) {
+        CustomMatcher customMatcher = new CustomMatcher();
+        customMatcher.setCustomMatcherHandler(customMatcherHandler);
+        customMatcher.setCustomMatcherParameters(customMatcherParameters);
+        Matcher matcher = new Matcher();
+        matcher.setCustomMatcher(customMatcher);
+        return matcher;
+    }
+
+    @Test
+    public void test_should_pass_when_value_class_empty() {
+        GovernanceRequest request = new GovernanceRequest();
+        Matcher mockMatcher = generateMatcher("", "");
+        Assert.assertTrue(this.requestProcessor.match(request,mockMatcher));
+        mockMatcher = generateMatcher("", "bill");
+        Assert.assertTrue(this.requestProcessor.match(request,mockMatcher));
+        mockMatcher = generateMatcher("classWithAnnotation", "");
+        Assert.assertTrue(this.requestProcessor.match(request,mockMatcher));
+    }
+
+    @Test
+    public void test_should_pass_when_value_class_match() {
+        GovernanceRequest request = new GovernanceRequest();
+        Matcher mockMatcher = generateMatcher("classWithAnnotation", "bill");
+        Assert.assertTrue(this.requestProcessor.match(request,mockMatcher));
+    }
+
+    @Test
+    public void test_should_throw_exception_when_class_not_found() {
+        GovernanceRequest request = new GovernanceRequest();
+        try {
+            Matcher mockMatcher = generateMatcher("classWithAnnotationNotFound", "bill");
+            this.requestProcessor.match(request,mockMatcher);
+        } catch (Exception e) {
+            Assert.assertTrue(e.getCause() instanceof ClassNotFoundException);
+        }
+    }
+
+    @Test
+    public void test_should_pass_when_multiple_value() {
+        GovernanceRequest request = new GovernanceRequest();
+        Matcher mockMatcher = generateMatcher("classWithAnnotation", "bill,bill2");
+        Assert.assertTrue(this.requestProcessor.match(request,mockMatcher));
+    }
+
+    @Test
+    public void test_should_throw_exception_when_not_implements_interface() {
+        GovernanceRequest request = new GovernanceRequest();
+        try {
+            Matcher mockMatcher = generateMatcher("classNotImplments", "bill,bill2");
+            this.requestProcessor.match(request,mockMatcher);

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] little-cui merged pull request #3377: add feature , request can be handle by self-defined class

Posted by GitBox <gi...@apache.org>.
little-cui merged PR #3377:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3377


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] WillemJiang commented on a diff in pull request #3377: add feature , request can be handle by self-defined class

Posted by GitBox <gi...@apache.org>.
WillemJiang commented on code in PR #3377:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3377#discussion_r991737935


##########
governance/src/test/java/org/apache/servicecomb/governance/CustomMatchTest.java:
##########
@@ -0,0 +1,82 @@
+package org.apache.servicecomb.governance;

Review Comment:
   We need the License header to the unit test file as well. 



##########
governance/src/test/java/org/apache/servicecomb/governance/CustomMatchTest.java:
##########
@@ -0,0 +1,82 @@
+package org.apache.servicecomb.governance;
+
+import org.apache.servicecomb.governance.marker.CustomMatcher;
+import org.apache.servicecomb.governance.marker.GovernanceRequest;
+import org.apache.servicecomb.governance.marker.Matcher;
+import org.apache.servicecomb.governance.marker.RequestProcessor;
+import org.apache.servicecomb.governance.mockclasses.service.MockConfigurationForCustomMatcher;
+import org.apache.servicecomb.governance.service.MatchersService;
+import org.apache.servicecomb.governance.utils.CustomMatch;
+import org.junit.Assert;
+import org.junit.jupiter.api.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ContextConfiguration;
+
+@SpringBootTest
+@ContextConfiguration(classes = {GovernanceConfiguration.class, MockConfiguration.class, MockConfigurationForCustomMatcher.class})
+public class CustomMatchTest {
+
+    private RequestProcessor requestProcessor;
+
+    @Autowired
+    public void setRequestProcessor(RequestProcessor requestProcessor) {
+        this.requestProcessor = requestProcessor;
+    }
+
+    private Matcher generateMatcher(String customMatcherHandler, String customMatcherParameters) {
+        CustomMatcher customMatcher = new CustomMatcher();
+        customMatcher.setCustomMatcherHandler(customMatcherHandler);
+        customMatcher.setCustomMatcherParameters(customMatcherParameters);
+        Matcher matcher = new Matcher();
+        matcher.setCustomMatcher(customMatcher);
+        return matcher;
+    }
+
+    @Test
+    public void test_should_pass_when_value_class_empty() {
+        GovernanceRequest request = new GovernanceRequest();
+        Matcher mockMatcher = generateMatcher("", "");
+        Assert.assertTrue(this.requestProcessor.match(request,mockMatcher));
+        mockMatcher = generateMatcher("", "bill");
+        Assert.assertTrue(this.requestProcessor.match(request,mockMatcher));
+        mockMatcher = generateMatcher("classWithAnnotation", "");
+        Assert.assertTrue(this.requestProcessor.match(request,mockMatcher));
+    }
+
+    @Test
+    public void test_should_pass_when_value_class_match() {
+        GovernanceRequest request = new GovernanceRequest();
+        Matcher mockMatcher = generateMatcher("classWithAnnotation", "bill");
+        Assert.assertTrue(this.requestProcessor.match(request,mockMatcher));
+    }
+
+    @Test
+    public void test_should_throw_exception_when_class_not_found() {
+        GovernanceRequest request = new GovernanceRequest();
+        try {
+            Matcher mockMatcher = generateMatcher("classWithAnnotationNotFound", "bill");
+            this.requestProcessor.match(request,mockMatcher);
+        } catch (Exception e) {
+            Assert.assertTrue(e.getCause() instanceof ClassNotFoundException);
+        }
+    }
+
+    @Test
+    public void test_should_pass_when_multiple_value() {
+        GovernanceRequest request = new GovernanceRequest();
+        Matcher mockMatcher = generateMatcher("classWithAnnotation", "bill,bill2");
+        Assert.assertTrue(this.requestProcessor.match(request,mockMatcher));
+    }
+
+    @Test
+    public void test_should_throw_exception_when_not_implements_interface() {
+        GovernanceRequest request = new GovernanceRequest();
+        try {
+            Matcher mockMatcher = generateMatcher("classNotImplments", "bill,bill2");
+            this.requestProcessor.match(request,mockMatcher);

Review Comment:
   need to add a line below this code.
   
   fail("Except the exception is thrown here")



##########
governance/src/main/java/org/apache/servicecomb/governance/marker/RequestProcessor.java:
##########
@@ -103,4 +115,68 @@ private boolean operatorMatch(String str, RawOperator rawOperator) {
     }
     return true;
   }
+
+  private boolean customMatch(GovernanceRequest request, Matcher matcher) {
+    if (matcher.getCustomMatcher() == null) {
+      return true;
+    }
+    String customMatcherHandlerName = matcher.getCustomMatcher().getCustomMatcherHandler();
+    String customMatcherParameters = matcher.getCustomMatcher().getCustomMatcherParameters();
+
+    if (StringUtils.isEmpty(customMatcherHandlerName) || StringUtils.isEmpty(customMatcherParameters)) {
+      return true;
+    }
+
+    CustomMatch customMatcherHandler = generateHandler(customMatcherHandlerName);
+    return customMatcherHandler.matchRequest(request, customMatcherParameters);
+  }
+
+  private CustomMatch getBeanByHandlerName(String customMatcherHandler) {
+    Object extractObject = null;
+    if (applicationContext.containsBean(customMatcherHandler)) {
+      extractObject = applicationContext.getBean(customMatcherHandler);
+      if (!(extractObject instanceof CustomMatch)) {
+        LOGGER.error("{} {}", customMatcherHandler, CustomMatch.errorMessageForNotImplements);
+        throw new RuntimeException(customMatcherHandler + CustomMatch.errorMessageForNotImplements);
+      }
+      return (CustomMatch)extractObject;
+    }
+    return null;
+  }
+
+
+  public CustomMatch generateHandler(String customMatcherHandler) {
+    CustomMatch extractObject = getBeanByHandlerName(customMatcherHandler);
+    if (extractObject != null) {
+      return extractObject;
+    }
+

Review Comment:
   It could be better if we can add a info log to show we create a extractionHandler here. 



##########
governance/src/test/java/org/apache/servicecomb/governance/mockclasses/CustomMatchDemo.java:
##########
@@ -0,0 +1,16 @@
+package org.apache.servicecomb.governance.mockclasses;

Review Comment:
   License header.



##########
governance/src/test/java/org/apache/servicecomb/governance/mockclasses/ClassNotImplments.java:
##########
@@ -0,0 +1,11 @@
+package org.apache.servicecomb.governance.mockclasses;

Review Comment:
   License header.



##########
governance/src/test/java/org/apache/servicecomb/governance/mockclasses/service/MockConfigurationForCustomMatcher.java:
##########
@@ -0,0 +1,9 @@
+package org.apache.servicecomb.governance.mockclasses.service;

Review Comment:
   License header.



##########
governance/src/test/java/org/apache/servicecomb/governance/mockclasses/ClassWithAnnotation.java:
##########
@@ -0,0 +1,22 @@
+package org.apache.servicecomb.governance.mockclasses;

Review Comment:
   License header.



##########
governance/src/test/java/org/apache/servicecomb/governance/mockclasses/service/MockProfileClassUserService.java:
##########
@@ -0,0 +1,10 @@
+package org.apache.servicecomb.governance.mockclasses.service;

Review Comment:
   License header.



##########
governance/src/main/java/org/apache/servicecomb/governance/marker/GovernanceRequest.java:
##########
@@ -102,4 +109,12 @@ public String getServiceName() {
   public void setServiceName(String serviceName) {
     this.serviceName = serviceName;
   }
+
+  public Object getSourceRequest() {
+    return sourceRequest;
+  }
+
+  public void setSourceRequest(Object sourceRequest) {
+    this.sourceRequest = sourceRequest;
+  }

Review Comment:
   I don't think it's reasonable to treat the sourceRequest as a Object.
   If it just a URI, we can change the Object to String.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] liubao68 commented on pull request #3377: add feature , request can be handle by self-defined class

Posted by GitBox <gi...@apache.org>.
liubao68 commented on PR #3377:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3377#issuecomment-1263170097

   Can you create a issue on why you add this feature? and maybe we have other ways to implement your feature. Your PR seems not very good for a framework extension. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] gudelian941 commented on a diff in pull request #3377: add feature , request can be handle by self-defined class

Posted by GitBox <gi...@apache.org>.
gudelian941 commented on code in PR #3377:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3377#discussion_r991716132


##########
governance/src/main/java/org/apache/servicecomb/governance/marker/RequestProcessor.java:
##########
@@ -103,4 +115,68 @@ private boolean operatorMatch(String str, RawOperator rawOperator) {
     }
     return true;
   }
+
+  private boolean customMatch(GovernanceRequest request, Matcher matcher) {

Review Comment:
   done



##########
governance/src/main/java/org/apache/servicecomb/governance/utils/CustomMatch.java:
##########
@@ -0,0 +1,9 @@
+package org.apache.servicecomb.governance.utils;

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] little-cui commented on a diff in pull request #3377: add feature , request can be handle by self-defined class

Posted by GitBox <gi...@apache.org>.
little-cui commented on code in PR #3377:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3377#discussion_r990897474


##########
governance/src/main/java/org/apache/servicecomb/governance/marker/RequestProcessor.java:
##########
@@ -103,4 +115,68 @@ private boolean operatorMatch(String str, RawOperator rawOperator) {
     }
     return true;
   }
+
+  private boolean customMatch(GovernanceRequest request, Matcher matcher) {

Review Comment:
   需要UT保护下



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] yhs0092 commented on a diff in pull request #3377: add feature , request can be handle by self-defined class

Posted by GitBox <gi...@apache.org>.
yhs0092 commented on code in PR #3377:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3377#discussion_r990899799


##########
governance/src/main/java/org/apache/servicecomb/governance/utils/CustomMatch.java:
##########
@@ -0,0 +1,9 @@
+package org.apache.servicecomb.governance.utils;

Review Comment:
   File header required, Apache license infomation



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] liubao68 commented on a diff in pull request #3377: add feature , request can be handle by self-defined class

Posted by GitBox <gi...@apache.org>.
liubao68 commented on code in PR #3377:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3377#discussion_r984255517


##########
governance/src/main/java/org/apache/servicecomb/governance/marker/TrafficMarker.java:
##########
@@ -23,6 +23,10 @@
 public class TrafficMarker extends Configurable {
   private List<Matcher> matches;
 
+  private String profileValues;
+
+  private String profileExtractClass;

Review Comment:
   I think it is not a good idea to create these two properties here. We need to keep the specification clear and clarity, see https://github.com/huaweicloud/spring-cloud-huawei/wiki/using-governance
   
   First of all, we should keep the specification language independent. For your requirement, I think you can add this logic when you create your governance request, and set the header you need. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] gudelian941 commented on a diff in pull request #3377: add feature , request can be handle by self-defined class

Posted by GitBox <gi...@apache.org>.
gudelian941 commented on code in PR #3377:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3377#discussion_r991748816


##########
governance/src/test/java/org/apache/servicecomb/governance/mockclasses/service/MockConfigurationForCustomMatcher.java:
##########
@@ -0,0 +1,9 @@
+package org.apache.servicecomb.governance.mockclasses.service;

Review Comment:
   done



##########
governance/src/test/java/org/apache/servicecomb/governance/mockclasses/service/MockProfileClassUserService.java:
##########
@@ -0,0 +1,10 @@
+package org.apache.servicecomb.governance.mockclasses.service;

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] gudelian941 commented on a diff in pull request #3377: add feature , request can be handle by self-defined class

Posted by GitBox <gi...@apache.org>.
gudelian941 commented on code in PR #3377:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3377#discussion_r991748741


##########
governance/src/test/java/org/apache/servicecomb/governance/mockclasses/ClassNotImplments.java:
##########
@@ -0,0 +1,11 @@
+package org.apache.servicecomb.governance.mockclasses;

Review Comment:
   done



##########
governance/src/test/java/org/apache/servicecomb/governance/mockclasses/CustomMatchDemo.java:
##########
@@ -0,0 +1,16 @@
+package org.apache.servicecomb.governance.mockclasses;

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] yhs0092 commented on a diff in pull request #3377: add feature , request can be handle by self-defined class

Posted by GitBox <gi...@apache.org>.
yhs0092 commented on code in PR #3377:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3377#discussion_r990900006


##########
governance/src/main/java/org/apache/servicecomb/governance/marker/CustomMatcher.java:
##########
@@ -0,0 +1,24 @@
+package org.apache.servicecomb.governance.marker;

Review Comment:
   File header required, Apache license infomation



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] liubao68 commented on a diff in pull request #3377: add feature , request can be handle by self-defined class

Posted by GitBox <gi...@apache.org>.
liubao68 commented on code in PR #3377:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3377#discussion_r984256406


##########
governance/src/main/java/org/apache/servicecomb/governance/marker/GovernanceRequest.java:
##########
@@ -102,4 +109,12 @@ public String getServiceName() {
   public void setServiceName(String serviceName) {
     this.serviceName = serviceName;
   }
+
+  public Object getSourceRequest() {
+    return sourceRequest;
+  }
+
+  public void setSourceRequest(Object sourceRequest) {
+    this.sourceRequest = sourceRequest;
+  }

Review Comment:
   This property will make design not specific and not descriptive, I think this is not good extension. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [servicecomb-java-chassis] codecov-commenter commented on pull request #3377: add feature , request can be handle by self-defined class

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #3377:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3377#issuecomment-1278470183

   # [Codecov](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/3377?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#3377](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/3377?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1a470e6) into [master](https://codecov.io/gh/apache/servicecomb-java-chassis/commit/6d20460e718f12cd87392ec2af380d2ca8e77577?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6d20460) will **decrease** coverage by `0.01%`.
   > The diff coverage is `70.90%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #3377      +/-   ##
   ============================================
   - Coverage     77.57%   77.55%   -0.02%     
   - Complexity     1462     1463       +1     
   ============================================
     Files          1650     1651       +1     
     Lines         43772    43860      +88     
     Branches       3685     3693       +8     
   ============================================
   + Hits          33955    34016      +61     
   - Misses         8280     8306      +26     
   - Partials       1537     1538       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/3377?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...rvicecomb/governance/marker/GovernanceRequest.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/3377/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z292ZXJuYW5jZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvZ292ZXJuYW5jZS9tYXJrZXIvR292ZXJuYW5jZVJlcXVlc3QuamF2YQ==) | `81.81% <0.00%> (-12.92%)` | :arrow_down: |
   | [...ervicecomb/governance/marker/RequestProcessor.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/3377/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z292ZXJuYW5jZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvZ292ZXJuYW5jZS9tYXJrZXIvUmVxdWVzdFByb2Nlc3Nvci5qYXZh) | `81.25% <69.04%> (-13.63%)` | :arrow_down: |
   | [...e/servicecomb/governance/marker/CustomMatcher.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/3377/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z292ZXJuYW5jZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvZ292ZXJuYW5jZS9tYXJrZXIvQ3VzdG9tTWF0Y2hlci5qYXZh) | `100.00% <100.00%> (ø)` | |
   | [.../apache/servicecomb/governance/marker/Matcher.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/3377/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z292ZXJuYW5jZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvZ292ZXJuYW5jZS9tYXJrZXIvTWF0Y2hlci5qYXZh) | `100.00% <100.00%> (ø)` | |
   | [...thentication/consumer/RSAConsumerTokenManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/3377/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-aGFuZGxlcnMvaGFuZGxlci1wdWJsaWNrZXktYXV0aC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvYXV0aGVudGljYXRpb24vY29uc3VtZXIvUlNBQ29uc3VtZXJUb2tlbk1hbmFnZXIuamF2YQ==) | `70.96% <0.00%> (-6.46%)` | :arrow_down: |
   | [...ervicecomb/common/rest/AbstractRestInvocation.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/3377/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2NvbW1vbi1yZXN0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZXJ2aWNlY29tYi9jb21tb24vcmVzdC9BYnN0cmFjdFJlc3RJbnZvY2F0aW9uLmphdmE=) | `87.91% <0.00%> (-4.69%)` | :arrow_down: |
   | [...mb/config/ConfigCenterConfigurationSourceImpl.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/3377/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHluYW1pYy1jb25maWcvY29uZmlnLWNjL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zZXJ2aWNlY29tYi9jb25maWcvQ29uZmlnQ2VudGVyQ29uZmlndXJhdGlvblNvdXJjZUltcGwuamF2YQ==) | `9.57% <0.00%> (-1.07%)` | :arrow_down: |
   | [...cecomb/serviceregistry/auth/TokenCacheManager.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/3377/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmljZS1yZWdpc3RyeS9yZWdpc3RyeS1zZXJ2aWNlLWNlbnRlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvc2VydmljZXJlZ2lzdHJ5L2F1dGgvVG9rZW5DYWNoZU1hbmFnZXIuamF2YQ==) | `13.04% <0.00%> (-1.02%)` | :arrow_down: |
   | [...g/apache/servicecomb/edge/core/EdgeInvocation.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/3377/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZWRnZS9lZGdlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NlcnZpY2Vjb21iL2VkZ2UvY29yZS9FZGdlSW52b2NhdGlvbi5qYXZh) | `5.12% <0.00%> (-0.14%)` | :arrow_down: |
   | [...ache/servicecomb/router/cache/RouterRuleCache.java](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/3377/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z292ZXJuYW5jZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2VydmljZWNvbWIvcm91dGVyL2NhY2hlL1JvdXRlclJ1bGVDYWNoZS5qYXZh) | `58.13% <0.00%> (ø)` | |
   | ... and [8 more](https://codecov.io/gh/apache/servicecomb-java-chassis/pull/3377/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org