[GitHub] weichao666 opened a new pull request #30: delete build-consumer/instance-isolation.md and modify isolation error percent default value
weichao666 opened a new pull request #30: delete build-consumer/instance-isolation.md and modify isolation error percent default value URL: https://github.com/apache/incubator-servicecomb-docs/pull/30 delete build-consumer/instance-isolation.md and modify isolation error percent default value 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 opened a new pull request #868: [SCB-833]Provide a retry mechanism to meet upgrade no interrupt
liubao68 opened a new pull request #868: [SCB-833]Provide a retry mechanism to meet upgrade no interrupt URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/868 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
[incubator-servicecomb-saga] branch master updated: [SCB-823] Setup the test in kubernetes (#243)
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git The following commit(s) were added to refs/heads/master by this push: new 2b73537 [SCB-823] Setup the test in kubernetes (#243) 2b73537 is described below commit 2b735373bd328a056c1a9e663ddee275725dfc73 Author: crystaldust AuthorDate: Fri Aug 10 21:28:18 2018 +0800 [SCB-823] Setup the test in kubernetes (#243) * Add the yaml files for kubernetes deployment * Rename the k8s demo folder to saga-k8s-demo/ * Re-organize the folder structure of k8s resource. Rename the saga-k8s-demo folder with saga-k8s-resources. The resources folder provide the base resources(alpha-server and postgresql) and other demos' k8s resources. spring-demo's resources is now included. * Add ASF header for yamls in base/ and spring-demo/ * Add jmeter for spring-demo load testing. - jmeter.yaml: The jmeter deployment - jmeter.configmap.yaml: The jmeter script content used by jmeter pod. * Move the jmeter resources to test folder * Add the README file for kuberenetes demos --- saga-demo/saga-k8s-resources/README.md | 72 ++ saga-demo/saga-k8s-resources/base/alpha.yaml | 54 saga-demo/saga-k8s-resources/base/postgresql.yaml | 60 + .../saga-k8s-resources/spring-demo/booking.yaml| 73 ++ saga-demo/saga-k8s-resources/spring-demo/car.yaml | 55 .../saga-k8s-resources/spring-demo/hotel.yaml | 55 .../spring-demo/test/jmeter.configmap.yaml | 282 + .../spring-demo/test/jmeter.yaml | 54 8 files changed, 705 insertions(+) diff --git a/saga-demo/saga-k8s-resources/README.md b/saga-demo/saga-k8s-resources/README.md new file mode 100644 index 000..a10588c --- /dev/null +++ b/saga-demo/saga-k8s-resources/README.md @@ -0,0 +1,72 @@ +# Deploy & test saga with Kubernetes + +You can now play with saga under Kubernetes! + +The demos' Kubernetes resources are splitted into 3 categories: + +- **base**: The base resources that all demos needs under `base/` folder, including the `alpha-server` and `postgresql` database +- **demos**: The resources that each demo will consume, stored in the folder named with `xxx-demo/` +- **tests**: A [jmeter](https://jmeter.apache.org/) deployment is provided for each demo under the demo's `test/` folder, there is also a [Kubernetes configmap](http://kubernetes-v1-4.github.io/docs/user-guide/configmap/) where you can change and apply the jmeter test plans. So you can change the plan at any time and pull up the jmeter deployment to test the demos. + + + +## Get started + +All the Kubernetes objects will be deployed in the `servicecomb` namespace, so make sure it is there with the command: + +```bash +$ kubectl create namespace servicecomb +namespace "servicecomb" created +``` + +Let's take the `spring-demo` as the example, apply the base and demo resources: + +```bash +$ kubectl apply -f ./base +service "alpha-server" created +deployment "alphaserver" created +service "postgresql" created +deployment "database" created + +$ kubectl apply -f ./spring-demo +service "booking" created +deployment "booking" created +service "car" created +deployment "car" created +service "hotel" created +deployment "hotel" created + +``` + +Make sure all the services in the demo are up and running: + +```bash +$ kubectl get pods -n servicecomb +NAME READY STATUSRESTARTS AGE +alphaserver-6cb48898fc-tlqtb 1/1 Running 0 1d +booking-666c8f4dbb-k5glt 1/1 Running 0 4h +car-975d666f8-prs9p1/1 Running 0 1d +database-796fc68b98-mhz8n 1/1 Running 0 1d +hotel-768b59dfcd-gc7sn 1/1 Running 0 1d +``` + +Then you can test the demo with jmeter, modify the configmap according to your test plan, then apply the test service to Kubernetes api server: + +```bash +$ vim ./spring-demo/test/jmeter.configmap.yaml +$ # edit the file as you wish, mind the identation of yamls +$ kubectl apply -f ./spring-demo/test/ +configmap "springdemo-jmeter-script" created +deployment "spring-demo-jmeter" created + +$ kubectl get pods -n servicecomb | grep jmeter +spring-demo-jmeter-6cfb679f58-sckkx 1/1 Running 0 12s +``` + +The jmeter deployment will keep testing the demo and generate the test result. For now the the result file is stored in the Kubernetes nodes under the path `/saga-jmeter-result/{demo_name}.jtl`. You can generate the HTML dashboard with the command: + +```bash +$ jmeter -g /saga-jmeter-result/{demo_name}.jtl -o output/ +``` + +We will try to provide more services to automate the dashboard generation in the future. diff --git a/saga-demo/saga-k8s-resources/base/alpha.yaml
[GitHub] WillemJiang closed pull request #243: [SCB-823] Setup the test in kubernetes
WillemJiang closed pull request #243: [SCB-823] Setup the test in kubernetes URL: https://github.com/apache/incubator-servicecomb-saga/pull/243 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/saga-demo/saga-k8s-resources/README.md b/saga-demo/saga-k8s-resources/README.md new file mode 100644 index ..a10588c7 --- /dev/null +++ b/saga-demo/saga-k8s-resources/README.md @@ -0,0 +1,72 @@ +# Deploy & test saga with Kubernetes + +You can now play with saga under Kubernetes! + +The demos' Kubernetes resources are splitted into 3 categories: + +- **base**: The base resources that all demos needs under `base/` folder, including the `alpha-server` and `postgresql` database +- **demos**: The resources that each demo will consume, stored in the folder named with `xxx-demo/` +- **tests**: A [jmeter](https://jmeter.apache.org/) deployment is provided for each demo under the demo's `test/` folder, there is also a [Kubernetes configmap](http://kubernetes-v1-4.github.io/docs/user-guide/configmap/) where you can change and apply the jmeter test plans. So you can change the plan at any time and pull up the jmeter deployment to test the demos. + + + +## Get started + +All the Kubernetes objects will be deployed in the `servicecomb` namespace, so make sure it is there with the command: + +```bash +$ kubectl create namespace servicecomb +namespace "servicecomb" created +``` + +Let's take the `spring-demo` as the example, apply the base and demo resources: + +```bash +$ kubectl apply -f ./base +service "alpha-server" created +deployment "alphaserver" created +service "postgresql" created +deployment "database" created + +$ kubectl apply -f ./spring-demo +service "booking" created +deployment "booking" created +service "car" created +deployment "car" created +service "hotel" created +deployment "hotel" created + +``` + +Make sure all the services in the demo are up and running: + +```bash +$ kubectl get pods -n servicecomb +NAME READY STATUSRESTARTS AGE +alphaserver-6cb48898fc-tlqtb 1/1 Running 0 1d +booking-666c8f4dbb-k5glt 1/1 Running 0 4h +car-975d666f8-prs9p1/1 Running 0 1d +database-796fc68b98-mhz8n 1/1 Running 0 1d +hotel-768b59dfcd-gc7sn 1/1 Running 0 1d +``` + +Then you can test the demo with jmeter, modify the configmap according to your test plan, then apply the test service to Kubernetes api server: + +```bash +$ vim ./spring-demo/test/jmeter.configmap.yaml +$ # edit the file as you wish, mind the identation of yamls +$ kubectl apply -f ./spring-demo/test/ +configmap "springdemo-jmeter-script" created +deployment "spring-demo-jmeter" created + +$ kubectl get pods -n servicecomb | grep jmeter +spring-demo-jmeter-6cfb679f58-sckkx 1/1 Running 0 12s +``` + +The jmeter deployment will keep testing the demo and generate the test result. For now the the result file is stored in the Kubernetes nodes under the path `/saga-jmeter-result/{demo_name}.jtl`. You can generate the HTML dashboard with the command: + +```bash +$ jmeter -g /saga-jmeter-result/{demo_name}.jtl -o output/ +``` + +We will try to provide more services to automate the dashboard generation in the future. diff --git a/saga-demo/saga-k8s-resources/base/alpha.yaml b/saga-demo/saga-k8s-resources/base/alpha.yaml new file mode 100644 index ..47c0d5df --- /dev/null +++ b/saga-demo/saga-k8s-resources/base/alpha.yaml @@ -0,0 +1,54 @@ +## --- +## 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. +## --- + +apiVersion: v1 +kind: Service +metadata: + name: alpha-server + namespace: servicecomb + labels: +app: alphaserver +spec: + ports: + - port: 8080 +name: alpha + selector: +app: alphaserver +--- +apiVersion: extensions/v1beta1 +kind:
[GitHub] liubao68 commented on issue #867: [SCB-832] modify the errorThresholdPercentage from 20 to 0
liubao68 commented on issue #867: [SCB-832] modify the errorThresholdPercentage from 20 to 0 URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/867#issuecomment-412068252 Change default value to make sure fast isolation and fast recover. Error percentage can not fast recover. So we will not use it as default value. 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] weichao666 opened a new pull request #867: [SCB-832] modify the errorThresholdPercentage from 20 to 0
weichao666 opened a new pull request #867: [SCB-832] modify the errorThresholdPercentage from 20 to 0 URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/867 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] liubao68 closed pull request #866: [SCB-828]In some tomcat implementation inputstream available is null
liubao68 closed pull request #866: [SCB-828]In some tomcat implementation inputstream available is null URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/866 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/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/RestCodec.java b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/RestCodec.java index 7c80dfd25..5642642d5 100644 --- a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/RestCodec.java +++ b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/RestCodec.java @@ -20,10 +20,10 @@ import java.util.List; import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.core.Response.Status; import org.apache.servicecomb.common.rest.definition.RestOperationMeta; import org.apache.servicecomb.common.rest.definition.RestParam; -import org.apache.servicecomb.swagger.invocation.exception.ExceptionFactory; import org.apache.servicecomb.swagger.invocation.exception.InvocationException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -67,7 +67,8 @@ public static void argsToRest(Object[] args, RestOperationMeta restOperation, LOG.error("Parameter is not valid for operation {}. ", restOperation.getOperationMeta().getMicroserviceQualifiedName(), e); - throw ExceptionFactory.convertProducerException(e, "Parameter is not valid."); + // give standard http error code for invalid parameter + throw new InvocationException(Status.BAD_REQUEST, "Parameter is not valid."); } } } diff --git a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/param/BodyProcessorCreator.java b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/param/BodyProcessorCreator.java index c21f527d9..61f0ea959 100644 --- a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/param/BodyProcessorCreator.java +++ b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/param/BodyProcessorCreator.java @@ -31,14 +31,18 @@ import org.apache.servicecomb.common.rest.codec.RestObjectMapperFactory; import org.apache.servicecomb.foundation.vertx.stream.BufferOutputStream; import org.apache.servicecomb.swagger.generator.core.utils.ClassUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import com.fasterxml.jackson.databind.JavaType; +import com.fasterxml.jackson.databind.exc.MismatchedInputException; import com.fasterxml.jackson.databind.type.TypeFactory; import io.swagger.models.parameters.Parameter; import io.vertx.core.buffer.Buffer; public class BodyProcessorCreator implements ParamValueProcessorCreator { + private static final Logger LOGGER = LoggerFactory.getLogger(BodyProcessorCreator.class); public static final String PARAMTYPE = "body"; @@ -75,15 +79,21 @@ public Object getValue(HttpServletRequest request) throws Exception { return null; } - if (isRequired == false && inputStream.available() == 0) { -return null; - } - if (!contentType.isEmpty() && !contentType.startsWith(MediaType.APPLICATION_JSON)) { // TODO: we should consider body encoding return IOUtils.toString(inputStream, "UTF-8"); } - return RestObjectMapperFactory.getRestObjectMapper().readValue(inputStream, targetType); + + try { +return RestObjectMapperFactory.getRestObjectMapper().readValue(inputStream, targetType); + } catch (MismatchedInputException e) { +// there is no way to detect InputStream is empty, so have to catch the exception +if (!isRequired) { + LOGGER.warn("Mismatched content and required is false, taken as null. Msg=" + e.getMessage()); + return null; +} +throw e; + } } @Override diff --git a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/produce/ProduceProcessor.java b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/produce/ProduceProcessor.java index 127250ff7..4172cb56f 100644 --- a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/produce/ProduceProcessor.java +++ b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/produce/ProduceProcessor.java @@ -54,10 +54,6 @@ default Buffer encodeResponse(Object result) throws Exception { } default Object decodeResponse(InputStream input, JavaType type) throws Exception { -if (input.available() == 0) { - return null; -} - return doDecodeResponse(input, type); } diff --git
[incubator-servicecomb-java-chassis] 01/03: [SCB-828]In some tomcat implementation inputstream available is null
This is an automated email from the ASF dual-hosted git repository. liubao pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git commit 45471e76d9a6cef4d997ef2b496b7006558e829b Author: liubao AuthorDate: Thu Aug 9 22:22:59 2018 +0800 [SCB-828]In some tomcat implementation inputstream available is null --- .../servicecomb/common/rest/codec/RestCodec.java | 4 ++-- .../rest/codec/param/BodyProcessorCreator.java | 20 +++- .../common/rest/codec/produce/ProduceProcessor.java | 4 .../servicecomb/common/rest/codec/TestRestCodec.java | 4 ++-- .../common/rest/codec/TestRestObjectMapper.java | 14 ++ .../rest/codec/produce/TestProduceJsonProcessor.java | 10 -- .../codec/produce/TestProduceTextPlainProcessor.java | 2 +- 7 files changed, 42 insertions(+), 16 deletions(-) diff --git a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/RestCodec.java b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/RestCodec.java index 7c80dfd..127b76d 100644 --- a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/RestCodec.java +++ b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/RestCodec.java @@ -23,7 +23,6 @@ import javax.servlet.http.HttpServletRequest; import org.apache.servicecomb.common.rest.definition.RestOperationMeta; import org.apache.servicecomb.common.rest.definition.RestParam; -import org.apache.servicecomb.swagger.invocation.exception.ExceptionFactory; import org.apache.servicecomb.swagger.invocation.exception.InvocationException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -67,7 +66,8 @@ public final class RestCodec { LOG.error("Parameter is not valid for operation {}. ", restOperation.getOperationMeta().getMicroserviceQualifiedName(), e); - throw ExceptionFactory.convertProducerException(e, "Parameter is not valid."); + // give standard http error code for invalid parameter + throw new InvocationException(400, "", "Parameter is not valid."); } } } diff --git a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/param/BodyProcessorCreator.java b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/param/BodyProcessorCreator.java index c21f527..61f0ea9 100644 --- a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/param/BodyProcessorCreator.java +++ b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/param/BodyProcessorCreator.java @@ -31,14 +31,18 @@ import org.apache.servicecomb.common.rest.codec.RestClientRequest; import org.apache.servicecomb.common.rest.codec.RestObjectMapperFactory; import org.apache.servicecomb.foundation.vertx.stream.BufferOutputStream; import org.apache.servicecomb.swagger.generator.core.utils.ClassUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import com.fasterxml.jackson.databind.JavaType; +import com.fasterxml.jackson.databind.exc.MismatchedInputException; import com.fasterxml.jackson.databind.type.TypeFactory; import io.swagger.models.parameters.Parameter; import io.vertx.core.buffer.Buffer; public class BodyProcessorCreator implements ParamValueProcessorCreator { + private static final Logger LOGGER = LoggerFactory.getLogger(BodyProcessorCreator.class); public static final String PARAMTYPE = "body"; @@ -75,15 +79,21 @@ public class BodyProcessorCreator implements ParamValueProcessorCreator { return null; } - if (isRequired == false && inputStream.available() == 0) { -return null; - } - if (!contentType.isEmpty() && !contentType.startsWith(MediaType.APPLICATION_JSON)) { // TODO: we should consider body encoding return IOUtils.toString(inputStream, "UTF-8"); } - return RestObjectMapperFactory.getRestObjectMapper().readValue(inputStream, targetType); + + try { +return RestObjectMapperFactory.getRestObjectMapper().readValue(inputStream, targetType); + } catch (MismatchedInputException e) { +// there is no way to detect InputStream is empty, so have to catch the exception +if (!isRequired) { + LOGGER.warn("Mismatched content and required is false, taken as null. Msg=" + e.getMessage()); + return null; +} +throw e; + } } @Override diff --git a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/produce/ProduceProcessor.java b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/produce/ProduceProcessor.java index 127250f..4172cb5 100644 --- a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/produce/ProduceProcessor.java +++
[incubator-servicecomb-java-chassis] 03/03: [SCB-828]test missed
This is an automated email from the ASF dual-hosted git repository. liubao pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git commit e1671b4b3fed64cd5bb9c98444bea2eecaa26a14 Author: liubao AuthorDate: Fri Aug 10 10:27:02 2018 +0800 [SCB-828]test missed --- .../java/org/apache/servicecomb/common/rest/codec/TestRestCodec.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/common-rest/src/test/java/org/apache/servicecomb/common/rest/codec/TestRestCodec.java b/common/common-rest/src/test/java/org/apache/servicecomb/common/rest/codec/TestRestCodec.java index ce6489b..90245d7 100644 --- a/common/common-rest/src/test/java/org/apache/servicecomb/common/rest/codec/TestRestCodec.java +++ b/common/common-rest/src/test/java/org/apache/servicecomb/common/rest/codec/TestRestCodec.java @@ -134,7 +134,7 @@ public class TestRestCodec { success = true; } catch (InvocationException e) { Assert.assertEquals(400, e.getStatusCode()); - Assert.assertEquals("Parameter is not valid.", e.getErrorData()); + Assert.assertEquals("Parameter is not valid.", ((CommonExceptionData) e.getErrorData()).getMessage()); } Assert.assertEquals(success, false); }
[incubator-servicecomb-java-chassis] branch master updated (a30e796 -> e1671b4)
This is an automated email from the ASF dual-hosted git repository. liubao pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git. from a30e796 [SCB-793] make demo output less log new 45471e7 [SCB-828]In some tomcat implementation inputstream available is null new aa2edef [SCB-828]data should be CommonExceptionData new e1671b4 [SCB-828]test missed The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../servicecomb/common/rest/codec/RestCodec.java | 5 +++-- .../rest/codec/param/BodyProcessorCreator.java | 20 +++- .../common/rest/codec/produce/ProduceProcessor.java | 4 .../servicecomb/common/rest/codec/TestRestCodec.java | 2 +- .../common/rest/codec/TestRestObjectMapper.java | 14 ++ .../rest/codec/produce/TestProduceJsonProcessor.java | 10 -- .../codec/produce/TestProduceTextPlainProcessor.java | 2 +- 7 files changed, 42 insertions(+), 15 deletions(-)
[incubator-servicecomb-java-chassis] 02/03: [SCB-828]data should be CommonExceptionData
This is an automated email from the ASF dual-hosted git repository. liubao pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git commit aa2edefb7b703dfd5ba83561232c806b3324d45d Author: liubao AuthorDate: Fri Aug 10 10:03:16 2018 +0800 [SCB-828]data should be CommonExceptionData --- .../main/java/org/apache/servicecomb/common/rest/codec/RestCodec.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/RestCodec.java b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/RestCodec.java index 127b76d..5642642 100644 --- a/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/RestCodec.java +++ b/common/common-rest/src/main/java/org/apache/servicecomb/common/rest/codec/RestCodec.java @@ -20,6 +20,7 @@ package org.apache.servicecomb.common.rest.codec; import java.util.List; import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.core.Response.Status; import org.apache.servicecomb.common.rest.definition.RestOperationMeta; import org.apache.servicecomb.common.rest.definition.RestParam; @@ -67,7 +68,7 @@ public final class RestCodec { restOperation.getOperationMeta().getMicroserviceQualifiedName(), e); // give standard http error code for invalid parameter - throw new InvocationException(400, "", "Parameter is not valid."); + throw new InvocationException(Status.BAD_REQUEST, "Parameter is not valid."); } } }
[GitHub] yhs0092 opened a new pull request #29: Add description about SpringMVC's query object param and JAX-RS's BeanParam
yhs0092 opened a new pull request #29: Add description about SpringMVC's query object param and JAX-RS's BeanParam URL: https://github.com/apache/incubator-servicecomb-docs/pull/29 Add description about the new features added in [SCB-708](https://issues.apache.org/jira/browse/SCB-708) and [SCB-777](https://issues.apache.org/jira/browse/SCB-777) 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 edited a comment on issue #243: [SCB-823] Setup the test in kubernetes
coveralls edited a comment on issue #243: [SCB-823] Setup the test in kubernetes URL: https://github.com/apache/incubator-servicecomb-saga/pull/243#issuecomment-411409444 [![Coverage Status](https://coveralls.io/builds/18422006/badge)](https://coveralls.io/builds/18422006) Coverage increased (+0.4%) to 94.356% when pulling **a7421ba6364afcc183e564e7ef324f6e38c3caa2 on crystaldust:feature/kubernetes-demo** into **0d1ecf601bbfd0458b234a3d0b86d86af37d32e3 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 edited a comment on issue #243: [SCB-823] Setup the test in kubernetes
coveralls edited a comment on issue #243: [SCB-823] Setup the test in kubernetes URL: https://github.com/apache/incubator-servicecomb-saga/pull/243#issuecomment-411409444 [![Coverage Status](https://coveralls.io/builds/18421414/badge)](https://coveralls.io/builds/18421414) Coverage increased (+0.4%) to 94.275% when pulling **7577d9c0abc59c9056f74c734e755ac4bd620e47 on crystaldust:feature/kubernetes-demo** into **0d1ecf601bbfd0458b234a3d0b86d86af37d32e3 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] yhs0092 commented on a change in pull request #865: [SCB-827] Add response body decoding error log
yhs0092 commented on a change in pull request #865: [SCB-827] Add response body decoding error log URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/865#discussion_r209167388 ## File path: transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/http/DefaultHttpClientFilter.java ## @@ -79,13 +82,15 @@ protected Object extractResult(Invocation invocation, HttpServletResponseEx resp responseEx.getStatus(), responseEx.getStatusType().getReasonPhrase(), responseEx.getHeader(HttpHeaders.CONTENT_TYPE)); + LOGGER.error(msg); return ExceptionFactory.createConsumerException(new InvocationException(responseEx.getStatus(), responseEx.getStatusType().getReasonPhrase(), msg)); } try { return produceProcessor.decodeResponse(responseEx.getBodyBuffer(), responseMeta.getJavaType()); } catch (Exception e) { - return ExceptionFactory.createConsumerException(e); + LOGGER.error("failed to decode response body", e); + throw ExceptionFactory.createConsumerException(e); Review comment: OK, please review 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] coveralls edited a comment on issue #865: [SCB-827] Add response body decoding error log
coveralls edited a comment on issue #865: [SCB-827] Add response body decoding error log URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/865#issuecomment-411738057 [![Coverage Status](https://coveralls.io/builds/18420896/badge)](https://coveralls.io/builds/18420896) Coverage decreased (-0.05%) to 86.427% when pulling **6af4742e271dad9cabdde6b3a7d0c440701a012e on yhs0092:fix_DefaultHttpClientFilter_confusing_response** into **a30e796134ffbbed278365237d32775fa6c9eef5 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
[incubator-servicecomb-saga] branch master updated: Polish the user guide document
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git The following commit(s) were added to refs/heads/master by this push: new 0d1ecf6 Polish the user guide document 0d1ecf6 is described below commit 0d1ecf601bbfd0458b234a3d0b86d86af37d32e3 Author: Willem Jiang AuthorDate: Fri Aug 10 14:34:09 2018 +0800 Polish the user guide document --- docs/user_guide.md| 3 +++ docs/user_guide_zh.md | 7 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/user_guide.md b/docs/user_guide.md index 58a2b2b..293004b 100644 --- a/docs/user_guide.md +++ b/docs/user_guide.md @@ -96,11 +96,14 @@ Take a transfer money application as an example: 4. Repeat step 3 for the `transferIn` service. +5. Since Saga-0.3.0, you can access the [OmegaContext](https://github.com/apache/incubator-servicecomb-saga/blob/master/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/OmegaContext.java) for the gloableTxId and localTxId in the @Compensable annotated method or the cancel method. + ## How to run 1. run postgreSQL. ```bash docker run -d -e "POSTGRES_DB=saga" -e "POSTGRES_USER=saga" -e "POSTGRES_PASSWORD=password" -p 5432:5432 postgres ``` + Please check out [this document](https://github.com/apache/incubator-servicecomb-saga/blob/master/docs/faq/en/how_to_use_mysql_as_alpha_backend_database.md), if you want to use the MySQL instead of postgreSQL. 2. run alpha. Before running alpha, please make sure postgreSQL is already up. You can run alpha through docker or executable file. * Run alpha through docker. diff --git a/docs/user_guide_zh.md b/docs/user_guide_zh.md index 4331001..5e156a9 100644 --- a/docs/user_guide_zh.md +++ b/docs/user_guide_zh.md @@ -96,11 +96,16 @@ Saga可通过以下任一方式进行构建: 4. 对转入服务重复第三步即可。 +5. 从Saga-0.3.0, 你可以在服务函数或者取消函数中通过访问 [OmegaContext](https://github.com/apache/incubator-servicecomb-saga/blob/master/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/OmegaContext.java) 来获取 gloableTxId 以及 localTxId 信息。 + + ## 如何运行 -1. 运行postgreSQL +1. 运行postgreSQL, ```bash docker run -d -e "POSTGRES_DB=saga" -e "POSTGRES_USER=saga" -e "POSTGRES_PASSWORD=password" -p 5432:5432 postgres ``` + 如果你想使用MySQL做为后台数据库,可以参考 [此文档](https://github.com/apache/incubator-servicecomb-saga/blob/master/docs/faq/en/how_to_use_mysql_as_alpha_backend_database.md)。 + 2. 运行alpha。在运行alpha前,请确保postgreSQL已正常启动。可通过docker或可执行文件的方式来启动alpha。 * 通过docker运行:
[GitHub] maheshrajus commented on a change in pull request #863: [SCB-736] generate default value to swagger for primitive type when there is no defaultValue annotation
maheshrajus commented on a change in pull request #863: [SCB-736] generate default value to swagger for primitive type when there is no defaultValue annotation URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/863#discussion_r209156301 ## File path: demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/SpringMvcDefaultValues.java ## @@ -64,4 +64,28 @@ public String query3(@RequestParam("a") @Min(value = 20) int a, @RequestParam("b return "Hello " + a + b; } + @PostMapping("/javaprimitive1") + public String springJavaPrim1(@RequestParam(name = "a") int a, Review comment: yes...i mofied in local evn but forgot to merge the demo. i am raising PR now. Thank you ! 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 #863: [SCB-736] generate default value to swagger for primitive type when there is no defaultValue annotation
liubao68 commented on a change in pull request #863: [SCB-736] generate default value to swagger for primitive type when there is no defaultValue annotation URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/863#discussion_r209155524 ## File path: demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/SpringMvcDefaultValues.java ## @@ -64,4 +64,28 @@ public String query3(@RequestParam("a") @Min(value = 20) int a, @RequestParam("b return "Hello " + a + b; } + @PostMapping("/javaprimitive1") + public String springJavaPrim1(@RequestParam(name = "a") int a, Review comment: This default required is true, seems this test case will fail 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] maheshrajus commented on a change in pull request #863: [SCB-736] generate default value to swagger for primitive type when there is no defaultValue annotation
maheshrajus commented on a change in pull request #863: [SCB-736] generate default value to swagger for primitive type when there is no defaultValue annotation URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/863#discussion_r209152955 ## File path: demo/demo-springmvc/springmvc-server/src/main/java/org/apache/servicecomb/demo/springmvc/server/SpringMvcDefaultValues.java ## @@ -64,4 +64,28 @@ public String query3(@RequestParam("a") @Min(value = 20) int a, @RequestParam("b return "Hello " + a + b; } + @PostMapping("/javaprimitive1") + public String springJavaPrim1(@RequestParam(name = "a") int a, Review comment: I fixed the base springmvc defect related to required parameter and raised PR. please check 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] WillemJiang edited a comment on issue #237: [SCB-785] 支持在补偿方法里得到当前分布式事务的全局事务ID及本地事务ID
WillemJiang edited a comment on issue #237: [SCB-785] 支持在补偿方法里得到当前分布式事务的全局事务ID及本地事务ID URL: https://github.com/apache/incubator-servicecomb-saga/pull/237#issuecomment-411966813 @jeremyxu2010 Thanks for your PR. There still a simple issue of grpc-stub dependency. I just applied the patch manually after [fixing the dependency issue](https://github.com/apache/incubator-servicecomb-saga/commit/97e856fe9e5b77947faf0daedf1db9c45d6f56a0). 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