[GitHub] acsukesh commented on a change in pull request #627: [SCB-292] chassis support standard parameter validation

2018-04-09 Thread GitBox
acsukesh commented on a change in pull request #627: [SCB-292] chassis support 
standard parameter validation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/627#discussion_r180302280
 
 

 ##
 File path: 
demo/demo-validator/validator-client/src/main/java/org/apache/servicecomb/demo/validator/client/CodeFirstValidatorRestTemplate.java
 ##
 @@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.demo.validator.client;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.servicecomb.core.Const;
+import org.apache.servicecomb.core.CseContext;
+import org.apache.servicecomb.demo.DemoConst;
+import org.apache.servicecomb.demo.TestMgr;
+import org.apache.servicecomb.swagger.invocation.context.ContextUtils;
+import org.apache.servicecomb.swagger.invocation.context.InvocationContext;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.client.RestTemplate;
+
+public class CodeFirstValidatorRestTemplate {
+  protected void changeTransport(String microserviceName, String transport) {
+
CseContext.getInstance().getConsumerProviderManager().setTransport(microserviceName,
 transport);
+TestMgr.setMsg(microserviceName, transport);
+  }
+
+  public void testCodeFirst(RestTemplate template, String microserviceName, 
String basePath) {
+String cseUrlPrefix = "cse://" + microserviceName + basePath;
+for (String transport : DemoConst.transports) {
+  changeTransport(microserviceName, transport);
+  testAllTransport(microserviceName, template, cseUrlPrefix);
+}
+  }
+
+  protected void testAllTransport(String microserviceName, RestTemplate 
template, String cseUrlPrefix) {
+testCodeFirstAdd(template, cseUrlPrefix);
+testCodeFirstAddForException(template, cseUrlPrefix);
+testCodeFirstSayHi(template, cseUrlPrefix);
+testCodeFirstSayHiForException(template, cseUrlPrefix);
+testTraceIdOnContextContainsTraceId(template, cseUrlPrefix);
+  }
+
+  protected void checkStatusCode(String microserviceName, int 
expectStatusCode, HttpStatus httpStatus) {
+TestMgr.check(expectStatusCode, httpStatus.value());
+  }
+
+  protected void testCodeFirstSayHi(RestTemplate template, String 
cseUrlPrefix) {
+ResponseEntity responseEntity =
+template.exchange(cseUrlPrefix + "sayhi/{name}", HttpMethod.PUT, null, 
String.class, "world");
+TestMgr.check(202, responseEntity.getStatusCode());
+TestMgr.check("world sayhi", responseEntity.getBody());
+  }
+
+  protected void testCodeFirstSayHiForException(RestTemplate template, String 
cseUrlPrefix) {
+boolean isExcep = false;
+try {
+  template.exchange(cseUrlPrefix + "sayhi/{name}", HttpMethod.PUT, null, 
String.class, "te");
+} catch (Exception e) {
+  isExcep = true;
+}
+TestMgr.check(true, isExcep);
+  }
+
+  protected void testCodeFirstAdd(RestTemplate template, String cseUrlPrefix) {
+Map params = new HashMap<>();
+params.put("a", "5");
+params.put("b", "20");
+int result =
+template.postForObject(cseUrlPrefix + "add", params, Integer.class);
+TestMgr.check(25, result);
+  }
+
+  protected void testCodeFirstAddForException(RestTemplate template, String 
cseUrlPrefix) {
+Map params = new HashMap<>();
+params.put("a", "5");
+params.put("b", "3");
+boolean isExcep = false;
+try {
 
 Review comment:
   fixed


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] acsukesh commented on a change in pull request #627: [SCB-292] chassis support standard parameter validation

2018-04-09 Thread GitBox
acsukesh commented on a change in pull request #627: [SCB-292] chassis support 
standard parameter validation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/627#discussion_r180302115
 
 

 ##
 File path: demo/demo-validator/pom.xml
 ##
 @@ -0,0 +1,35 @@
+
+
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+   4.0.0
+   
+   org.apache.servicecomb.demo
+   demo-parent
+   1.0.0-m2-SNAPSHOT
 
 Review comment:
   fixed


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] acsukesh commented on a change in pull request #627: [SCB-292] chassis support standard parameter validation

2018-04-09 Thread GitBox
acsukesh commented on a change in pull request #627: [SCB-292] chassis support 
standard parameter validation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/627#discussion_r180302126
 
 

 ##
 File path: demo/demo-validator/validator-client/pom.xml
 ##
 @@ -0,0 +1,58 @@
+
+
+
+http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;
+   xmlns="http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>
+   4.0.0
+   
+   org.apache.servicecomb.demo
+   demo-validator
+   1.0.0-m2-SNAPSHOT
+   
+   validator-client
+   Java Chassis::Demo::Validator::Client
+
+   
+   
+   org.apache.servicecomb.demo
+   demo-schema
+   
+   
+   org.apache.servicecomb
+   provider-jaxrs
+   
+   
+   org.apache.servicecomb
+   provider-springmvc
+   
+   
+
+   
+   
org.apache.servicecomb.demo.jaxrs.client.JaxrsClient
 
 Review comment:
   fixed


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] acsukesh commented on a change in pull request #627: [SCB-292] chassis support standard parameter validation

2018-04-09 Thread GitBox
acsukesh commented on a change in pull request #627: [SCB-292] chassis support 
standard parameter validation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/627#discussion_r180302239
 
 

 ##
 File path: 
demo/demo-validator/validator-client/src/main/java/org/apache/servicecomb/demo/validator/client/CodeFirstRestTemplateValidator.java
 ##
 @@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.demo.validator.client;
+
+import org.apache.servicecomb.demo.CodeFirstRestTemplate;
+import org.apache.servicecomb.demo.TestMgr;
+import org.springframework.web.client.RestTemplate;
+
+public class CodeFirstRestTemplateValidator extends CodeFirstRestTemplate {
 
 Review comment:
   fixed


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] acsukesh commented on a change in pull request #627: [SCB-292] chassis support standard parameter validation

2018-04-09 Thread GitBox
acsukesh commented on a change in pull request #627: [SCB-292] chassis support 
standard parameter validation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/627#discussion_r180301954
 
 

 ##
 File path: 
core/src/test/java/org/apache/servicecomb/core/definition/schema/TestProducerSchemaFactory.java
 ##
 @@ -1,5 +1,5 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
+* Licensed to the Apache Software Foundation (ASF) under one or more
 
 Review comment:
   Fixed


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Re: Ask for Help of ServiceComb Saga

2018-04-09 Thread Yang Bo
Hi,

 I'll work on the SSL support of gRPC.

[1]https://issues.apache.org/jira/browse/SCB-342

On Mon, Apr 9, 2018 at 6:15 PM, 李波  wrote:

> Hi,
>
> I will take the second issue, add a demo using pack with java chassis
> about *transfering
> money* (*)[1]
>
> [1]  https://issues.apache.org/jira/browse/SCB-244
>
>
> Best Regards!
> Li Bo
>
>
> 2018-04-09 17:54 GMT+08:00 Willem Jiang :
>
> > Hi,
> >
> > There are some small tasks which are easy for the newbee to take to
> > understand better about ServiceComb Saga. Please feel free to take if you
> > like.
> >
> >
> > 1.  secure gPRC transport (*) [1]
> > We need to support SSL transport for gPRC , and also need to verify the
> > Alpha Server's identity
> >
> > 2.  add demo to use pack with java chassis (*) [2]
> > Current we just have some demo of spring boot,  we may need to verify if
> we
> > can interceptor the invocation of java chassis
> >
> > 3. compact events to remove unnecessary fields(*) [3]
> > It can help you know more about the events between the  Omega and Alpha
> >
> > 4. acceptance tests related issue (**) [4][5][6]
> > It can help you know better about the acceptance test, we need to update
> > the demo to let the transaction timeout
> >
> > [1]https://issues.apache.org/jira/browse/SCB-342
> > [2]https://issues.apache.org/jira/browse/SCB-244
> > [3]https://issues.apache.org/jira/browse/SCB-268
> > [4]https://issues.apache.org/jira/browse/SCB-301
> > [5]https://issues.apache.org/jira/browse/SCB-302
> > [6]https://issues.apache.org/jira/browse/SCB-303
> >
> >
> > Willem Jiang
> >
> > Blog: http://willemjiang.blogspot.com (English)
> >   http://jnn.iteye.com  (Chinese)
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
>



-- 
Best Regards,
Yang.


[GitHub] liubao68 commented on a change in pull request #627: [SCB-292] chassis support standard parameter validation

2018-04-09 Thread GitBox
liubao68 commented on a change in pull request #627: [SCB-292] chassis support 
standard parameter validation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/627#discussion_r180285793
 
 

 ##
 File path: 
demo/demo-validator/validator-client/src/main/java/org/apache/servicecomb/demo/validator/client/CodeFirstValidatorRestTemplate.java
 ##
 @@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.demo.validator.client;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.servicecomb.core.Const;
+import org.apache.servicecomb.core.CseContext;
+import org.apache.servicecomb.demo.DemoConst;
+import org.apache.servicecomb.demo.TestMgr;
+import org.apache.servicecomb.swagger.invocation.context.ContextUtils;
+import org.apache.servicecomb.swagger.invocation.context.InvocationContext;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.client.RestTemplate;
+
+public class CodeFirstValidatorRestTemplate {
+  protected void changeTransport(String microserviceName, String transport) {
+
CseContext.getInstance().getConsumerProviderManager().setTransport(microserviceName,
 transport);
+TestMgr.setMsg(microserviceName, transport);
+  }
+
+  public void testCodeFirst(RestTemplate template, String microserviceName, 
String basePath) {
+String cseUrlPrefix = "cse://" + microserviceName + basePath;
+for (String transport : DemoConst.transports) {
+  changeTransport(microserviceName, transport);
+  testAllTransport(microserviceName, template, cseUrlPrefix);
+}
+  }
+
+  protected void testAllTransport(String microserviceName, RestTemplate 
template, String cseUrlPrefix) {
+testCodeFirstAdd(template, cseUrlPrefix);
+testCodeFirstAddForException(template, cseUrlPrefix);
+testCodeFirstSayHi(template, cseUrlPrefix);
+testCodeFirstSayHiForException(template, cseUrlPrefix);
+testTraceIdOnContextContainsTraceId(template, cseUrlPrefix);
+  }
+
+  protected void checkStatusCode(String microserviceName, int 
expectStatusCode, HttpStatus httpStatus) {
+TestMgr.check(expectStatusCode, httpStatus.value());
+  }
+
+  protected void testCodeFirstSayHi(RestTemplate template, String 
cseUrlPrefix) {
+ResponseEntity responseEntity =
+template.exchange(cseUrlPrefix + "sayhi/{name}", HttpMethod.PUT, null, 
String.class, "world");
+TestMgr.check(202, responseEntity.getStatusCode());
+TestMgr.check("world sayhi", responseEntity.getBody());
+  }
+
+  protected void testCodeFirstSayHiForException(RestTemplate template, String 
cseUrlPrefix) {
+boolean isExcep = false;
+try {
+  template.exchange(cseUrlPrefix + "sayhi/{name}", HttpMethod.PUT, null, 
String.class, "te");
+} catch (Exception e) {
+  isExcep = true;
+}
+TestMgr.check(true, isExcep);
+  }
+
+  protected void testCodeFirstAdd(RestTemplate template, String cseUrlPrefix) {
+Map params = new HashMap<>();
+params.put("a", "5");
+params.put("b", "20");
+int result =
+template.postForObject(cseUrlPrefix + "add", params, Integer.class);
+TestMgr.check(25, result);
+  }
+
+  protected void testCodeFirstAddForException(RestTemplate template, String 
cseUrlPrefix) {
+Map params = new HashMap<>();
+params.put("a", "5");
+params.put("b", "3");
+boolean isExcep = false;
+try {
 
 Review comment:
   It's better to validate the returned status code also. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] liubao68 commented on a change in pull request #627: [SCB-292] chassis support standard parameter validation

2018-04-09 Thread GitBox
liubao68 commented on a change in pull request #627: [SCB-292] chassis support 
standard parameter validation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/627#discussion_r180284735
 
 

 ##
 File path: demo/demo-validator/validator-server/pom.xml
 ##
 @@ -0,0 +1,88 @@
+
+
+
+http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;
+   xmlns="http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>
+   4.0.0
+   
+   org.apache.servicecomb.demo
+   demo-validator
+   1.0.0-m2-SNAPSHOT
+   
+   validator-server
+   Java Chassis::Demo::Validator::Server
+
+   
+   
+   org.apache.servicecomb.demo
+   demo-schema
+   
+   
+   org.apache.servicecomb
+   provider-jaxrs
+   
+   
+   org.apache.servicecomb
+   swagger-invocation-validator
+   
+   
+
+   
+   
org.apache.servicecomb.demo.jaxrs.server.JaxrsServer
 
 Review comment:
   wrong class name


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] liubao68 commented on a change in pull request #627: [SCB-292] chassis support standard parameter validation

2018-04-09 Thread GitBox
liubao68 commented on a change in pull request #627: [SCB-292] chassis support 
standard parameter validation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/627#discussion_r180284632
 
 

 ##
 File path: 
demo/demo-validator/validator-client/src/main/java/org/apache/servicecomb/demo/validator/client/CodeFirstRestTemplateValidator.java
 ##
 @@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.demo.validator.client;
+
+import org.apache.servicecomb.demo.CodeFirstRestTemplate;
+import org.apache.servicecomb.demo.TestMgr;
+import org.springframework.web.client.RestTemplate;
+
+public class CodeFirstRestTemplateValidator extends CodeFirstRestTemplate {
 
 Review comment:
   This class seems useless


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] liubao68 commented on a change in pull request #627: [SCB-292] chassis support standard parameter validation

2018-04-09 Thread GitBox
liubao68 commented on a change in pull request #627: [SCB-292] chassis support 
standard parameter validation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/627#discussion_r180283712
 
 

 ##
 File path: demo/demo-validator/validator-client/pom.xml
 ##
 @@ -0,0 +1,58 @@
+
+
+
+http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;
+   xmlns="http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>
+   4.0.0
+   
+   org.apache.servicecomb.demo
+   demo-validator
+   1.0.0-m2-SNAPSHOT
+   
+   validator-client
+   Java Chassis::Demo::Validator::Client
+
+   
+   
+   org.apache.servicecomb.demo
+   demo-schema
+   
+   
+   org.apache.servicecomb
+   provider-jaxrs
+   
+   
+   org.apache.servicecomb
+   provider-springmvc
+   
+   
+
+   
+   
org.apache.servicecomb.demo.jaxrs.client.JaxrsClient
 
 Review comment:
   Class name should be ValidatorClient 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] liubao68 commented on a change in pull request #627: [SCB-292] chassis support standard parameter validation

2018-04-09 Thread GitBox
liubao68 commented on a change in pull request #627: [SCB-292] chassis support 
standard parameter validation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/627#discussion_r180282765
 
 

 ##
 File path: demo/demo-validator/pom.xml
 ##
 @@ -0,0 +1,35 @@
+
+
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd;>
+   4.0.0
+   
+   org.apache.servicecomb.demo
+   demo-parent
+   1.0.0-m2-SNAPSHOT
 
 Review comment:
   Formatting. Suggest to show blanks in your IDE to check if file is correctly 
indented


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


Re: [VOTE] Holding Apache ServiceComb (incubating) Meetup Hosted byHuawei Cloud as a Co-located Event in LC3 2018 Aisa

2018-04-09 Thread kirin wang
+1 LGTM

2018-04-09 18:24 GMT+08:00 郑扬勇 :

> +1
>
>  Yangyong Zheng
>  Best Regards!
>
>  -- 原始邮件 --
>   发件人: "Zen Lin";
>  发送时间: 2018年4月8日(星期天) 下午3:40
>  收件人: "dev";
>
>  主题: [VOTE] Holding Apache ServiceComb (incubating) Meetup Hosted byHuawei
> Cloud as a Co-located Event in LC3 2018 Aisa
>
>
>
> Hi All,
> This is a call for Vote to hold Apache ServiceComb (incubating) Meetup
> Hosted by Huawei Cloud as a Co-located Event in LC3 2018 Aisa.
>
> As discussed in the meetup propersal[1], we have plan to hold Apache
> ServiceComb (incubating) Mini Meetup, details are listed bellow,
>
>
>- What is the topic focus of the event?
>
> Topics are focused on user-pratices/technologies/ecosystem of Apache
> ServiceComb (incubating)
>
>- Who is organising the event?
>
> PMCs of ServiceComb (incubating) are the organizer
>
>- When is the event?
>
>  one day Between Jun 25, 2018 and Jun 27, 2018, maybe in Jun 26, 2018
>
>- How many attendees are expected?
>
> 60~100
>
>- How much PMC involvement is there already?
>
> 5
>
>- Which marks are requested?
>
> Two marks are requested,
> 1. Name of "Apache ServiceComb Incubating Meetup Hosted by Huawei Cloud"
> 2. "Powered By" Apache Incubator logo of Apache ServiceComb (incubating)
>
>- Is this for profit or non-profit? (See "Event Profits And Donations")?
>
> non-profit.
>
>
>
> [1]  https://www.mail-archive.com/dev@servicecomb.apache.org/msg03298.html
>


[GitHub] WillemJiang closed pull request #169: [SCB-464] Upgrade to Java Chassis 1.0.0-m1

2018-04-09 Thread GitBox
WillemJiang closed pull request #169: [SCB-464] Upgrade to Java Chassis 1.0.0-m1
URL: https://github.com/apache/incubator-servicecomb-saga/pull/169
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/omega/omega-transport/omega-transport-servicecomb/pom.xml 
b/omega/omega-transport/omega-transport-servicecomb/pom.xml
index a37629b1..18b9b51b 100644
--- a/omega/omega-transport/omega-transport-servicecomb/pom.xml
+++ b/omega/omega-transport/omega-transport-servicecomb/pom.xml
@@ -31,7 +31,7 @@
   
 
 
-  io.servicecomb
+  org.apache.servicecomb
   java-chassis-core
   ${java.chassis.version}
   provided
diff --git 
a/omega/omega-transport/omega-transport-servicecomb/src/main/java/org/apache/servicecomb/saga/omega/transport/servicecomb/SagaConsumerHandler.java
 
b/omega/omega-transport/omega-transport-servicecomb/src/main/java/org/apache/servicecomb/saga/omega/transport/servicecomb/SagaConsumerHandler.java
index 8fd296fe..5e0dcb22 100644
--- 
a/omega/omega-transport/omega-transport-servicecomb/src/main/java/org/apache/servicecomb/saga/omega/transport/servicecomb/SagaConsumerHandler.java
+++ 
b/omega/omega-transport/omega-transport-servicecomb/src/main/java/org/apache/servicecomb/saga/omega/transport/servicecomb/SagaConsumerHandler.java
@@ -27,9 +27,9 @@
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 
-import io.servicecomb.core.Handler;
-import io.servicecomb.core.Invocation;
-import io.servicecomb.swagger.invocation.AsyncResponse;
+import org.apache.servicecomb.core.Handler;
+import org.apache.servicecomb.core.Invocation;
+import org.apache.servicecomb.swagger.invocation.AsyncResponse;
 
 public class SagaConsumerHandler implements Handler {
 
diff --git 
a/omega/omega-transport/omega-transport-servicecomb/src/main/java/org/apache/servicecomb/saga/omega/transport/servicecomb/SagaProviderHandler.java
 
b/omega/omega-transport/omega-transport-servicecomb/src/main/java/org/apache/servicecomb/saga/omega/transport/servicecomb/SagaProviderHandler.java
index d639db53..73a73942 100644
--- 
a/omega/omega-transport/omega-transport-servicecomb/src/main/java/org/apache/servicecomb/saga/omega/transport/servicecomb/SagaProviderHandler.java
+++ 
b/omega/omega-transport/omega-transport-servicecomb/src/main/java/org/apache/servicecomb/saga/omega/transport/servicecomb/SagaProviderHandler.java
@@ -27,9 +27,9 @@
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 
-import io.servicecomb.core.Handler;
-import io.servicecomb.core.Invocation;
-import io.servicecomb.swagger.invocation.AsyncResponse;
+import org.apache.servicecomb.core.Handler;
+import org.apache.servicecomb.core.Invocation;
+import org.apache.servicecomb.swagger.invocation.AsyncResponse;
 
 public class SagaProviderHandler implements Handler {
 
diff --git 
a/omega/omega-transport/omega-transport-servicecomb/src/test/java/org/apache/servicecomb/saga/omega/transport/servicecomb/SagaConsumerHandlerTest.java
 
b/omega/omega-transport/omega-transport-servicecomb/src/test/java/org/apache/servicecomb/saga/omega/transport/servicecomb/SagaConsumerHandlerTest.java
index d23ad2b9..edf2c791 100644
--- 
a/omega/omega-transport/omega-transport-servicecomb/src/test/java/org/apache/servicecomb/saga/omega/transport/servicecomb/SagaConsumerHandlerTest.java
+++ 
b/omega/omega-transport/omega-transport-servicecomb/src/test/java/org/apache/servicecomb/saga/omega/transport/servicecomb/SagaConsumerHandlerTest.java
@@ -31,8 +31,8 @@
 import org.junit.Before;
 import org.junit.Test;
 
-import io.servicecomb.core.Invocation;
-import io.servicecomb.swagger.invocation.AsyncResponse;
+import org.apache.servicecomb.core.Invocation;
+import org.apache.servicecomb.swagger.invocation.AsyncResponse;
 
 public class SagaConsumerHandlerTest {
 
diff --git 
a/omega/omega-transport/omega-transport-servicecomb/src/test/java/org/apache/servicecomb/saga/omega/transport/servicecomb/SagaProviderHandlerTest.java
 
b/omega/omega-transport/omega-transport-servicecomb/src/test/java/org/apache/servicecomb/saga/omega/transport/servicecomb/SagaProviderHandlerTest.java
index a9b7e375..d789c935 100644
--- 
a/omega/omega-transport/omega-transport-servicecomb/src/test/java/org/apache/servicecomb/saga/omega/transport/servicecomb/SagaProviderHandlerTest.java
+++ 
b/omega/omega-transport/omega-transport-servicecomb/src/test/java/org/apache/servicecomb/saga/omega/transport/servicecomb/SagaProviderHandlerTest.java
@@ -34,8 +34,8 @@
 import org.junit.Before;
 import org.junit.Test;
 
-import io.servicecomb.core.Invocation;
-import io.servicecomb.swagger.invocation.AsyncResponse;
+import org.apache.servicecomb.core.Invocation;
+import 

[GitH b] little-c i closed p ll req est #322: [SCB-454] pdate instance stat s api param check

2018-04-09 Thread GitBox
little-cui closed pull request #322: [SCB-454] update instance status api param 
check
URL: https://github.com/apache/incubator-servicecomb-service-center/pull/322
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/pkg/validate/validate.go b/pkg/validate/validate.go
index 6c25e30d..e54cc557 100644
--- a/pkg/validate/validate.go
+++ b/pkg/validate/validate.go
@@ -246,9 +246,9 @@ func (v *Validator) Validate(s interface{}) error {
ok, invalidValue := validate.Match(fi)
if !ok {
if filter(fieldName) {
-   return fmt.Errorf("The field 
'%s.%s' value does not match rule: %s", st.Type.Name(), fieldName, validate)
+   return fmt.Errorf("The field 
'%s.%s' invalid-value does not match rule: %s", st.Type.Name(), fieldName, 
validate)
}
-   return fmt.Errorf("The field '%s.%s' 
value(%v) does not match rule: %s", st.Type.Name(), fieldName, invalidValue, 
validate)
+   return fmt.Errorf("The field '%s.%s' 
invalid-value(%v) does not match rule: %s", st.Type.Name(), fieldName, 
invalidValue, validate)
}
}
}
diff --git a/server/core/common.go b/server/core/common.go
index 2ea5de2c..0d2ae757 100644
--- a/server/core/common.go
+++ b/server/core/common.go
@@ -30,7 +30,6 @@ var (
ServiceAPI  pb.ServiceCtrlServer
InstanceAPI pb.SerivceInstanceCtrlServerEx
 
-   VersionRegex  *regexp.Regexp
MicroServiceValidator validate.Validator
MicroServiceInstanceValidator validate.Validator
ServiceRuleValidator  validate.Validator
@@ -50,6 +49,7 @@ var (
SchemasValidator  validate.Validator
SchemaValidator   validate.Validator
FrameWKValidator  validate.Validator
+   UpdateInstanceValidator   validate.Validator
 
SchemaIdRule *validate.ValidateRule
TagRule  *validate.ValidateRule
@@ -58,10 +58,11 @@ var (
 func init() {
// 非map/slice的validator
nameRegex, _ := 
regexp.Compile(`^[a-zA-Z0-9]*$|^[a-zA-Z0-9][a-zA-Z0-9_\-.]*[a-zA-Z0-9]$`)
+   // find 支持alias,多个:
serviceNameForFindRegex, _ := 
regexp.Compile(`^[a-zA-Z0-9]*$|^[a-zA-Z0-9][a-zA-Z0-9_\-.:]*[a-zA-Z0-9]$`)
//name模糊规则: name, *
nameFuzzyRegex, _ := 
regexp.Compile(`^[a-zA-Z0-9]*$|^[a-zA-Z0-9][a-zA-Z0-9_\-.]*[a-zA-Z0-9]$|^\*$`)
-   VersionRegex, _ = regexp.Compile(`^[0-9]+(\.[0-9]+){0,2}$`)
+   versionRegex, _ := regexp.Compile(`^[0-9]+(\.[0-9]+){0,2}$`)
// version模糊规则: 1.0, 1.0+, 1.0-2.0, latest
versionFuzzyRegex, _ := 
regexp.Compile(`^[0-9]*$|^[0-9]+(\.[0-9]+)*\+{0,1}$|^[0-9]+(\.[0-9]+)*-[0-9]+(\.[0-9]+)*$|^latest$`)
pathRegex, _ := regexp.Compile(`^[A-Za-z0-9.,?'\\/+%$#=~_\-@{}]*$`)
@@ -79,6 +80,8 @@ func init() {
schemaIdRegex, _ := 
regexp.Compile(`^[a-zA-Z0-9]{1,160}$|^[a-zA-Z0-9][a-zA-Z0-9_\-.]{0,158}[a-zA-Z0-9]$`)
 //length:{1,160}
instStatusRegex, _ := regexp.Compile("^(" + util.StringJoin([]string{
pb.MSI_UP, pb.MSI_DOWN, pb.MSI_STARTING, pb.MSI_OUTOFSERVICE}, 
"|") + ")?$")
+   updateInstStatusRegex, _ := regexp.Compile("^(" + 
util.StringJoin([]string{
+   pb.MSI_UP, pb.MSI_DOWN, pb.MSI_STARTING, pb.MSI_OUTOFSERVICE}, 
"|") + ")$")
tagRegex, _ := regexp.Compile(`^[a-zA-Z][a-zA-Z0-9_\-.]{0,63}$`)
hbModeRegex, _ := regexp.Compile(`^(push|pull)$`)
numberAllowEmptyRegex, _ := regexp.Compile(`^[0-9]*$`)
@@ -89,19 +92,22 @@ func init() {
regionRegex, _ := regexp.Compile(`^[A-Za-z0-9_.-]+$`)
ruleRegex, _ := regexp.Compile(`^(WHITE|BLACK)$`)
ruleAttrRegex, _ := 
regexp.Compile(`((^tag_[a-zA-Z][a-zA-Z0-9_\-.]{0,63}$)|(^ServiceId$)|(^AppId$)|(^ServiceName$)|(^Version$)|(^Description$)|(^Level$)|(^Status$))`)
-   SchemaSummaryRegex, _ := regexp.Compile(`(a-zA-Z0-9)*`)
+   schemaSummaryRegex, _ := regexp.Compile(`(a-zA-Z0-9)*`)
 
-   ServiceIdRule := {Min: 1, Length: 64, Regexp: 
serviceIdRegex}
-   InstanceStatusRule := {Regexp: instStatusRegex}
SchemaIdRule = {Regexp: schemaIdRegex}
-   nameRule := {Min: 1, Max: 128, Regexp: nameRegex}
-   versionFuzzyRule := {Min: 1, Max: 128, Regexp: 
versionFuzzyRegex}
TagRule = {Regexp: tagRegex}
 
+   serviceIdRule := {Min: 1, Length: 64, Regexp: 
serviceIdRegex}
+   instanceStatusRule := {Regexp: instStatusRegex}
+   updateInstStatusRule := {Regexp: 

??????[VOTE] Holding Apache ServiceComb (incubating) Meetup Hosted byHuawei Cloud as a Co-located Event in LC3 2018 Aisa

2018-04-09 Thread ??????
+1
   
 Yangyong Zheng
 Best Regards!
  
 --  --
  ??: "Zen Lin";
 : 2018??4??8??(??) 3:40
 ??: "dev";
 
 : [VOTE] Holding Apache ServiceComb (incubating) Meetup Hosted byHuawei 
Cloud as a Co-located Event in LC3 2018 Aisa

 

Hi All,
This is a call for Vote to hold Apache ServiceComb (incubating) Meetup
Hosted by Huawei Cloud as a Co-located Event in LC3 2018 Aisa.

As discussed in the meetup propersal[1], we have plan to hold Apache
ServiceComb (incubating) Mini Meetup, details are listed bellow,


   - What is the topic focus of the event?

Topics are focused on user-pratices/technologies/ecosystem of Apache
ServiceComb (incubating)

   - Who is organising the event?

PMCs of ServiceComb (incubating) are the organizer

   - When is the event?

 one day Between Jun 25, 2018 and Jun 27, 2018, maybe in Jun 26, 2018

   - How many attendees are expected?

60~100

   - How much PMC involvement is there already?

5

   - Which marks are requested?

Two marks are requested,
1. Name of "Apache ServiceComb Incubating Meetup Hosted by Huawei Cloud"
2. "Powered By" Apache Incubator logo of Apache ServiceComb (incubating)

   - Is this for profit or non-profit? (See "Event Profits And Donations")?

non-profit.



[1]  https://www.mail-archive.com/dev@servicecomb.apache.org/msg03298.html

Re: [VOTE] Holding Apache ServiceComb (incubating) Meetup Hosted by Huawei Cloud as a Co-located Event in LC3 2018 Aisa

2018-04-09 Thread Eric Lee
+1

2018-04-09 18:01 GMT+08:00 Yang Bo :

> +1
>
> On Mon, Apr 9, 2018 at 5:55 PM, 李波  wrote:
>
> > +1
> >
> > Best!
> > Li Bo
> >
> >
> > 2018-04-09 13:25 GMT+08:00 Jean-Baptiste Onofré :
> >
> > > Hi,
> > >
> > > it sounds good. Unfortunately, I'm not in the area ;)
> > >
> > > I hope next time ;)
> > >
> > > Regards
> > > JB
> > >
> > > On 04/08/2018 04:13 PM, Willem Jiang wrote:
> > > > +1 (Binding)
> > > >
> > > >
> > > > Willem Jiang
> > > >
> > > > Blog: http://willemjiang.blogspot.com (English)
> > > >   http://jnn.iteye.com  (Chinese)
> > > > Twitter: willemjiang
> > > > Weibo: 姜宁willem
> > > >
> > > > On Sun, Apr 8, 2018 at 3:40 PM, Zen Lin  >
> > > wrote:
> > > >
> > > >> Hi All,
> > > >> This is a call for Vote to hold Apache ServiceComb (incubating)
> Meetup
> > > >> Hosted by Huawei Cloud as a Co-located Event in LC3 2018 Aisa.
> > > >>
> > > >> As discussed in the meetup propersal[1], we have plan to hold Apache
> > > >> ServiceComb (incubating) Mini Meetup, details are listed bellow,
> > > >>
> > > >>
> > > >>- What is the topic focus of the event?
> > > >>
> > > >> Topics are focused on user-pratices/technologies/ecosystem of
> Apache
> > > >> ServiceComb (incubating)
> > > >>
> > > >>- Who is organising the event?
> > > >>
> > > >> PMCs of ServiceComb (incubating) are the organizer
> > > >>
> > > >>- When is the event?
> > > >>
> > > >>  one day Between Jun 25, 2018 and Jun 27, 2018, maybe in Jun 26,
> 2018
> > > >>
> > > >>- How many attendees are expected?
> > > >>
> > > >> 60~100
> > > >>
> > > >>- How much PMC involvement is there already?
> > > >>
> > > >> 5
> > > >>
> > > >>- Which marks are requested?
> > > >>
> > > >> Two marks are requested,
> > > >> 1. Name of "Apache ServiceComb Incubating Meetup Hosted by Huawei
> > Cloud"
> > > >> 2. "Powered By" Apache Incubator logo of Apache ServiceComb
> > (incubating)
> > > >>
> > > >>- Is this for profit or non-profit? (See "Event Profits And
> > > Donations")?
> > > >>
> > > >> non-profit.
> > > >>
> > > >>
> > > >>
> > > >> [1]  https://www.mail-archive.com/dev@servicecomb.apache.org/
> > > msg03298.html
> > > >>
> > > >
> > >
> > > --
> > > Jean-Baptiste Onofré
> > > jbono...@apache.org
> > > http://blog.nanthrax.net
> > > Talend - http://www.talend.com
> > >
> >
>
>
>
> --
> Best Regards,
> Yang.
>


Re: [VOTE] Holding Apache ServiceComb (incubating) Meetup Hosted by Huawei Cloud as a Co-located Event in LC3 2018 Aisa

2018-04-09 Thread 李波
+1

Best!
Li Bo


2018-04-09 13:25 GMT+08:00 Jean-Baptiste Onofré :

> Hi,
>
> it sounds good. Unfortunately, I'm not in the area ;)
>
> I hope next time ;)
>
> Regards
> JB
>
> On 04/08/2018 04:13 PM, Willem Jiang wrote:
> > +1 (Binding)
> >
> >
> > Willem Jiang
> >
> > Blog: http://willemjiang.blogspot.com (English)
> >   http://jnn.iteye.com  (Chinese)
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
> > On Sun, Apr 8, 2018 at 3:40 PM, Zen Lin 
> wrote:
> >
> >> Hi All,
> >> This is a call for Vote to hold Apache ServiceComb (incubating) Meetup
> >> Hosted by Huawei Cloud as a Co-located Event in LC3 2018 Aisa.
> >>
> >> As discussed in the meetup propersal[1], we have plan to hold Apache
> >> ServiceComb (incubating) Mini Meetup, details are listed bellow,
> >>
> >>
> >>- What is the topic focus of the event?
> >>
> >> Topics are focused on user-pratices/technologies/ecosystem of Apache
> >> ServiceComb (incubating)
> >>
> >>- Who is organising the event?
> >>
> >> PMCs of ServiceComb (incubating) are the organizer
> >>
> >>- When is the event?
> >>
> >>  one day Between Jun 25, 2018 and Jun 27, 2018, maybe in Jun 26, 2018
> >>
> >>- How many attendees are expected?
> >>
> >> 60~100
> >>
> >>- How much PMC involvement is there already?
> >>
> >> 5
> >>
> >>- Which marks are requested?
> >>
> >> Two marks are requested,
> >> 1. Name of "Apache ServiceComb Incubating Meetup Hosted by Huawei Cloud"
> >> 2. "Powered By" Apache Incubator logo of Apache ServiceComb (incubating)
> >>
> >>- Is this for profit or non-profit? (See "Event Profits And
> Donations")?
> >>
> >> non-profit.
> >>
> >>
> >>
> >> [1]  https://www.mail-archive.com/dev@servicecomb.apache.org/
> msg03298.html
> >>
> >
>
> --
> Jean-Baptiste Onofré
> jbono...@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>


Ask for Help of ServiceComb Saga

2018-04-09 Thread Willem Jiang
Hi,

There are some small tasks which are easy for the newbee to take to
understand better about ServiceComb Saga. Please feel free to take if you
like.


1.  secure gPRC transport (*) [1]
We need to support SSL transport for gPRC , and also need to verify the
Alpha Server's identity

2.  add demo to use pack with java chassis (*) [2]
Current we just have some demo of spring boot,  we may need to verify if we
can interceptor the invocation of java chassis

3. compact events to remove unnecessary fields(*) [3]
It can help you know more about the events between the  Omega and Alpha

4. acceptance tests related issue (**) [4][5][6]
It can help you know better about the acceptance test, we need to update
the demo to let the transaction timeout

[1]https://issues.apache.org/jira/browse/SCB-342
[2]https://issues.apache.org/jira/browse/SCB-244
[3]https://issues.apache.org/jira/browse/SCB-268
[4]https://issues.apache.org/jira/browse/SCB-301
[5]https://issues.apache.org/jira/browse/SCB-302
[6]https://issues.apache.org/jira/browse/SCB-303


Willem Jiang

Blog: http://willemjiang.blogspot.com (English)
  http://jnn.iteye.com  (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem


[GitHub] coveralls commented on issue #640: SCB-457 demostrate how to run bmi with gradle

2018-04-09 Thread GitBox
coveralls commented on issue #640: SCB-457 demostrate how to run bmi with gradle
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/640#issuecomment-379695727
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/16413242/badge)](https://coveralls.io/builds/16413242)
   
   Coverage decreased (-0.02%) to 87.755% when pulling 
**b0163c38709ebd9b34730d8f91280dcc14070c16 on eric-lee-ltk:SCB-457** into 
**a980d2b22dfe243a2a7853d40ff85bdc2cc9eb49 on apache:master**.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #640: SCB-457 demostrate how to run bmi with gradle

2018-04-09 Thread GitBox
coveralls commented on issue #640: SCB-457 demostrate how to run bmi with gradle
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/640#issuecomment-379695727
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/16413111/badge)](https://coveralls.io/builds/16413111)
   
   Coverage decreased (-0.02%) to 87.755% when pulling 
**b0163c38709ebd9b34730d8f91280dcc14070c16 on eric-lee-ltk:SCB-457** into 
**a980d2b22dfe243a2a7853d40ff85bdc2cc9eb49 on apache:master**.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #627: [SCB-292] chassis support standard parameter validation

2018-04-09 Thread GitBox
coveralls commented on issue #627: [SCB-292] chassis support standard parameter 
validation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/627#issuecomment-377222163
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/16412902/badge)](https://coveralls.io/builds/16412902)
   
   Coverage increased (+0.4%) to 87.761% when pulling 
**d716a1abb5f2eb8ae6e0537120165ccd721c45d2 on acsukesh:master** into 
**ae28a9faff24e773520f3452dfd80b86dfbe7aa4 on apache:master**.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] coveralls commented on issue #169: [SCB-464] Upgrade to Java Chassis 1.0.0-m1

2018-04-09 Thread GitBox
coveralls commented on issue #169: [SCB-464] Upgrade to Java Chassis 1.0.0-m1
URL: 
https://github.com/apache/incubator-servicecomb-saga/pull/169#issuecomment-379687650
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/16412780/badge)](https://coveralls.io/builds/16412780)
   
   Coverage decreased (-0.2%) to 95.082% when pulling 
**691ba4e3a5dbdaf2328f85e2522a705ea644a7b1 on yangbor:master** into 
**89485bc1ace9b65b01ccc1f57faa8f3b4ce7bd8a on apache:master**.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] WillemJiang commented on a change in pull request #640: SCB-457 demostrate how to run bmi with gradle

2018-04-09 Thread GitBox
WillemJiang commented on a change in pull request #640: SCB-457 demostrate how 
to run bmi with gradle
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/640#discussion_r180030724
 
 

 ##
 File path: samples/bmi/calculator/build.gradle
 ##
 @@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+description = 'Java Chassis::Samples::BMI::Calculator'
+
+dependencies {
+compile(group: 'org.springframework.boot', name: 'spring-boot-starter') {
+exclude(module: 'commons-logging')
+}
+compile group: 'org.apache.servicecomb', name: 
'spring-boot-starter-provider'
+compile group: 'org.apache.servicecomb', name: 'handler-flowcontrol-qps'
+compile group: 'org.apache.servicecomb', name: 'handler-bizkeeper'
+compile group: 'org.apache.servicecomb', name: 'handler-tracing-zipkin'
+}
+
+buildscript {
+dependencies {
+
classpath('io.spring.gradle:dependency-management-plugin:1.0.4.RELEASE')
+}
+repositories {
+mavenLocal()
+mavenCentral()
+}
+}
+
+apply plugin: 'io.spring.dependency-management'
+
+dependencyManagement {
 
 Review comment:
   Can you add some comment for it?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eric-lee-ltk opened a new pull request #640: SCB-457 demostrate how to run bmi with gradle

2018-04-09 Thread GitBox
eric-lee-ltk opened a new pull request #640: SCB-457 demostrate how to run bmi 
with gradle
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/640
 
 
   Signed-off-by: Eric Lee 
   
   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` 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 GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] yangbor opened a new pull request #169: [SCB-464] Upgrade to Java Chassis 1.0.0-m1

2018-04-09 Thread GitBox
yangbor opened a new pull request #169: [SCB-464] Upgrade to Java Chassis 
1.0.0-m1
URL: https://github.com/apache/incubator-servicecomb-saga/pull/169
 
 
   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` 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 GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] wujimin commented on a change in pull request #639: [SCB-422] prometheus switch to new mechanism

2018-04-09 Thread GitBox
wujimin commented on a change in pull request #639: [SCB-422] prometheus switch 
to new mechanism
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/639#discussion_r180006147
 
 

 ##
 File path: 
metrics/metrics-integration/metrics-prometheus/src/test/java/org/apache/servicecomb/metrics/prometheus/TestPrometheusPublisher.java
 ##
 @@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.metrics.prometheus;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.reflect.FieldUtils;
+import 
org.apache.servicecomb.foundation.common.exceptions.ServiceCombException;
+import org.apache.servicecomb.foundation.test.scaffolding.config.ArchaiusUtils;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+
+import com.netflix.spectator.api.CompositeRegistry;
+import com.netflix.spectator.api.Counter;
+import com.netflix.spectator.api.DefaultRegistry;
+import com.netflix.spectator.api.ManualClock;
+import com.netflix.spectator.api.Registry;
+import com.netflix.spectator.api.SpectatorUtils;
+import com.sun.net.httpserver.HttpServer;
+
+import io.prometheus.client.exporter.HTTPServer;
+
+@SuppressWarnings("restriction")
+public class TestPrometheusPublisher {
+  CompositeRegistry globalRegistry = 
SpectatorUtils.createCompositeRegistry(new ManualClock());
+
+  PrometheusPublisher publisher = new PrometheusPublisher();
+
+  @Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  @AfterClass
+  public static void teardown() {
+ArchaiusUtils.resetConfig();
+  }
+
+  @Test
+  public void testBadPublishAddress() {
+thrown.expect(ServiceCombException.class);
+
+ArchaiusUtils.setProperty(PrometheusPublisher.METRICS_PROMETHEUS_ADDRESS, 
"a:b:c");
+publisher.init(globalRegistry, null, null);
+  }
+
+  @Test
+  public void testBadPublishAddress_BadPort() {
+thrown.expect(ServiceCombException.class);
+
+ArchaiusUtils.setProperty(PrometheusPublisher.METRICS_PROMETHEUS_ADDRESS, 
"localhost:");
+publisher.init(globalRegistry, null, null);
+  }
+
+  @Test
+  public void testBadPublishAddress_TooLargePort() {
+thrown.expect(ServiceCombException.class);
+
+ArchaiusUtils.setProperty(PrometheusPublisher.METRICS_PROMETHEUS_ADDRESS, 
"localhost:999");
+publisher.init(globalRegistry, null, null);
+  }
+
+  @Test
+  public void collect() throws IllegalAccessException, IOException {
+ArchaiusUtils.setProperty(PrometheusPublisher.METRICS_PROMETHEUS_ADDRESS, 
"localhost:0");
+publisher.init(globalRegistry, null, null);
+
+Registry registry = new DefaultRegistry(new ManualClock());
+globalRegistry.add(registry);
+
+Counter counter = registry.counter("count.name", "tag1", "tag1v", "tag2", 
"tag2v");
+counter.increment();
+
+HTTPServer httpServer = (HTTPServer) FieldUtils.readField(publisher, 
"httpServer", true);
 
 Review comment:
   we can use port 0 to try listen, and got the real port, and then close it
   use the found real port to init prometheus.
   
   but so complex, no need to do this, just a test case. i think reflection is 
enough.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] wujimin commented on a change in pull request #639: [SCB-422] prometheus switch to new mechanism

2018-04-09 Thread GitBox
wujimin commented on a change in pull request #639: [SCB-422] prometheus switch 
to new mechanism
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/639#discussion_r180006147
 
 

 ##
 File path: 
metrics/metrics-integration/metrics-prometheus/src/test/java/org/apache/servicecomb/metrics/prometheus/TestPrometheusPublisher.java
 ##
 @@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.metrics.prometheus;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.reflect.FieldUtils;
+import 
org.apache.servicecomb.foundation.common.exceptions.ServiceCombException;
+import org.apache.servicecomb.foundation.test.scaffolding.config.ArchaiusUtils;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+
+import com.netflix.spectator.api.CompositeRegistry;
+import com.netflix.spectator.api.Counter;
+import com.netflix.spectator.api.DefaultRegistry;
+import com.netflix.spectator.api.ManualClock;
+import com.netflix.spectator.api.Registry;
+import com.netflix.spectator.api.SpectatorUtils;
+import com.sun.net.httpserver.HttpServer;
+
+import io.prometheus.client.exporter.HTTPServer;
+
+@SuppressWarnings("restriction")
+public class TestPrometheusPublisher {
+  CompositeRegistry globalRegistry = 
SpectatorUtils.createCompositeRegistry(new ManualClock());
+
+  PrometheusPublisher publisher = new PrometheusPublisher();
+
+  @Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  @AfterClass
+  public static void teardown() {
+ArchaiusUtils.resetConfig();
+  }
+
+  @Test
+  public void testBadPublishAddress() {
+thrown.expect(ServiceCombException.class);
+
+ArchaiusUtils.setProperty(PrometheusPublisher.METRICS_PROMETHEUS_ADDRESS, 
"a:b:c");
+publisher.init(globalRegistry, null, null);
+  }
+
+  @Test
+  public void testBadPublishAddress_BadPort() {
+thrown.expect(ServiceCombException.class);
+
+ArchaiusUtils.setProperty(PrometheusPublisher.METRICS_PROMETHEUS_ADDRESS, 
"localhost:");
+publisher.init(globalRegistry, null, null);
+  }
+
+  @Test
+  public void testBadPublishAddress_TooLargePort() {
+thrown.expect(ServiceCombException.class);
+
+ArchaiusUtils.setProperty(PrometheusPublisher.METRICS_PROMETHEUS_ADDRESS, 
"localhost:999");
+publisher.init(globalRegistry, null, null);
+  }
+
+  @Test
+  public void collect() throws IllegalAccessException, IOException {
+ArchaiusUtils.setProperty(PrometheusPublisher.METRICS_PROMETHEUS_ADDRESS, 
"localhost:0");
+publisher.init(globalRegistry, null, null);
+
+Registry registry = new DefaultRegistry(new ManualClock());
+globalRegistry.add(registry);
+
+Counter counter = registry.counter("count.name", "tag1", "tag1v", "tag2", 
"tag2v");
+counter.increment();
+
+HTTPServer httpServer = (HTTPServer) FieldUtils.readField(publisher, 
"httpServer", true);
 
 Review comment:
   we can use port 0 to try listen, and got the real port, and the close it
   use the found real port to init prometheus.
   
   but so complex, no need to do this, just a test case. i think reflection is 
enough.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] wujimin commented on a change in pull request #639: [SCB-422] prometheus switch to new mechanism

2018-04-09 Thread GitBox
wujimin commented on a change in pull request #639: [SCB-422] prometheus switch 
to new mechanism
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/639#discussion_r180005756
 
 

 ##
 File path: metrics/metrics-integration/metrics-prometheus/pom.xml
 ##
 @@ -43,7 +42,10 @@
   org.apache.servicecomb
   metrics-core
 
-
+
 
 Review comment:
   'foundation-test-scaffolding' already in 'test' scope, no need to set again.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] wujimin commented on a change in pull request #639: [SCB-422] prometheus switch to new mechanism

2018-04-09 Thread GitBox
wujimin commented on a change in pull request #639: [SCB-422] prometheus switch 
to new mechanism
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/639#discussion_r180005837
 
 

 ##
 File path: 
metrics/metrics-integration/metrics-prometheus/src/test/java/org/apache/servicecomb/metrics/prometheus/TestPrometheusPublisher.java
 ##
 @@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.metrics.prometheus;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.reflect.FieldUtils;
+import 
org.apache.servicecomb.foundation.common.exceptions.ServiceCombException;
+import org.apache.servicecomb.foundation.test.scaffolding.config.ArchaiusUtils;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+
+import com.netflix.spectator.api.CompositeRegistry;
+import com.netflix.spectator.api.Counter;
+import com.netflix.spectator.api.DefaultRegistry;
+import com.netflix.spectator.api.ManualClock;
+import com.netflix.spectator.api.Registry;
+import com.netflix.spectator.api.SpectatorUtils;
+import com.sun.net.httpserver.HttpServer;
 
 Review comment:
   prometheus depend on com.sun.net.httpserver.HttpServer


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] WillemJiang closed pull request #167: SCB-463 Upgrade the Spring Boot 2 version to 2.0.1

2018-04-09 Thread GitBox
WillemJiang closed pull request #167: SCB-463 Upgrade the Spring Boot 2 version 
to 2.0.1
URL: https://github.com/apache/incubator-servicecomb-saga/pull/167
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] WillemJiang closed pull request #168: [SCB-465] Start the build metrics of Saga in travis

2018-04-09 Thread GitBox
WillemJiang closed pull request #168: [SCB-465] Start the build metrics of Saga 
in travis
URL: https://github.com/apache/incubator-servicecomb-saga/pull/168
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/.travis.yml b/.travis.yml
index 9e11d69b..e07fb5ba 100755
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,10 +22,15 @@ cache:
 language: java
 jdk:
 - oraclejdk8
+env:
+  # dummy profile
+  - SPRING_BOOT_PROFILE=spring-boot-1
+  # use spring-boot-2 profile 
+  - SPRING_BOOT_PROFILE=spring-boot-2
 script:
 - set -e
-- mvn clean install -Pjacoco -Pdocker coveralls:report
-- mvn clean verify -f saga-demo -Pdemo -Pdocker -Ddocker.useColor=false 
-Ddocker.showLogs
-- mvn clean verify -f acceptance-tests -Pdemo -Pdocker -Ddocker.useColor=false 
-Ddocker.showLogs
+- mvn clean install -Pjacoco -Pdocker -P${SPRING_BOOT_PROFILE} coveralls:report
+- mvn clean verify -f saga-demo -Pdemo -Pdocker -P${SPRING_BOOT_PROFILE} 
-Ddocker.useColor=false -Ddocker.showLogs
+- mvn clean verify -f acceptance-tests -Pdemo -Pdocker 
-P${SPRING_BOOT_PROFILE} -Ddocker.useColor=false -Ddocker.showLogs
 after_success:
 - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash -x scripts/deploy.sh ; fi


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] WillemJiang commented on a change in pull request #639: [SCB-422] prometheus switch to new mechanism

2018-04-09 Thread GitBox
WillemJiang commented on a change in pull request #639: [SCB-422] prometheus 
switch to new mechanism
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/639#discussion_r180003196
 
 

 ##
 File path: 
metrics/metrics-integration/metrics-prometheus/src/test/java/org/apache/servicecomb/metrics/prometheus/TestPrometheusPublisher.java
 ##
 @@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.metrics.prometheus;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.reflect.FieldUtils;
+import 
org.apache.servicecomb.foundation.common.exceptions.ServiceCombException;
+import org.apache.servicecomb.foundation.test.scaffolding.config.ArchaiusUtils;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+
+import com.netflix.spectator.api.CompositeRegistry;
+import com.netflix.spectator.api.Counter;
+import com.netflix.spectator.api.DefaultRegistry;
+import com.netflix.spectator.api.ManualClock;
+import com.netflix.spectator.api.Registry;
+import com.netflix.spectator.api.SpectatorUtils;
+import com.sun.net.httpserver.HttpServer;
 
 Review comment:
   Do we still need to use com.sun package ?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] yangbor commented on a change in pull request #639: [SCB-422] prometheus switch to new mechanism

2018-04-09 Thread GitBox
yangbor commented on a change in pull request #639: [SCB-422] prometheus switch 
to new mechanism
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/639#discussion_r18908
 
 

 ##
 File path: metrics/metrics-integration/metrics-prometheus/pom.xml
 ##
 @@ -43,7 +42,10 @@
   org.apache.servicecomb
   metrics-core
 
-
+
 
 Review comment:
   I mean 'foundation-test-scaffolding'


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] acsukesh commented on a change in pull request #627: [SCB-292] chassis support standard parameter validation

2018-04-09 Thread GitBox
acsukesh commented on a change in pull request #627: [SCB-292] chassis support 
standard parameter validation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/627#discussion_r18288
 
 

 ##
 File path: 
swagger/swagger-invocation/invocation-validator/src/main/java/org/apache/servicecomb/swagger/invocation/validator/ParameterValidator.java
 ##
 @@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.swagger.invocation.validator;
+
+import java.util.Set;
+
+import javax.validation.ConstraintViolation;
+import javax.validation.ConstraintViolationException;
+import javax.validation.Validation;
+import javax.validation.ValidatorFactory;
+import javax.validation.executable.ExecutableValidator;
+import javax.validation.groups.Default;
+
+import org.apache.servicecomb.swagger.engine.SwaggerProducerOperation;
+import org.apache.servicecomb.swagger.invocation.SwaggerInvocation;
+import 
org.apache.servicecomb.swagger.invocation.extension.ProducerInvokeExtension;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ParameterValidator implements ProducerInvokeExtension {
+
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(ParameterValidator.class);
+
+  private static ExecutableValidator executableValidator;
+
+  @Override
+  public  void beforeMethodInvoke(SwaggerInvocation invocation, 
SwaggerProducerOperation producerOperation,
+  Object[] args)
+  throws ConstraintViolationException {
+
+if (null == executableValidator) {
+  ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
+  executableValidator = factory.getValidator().forExecutables();
+}
+Set violations =
+
executableValidator.validateParameters(producerOperation.getProducerInstance(),
+producerOperation.getProducerMethod(),
+args,
+Default.class);
+if (violations.size() > 0) {
+  LOGGER.warn("Parameter validation failed : " + violations.toString());
+  throw new ConstraintViolationException(violations.toString(), 
violations);
+}
+  }
+
+  @Override
+  public int getOrder() {
+return 100;
 
 Review comment:
   When user custom exception with higher order , it will override the default 
behavior, user can customize the error codes, message ..etc.The same is tested.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] acsukesh commented on a change in pull request #627: [SCB-292] chassis support standard parameter validation

2018-04-09 Thread GitBox
acsukesh commented on a change in pull request #627: [SCB-292] chassis support 
standard parameter validation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/627#discussion_r17479
 
 

 ##
 File path: 
swagger/swagger-invocation/invocation-validator/src/main/java/org/apache/servicecomb/swagger/invocation/validator/ParameterValidator.java
 ##
 @@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.swagger.invocation.validator;
+
+import java.util.Set;
+
+import javax.validation.ConstraintViolation;
+import javax.validation.ConstraintViolationException;
+import javax.validation.Validation;
+import javax.validation.ValidatorFactory;
+import javax.validation.executable.ExecutableValidator;
+import javax.validation.groups.Default;
+
+import org.apache.servicecomb.swagger.engine.SwaggerProducerOperation;
+import org.apache.servicecomb.swagger.invocation.SwaggerInvocation;
+import 
org.apache.servicecomb.swagger.invocation.extension.ProducerInvokeExtension;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ParameterValidator implements ProducerInvokeExtension {
+
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(ParameterValidator.class);
+
+  private static ExecutableValidator executableValidator;
+
+  @Override
+  public  void beforeMethodInvoke(SwaggerInvocation invocation, 
SwaggerProducerOperation producerOperation,
+  Object[] args)
+  throws ConstraintViolationException {
+
+if (null == executableValidator) {
+  ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
+  executableValidator = factory.getValidator().forExecutables();
+}
+Set violations =
+
executableValidator.validateParameters(producerOperation.getProducerInstance(),
+producerOperation.getProducerMethod(),
+args,
+Default.class);
+if (violations.size() > 0) {
+  LOGGER.warn("Parameter validation failed : " + violations.toString());
+  throw new ConstraintViolationException(violations.toString(), 
violations);
 
 Review comment:
   Fixed.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


?????? [Discussion]Provider a project fully show all featuresofServiceComb(also can use as a scaffold)

2018-04-09 Thread ??????
Sure, I will add new features such as using Apollo to support dynamic config, 
using Saga to show eventually data consistency solution, etc..
  
 Also I will show more details about how to extend edge service in order to 
implement authentication, A/B testing, etc..
  
 Yangyong Zheng
Best Regards !

  --  --
  ??: "wjm wjm";
 : 2018??4??9??(??) 11:11
 ??: "dev";
 
 : Re: [Discussion]Provider a project fully show all 
featuresofServiceComb(also can use as a scaffold)

 

we already have some projects like this(houseApp or something else).
so my question is: design some new projects or make the exists better.

2018-04-09 11:02 GMT+08:00 bismy :

> This is a good idea, and the features is good too.
> Here are some works done that you can refer to
>https://java.huaweicse.com/featured-topics/develope-
> microservice-using-ces.html
> including microservice design and the working code is also included.
>
>
> If you want to demonstrate transactions processing, this is a project you
> can refer to https://github.com/huawei-microservice-demo/HouseApp
>
>
> --  --
> ??: "??";
> : 2018??4??9??(??) 9:58
> ??: "dev";
>
> : ?? [Discussion]Provider a project fully show all features
> ofServiceComb(also can use as a scaffold)
>
>
>
> Ok,I will try.
>
>  Yangyong Zheng
> Best Regards !
>
>   --  --
>   ??: "willem.jiang";
>  : 2018??4??8??(??) 10:29
>  ??: "dev";
>
>  : Re: [Discussion]Provider a project fully show all features
> ofServiceComb(also can use as a scaffold)
>
>
>
> I just went through the documents, it looks good.
> Here are some comments for the edge service part.
> For the canary test, we need to make sure the new version of service is
> available to some kind of user, not the normal round robin one.
> Is better to show the user to do AB test by applying different routing rule
> on the edge service.
>
>
> Willem Jiang
>
> Blog: http://willemjiang.blogspot.com (English)
>   http://jnn.iteye.com  (Chinese)
> Twitter: willemjiang
> Weibo: willem
>
> On Wed, Apr 4, 2018 at 10:06 AM, ??  wrote:
>
> > Hi everyone:
> > In order to fully show features of ServiceComb, I think we can use it
> > to construct a classic micro-service style project step by step (also can
> > called hand by hand) :
> >  1. Use ServiceCenter to support services register and discover;
> > 2. Includes edge service, user service with authentication and some other
> > business services develped by Java Chassis;
> > 3. Use Apollo to support dynamic config;
> > 4. Include a composite service to do complex business logic;
> > 5. In composite service we will use Saga to show eventually data
> > consistency solution;
> > 6. Show logs, metrics, tracing etc in operation phase.
> >
> >  Each small step of the construction will check a branch and write a
> > wiki to let user known what we had done, like:
> > 0.0.1 -> 1. Implement user service
> > 0.0.2 -> 2. Add authentication in user service
> > 0.0.3 -> 3. Implement edge service
> > ...
> >
> >  Then user can learn how to develop with ServiceComb faster, and can
> > use this project as a scaffold.
> >
> >  I had complete a small part of this program here :
> > https://github.com/zhengyangyong/scaffold/wiki (English version is
> coming
> > soon).
> >
> >  Any other ideas or suggestions are welcome !
> >
> >  Yangyong Zheng
> >  Best Regards !
>

[GitHub] acsukesh commented on a change in pull request #627: [SCB-292] chassis support standard parameter validation

2018-04-09 Thread GitBox
acsukesh commented on a change in pull request #627: [SCB-292] chassis support 
standard parameter validation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/627#discussion_r179997373
 
 

 ##
 File path: 
swagger/swagger-invocation/invocation-core/src/main/java/org/apache/servicecomb/swagger/invocation/extension/ProducerInvokeExtension.java
 ##
 @@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.servicecomb.swagger.invocation.extension;
+
+import org.apache.servicecomb.swagger.engine.SwaggerProducerOperation;
+import org.apache.servicecomb.swagger.invocation.SwaggerInvocation;
+
+
+public interface ProducerInvokeExtension {
+
+  public int getOrder();
+
+   void beforeMethodInvoke(SwaggerInvocation invocation, 
SwaggerProducerOperation producerOperation,
 
 Review comment:
   Fixed


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] yangbor commented on issue #639: [SCB-422] prometheus switch to new mechanism

2018-04-09 Thread GitBox
yangbor commented on issue #639: [SCB-422] prometheus switch to new mechanism
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/639#issuecomment-379647394
 
 
   Some files don't have proper final newline.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] yangbor commented on a change in pull request #639: [SCB-422] prometheus switch to new mechanism

2018-04-09 Thread GitBox
yangbor commented on a change in pull request #639: [SCB-422] prometheus switch 
to new mechanism
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/639#discussion_r179996570
 
 

 ##
 File path: metrics/metrics-integration/metrics-prometheus/pom.xml
 ##
 @@ -43,7 +42,10 @@
   org.apache.servicecomb
   metrics-core
 
-
+
 
 Review comment:
   Shouldn't the scope set to 'test' here?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


?????? [Discussion]Provider a project fully show all features ofServiceComb(also can use as a scaffold)

2018-04-09 Thread ??????
Ok, thanks!
  
  Yangyong Zheng
Best Regards !

 --  --
  ??: "bismy";
 : 2018??4??9??(??) 11:02
 ??: "dev";
 
 : ?? [Discussion]Provider a project fully show all features 
ofServiceComb(also can use as a scaffold)

 

This is a good idea, and the features is good too. 
Here are some works done that you can refer to 
   
https://java.huaweicse.com/featured-topics/develope-microservice-using-ces.html
including microservice design and the working code is also included.


If you want to demonstrate transactions processing, this is a project you can 
refer to https://github.com/huawei-microservice-demo/HouseApp


--  --
??: "??";
: 2018??4??9??(??) 9:58
??: "dev";

: ?? [Discussion]Provider a project fully show all features 
ofServiceComb(also can use as a scaffold)



Ok,I will try.
  
 Yangyong Zheng
Best Regards !

  --  --
  ??: "willem.jiang";
 : 2018??4??8??(??) 10:29
 ??: "dev";
 
 : Re: [Discussion]Provider a project fully show all features 
ofServiceComb(also can use as a scaffold)

 

I just went through the documents, it looks good.
Here are some comments for the edge service part.
For the canary test, we need to make sure the new version of service is
available to some kind of user, not the normal round robin one.
Is better to show the user to do AB test by applying different routing rule
on the edge service.


Willem Jiang

Blog: http://willemjiang.blogspot.com (English)
  http://jnn.iteye.com  (Chinese)
Twitter: willemjiang
Weibo: willem

On Wed, Apr 4, 2018 at 10:06 AM, ??  wrote:

> Hi everyone:
> In order to fully show features of ServiceComb, I think we can use it
> to construct a classic micro-service style project step by step (also can
> called hand by hand) :
>  1. Use ServiceCenter to support services register and discover;
> 2. Includes edge service, user service with authentication and some other
> business services develped by Java Chassis;
> 3. Use Apollo to support dynamic config;
> 4. Include a composite service to do complex business logic;
> 5. In composite service we will use Saga to show eventually data
> consistency solution;
> 6. Show logs, metrics, tracing etc in operation phase.
>
>  Each small step of the construction will check a branch and write a
> wiki to let user known what we had done, like:
> 0.0.1 -> 1. Implement user service
> 0.0.2 -> 2. Add authentication in user service
> 0.0.3 -> 3. Implement edge service
> ...
>
>  Then user can learn how to develop with ServiceComb faster, and can
> use this project as a scaffold.
>
>  I had complete a small part of this program here :
> https://github.com/zhengyangyong/scaffold/wiki (English version is coming
> soon).
>
>  Any other ideas or suggestions are welcome !
>
>  Yangyong Zheng
>  Best Regards !

[GitHub] WillemJiang closed pull request #59: Add the Release guide for ServiceComb

2018-04-09 Thread GitBox
WillemJiang closed pull request #59: Add the Release guide for ServiceComb
URL: https://github.com/apache/incubator-servicecomb-website/pull/59
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/_data/navigation.yml b/_data/navigation.yml
index f99055c..7ad9b42 100755
--- a/_data/navigation.yml
+++ b/_data/navigation.yml
@@ -127,6 +127,8 @@ t:
 url: /developers/use-jira/
   - title: "Set Up Write Access for Committer"
 url: /developers/setup-committer-rights/
+  - title: "How to Release in Apache"
+url: /developers/release-guide/
 
 faqs:
   - title: "FAQ"
@@ -286,6 +288,8 @@ t:
 url: /cn/developers/use-jira/
   - title: "设置代码仓库写权限"
 url: /cn/developers/setup-committer-rights/
+  - title: "How to Release in Apache"
+url: /cn/developers/release-guide/
 
 faqs:
   - title: "常见问题"
diff --git a/_developers/cn/release_guide.md b/_developers/cn/release_guide.md
new file mode 100644
index 000..443ab0a
--- /dev/null
+++ b/_developers/cn/release_guide.md
@@ -0,0 +1,233 @@
+---
+title: "Release guide for ServiceComb"
+lang: en
+ref: release_guide
+permalink: /cn/developers/release-guide/
+excerpt: "Release guide for doing the releases in Apache"
+last_modified_at: 2018-04-03T18:33:43+08:00
+author: Asif Siddiqui
+tags: [release]
+redirect_from:
+  - /theme-setup/
+---
+
+
+This Guide helps you to do the release in Apache for ServiceComb projects.
+
+## Pre-Requisite
+
+1. The CI for the project should be green.
+2. Should have the version number for the project.
+3. Should have Sign Key for signing the release, the keys should be published 
to public key server.
+
+## Major Steps for doing Service-Center Release
+
+***Make and Verify the Release***
+
+1. Clone the service-center code.
+```
+g...@github.com:apache/incubator-servicecomb-service-center.git
+cd incubator-servicecomb-service-center
+gvt restore
+```
+
+2. Create a Tag from the master branch based on the version number which needs 
to be released.
+
+3. Run RAT tool to ensure no license issues are there, follow the guide over 
[here](https://github.com/apache/incubator-servicecomb-service-center/tree/master/docs/release)
+
+4. Run the make_release.sh to make the release for windows and linux following 
the guide over 
[here](https://github.com/apache/incubator-servicecomb-service-center/tree/master/scripts/release).
+
+5. Last Step will make the releases in root folder.
+
+6. Run the releases of frontend and service-center in both linux and windows.
+
+7. Run the [integration 
test](https://github.com/apache/incubator-servicecomb-service-center/tree/master/integration)
 on the release.
+
+8. If all the test passes then send the release candidate to peers to test in 
different machines.
+
+9. Push the tag to master.
+
+***Sign the Release***
+
+10. Once the tag is pushed then using the tag download the source code from 
git [tag](https://github.com/apache/incubator-servicecomb-service-center/tags).
+
+11. Sign the 3 releases(linux, windows, src) and checksum.
+
+12. Upload the release to dev/incubator/servicecomb Apache Svn.
+
+13. Download all the releases from SVN and verify the signature and checksum.
+
+***PPMC Approval***
+
+14. Send the voting mail in ***dev@servicecomb.apache.org*** for PPMC approval.
+
+15. Wait for 72 hours or unless you get 3 +1 binding vote with no -1 vote. If 
you get even one -1 binding vote then fix the issue and start again from 
***Step 1***.
+
+16. Publish the result of the vote in dev@servicecomb.apache.org.
+
+***IPMC approval***
+
+17. Send the voting mail in ***gene...@incubator.apache.org*** for IPMC 
approval.
+
+18. Wait for 72 hours or unless you get 3 +1 binding vote with no -1 vote.If 
you get even one -1 binding vote then fix the issue and start again from 
***Step 1***
+
+19. Publish the result of the vote in gene...@incubator.apache.org.
+
+***Announcements***
+
+20. Upload the releases to release/incubator/servicecomb Apache Svn.
+
+21. Wait for 24 hours to replicate the release in all the mirrors.
+
+22. Upload the release page of ServiceComb Website.
+
+23. Send the announcement mails to dev@servicecomb.apache.org, 
gene...@incubator.apache.org, annou...@apache.org
+
+
+
+
+## Major Steps for doing Java-Chassis Release
+
+***Make and Verify the Release***
+
+1. Clone the java-chassis code.
+```
+git clone g...@github.com:apache/incubator-servicecomb-java-chassis.git
+```
+
+2. Cut the release using per command to replace all the versions in pom.xml 
files
+
+3. Create a Tag from the master branch using the version number.
+
+4. Clear all the redundant servicecomb releases in repository.apache.org
+
+5. Add the keys in a reference folder.
+
+6. Update the key path and passphrase in