[jira] [Commented] (SCB-922) collect Getter/Setter from pojo
[ https://issues.apache.org/jira/browse/SCB-922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16631311#comment-16631311 ] ASF GitHub Bot commented on SCB-922: liubao68 closed pull request #928: [SCB-922] collect Getter/Setter from pojo URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/928 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/core/src/main/resources/META-INF/spring/cse.bean.xml b/core/src/main/resources/META-INF/spring/cse.bean.xml index b24ab137e..092187ca9 100644 --- a/core/src/main/resources/META-INF/spring/cse.bean.xml +++ b/core/src/main/resources/META-INF/spring/cse.bean.xml @@ -20,7 +20,7 @@ xmlns:context="http://www.springframework.org/schema/context; xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd - http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd;> + http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd;> diff --git a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/LambdaMetafactoryUtils.java b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/LambdaMetafactoryUtils.java index e6bfa73c9..3e8578709 100644 --- a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/LambdaMetafactoryUtils.java +++ b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/LambdaMetafactoryUtils.java @@ -93,7 +93,13 @@ public static Getter createGetter(Method getMethod) throws Throwable { // slower than reflect directly public static Getter createGetter(Field field) { field.setAccessible(true); -return instance -> field.get(instance); +return instance -> { + try { +return field.get(instance); + } catch (IllegalAccessException e) { +throw new RuntimeException(e); + } +}; } public static Setter createSetter(Method setMethod) throws Throwable { @@ -103,6 +109,12 @@ public static Setter createSetter(Method setMethod) throws Throwable { // slower than reflect directly public static Setter createSetter(Field field) { field.setAccessible(true); -return (instance, value) -> field.set(instance, value); +return (instance, value) -> { + try { +field.set(instance, value); + } catch (IllegalAccessException e) { +throw new RuntimeException(e); + } +}; } } diff --git a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/bean/Getter.java b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/bean/Getter.java index 1404f4738..15ea1d9cb 100644 --- a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/bean/Getter.java +++ b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/bean/Getter.java @@ -17,5 +17,5 @@ package org.apache.servicecomb.foundation.common.utils.bean; public interface Getter { - Object get(Object instance) throws Throwable; + Object get(Object instance); } diff --git a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/bean/MapGetter.java b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/bean/MapGetter.java new file mode 100644 index 0..0766e9959 --- /dev/null +++ b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/bean/MapGetter.java @@ -0,0 +1,33 @@ +/* + * 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.foundation.common.utils.bean; + +import java.util.Map; +
[jira] [Resolved] (SCB-939) [SCB-939] move double type test case from demo to integration-test
[ https://issues.apache.org/jira/browse/SCB-939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] 何一乐 resolved SCB-939. - Resolution: Fixed > [SCB-939] move double type test case from demo to integration-test > -- > > Key: SCB-939 > URL: https://issues.apache.org/jira/browse/SCB-939 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: 何一乐 >Assignee: 何一乐 >Priority: Minor > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-943) make ProduceJsonProcessor,DefaultHttpClientFilter,ServerRestArgsFilter changable
[ https://issues.apache.org/jira/browse/SCB-943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16631294#comment-16631294 ] ASF GitHub Bot commented on SCB-943: coveralls commented on issue #929: [SCB-943]make ProduceJsonProcessor,DefaultHttpClientFilter,ServerRestArgsFilter changable URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/929#issuecomment-425307571 [![Coverage Status](https://coveralls.io/builds/19239698/badge)](https://coveralls.io/builds/19239698) Coverage increased (+0.0003%) to 86.203% when pulling **88494626e597cec24589f7f5a95d61f2c116542e on liubao68:edge-raw** into **6de89dd2b7c98147040ba5d7f9b4dec5ddd30ec5 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 > make ProduceJsonProcessor,DefaultHttpClientFilter,ServerRestArgsFilter > changable > > > Key: SCB-943 > URL: https://issues.apache.org/jira/browse/SCB-943 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: liubao >Assignee: liubao >Priority: Major > > In user customized scenario, they want to change the default behavior of > ProduceJsonProcessor,DefaultHttpClientFilter,ServerRestArgsFilter -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SCB-74) POJO static method is export as an operation
[ https://issues.apache.org/jira/browse/SCB-74?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] 何一乐 reassigned SCB-74: -- Assignee: 何一乐 > POJO static method is export as an operation > > > Key: SCB-74 > URL: https://issues.apache.org/jira/browse/SCB-74 > Project: Apache ServiceComb > Issue Type: Bug > Components: Java-Chassis >Reporter: Bo Li >Assignee: 何一乐 >Priority: Major > Labels: newbie > > When using @rpcschema to expose a singleton POJO as schema interface, then > call the public method of the class which the method belong to, exception > occurs as follow: > {code} > Exception in thread "main" java.lang.NullPointerException > at > io.servicecomb.swagger.generator.core.utils.ClassUtils.getOrCreateClass(ClassUtils.java:135) > at > io.servicecomb.swagger.converter.model.ModelImplConverter.doConvert(ModelImplConverter.java:55) > at > io.servicecomb.swagger.converter.AbstractConverter.convert(AbstractConverter.java:42) > at > io.servicecomb.swagger.converter.ConverterMgr.findJavaType(ConverterMgr.java:188) > at > io.servicecomb.swagger.converter.ConverterMgr.findByRef(ConverterMgr.java:196) > at > io.servicecomb.swagger.converter.property.RefPropertyConverter.doConvert(RefPropertyConverter.java:30) > at > io.servicecomb.swagger.converter.AbstractConverter.convert(AbstractConverter.java:42) > at > io.servicecomb.swagger.converter.ConverterMgr.findJavaType(ConverterMgr.java:188) > at > io.servicecomb.swagger.generator.core.utils.ClassUtils.createInterface(ClassUtils.java:252) > at > io.servicecomb.swagger.generator.core.utils.ClassUtils.getOrCreateInterface(ClassUtils.java:237) > at io.servicecomb.core.definition.SchemaMeta.(SchemaMeta.java:65) > at > io.servicecomb.core.definition.loader.SchemaLoader.registerSchema(SchemaLoader.java:92) > at > io.servicecomb.core.definition.schema.ConsumerSchemaFactory.createSchema(ConsumerSchemaFactory.java:132) > at > io.servicecomb.core.definition.schema.ConsumerSchemaFactory.createSchema(ConsumerSchemaFactory.java:33) > at > io.servicecomb.core.definition.schema.AbstractSchemaFactory.getOrCreateSchema(AbstractSchemaFactory.java:59) > at > io.servicecomb.core.definition.schema.ConsumerSchemaFactory.getOrCreateConsumerSchema(ConsumerSchemaFactory.java:122) > at > io.servicecomb.core.definition.schema.ConsumerSchemaFactory.getOrCreateMicroserviceMeta(ConsumerSchemaFactory.java:78) > at > io.servicecomb.core.provider.consumer.ReferenceConfig.(ReferenceConfig.java:35) > at > io.servicecomb.core.provider.consumer.ConsumerProviderManager.getReferenceConfig(ConsumerProviderManager.java:82) > at > io.servicecomb.core.provider.consumer.ReferenceConfigUtils.getForInvoke(ReferenceConfigUtils.java:42) > at io.servicecomb.provider.pojo.Invoker.prepare(Invoker.java:59) > at io.servicecomb.provider.pojo.Invoker.invoke(Invoker.java:81) > at com.sun.proxy.$Proxy17.selectByPrimaryKey(Unknown Source) > at com.ceewa.cloud.consumer.DubboxConsumer.testMycat(DubboxConsumer.java:49) > at com.ceewa.cloud.consumer.DubboxConsumer.main(DubboxConsumer.java:38) > {code} > Problem is fixed after adding {code}@apioperation(value = "getInstance is not > an endpoint", hidden = true){code} tag for method getInstance, is there any > good suggestions for that question? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-926) Invoke 3rd party service
[ https://issues.apache.org/jira/browse/SCB-926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16631288#comment-16631288 ] ASF GitHub Bot commented on SCB-926: liubao68 closed pull request #915: [SCB-926] support invoking 3rd party service URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/915 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/core/src/main/java/org/apache/servicecomb/core/CseApplicationListener.java b/core/src/main/java/org/apache/servicecomb/core/CseApplicationListener.java index 70c66f89b..5ed1759c1 100644 --- a/core/src/main/java/org/apache/servicecomb/core/CseApplicationListener.java +++ b/core/src/main/java/org/apache/servicecomb/core/CseApplicationListener.java @@ -19,6 +19,7 @@ import org.apache.servicecomb.core.definition.MicroserviceMeta; import org.apache.servicecomb.core.definition.loader.SchemaListenerManager; +import org.apache.servicecomb.core.definition.schema.StaticSchemaFactory; import org.apache.servicecomb.core.provider.consumer.ConsumerProviderManager; import org.apache.servicecomb.core.provider.producer.ProducerProviderManager; import org.apache.servicecomb.core.transport.TransportManager; @@ -74,6 +75,7 @@ public void onApplicationEvent(ApplicationEvent event) { SCBEngine.getInstance().setTransportManager(applicationContext.getBean(TransportManager.class)); SCBEngine.getInstance().setSchemaListenerManager(applicationContext.getBean(SchemaListenerManager.class)); SCBEngine.getInstance().setBootListenerList(applicationContext.getBeansOfType(BootListener.class).values()); + SCBEngine.getInstance().setStaticSchemaFactory(applicationContext.getBean(StaticSchemaFactory.class)); } SCBEngine.getInstance().init(); diff --git a/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java b/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java index 4be7e7c7b..f364d1c6f 100644 --- a/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java +++ b/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java @@ -31,6 +31,7 @@ import org.apache.servicecomb.core.BootListener.EventType; import org.apache.servicecomb.core.definition.MicroserviceMeta; import org.apache.servicecomb.core.definition.loader.SchemaListenerManager; +import org.apache.servicecomb.core.definition.schema.StaticSchemaFactory; import org.apache.servicecomb.core.endpoint.AbstractEndpointsCache; import org.apache.servicecomb.core.event.InvocationFinishEvent; import org.apache.servicecomb.core.event.InvocationStartEvent; @@ -82,6 +83,8 @@ private EventBus eventBus = EventManager.getEventBus(); + private StaticSchemaFactory staticSchemaFactory; + private static final SCBEngine INSTANCE = new SCBEngine(); public void setStatus(SCBStatus status) { @@ -374,4 +377,12 @@ public void waitStatusUp(long msWait) throws InterruptedException, TimeoutExcept } } } + + public StaticSchemaFactory getStaticSchemaFactory() { +return staticSchemaFactory; + } + + public void setStaticSchemaFactory(StaticSchemaFactory staticSchemaFactory) { +this.staticSchemaFactory = staticSchemaFactory; + } } diff --git a/core/src/main/java/org/apache/servicecomb/core/definition/MicroserviceVersionMeta.java b/core/src/main/java/org/apache/servicecomb/core/definition/MicroserviceVersionMeta.java index a5eff5853..e4e27632b 100644 --- a/core/src/main/java/org/apache/servicecomb/core/definition/MicroserviceVersionMeta.java +++ b/core/src/main/java/org/apache/servicecomb/core/definition/MicroserviceVersionMeta.java @@ -20,10 +20,15 @@ import org.apache.servicecomb.core.CseContext; import org.apache.servicecomb.core.definition.classloader.MicroserviceClassLoaderFactory; import org.apache.servicecomb.serviceregistry.api.Const; +import org.apache.servicecomb.serviceregistry.api.registry.Microservice; import org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersion; public class MicroserviceVersionMeta extends MicroserviceVersion { - private MicroserviceMeta microserviceMeta; + MicroserviceMeta microserviceMeta; + + MicroserviceVersionMeta(Microservice microservice) { +super(microservice); + } public MicroserviceVersionMeta(String microserviceName, String microserviceId, MicroserviceClassLoaderFactory classLoaderFactory) { diff --git a/core/src/main/java/org/apache/servicecomb/core/definition/StaticMicroserviceVersionMeta.java b/core/src/main/java/org/apache/servicecomb/core/definition/StaticMicroserviceVersionMeta.java new file mode 100644 index 0..0fd866bc0 --- /dev/null +++
[jira] [Commented] (SCB-939) [SCB-939] move double type test case from demo to integration-test
[ https://issues.apache.org/jira/browse/SCB-939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16631286#comment-16631286 ] ASF GitHub Bot commented on SCB-939: liubao68 closed pull request #927: [SCB-939] move double type test case from demo to integration-test URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/927 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/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/testcase/TestDataTypePrimitive.java b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/testcase/TestDataTypePrimitive.java index 473fc5486..da9f29430 100644 --- a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/testcase/TestDataTypePrimitive.java +++ b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/testcase/TestDataTypePrimitive.java @@ -34,11 +34,15 @@ interface DataTypePojoIntf { int intBody(int input); -int add(int num1, int num2); +int intAdd(int num1, int num2); String stringBody(String input); String stringConcat(String str1, String str2); + +double doubleBody(double input); + +double doubleAdd(double num1, double num2); } public interface DataTypeRestIntf { @@ -54,7 +58,7 @@ int intForm(int input); -int add(int num1, int num2); +int intAdd(int num1, int num2); //string String stringPath(String input); @@ -70,6 +74,21 @@ String stringBody(String input); String stringConcat(String str1, String str2); + +//double +double doublePath(double input); + +double doubleQuery(double input); + +double doubleHeader(double input); + +double doubleCookie(double input); + +double doubleBody(double input); + +double doubleForm(double input); + +double doubleAdd(double num1, double num2); } private static Consumers consumersPojo; @@ -98,6 +117,11 @@ public void int_pojo_intf() { assertEquals(10, consumersPojo.getIntf().intBody(10)); } + @Test + public void double_pojo_intf() { +assertEquals(10.2, consumersPojo.getIntf().doubleBody(10.2), 0.0); + } + @Test public void string_pojo_intf() { String expect = "serviceComb"; @@ -111,17 +135,31 @@ public void int_pojo_rt() { assertEquals(10, (int) consumersPojo.getSCBRestTemplate().postForObject("/intBody", map, int.class)); } + @Test + public void double_pojo_rt() { +Map map = new HashMap<>(); +map.put("input", 10.2); +assertEquals(10.2, consumersPojo.getSCBRestTemplate().postForObject("/doubleBody", map, double.class), +0.0); + } + + @Test public void string_pojo_rt() { String expect = "serviceComb"; Map map = new HashMap<>(); map.put("input", expect); -assertEquals(expect, (String) consumersPojo.getSCBRestTemplate().postForObject("/stringBody", map, String.class)); +assertEquals(expect, consumersPojo.getSCBRestTemplate().postForObject("/stringBody", map, String.class)); } @Test - public void add_pojo_intf() { -assertEquals(12, consumersPojo.getIntf().add(10, 2)); + public void intAdd_pojo_intf() { +assertEquals(12, consumersPojo.getIntf().intAdd(10, 2)); + } + + @Test + public void doubleAdd_pojo_intf() { +assertEquals(20.5, consumersPojo.getIntf().doubleAdd(10.2, 10.3), 0.0); } @Test @@ -130,11 +168,19 @@ public void string_concat_pojo_intf() { } @Test - public void add_pojo_rt() { + public void intAdd_pojo_rt() { Map map = new HashMap<>(); map.put("num1", 10); map.put("num2", 2); -assertEquals(12, (int) consumersPojo.getSCBRestTemplate().postForObject("/add", map, int.class)); +assertEquals(12, (int) consumersPojo.getSCBRestTemplate().postForObject("/intAdd", map, int.class)); + } + + @Test + public void doubleAdd_pojo_rt() { +Map map = new HashMap<>(); +map.put("num1", 10.2); +map.put("num2", 10.3); +assertEquals(20.5, consumersPojo.getSCBRestTemplate().postForObject("/doubleAdd", map, double.class), 0.0); } @Test @@ -143,7 +189,7 @@ public void string_concat_pojo_rt() { map.put("str1", "service"); map.put("str2", "Comb"); assertEquals("serviceComb", -(String) consumersPojo.getSCBRestTemplate().postForObject("/stringConcat", map, String.class)); +consumersPojo.getSCBRestTemplate().postForObject("/stringConcat", map, String.class)); } @Test @@ -151,6 +197,11 @@ public void intPath_jaxrs_intf() { assertEquals(10, consumersJaxrs.getIntf().intPath(10)); } + @Test + public void doublePath_jaxrs_intf() { +assertEquals(10.2, consumersJaxrs.getIntf().doublePath(10.2), 0.0); + }
[jira] [Updated] (SCB-921) check if swagger compatible to protobuf and choose transport automatically
[ https://issues.apache.org/jira/browse/SCB-921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] wujimin updated SCB-921: Issue Type: Task (was: Sub-task) Parent: (was: SCB-676) > check if swagger compatible to protobuf and choose transport automatically > -- > > Key: SCB-921 > URL: https://issues.apache.org/jira/browse/SCB-921 > Project: Apache ServiceComb > Issue Type: Task > Components: Java-Chassis >Reporter: wujimin >Assignee: wujimin >Priority: Major > Fix For: java-chassis-1.1.0 > > > include these rules at least: > * not support List/List > * array in deserialize target model -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-921) check if swagger compatible to protobuf and choose transport automatically
[ https://issues.apache.org/jira/browse/SCB-921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] wujimin updated SCB-921: Description: include these rules at least: * not support List/List * array in deserialize target model > check if swagger compatible to protobuf and choose transport automatically > -- > > Key: SCB-921 > URL: https://issues.apache.org/jira/browse/SCB-921 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: wujimin >Priority: Major > Fix For: java-chassis-1.1.0 > > > include these rules at least: > * not support List/List > * array in deserialize target model -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-921) check if swagger compatible to protobuf and choose transport automatically
[ https://issues.apache.org/jira/browse/SCB-921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] wujimin updated SCB-921: Summary: check if swagger compatible to protobuf and choose transport automatically (was: deserialize based on proto model) > check if swagger compatible to protobuf and choose transport automatically > -- > > Key: SCB-921 > URL: https://issues.apache.org/jira/browse/SCB-921 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: wujimin >Priority: Major > Fix For: java-chassis-1.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-909) Add fault tolerance for service comb TCC
[ https://issues.apache.org/jira/browse/SCB-909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16631160#comment-16631160 ] ASF GitHub Bot commented on SCB-909: WillemJiang closed pull request #315: SCB-909 Add fail fast mechanism when all alpha is unreachable. URL: https://github.com/apache/incubator-servicecomb-saga/pull/315 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/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/AlphaConfig.java b/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/AlphaConfig.java index b8c1be2b..bc4bc593 100644 --- a/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/AlphaConfig.java +++ b/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/AlphaConfig.java @@ -35,6 +35,7 @@ import org.apache.servicecomb.saga.alpha.core.TxEventRepository; import org.apache.servicecomb.saga.alpha.core.TxTimeoutRepository; import org.apache.servicecomb.saga.alpha.server.tcc.GrpcTccEventService; +import org.apache.servicecomb.saga.alpha.server.tcc.callback.TccPendingTaskRunner; import org.apache.servicecomb.saga.alpha.server.tcc.service.TccTxEventService; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.domain.EntityScan; @@ -99,7 +100,14 @@ TxConsistentService txConsistentService( } @Bean - GrpcTccEventService grpcTccEventService(TccTxEventService tccTxEventService) { + TccPendingTaskRunner tccPendingTaskRunner() { +return new TccPendingTaskRunner(delay); + } + + @Bean + GrpcTccEventService grpcTccEventService(TccTxEventService tccTxEventService, TccPendingTaskRunner tccPendingTaskRunner) { +tccPendingTaskRunner.start(); +Runtime.getRuntime().addShutdownHook(new Thread(() -> tccPendingTaskRunner.shutdown())); return new GrpcTccEventService(tccTxEventService); } diff --git a/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/tcc/callback/OmegaCallbackWrapper.java b/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/tcc/callback/OmegaCallbackWrapper.java index 64d624a2..475489dc 100644 --- a/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/tcc/callback/OmegaCallbackWrapper.java +++ b/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/tcc/callback/OmegaCallbackWrapper.java @@ -17,6 +17,7 @@ package org.apache.servicecomb.saga.alpha.server.tcc.callback; +import java.util.concurrent.BlockingQueue; import org.apache.servicecomb.saga.alpha.server.tcc.jpa.ParticipatedEvent; import org.apache.servicecomb.saga.common.TransactionStatus; import org.springframework.stereotype.Component; @@ -24,14 +25,30 @@ @Component public class OmegaCallbackWrapper implements OmegaCallback { + private final BlockingQueue pendingTasks; + + public OmegaCallbackWrapper( + TccPendingTaskRunner tccPendingTaskRunner) { +this.pendingTasks = tccPendingTaskRunner.getPendingTasks(); + } + + @Override public void invoke(ParticipatedEvent event, TransactionStatus status) { -OmegaCallback omegaCallback = OmegaCallbacksRegistry.retrieve(event.getServiceName(), event.getInstanceId()); +OmegaCallback omegaCallback; +try { + omegaCallback = OmegaCallbacksRegistry.retrieve(event.getServiceName(), event.getInstanceId()); +} catch (Exception e) { + pendingTasks.offer(() -> invoke(event, status)); + throw e; +} + try { omegaCallback.invoke(event, status); -} catch (Exception ex) { +} catch (Exception e) { OmegaCallbacksRegistry.remove(event.getServiceName(), event.getInstanceId()); - throw ex; + pendingTasks.offer(() -> invoke(event, status)); + throw e; } } } diff --git a/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/tcc/callback/TccCallbackEngine.java b/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/tcc/callback/TccCallbackEngine.java index 48cbdbae..1a55d198 100644 --- a/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/tcc/callback/TccCallbackEngine.java +++ b/alpha/alpha-server/src/main/java/org/apache/servicecomb/saga/alpha/server/tcc/callback/TccCallbackEngine.java @@ -47,6 +47,7 @@ @Override public boolean execute(GlobalTxEvent request) { boolean result = true; +// TODO if tcc end event was triggered by many times, we should ensure coordinated event won't be invoke again. List events = tccTxEventRepository.findByGlobalTxIdAndTxType(request.getGlobalTxId(), TccTxType.PARTICIPATED).orElse(
[jira] [Commented] (SCB-918) serialize/deserialize based on proto model
[ https://issues.apache.org/jira/browse/SCB-918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16630922#comment-16630922 ] ASF GitHub Bot commented on SCB-918: wujimin opened a new pull request #930: [SCB-918] Codec based on proto URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/930 **need to merge https://github.com/apache/incubator-servicecomb-java-chassis/pull/928 first** ProtobufRoot.java is generated by protobufRoot.proto, 5000 lines. it's only for unit test - compare to jackson protobuf: - can parse protobuf 3 proto file - support protobuf 3: map/any - compare to protoStuff runtime: - for a proto message type, not only support strong type(Pojo), but alse support weak type(Map) - support "any" type - support generic pojo type, eg:CustomGeneric - **NOT** support List>/List> any more, because protobuf specification not support it, and the parser can not parse the proto file - compare to standard protobuf: - extend "any" type, for standard not support cases, use "json" schema to codec it. - compare to all: - just pojo, no need any code generation and annotation - one pojo can serialize to different version proto file to support different version server - support text data come from http,can serrialize from different data type - number fields (int32/int64 and so on) - number - String - String[] - string fields - string - string[] - bool fields - boolean - string - string[] - enum fields - enum - number - string - string[] - performance compare: ``` 1.protobuf in our real scenes business model never bind to transport, and can switch between different transport dynamically that means if we choose standard protobuf, must build protobuf models from business models each time so should be much slower than the test results 2.protoStuff some scenes, there is no field but have getter or setter, so we can not use unsafe to access field so we disable protoStuff unsafe feature Empty: Protostuff ScbStrong ScbWeakProtobuf Jackson ser time(ms) :268297250187 391 ser len :36 0 0 0 56 deser time(ms):10931 16 243 434 deser-ser len :36 0 0 0 56 Scalars: Protostuff ScbStrong ScbWeakProtobuf Jackson ser time(ms) :234282284313 388 ser len :53 21 21 21 73 deser time(ms):15662 125187 453 deser-ser len :53 21 21 21 73 SimpleList: Protostuff ScbStrong ScbWeakProtobuf Jackson ser time(ms) :234281286172 422 ser len :68 32 32 32 88 deser time(ms):21994 106251 485 deser-ser len :68 32 32 32 88 PojoList: Protostuff ScbStrong ScbWeakProtobuf Jackson ser time(ms) :313359344172 543 ser len :56 20 20 20 76 deser time(ms):246127174281 609 deser-ser len :56 20 20 20 76 Map: Protostuff ScbStrong ScbWeakProtobuf Jackson ser time(ms) :408489514482 388 ser len :92 54 54 54 56 deser time(ms):515375423737 359 deser-ser len :92 54 54 54 56 Mixed: Protostuff ScbStrong ScbWeakProtobuf Jackson ser time(ms) :549721708543 563 ser len :161127127
[jira] [Commented] (SCB-941) Support multiple datacenter deployment
[ https://issues.apache.org/jira/browse/SCB-941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16630658#comment-16630658 ] ASF GitHub Bot commented on SCB-941: codecov-io edited a comment on issue #451: SCB-941 Support multiple datacenter deployment URL: https://github.com/apache/incubator-servicecomb-service-center/pull/451#issuecomment-425070687 # [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=h1) Report > Merging [#451](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=desc) into [master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/204d35cc4a02b447fcbb55f83d824fa1bcddba27?src=pr=desc) will **increase** coverage by `0.06%`. > The diff coverage is `44.31%`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/graphs/tree.svg?width=650=GAaF7zrg8R=150=pr)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=tree) ```diff @@Coverage Diff @@ ## master #451 +/- ## == + Coverage 59.95% 60.01% +0.06% == Files 149 156 +7 Lines 1318313388 +205 == + Hits 7904 8035 +131 - Misses 4703 4776 +73 - Partials 576 577 +1 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=tree) | Coverage Δ | | |---|---|---| | [server/service/tag\_validator.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdGFnX3ZhbGlkYXRvci5nbw==) | `100% <ø> (ø)` | :arrow_up: | | [server/service/rule\_validator.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvcnVsZV92YWxpZGF0b3IuZ28=) | `100% <ø> (ø)` | :arrow_up: | | [server/plugin/pkg/discovery/types.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvZGlzY292ZXJ5L3R5cGVzLmdv) | `77.77% <ø> (ø)` | | | [server/plugin/pkg/registry/etcd/logger.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvcmVnaXN0cnkvZXRjZC9sb2dnZXIuZ28=) | `80.76% <ø> (ø)` | | | [server/plugin/pkg/registry/etcd/metrics.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvcmVnaXN0cnkvZXRjZC9tZXRyaWNzLmdv) | `100% <ø> (ø)` | | | [server/service/schema\_validator.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2Uvc2NoZW1hX3ZhbGlkYXRvci5nbw==) | `100% <ø> (ø)` | :arrow_up: | | [server/plugin/pkg/tls/buildin/tls.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvdGxzL2J1aWxkaW4vdGxzLmdv) | `82.08% <ø> (ø)` | | | [server/plugin/pkg/discovery/etcd/watcher\_inner.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvZGlzY292ZXJ5L2V0Y2Qvd2F0Y2hlcl9pbm5lci5nbw==) | `100% <ø> (ø)` | | | [server/plugin/pkg/registry/etcd/tracing.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvcmVnaXN0cnkvZXRjZC90cmFjaW5nLmdv) | `72.72% <ø> (ø)` | | | [server/plugin/pkg/tracing/buildin/common.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvdHJhY2luZy9idWlsZGluL2NvbW1vbi5nbw==) | `80% <ø> (ø)` | | | ... and [82 more](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree-more) | | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=footer). Last update [204d35c...75b408f](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and
[jira] [Commented] (SCB-941) Support multiple datacenter deployment
[ https://issues.apache.org/jira/browse/SCB-941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16630657#comment-16630657 ] ASF GitHub Bot commented on SCB-941: coveralls edited a comment on issue #451: SCB-941 Support multiple datacenter deployment URL: https://github.com/apache/incubator-servicecomb-service-center/pull/451#issuecomment-425070801 [![Coverage Status](https://coveralls.io/builds/19228029/badge)](https://coveralls.io/builds/19228029) Coverage increased (+0.06%) to 62.427% when pulling **75b408f3a4f3ac5449a086423b10f689566f5586 on little-cui:dc** into **204d35cc4a02b447fcbb55f83d824fa1bcddba27 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 > Support multiple datacenter deployment > -- > > Key: SCB-941 > URL: https://issues.apache.org/jira/browse/SCB-941 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > Fix For: service-center-1.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-922) collect Getter/Setter from pojo
[ https://issues.apache.org/jira/browse/SCB-922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16630615#comment-16630615 ] ASF GitHub Bot commented on SCB-922: coveralls edited a comment on issue #928: [SCB-922] collect Getter/Setter from pojo URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/928#issuecomment-425027916 [![Coverage Status](https://coveralls.io/builds/19226369/badge)](https://coveralls.io/builds/19226369) Coverage decreased (-0.1%) to 86.095% when pulling **47bdc1807d2370eb7197e09f5a663ce80ce72d93 on wujimin:collect-getter-setter-from-pojo** into **6de89dd2b7c98147040ba5d7f9b4dec5ddd30ec5 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 > collect Getter/Setter from pojo > --- > > Key: SCB-922 > URL: https://issues.apache.org/jira/browse/SCB-922 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: wujimin >Priority: Major > Fix For: java-chassis-1.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-941) Support multiple datacenter deployment
[ https://issues.apache.org/jira/browse/SCB-941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16630598#comment-16630598 ] ASF GitHub Bot commented on SCB-941: coveralls edited a comment on issue #451: SCB-941 Support multiple datacenter deployment URL: https://github.com/apache/incubator-servicecomb-service-center/pull/451#issuecomment-425070801 [![Coverage Status](https://coveralls.io/builds/19226956/badge)](https://coveralls.io/builds/19226956) Coverage increased (+0.01%) to 62.382% when pulling **069df60575aaf8c4b950ffaff5e137df05d0e543 on little-cui:dc** into **204d35cc4a02b447fcbb55f83d824fa1bcddba27 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 > Support multiple datacenter deployment > -- > > Key: SCB-941 > URL: https://issues.apache.org/jira/browse/SCB-941 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > Fix For: service-center-1.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-941) Support multiple datacenter deployment
[ https://issues.apache.org/jira/browse/SCB-941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16630594#comment-16630594 ] ASF GitHub Bot commented on SCB-941: codecov-io edited a comment on issue #451: SCB-941 Support multiple datacenter deployment URL: https://github.com/apache/incubator-servicecomb-service-center/pull/451#issuecomment-425070687 # [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=h1) Report > Merging [#451](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=desc) into [master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/204d35cc4a02b447fcbb55f83d824fa1bcddba27?src=pr=desc) will **increase** coverage by `<.01%`. > The diff coverage is `44.31%`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/graphs/tree.svg?width=650=GAaF7zrg8R=150=pr)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=tree) ```diff @@Coverage Diff @@ ## master #451 +/- ## == + Coverage 59.95% 59.96% +<.01% == Files 149 156 +7 Lines 1318313388 +205 == + Hits 7904 8028 +124 - Misses 4703 4783 +80 - Partials 576 577 +1 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=tree) | Coverage Δ | | |---|---|---| | [server/service/tag\_validator.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdGFnX3ZhbGlkYXRvci5nbw==) | `100% <ø> (ø)` | :arrow_up: | | [server/service/rule\_validator.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvcnVsZV92YWxpZGF0b3IuZ28=) | `100% <ø> (ø)` | :arrow_up: | | [server/plugin/pkg/discovery/types.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvZGlzY292ZXJ5L3R5cGVzLmdv) | `77.77% <ø> (ø)` | | | [server/plugin/pkg/registry/etcd/logger.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvcmVnaXN0cnkvZXRjZC9sb2dnZXIuZ28=) | `80.76% <ø> (ø)` | | | [server/plugin/pkg/registry/etcd/metrics.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvcmVnaXN0cnkvZXRjZC9tZXRyaWNzLmdv) | `100% <ø> (ø)` | | | [server/service/schema\_validator.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2Uvc2NoZW1hX3ZhbGlkYXRvci5nbw==) | `100% <ø> (ø)` | :arrow_up: | | [server/plugin/pkg/tls/buildin/tls.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvdGxzL2J1aWxkaW4vdGxzLmdv) | `82.08% <ø> (ø)` | | | [server/plugin/pkg/discovery/etcd/watcher\_inner.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvZGlzY292ZXJ5L2V0Y2Qvd2F0Y2hlcl9pbm5lci5nbw==) | `100% <ø> (ø)` | | | [server/plugin/pkg/registry/etcd/tracing.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvcmVnaXN0cnkvZXRjZC90cmFjaW5nLmdv) | `81.81% <ø> (ø)` | | | [server/plugin/pkg/tracing/buildin/common.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvdHJhY2luZy9idWlsZGluL2NvbW1vbi5nbw==) | `80% <ø> (ø)` | | | ... and [82 more](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree-more) | | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=footer). Last update [204d35c...069df60](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and
[jira] [Updated] (SCB-918) serialize/deserialize based on proto model
[ https://issues.apache.org/jira/browse/SCB-918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] wujimin updated SCB-918: Summary: serialize/deserialize based on proto model (was: serialize based on proto model) > serialize/deserialize based on proto model > -- > > Key: SCB-918 > URL: https://issues.apache.org/jira/browse/SCB-918 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: wujimin >Priority: Major > Fix For: java-chassis-1.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-74) POJO static method is export as an operation
[ https://issues.apache.org/jira/browse/SCB-74?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16630404#comment-16630404 ] ASF GitHub Bot commented on SCB-74: --- wujimin closed pull request #925: [SCB-74] POJO static method is export as an operation URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/925 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/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/ConsumerMain.java b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/ConsumerMain.java index 37e5df892..db9c1fcc4 100644 --- a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/ConsumerMain.java +++ b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/ConsumerMain.java @@ -27,6 +27,7 @@ import org.apache.servicecomb.it.testcase.TestDefaultJsonValueJaxrsSchema; import org.apache.servicecomb.it.testcase.TestDefaultValue; import org.apache.servicecomb.it.testcase.TestIgnoreMethod; +import org.apache.servicecomb.it.testcase.TestIgnoreStaticMethod; import org.apache.servicecomb.it.testcase.TestParamCodec; import org.apache.servicecomb.it.testcase.TestParamCodecEdge; import org.apache.servicecomb.it.testcase.TestRestServerConfig; @@ -65,7 +66,7 @@ protected static void run() throws Throwable { // if not ready, will start a new instance and wait for ready deploys.getEdge().ensureReady(); // deploys.getZuul().ensureReady(zuul); - +ITJUnitUtils.run(TestIgnoreStaticMethod.class); ITJUnitUtils.run(TestIgnoreMethod.class); ITJUnitUtils.run(TestApiParam.class); diff --git a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/schema/IgnoreStaticMethodJaxrsSchema.java b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/schema/IgnoreStaticMethodJaxrsSchema.java new file mode 100644 index 0..74ed1c6ba --- /dev/null +++ b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/schema/IgnoreStaticMethodJaxrsSchema.java @@ -0,0 +1,33 @@ +package org.apache.servicecomb.it.schema; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.QueryParam; + +import org.apache.servicecomb.provider.rest.common.RestSchema; + +@RestSchema(schemaId = "ignoreStaticMethodJaxrsSchema") +@Path("/ignoreStaticMethodJaxrsSchema") +public class IgnoreStaticMethodJaxrsSchema { + + private IgnoreStaticMethodJaxrsSchema() { + } + + private static IgnoreStaticMethodJaxrsSchema INSTANCE = new IgnoreStaticMethodJaxrsSchema(); + + public static IgnoreStaticMethodJaxrsSchema getINSTANCE() { +return INSTANCE; + } + + @GET + @Path("staticSub") + public static int staticSub(@QueryParam("num1") int num1, @QueryParam("num2") int num2) { +return num1 - num2; + } + + @GET + @Path("add") + public int add(@QueryParam("num1") int num1, @QueryParam("num2") int num2) { +return num1 + num2; + } +} diff --git a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/schema/IgnoreStaticMethodPojoSchema.java b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/schema/IgnoreStaticMethodPojoSchema.java new file mode 100644 index 0..f84b56fa5 --- /dev/null +++ b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/schema/IgnoreStaticMethodPojoSchema.java @@ -0,0 +1,27 @@ +package org.apache.servicecomb.it.schema; + +import org.apache.servicecomb.provider.pojo.RpcSchema; + +import io.swagger.annotations.SwaggerDefinition; + +@RpcSchema(schemaId = "ignoreStaticMethodPojoSchema") +@SwaggerDefinition(basePath = "/ignoreStaticMethodPojoSchema") +public class IgnoreStaticMethodPojoSchema { + + private IgnoreStaticMethodPojoSchema() { + } + + private static IgnoreStaticMethodPojoSchema INSTANCE = new IgnoreStaticMethodPojoSchema(); + + public static IgnoreStaticMethodPojoSchema getINSTANCE() { +return INSTANCE; + } + + public static int staticSub(int num1, int num2) { +return num1 - num2; + } + + public int add(int num1, int num2) { +return num1 + num2; + } +} diff --git a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/schema/IgnoreStaticMethodSpringmvcSchema.java b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/schema/IgnoreStaticMethodSpringmvcSchema.java new file mode 100644 index 0..5c46082a5 --- /dev/null +++ b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/schema/IgnoreStaticMethodSpringmvcSchema.java @@ -0,0 +1,29 @@ +package org.apache.servicecomb.it.schema; + +import org.apache.servicecomb.provider.rest.common.RestSchema; +import
[jira] [Commented] (SCB-941) Support multiple datacenter deployment
[ https://issues.apache.org/jira/browse/SCB-941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16630297#comment-16630297 ] ASF GitHub Bot commented on SCB-941: codecov-io commented on issue #451: SCB-941 Support multiple datacenter deployment URL: https://github.com/apache/incubator-servicecomb-service-center/pull/451#issuecomment-425070687 # [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=h1) Report > Merging [#451](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=desc) into [master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/204d35cc4a02b447fcbb55f83d824fa1bcddba27?src=pr=desc) will **increase** coverage by `0.07%`. > The diff coverage is `45.88%`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/graphs/tree.svg?width=650=GAaF7zrg8R=150=pr)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=tree) ```diff @@Coverage Diff @@ ## master #451 +/- ## == + Coverage 59.95% 60.03% +0.07% == Files 149 156 +7 Lines 1318313388 +205 == + Hits 7904 8037 +133 - Misses 4703 4776 +73 + Partials 576 575 -1 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=tree) | Coverage Δ | | |---|---|---| | [server/service/tag\_validator.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdGFnX3ZhbGlkYXRvci5nbw==) | `100% <ø> (ø)` | :arrow_up: | | [server/service/rule\_validator.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvcnVsZV92YWxpZGF0b3IuZ28=) | `100% <ø> (ø)` | :arrow_up: | | [server/plugin/pkg/discovery/types.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvZGlzY292ZXJ5L3R5cGVzLmdv) | `77.77% <ø> (ø)` | | | [server/plugin/pkg/registry/etcd/logger.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvcmVnaXN0cnkvZXRjZC9sb2dnZXIuZ28=) | `80.76% <ø> (ø)` | | | [server/plugin/pkg/registry/etcd/metrics.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvcmVnaXN0cnkvZXRjZC9tZXRyaWNzLmdv) | `100% <ø> (ø)` | | | [server/service/schema\_validator.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2Uvc2NoZW1hX3ZhbGlkYXRvci5nbw==) | `100% <ø> (ø)` | :arrow_up: | | [server/plugin/pkg/tls/buildin/tls.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvdGxzL2J1aWxkaW4vdGxzLmdv) | `82.08% <ø> (ø)` | | | [server/plugin/pkg/discovery/etcd/watcher\_inner.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvZGlzY292ZXJ5L2V0Y2Qvd2F0Y2hlcl9pbm5lci5nbw==) | `100% <ø> (ø)` | | | [server/plugin/pkg/registry/etcd/tracing.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvcmVnaXN0cnkvZXRjZC90cmFjaW5nLmdv) | `81.81% <ø> (ø)` | | | [server/plugin/pkg/tracing/buildin/common.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree#diff-c2VydmVyL3BsdWdpbi9wa2cvdHJhY2luZy9idWlsZGluL2NvbW1vbi5nbw==) | `80% <ø> (ø)` | | | ... and [84 more](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451/diff?src=pr=tree-more) | | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=footer). Last update [204d35c...10c8d39](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/451?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the
[jira] [Commented] (SCB-941) Support multiple datacenter deployment
[ https://issues.apache.org/jira/browse/SCB-941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16630298#comment-16630298 ] ASF GitHub Bot commented on SCB-941: coveralls commented on issue #451: SCB-941 Support multiple datacenter deployment URL: https://github.com/apache/incubator-servicecomb-service-center/pull/451#issuecomment-425070801 [![Coverage Status](https://coveralls.io/builds/19223247/badge)](https://coveralls.io/builds/19223247) Coverage increased (+0.07%) to 62.433% when pulling **10c8d39aacc3ebbc1d64c63213c128abd81f2450 on little-cui:dc** into **204d35cc4a02b447fcbb55f83d824fa1bcddba27 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 > Support multiple datacenter deployment > -- > > Key: SCB-941 > URL: https://issues.apache.org/jira/browse/SCB-941 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > Fix For: service-center-1.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-943) make ProduceJsonProcessor,DefaultHttpClientFilter,ServerRestArgsFilter changable
[ https://issues.apache.org/jira/browse/SCB-943?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16630244#comment-16630244 ] ASF GitHub Bot commented on SCB-943: liubao68 opened a new pull request #929: [SCB-943]make ProduceJsonProcessor,DefaultHttpClientFilter,ServerRestArgsFilter changable URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/929 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 > make ProduceJsonProcessor,DefaultHttpClientFilter,ServerRestArgsFilter > changable > > > Key: SCB-943 > URL: https://issues.apache.org/jira/browse/SCB-943 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: liubao >Assignee: liubao >Priority: Major > > In user customized scenario, they want to change the default behavior of > ProduceJsonProcessor,DefaultHttpClientFilter,ServerRestArgsFilter -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SCB-943) make ProduceJsonProcessor,DefaultHttpClientFilter,ServerRestArgsFilter changable
liubao created SCB-943: -- Summary: make ProduceJsonProcessor,DefaultHttpClientFilter,ServerRestArgsFilter changable Key: SCB-943 URL: https://issues.apache.org/jira/browse/SCB-943 Project: Apache ServiceComb Issue Type: Improvement Components: Java-Chassis Reporter: liubao Assignee: liubao In user customized scenario, they want to change the default behavior of ProduceJsonProcessor,DefaultHttpClientFilter,ServerRestArgsFilter -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SCB-931) upgrade vert.x to fix some know issues
[ https://issues.apache.org/jira/browse/SCB-931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] liubao resolved SCB-931. Resolution: Fixed Fix Version/s: java-chassis-1.1.0 > upgrade vert.x to fix some know issues > -- > > Key: SCB-931 > URL: https://issues.apache.org/jira/browse/SCB-931 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: liubao >Assignee: liubao >Priority: Major > Fix For: java-chassis-1.1.0 > > > Know issues: > # excpeptionHandler not property executed. > [https://github.com/eclipse-vertx/vert.x/issues/2368] > > # route handler concurrent problems. > [https://github.com/vert-x3/vertx-web/pull/739] > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SCB-933) Revert changes to RestObjectMapper that fail on primitive types not present
[ https://issues.apache.org/jira/browse/SCB-933?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] liubao resolved SCB-933. Resolution: Fixed Fix Version/s: java-chassis-1.1.0 > Revert changes to RestObjectMapper that fail on primitive types not present > --- > > Key: SCB-933 > URL: https://issues.apache.org/jira/browse/SCB-933 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0 >Reporter: liubao >Assignee: liubao >Priority: Major > Fix For: java-chassis-1.1.0 > > > This modification will cause compatible issues. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SCB-942) choose the highest priority from all implementation classes
laijianbin created SCB-942: -- Summary: choose the highest priority from all implementation classes Key: SCB-942 URL: https://issues.apache.org/jira/browse/SCB-942 Project: Apache ServiceComb Issue Type: Task Reporter: laijianbin Assignee: laijianbin -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Closed] (SCB-932) Time jump cause the new request injected
[ https://issues.apache.org/jira/browse/SCB-932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] laijianbin closed SCB-932. -- Resolution: Fixed > Time jump cause the new request injected > > > Key: SCB-932 > URL: https://issues.apache.org/jira/browse/SCB-932 > Project: Apache ServiceComb > Issue Type: Task >Reporter: laijianbin >Assignee: laijianbin >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-936) Encoded slash '/' is decoded in EdgeService, causing 404 error response
[ https://issues.apache.org/jira/browse/SCB-936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16630166#comment-16630166 ] ASF GitHub Bot commented on SCB-936: yhs0092 commented on a change in pull request #924: [SCB-936] encode slash in path param URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/924#discussion_r220875268 ## File path: integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/testcase/TestDataTypePrimitive.java ## @@ -395,9 +390,9 @@ public void intPath_springmvc_rt() { @Test public void stringPath_springmvc_rt() { -String expect = "serviceComb"; +String expect = "serviceComb%2FserviceComb"; assertEquals(expect, -(String) consumersSpringmvc.getSCBRestTemplate().getForObject("/stringPath/" + expect, String.class)); +consumersSpringmvc.getSCBRestTemplate().getForObject("/stringPath/" + expect, String.class)); Review comment: I split `stringPath_jaxrs_rt` into `stringPath_jaxrs_rt` and `stringPath_jaxrs_rt_with_encoded_slash` because I think `stringPath_jaxrs_rt_with_encoded_slash` uses new param type, it worth a separate test. 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 > Encoded slash '/' is decoded in EdgeService, causing 404 error response > --- > > Key: SCB-936 > URL: https://issues.apache.org/jira/browse/SCB-936 > Project: Apache ServiceComb > Issue Type: New Feature >Reporter: YaoHaishi >Assignee: YaoHaishi >Priority: Major > > When users invoke a provider via EdgeService, and the path param of request > contains %2F(the encoded slash '/'), EdgeService will decode %2F into '/' and > pass it to backend service without encoding it, causing 404 response. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-936) Encoded slash '/' is decoded in EdgeService, causing 404 error response
[ https://issues.apache.org/jira/browse/SCB-936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16630114#comment-16630114 ] ASF GitHub Bot commented on SCB-936: coveralls edited a comment on issue #924: [SCB-936] encode slash in path param URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/924#issuecomment-424322515 [![Coverage Status](https://coveralls.io/builds/19221231/badge)](https://coveralls.io/builds/19221231) Coverage increased (+0.01%) to 86.231% when pulling **a487e6db4200df931babc07b869053beecfeb49e on yhs0092:add_path_param_encode_for_slash** into **7588d90894c10a9f94d4f589e543ee14a7d0c272 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 > Encoded slash '/' is decoded in EdgeService, causing 404 error response > --- > > Key: SCB-936 > URL: https://issues.apache.org/jira/browse/SCB-936 > Project: Apache ServiceComb > Issue Type: New Feature >Reporter: YaoHaishi >Assignee: YaoHaishi >Priority: Major > > When users invoke a provider via EdgeService, and the path param of request > contains %2F(the encoded slash '/'), EdgeService will decode %2F into '/' and > pass it to backend service without encoding it, causing 404 response. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-922) collect Getter/Setter from pojo
[ https://issues.apache.org/jira/browse/SCB-922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16630069#comment-16630069 ] ASF GitHub Bot commented on SCB-922: coveralls commented on issue #928: [SCB-922] collect Getter/Setter from pojo URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/928#issuecomment-425027916 [![Coverage Status](https://coveralls.io/builds/19220745/badge)](https://coveralls.io/builds/19220745) Coverage decreased (-0.09%) to 86.128% when pulling **fe8f8fc0016f3e0856be051fbd39d36eb6df1f9d on wujimin:collect-getter-setter-from-pojo** into **7588d90894c10a9f94d4f589e543ee14a7d0c272 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 > collect Getter/Setter from pojo > --- > > Key: SCB-922 > URL: https://issues.apache.org/jira/browse/SCB-922 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: wujimin >Priority: Major > Fix For: java-chassis-1.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-941) Support multiple datacenter deployment
[ https://issues.apache.org/jira/browse/SCB-941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16630065#comment-16630065 ] ASF GitHub Bot commented on SCB-941: little-cui opened a new pull request #451: SCB-941 Support multiple datacenter deployment URL: https://github.com/apache/incubator-servicecomb-service-center/pull/451 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 `go build` `go test` `go fmt` `go vet` 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 > Support multiple datacenter deployment > -- > > Key: SCB-941 > URL: https://issues.apache.org/jira/browse/SCB-941 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > Fix For: service-center-1.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SCB-910) Java Chassis support spring boot 2.0
[ https://issues.apache.org/jira/browse/SCB-910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] yangyongzheng resolved SCB-910. --- Resolution: Fixed > Java Chassis support spring boot 2.0 > > > Key: SCB-910 > URL: https://issues.apache.org/jira/browse/SCB-910 > Project: Apache ServiceComb > Issue Type: Bug > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0 >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > Fix For: java-chassis-1.1.0 > > > Java Chassis support both spring boot 1.5.x and spring boot 2.0.x -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-936) Encoded slash '/' is decoded in EdgeService, causing 404 error response
[ https://issues.apache.org/jira/browse/SCB-936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16630055#comment-16630055 ] ASF GitHub Bot commented on SCB-936: yhs0092 commented on a change in pull request #924: [SCB-936] encode slash in path param URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/924#discussion_r220855988 ## File path: integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/testcase/TestDataTypePrimitive.java ## @@ -395,9 +390,9 @@ public void intPath_springmvc_rt() { @Test public void stringPath_springmvc_rt() { -String expect = "serviceComb"; +String expect = "serviceComb%2FserviceComb"; assertEquals(expect, -(String) consumersSpringmvc.getSCBRestTemplate().getForObject("/stringPath/" + expect, String.class)); +consumersSpringmvc.getSCBRestTemplate().getForObject("/stringPath/" + expect, String.class)); Review comment: Spring `HierarchicalUriComponents` does duplicated encoding. As a result, the path param actually sent is "serviceComb%252FserviceComb". To send an encoded slash, we need to build a Uri to specify path param. 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 > Encoded slash '/' is decoded in EdgeService, causing 404 error response > --- > > Key: SCB-936 > URL: https://issues.apache.org/jira/browse/SCB-936 > Project: Apache ServiceComb > Issue Type: New Feature >Reporter: YaoHaishi >Assignee: YaoHaishi >Priority: Major > > When users invoke a provider via EdgeService, and the path param of request > contains %2F(the encoded slash '/'), EdgeService will decode %2F into '/' and > pass it to backend service without encoding it, causing 404 response. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-922) collect Getter/Setter from pojo
[ https://issues.apache.org/jira/browse/SCB-922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16630028#comment-16630028 ] ASF GitHub Bot commented on SCB-922: wujimin opened a new pull request #928: [SCB-922] collect Getter/Setter from pojo URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/928 prepare for protobuf codec not use this feature yet. 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 > collect Getter/Setter from pojo > --- > > Key: SCB-922 > URL: https://issues.apache.org/jira/browse/SCB-922 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: wujimin >Priority: Major > Fix For: java-chassis-1.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)