[GitHub] WillemJiang closed pull request #237: [SCB-785] 支持在补偿方法里得到当前分布式事务的全局事务ID及本地事务ID
WillemJiang closed pull request #237: [SCB-785] 支持在补偿方法里得到当前分布式事务的全局事务ID及本地事务ID URL: https://github.com/apache/incubator-servicecomb-saga/pull/237 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/omega/omega-connector/omega-connector-grpc/pom.xml b/omega/omega-connector/omega-connector-grpc/pom.xml index 7a140975..9569514f 100644 --- a/omega/omega-connector/omega-connector-grpc/pom.xml +++ b/omega/omega-connector/omega-connector-grpc/pom.xml @@ -37,6 +37,11 @@ io.grpc grpc-protobuf + + io.grpc + grpc-stub + test + io.grpc grpc-netty diff --git a/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/CompensationContext.java b/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/CompensationContext.java index cf16888a..0823240a 100644 --- a/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/CompensationContext.java +++ b/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/CompensationContext.java @@ -30,6 +30,11 @@ private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); private final Map contexts = new ConcurrentHashMap<>(); + private final OmegaContext omegaContext; + + public CompensationContext(OmegaContext omegaContext) { +this.omegaContext = omegaContext; + } public void addCompensationContext(Method compensationMethod, Object target) { compensationMethod.setAccessible(true); @@ -39,7 +44,11 @@ public void addCompensationContext(Method compensationMethod, Object target) { public void apply(String globalTxId, String localTxId, String compensationMethod, Object... payloads) { CompensationContextInternal contextInternal = contexts.get(compensationMethod); +String oldGlobalTxId = omegaContext.globalTxId(); +String oldLocalTxId= omegaContext.localTxId(); try { + omegaContext.setGlobalTxId(globalTxId); + omegaContext.setLocalTxId(localTxId); contextInternal.compensationMethod.invoke(contextInternal.target, payloads); LOG.info("Compensated transaction with global tx id [{}], local tx id [{}]", globalTxId, localTxId); } catch (IllegalAccessException | InvocationTargetException e) { @@ -47,6 +56,9 @@ public void apply(String globalTxId, String localTxId, String compensationMethod "Pre-checking for compensation method " + contextInternal.compensationMethod.toString() + " was somehow skipped, did you forget to configure compensable method checking on service startup?", e); +} finally { + omegaContext.setGlobalTxId(oldGlobalTxId); + omegaContext.setLocalTxId(oldLocalTxId); } } diff --git a/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/OmegaSpringConfig.java b/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/OmegaSpringConfig.java index aaf67f64..ec4ced35 100644 --- a/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/OmegaSpringConfig.java +++ b/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/OmegaSpringConfig.java @@ -52,8 +52,8 @@ OmegaContext omegaContext(@Qualifier("omegaUniqueIdGenerator") IdGenerator messages = new ArrayList<>(); @Bean -CompensationContext recoveryContext() { - return new CompensationContext(); +CompensationContext recoveryContext(OmegaContext omegaContext) { + return new CompensationContext(omegaContext); } @Bean diff --git a/pom.xml b/pom.xml index e99b71eb..d21734b5 100644 --- a/pom.xml +++ b/pom.xml @@ -61,7 +61,7 @@ 2.5.6 0.12 2.19.1 -1.11.0 +1.14.0 4.0.1 1.2 2.7.1 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] WillemJiang commented on issue #237: [SCB-785] 支持在补偿方法里得到当前分布式事务的全局事务ID及本地事务ID
WillemJiang commented on issue #237: [SCB-785] 支持在补偿方法里得到当前分布式事务的全局事务ID及本地事务ID URL: https://github.com/apache/incubator-servicecomb-saga/pull/237#issuecomment-411966813 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
[incubator-servicecomb-saga] 02/02: SCB-785 Fixed the grpc-stub dependency issue
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 commit 97e856fe9e5b77947faf0daedf1db9c45d6f56a0 Author: Willem Jiang AuthorDate: Fri Aug 10 11:21:08 2018 +0800 SCB-785 Fixed the grpc-stub dependency issue --- omega/omega-connector/omega-connector-grpc/pom.xml | 5 - 1 file changed, 5 deletions(-) diff --git a/omega/omega-connector/omega-connector-grpc/pom.xml b/omega/omega-connector/omega-connector-grpc/pom.xml index 9569514..7a14097 100644 --- a/omega/omega-connector/omega-connector-grpc/pom.xml +++ b/omega/omega-connector/omega-connector-grpc/pom.xml @@ -39,11 +39,6 @@ io.grpc - grpc-stub - test - - - io.grpc grpc-netty
[incubator-servicecomb-saga] branch master updated (2431bf5 -> 97e856f)
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git. from 2431bf5 SCB-830 update chassis from 1.0.0-m2 to 1.0.0 (#247) new 279fd30 SCB-785 Support to get the globalTxId and localTxId when the componsation method is called. new 97e856f SCB-785 Fixed the grpc-stub dependency issue The 2 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/saga/omega/context/CompensationContext.java | 12 .../servicecomb/saga/omega/spring/OmegaSpringConfig.java | 4 ++-- .../transaction/spring/TransactionInterceptionTest.java | 4 ++-- 3 files changed, 16 insertions(+), 4 deletions(-)
[incubator-servicecomb-saga] 01/02: SCB-785 Support to get the globalTxId and localTxId when the componsation method is called.
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 commit 279fd30f9027f52814780e946d99ed031103ace7 Author: jeremy-xu AuthorDate: Sun Jul 29 23:03:51 2018 +0800 SCB-785 Support to get the globalTxId and localTxId when the componsation method is called. 1. 补偿方法里通过omegaContext.globalTxId()和omegaContext.localTxId()可得到当前分布式事务的全局事务ID及本地事务ID --- omega/omega-connector/omega-connector-grpc/pom.xml | 5 + .../servicecomb/saga/omega/context/CompensationContext.java | 12 .../servicecomb/saga/omega/spring/OmegaSpringConfig.java | 4 ++-- .../transaction/spring/TransactionInterceptionTest.java | 4 ++-- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/omega/omega-connector/omega-connector-grpc/pom.xml b/omega/omega-connector/omega-connector-grpc/pom.xml index 7a14097..9569514 100644 --- a/omega/omega-connector/omega-connector-grpc/pom.xml +++ b/omega/omega-connector/omega-connector-grpc/pom.xml @@ -39,6 +39,11 @@ io.grpc + grpc-stub + test + + + io.grpc grpc-netty diff --git a/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/CompensationContext.java b/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/CompensationContext.java index cf16888..0823240 100644 --- a/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/CompensationContext.java +++ b/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/CompensationContext.java @@ -30,6 +30,11 @@ public class CompensationContext { private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); private final Map contexts = new ConcurrentHashMap<>(); + private final OmegaContext omegaContext; + + public CompensationContext(OmegaContext omegaContext) { +this.omegaContext = omegaContext; + } public void addCompensationContext(Method compensationMethod, Object target) { compensationMethod.setAccessible(true); @@ -39,7 +44,11 @@ public class CompensationContext { public void apply(String globalTxId, String localTxId, String compensationMethod, Object... payloads) { CompensationContextInternal contextInternal = contexts.get(compensationMethod); +String oldGlobalTxId = omegaContext.globalTxId(); +String oldLocalTxId= omegaContext.localTxId(); try { + omegaContext.setGlobalTxId(globalTxId); + omegaContext.setLocalTxId(localTxId); contextInternal.compensationMethod.invoke(contextInternal.target, payloads); LOG.info("Compensated transaction with global tx id [{}], local tx id [{}]", globalTxId, localTxId); } catch (IllegalAccessException | InvocationTargetException e) { @@ -47,6 +56,9 @@ public class CompensationContext { "Pre-checking for compensation method " + contextInternal.compensationMethod.toString() + " was somehow skipped, did you forget to configure compensable method checking on service startup?", e); +} finally { + omegaContext.setGlobalTxId(oldGlobalTxId); + omegaContext.setLocalTxId(oldLocalTxId); } } diff --git a/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/OmegaSpringConfig.java b/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/OmegaSpringConfig.java index afa6443..51324e7 100644 --- a/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/OmegaSpringConfig.java +++ b/omega/omega-spring-starter/src/main/java/org/apache/servicecomb/saga/omega/spring/OmegaSpringConfig.java @@ -52,8 +52,8 @@ class OmegaSpringConfig { } @Bean - CompensationContext compensationContext() { -return new CompensationContext(); + CompensationContext compensationContext(OmegaContext omegaContext) { +return new CompensationContext(omegaContext); } @Bean diff --git a/omega/omega-spring-tx/src/test/java/org/apache/servicecomb/saga/omega/transaction/spring/TransactionInterceptionTest.java b/omega/omega-spring-tx/src/test/java/org/apache/servicecomb/saga/omega/transaction/spring/TransactionInterceptionTest.java index 75d5864..5f3f708 100644 --- a/omega/omega-spring-tx/src/test/java/org/apache/servicecomb/saga/omega/transaction/spring/TransactionInterceptionTest.java +++ b/omega/omega-spring-tx/src/test/java/org/apache/servicecomb/saga/omega/transaction/spring/TransactionInterceptionTest.java @@ -408,8 +408,8 @@ public class TransactionInterceptionTest { private final List messages = new ArrayList<>(); @Bean -CompensationContext recoveryContext() { - return new CompensationContext(); +CompensationContext recoveryContext(OmegaContext omegaContext) { + return new
[GitHub] wujimin commented on a change in pull request #865: [SCB-827] Add response body decoding error log
wujimin 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_r209136800 ## 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: change "extractResult" to "extractResponse"? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin commented on a change in pull request #861: [SCB-612]delete useless MicroserviceMetaManager
wujimin commented on a change in pull request #861: [SCB-612]delete useless MicroserviceMetaManager URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/861#discussion_r209136153 ## File path: core/src/test/java/org/apache/servicecomb/core/definition/schema/TestProducerSchemaFactory.java ## @@ -93,8 +90,7 @@ public static void init() { }; new MockUp() { @SuppressWarnings("unchecked") - @Mock - T getBean(String name) { + @Mock T getBean(String name) { Review comment: why change format? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin commented on a change in pull request #861: [SCB-612]delete useless MicroserviceMetaManager
wujimin commented on a change in pull request #861: [SCB-612]delete useless MicroserviceMetaManager URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/861#discussion_r209135965 ## File path: core/src/main/java/org/apache/servicecomb/core/definition/loader/SchemaLoader.java ## @@ -82,8 +73,13 @@ public SchemaMeta registerSchema(String microserviceName, String schemaId, Strin public SchemaMeta registerSchema(String microserviceName, String schemaId, Swagger swagger) { -MicroserviceMeta microserviceMeta = microserviceMetaManager.getOrCreateMicroserviceMeta(microserviceName); - +//check whether the microserviceName is right +if (!RegistryUtils.getMicroservice().getServiceName().equals(microserviceName)) { + LOGGER.error("miroserviceName : {} is different from the default microserviceName :{}", + microserviceName, + RegistryUtils.getMicroservice().getServiceName()); Review comment: still go on? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin commented on a change in pull request #861: [SCB-612]delete useless MicroserviceMetaManager
wujimin commented on a change in pull request #861: [SCB-612]delete useless MicroserviceMetaManager URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/861#discussion_r209135993 ## File path: core/src/main/java/org/apache/servicecomb/core/definition/schema/ProducerSchemaFactory.java ## @@ -77,7 +77,14 @@ public void setSwaggerEnv(SwaggerEnvironment swaggerEnv) { public SchemaMeta getOrCreateProducerSchema(String microserviceName, String schemaId, Class producerClass, Object producerInstance) { -MicroserviceMeta microserviceMeta = microserviceMetaManager.getOrCreateMicroserviceMeta(microserviceName); + +if (!RegistryUtils.getMicroservice().getServiceName().equals(microserviceName)) { + LOGGER.error("miroserviceName : {} is different from the default microserviceName :{}", + microserviceName, + RegistryUtils.getMicroservice().getServiceName()); Review comment: .. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin commented on a change in pull request #861: [SCB-612]delete useless MicroserviceMetaManager
wujimin commented on a change in pull request #861: [SCB-612]delete useless MicroserviceMetaManager URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/861#discussion_r209135870 ## File path: core/src/main/java/org/apache/servicecomb/core/definition/loader/SchemaListenerManager.java ## @@ -74,12 +71,22 @@ public void notifySchemaListener(List schemaMetaList) { } public SchemaMeta ensureFindSchemaMeta(String microserviceName, String schemaId) { -MicroserviceMeta microserviceMeta = microserviceMetaManager.ensureFindValue(microserviceName); +if (!RegistryUtils.getMicroservice().getServiceName().equals(microserviceName)) { + LOGGER.error("miroserviceName : {} is different from the default microserviceName :{}", + microserviceName, + RegistryUtils.getMicroservice().getServiceName()); Review comment: still go on? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin commented on a change in pull request #861: [SCB-612]delete useless MicroserviceMetaManager
wujimin commented on a change in pull request #861: [SCB-612]delete useless MicroserviceMetaManager URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/861#discussion_r209135912 ## File path: core/src/main/java/org/apache/servicecomb/core/definition/loader/SchemaListenerManager.java ## @@ -74,12 +71,22 @@ public void notifySchemaListener(List schemaMetaList) { } public SchemaMeta ensureFindSchemaMeta(String microserviceName, String schemaId) { -MicroserviceMeta microserviceMeta = microserviceMetaManager.ensureFindValue(microserviceName); +if (!RegistryUtils.getMicroservice().getServiceName().equals(microserviceName)) { + LOGGER.error("miroserviceName : {} is different from the default microserviceName :{}", + microserviceName, + RegistryUtils.getMicroservice().getServiceName()); +} +MicroserviceMeta microserviceMeta = SCBEngine.getInstance().getProducerMicroMeta(); return microserviceMeta.ensureFindSchemaMeta(schemaId); } public Collection getAllSchemaMeta(String microserviceName) { -MicroserviceMeta microserviceMeta = microserviceMetaManager.ensureFindValue(microserviceName); +if (!RegistryUtils.getMicroservice().getServiceName().equals(microserviceName)) { + LOGGER.error("miroserviceName : {} is different from the default microserviceName :{}", + microserviceName, + RegistryUtils.getMicroservice().getServiceName()); Review comment: still go on? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin commented on a change in pull request #861: [SCB-612]delete useless MicroserviceMetaManager
wujimin commented on a change in pull request #861: [SCB-612]delete useless MicroserviceMetaManager URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/861#discussion_r209135568 ## File path: common/common-rest/src/test/java/org/apache/servicecomb/common/rest/TestAbstractRestInvocation.java ## @@ -68,14 +66,14 @@ import com.google.common.eventbus.EventBus; import com.google.common.eventbus.Subscribe; - -import io.vertx.core.buffer.Buffer; import mockit.Deencapsulation; import mockit.Expectations; import mockit.Mock; import mockit.MockUp; import mockit.Mocked; +import io.vertx.core.buffer.Buffer; Review comment: did not import correct codestyle? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin commented on a change in pull request #861: [SCB-612]delete useless MicroserviceMetaManager
wujimin commented on a change in pull request #861: [SCB-612]delete useless MicroserviceMetaManager URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/861#discussion_r209135467 ## File path: common/common-rest/src/main/java/org/apache/servicecomb/common/rest/RestEngineSchemaListener.java ## @@ -20,34 +20,24 @@ import java.util.HashMap; import java.util.Map; -import javax.inject.Inject; - import org.apache.servicecomb.common.rest.locator.ServicePathManager; import org.apache.servicecomb.core.BootListener; +import org.apache.servicecomb.core.SCBEngine; import org.apache.servicecomb.core.definition.MicroserviceMeta; -import org.apache.servicecomb.core.definition.MicroserviceMetaManager; import org.apache.servicecomb.core.definition.SchemaMeta; import org.apache.servicecomb.core.definition.loader.SchemaListener; -import org.apache.servicecomb.serviceregistry.RegistryUtils; import org.springframework.stereotype.Component; @Component public class RestEngineSchemaListener implements SchemaListener, BootListener { - private MicroserviceMetaManager microserviceMetaManager; - - @Inject - public void setMicroserviceMetaManager(MicroserviceMetaManager microserviceMetaManager) { -this.microserviceMetaManager = microserviceMetaManager; - } @Override public void onBootEvent(BootEvent event) { if (!event.getEventType().equals(EventType.BEFORE_REGISTRY)) { return; } -MicroserviceMeta microserviceMeta = - microserviceMetaManager.getOrCreateMicroserviceMeta(RegistryUtils.getMicroservice()); +MicroserviceMeta microserviceMeta = SCBEngine.getInstance().getProducerMicroMeta(); Review comment: getProducerMicroserviceMeta? 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 #866: [SCB-828]In some tomcat implementation inputstream available is null
coveralls edited a comment on issue #866: [SCB-828]In some tomcat implementation inputstream available is null URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/866#issuecomment-411789185 [![Coverage Status](https://coveralls.io/builds/18419079/badge)](https://coveralls.io/builds/18419079) Coverage increased (+1.4%) to 86.456% when pulling **203fe0c6e21dbc690acaa6e2c18e11cf203d426d on liubao68:available** into **3edca801fe18fd6f93805bdf97f62aae58c99284 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] WillemJiang closed pull request #247: [SCB-830] update chassis from 1.0.0-m2 to 1.0.0
WillemJiang closed pull request #247: [SCB-830] update chassis from 1.0.0-m2 to 1.0.0 URL: https://github.com/apache/incubator-servicecomb-saga/pull/247 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/pom.xml b/pom.xml index 9597b3bf..bd532cec 100644 --- a/pom.xml +++ b/pom.xml @@ -57,7 +57,7 @@ 2.6.1 1.5.14.RELEASE 2.0.3.RELEASE -1.0.0-m2 +1.0.0 4.3.18.RELEASE 2.5.6 0.12 @@ -72,7 +72,6 @@ 1.1.1 3.0.2 2.0.7.Final -1.0.0-m2 4.1.24.Final 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-830 update chassis from 1.0.0-m2 to 1.0.0 (#247)
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 2431bf5 SCB-830 update chassis from 1.0.0-m2 to 1.0.0 (#247) 2431bf5 is described below commit 2431bf578881759332b3bd7868bdc48a9fe346f4 Author: zhengyangyong AuthorDate: Fri Aug 10 10:35:43 2018 +0800 SCB-830 update chassis from 1.0.0-m2 to 1.0.0 (#247) Signed-off-by: zhengyangyong --- pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 9597b3b..bd532ce 100644 --- a/pom.xml +++ b/pom.xml @@ -57,7 +57,7 @@ 2.6.1 1.5.14.RELEASE 2.0.3.RELEASE -1.0.0-m2 +1.0.0 4.3.18.RELEASE 2.5.6 0.12 @@ -72,7 +72,6 @@ 1.1.1 3.0.2 2.0.7.Final -1.0.0-m2 4.1.24.Final
[GitHub] coveralls commented on issue #247: [SCB-830] update chassis from 1.0.0-m2 to 1.0.0
coveralls commented on issue #247: [SCB-830] update chassis from 1.0.0-m2 to 1.0.0 URL: https://github.com/apache/incubator-servicecomb-saga/pull/247#issuecomment-411957237 [![Coverage Status](https://coveralls.io/builds/18418800/badge)](https://coveralls.io/builds/18418800) Coverage increased (+0.3%) to 94.379% when pulling **35d98a432c330ccb6fd9d2a8ddea1368758b60f0 on zhengyangyong:SCB-830** into **0069792dbffe6efaf6c172f51fac10af8da4c53e 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-java-chassis] 05/06: [SCB-793] make class-path in manifest.mf standard
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 6ff2f4dfc11716ff1c2f246011b403abdcbccda9 Author: wujimin AuthorDate: Thu Aug 9 10:57:37 2018 +0800 [SCB-793] make class-path in manifest.mf standard --- integration-tests/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 9089eef..9ec78a8 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -187,7 +187,7 @@ repository true - /${settings.localRepository}/ + file:///${settings.localRepository}/ ${it.main}
[incubator-servicecomb-java-chassis] 01/06: [SCB-793] SCBEngine output log after ready, that makes easier to check if a microservice instance is ready by read log.
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 5c6216ffcfb20221cf783084b2e296735e37bee3 Author: wujimin AuthorDate: Wed Aug 8 21:58:48 2018 +0800 [SCB-793] SCBEngine output log after ready, that makes easier to check if a microservice instance is ready by read log. --- core/src/main/java/org/apache/servicecomb/core/SCBEngine.java | 1 + 1 file changed, 1 insertion(+) 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 aa42ded..6c5ccb3 100644 --- a/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java +++ b/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java @@ -155,6 +155,7 @@ public class SCBEngine { status = SCBStatus.UP; triggerEvent(EventType.AFTER_REGISTRY); EventManager.unregister(this); + LOGGER.info("ServiceComb is ready."); } } });
[GitHub] liubao68 closed pull request #864: [SCB-793] Run it-consumer during travis ci
liubao68 closed pull request #864: [SCB-793] Run it-consumer during travis ci URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/864 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/SCBEngine.java b/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java index aa42ded56..6c5ccb3ac 100644 --- a/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java +++ b/core/src/main/java/org/apache/servicecomb/core/SCBEngine.java @@ -155,6 +155,7 @@ public void afterRegistryInstance(MicroserviceInstanceRegisterTask microserviceI status = SCBStatus.UP; triggerEvent(EventType.AFTER_REGISTRY); EventManager.unregister(this); + LOGGER.info("ServiceComb is ready."); } } }); diff --git a/demo/demo-signature/src/main/java/org/apache/servicecomb/demo/signature/ClientSignature.java b/demo/demo-signature/src/main/java/org/apache/servicecomb/demo/signature/ClientSignature.java index 6acd4643d..aa715d2bc 100644 --- a/demo/demo-signature/src/main/java/org/apache/servicecomb/demo/signature/ClientSignature.java +++ b/demo/demo-signature/src/main/java/org/apache/servicecomb/demo/signature/ClientSignature.java @@ -47,7 +47,7 @@ public Response afterReceiveResponse(Invocation invocation, HttpServletResponseE String serverSignature = responseEx.getHeader("signature"); if (serverSignature != null) { - LOGGER.info("check response signature, client: {}, server: {}.", signature, serverSignature); + LOGGER.debug("check response signature, client: {}, server: {}.", signature, serverSignature); if (!signature.equals(serverSignature)) { LOGGER.error("check response signature failed"); return Response.create(Status.UNAUTHORIZED, "check response signature failed"); diff --git a/demo/demo-signature/src/main/java/org/apache/servicecomb/demo/signature/ServerSignature.java b/demo/demo-signature/src/main/java/org/apache/servicecomb/demo/signature/ServerSignature.java index 35540611a..937aa7ff6 100644 --- a/demo/demo-signature/src/main/java/org/apache/servicecomb/demo/signature/ServerSignature.java +++ b/demo/demo-signature/src/main/java/org/apache/servicecomb/demo/signature/ServerSignature.java @@ -48,7 +48,7 @@ public boolean needCacheRequest(OperationMeta operationMeta) { public Response afterReceiveRequest(Invocation invocation, HttpServletRequestEx requestEx) { String signature = SignatureUtils.genSignature(requestEx); String clientSignature = requestEx.getHeader("signature"); -LOGGER.info("check request signature, client: {}, server: {}.", clientSignature, signature); +LOGGER.debug("check request signature, client: {}, server: {}.", clientSignature, signature); if (!signature.equals(clientSignature)) { LOGGER.error("check request signature failed: {}", invocation.getInvocationQualifiedName()); return Response diff --git a/integration-tests/it-common/src/main/resources/logback.xml b/integration-tests/it-common/src/main/resources/logback.xml index dfdfa9214..d753514a0 100644 --- a/integration-tests/it-common/src/main/resources/logback.xml +++ b/integration-tests/it-common/src/main/resources/logback.xml @@ -23,7 +23,7 @@ %d [%level] [%thread] - %msg (%F:%L\)%n - + \ No newline at end of file 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 528f9728c..a52e787f5 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 @@ -39,13 +39,17 @@ public static boolean autoExit = true; public static void main(String[] args) throws Throwable { +deploys.init(); +deploys.getServiceCenter().ensureReady(); + BeanUtils.init(); ITUtils.waitBootFinished(); -deploys.init(); run(); SCBEngine.getInstance().destroy(); +deploys.getServiceCenter().stop(); + resultPrinter.print(); if (autoExit) { diff --git a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/DeployDefinition.java b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/DeployDefinition.java index dfdc15840..99becf4fc 100644 --- a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/DeployDefinition.java +++ b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/DeployDefinition.java @@ -23,6 +23,10 @@ protected String displayName; + protected
[incubator-servicecomb-java-chassis] 02/06: [SCB-793] check if deploy completed by read boot log.
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 7839fcfa7d27a9cfbe815c5de625aa69aca19229 Author: wujimin AuthorDate: Wed Aug 8 22:01:16 2018 +0800 [SCB-793] check if deploy completed by read boot log. --- .../it-common/src/main/resources/logback.xml | 2 +- .../servicecomb/it/deploy/DeployDefinition.java| 10 ++ .../servicecomb/it/deploy/MicroserviceDeploy.java | 13 --- .../apache/servicecomb/it/deploy/NormalDeploy.java | 24 - .../servicecomb/it/deploy/SubProcessLogger.java| 40 +- 5 files changed, 75 insertions(+), 14 deletions(-) diff --git a/integration-tests/it-common/src/main/resources/logback.xml b/integration-tests/it-common/src/main/resources/logback.xml index dfdfa92..d753514 100644 --- a/integration-tests/it-common/src/main/resources/logback.xml +++ b/integration-tests/it-common/src/main/resources/logback.xml @@ -23,7 +23,7 @@ %d [%level] [%thread] - %msg (%F:%L\)%n - + \ No newline at end of file diff --git a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/DeployDefinition.java b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/DeployDefinition.java index dfdc158..f685e47 100644 --- a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/DeployDefinition.java +++ b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/DeployDefinition.java @@ -23,6 +23,8 @@ public class DeployDefinition { protected String displayName; + protected String startCompleteLog; + /** * * edge as the example: @@ -57,6 +59,14 @@ public class DeployDefinition { this.displayName = displayName; } + public String getStartCompleteLog() { +return startCompleteLog; + } + + public void setStartCompleteLog(String startCompleteLog) { +this.startCompleteLog = startCompleteLog; + } + public String getCmd() { return cmd; } diff --git a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/MicroserviceDeploy.java b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/MicroserviceDeploy.java index 0276882..2892c51 100644 --- a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/MicroserviceDeploy.java +++ b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/MicroserviceDeploy.java @@ -16,6 +16,7 @@ */ package org.apache.servicecomb.it.deploy; +import org.apache.commons.lang3.ArrayUtils; import org.apache.servicecomb.it.ITUtils; import org.apache.servicecomb.serviceregistry.RegistryUtils; import org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersionRule; @@ -30,11 +31,8 @@ public class MicroserviceDeploy extends NormalDeploy { public MicroserviceDeploy(DeployDefinition deployDefinition) { super(deployDefinition); this.microserviceDeployDefinition = (MicroserviceDeployDefinition) deployDefinition; - } - @Override - public void deploy() throws Throwable { -super.deploy(); +this.microserviceDeployDefinition.setStartCompleteLog("ServiceComb is ready."); } @Override @@ -42,6 +40,12 @@ public class MicroserviceDeploy extends NormalDeploy { return new String[] {"java", "-jar", deployDefinition.getCmd()}; } + @Override + protected String[] addArgs(String[] cmds) { +return ArrayUtils.addAll(super.addArgs(cmds), +"-DselfController=" + RegistryUtils.getMicroserviceInstance().getInstanceId()); + } + public void ensureReady() throws Throwable { MicroserviceVersionRule microserviceVersionRule = RegistryUtils.getServiceRegistry().getAppManager() .getOrCreateMicroserviceVersionRule(microserviceDeployDefinition.getAppId(), @@ -53,6 +57,7 @@ public class MicroserviceDeploy extends NormalDeploy { } deploy(); +waitStartComplete(); ITUtils.waitMicroserviceReady(microserviceDeployDefinition.getAppId(), microserviceDeployDefinition.getMicroserviceName(), microserviceDeployDefinition.getVersion(), diff --git a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/NormalDeploy.java b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/NormalDeploy.java index f750f1e..146ea5e 100644 --- a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/NormalDeploy.java +++ b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/NormalDeploy.java @@ -23,7 +23,6 @@ import java.io.OutputStreamWriter; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.ArrayUtils; import org.apache.servicecomb.foundation.common.utils.JsonUtils; -import org.apache.servicecomb.serviceregistry.RegistryUtils; import
[incubator-servicecomb-java-chassis] 04/06: [SCB-793] run it-consumer during travis CI
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 3893428f7002069ff02d78be3bace584ef20a21f Author: wujimin AuthorDate: Wed Aug 8 22:19:15 2018 +0800 [SCB-793] run it-consumer during travis CI --- .../src/test/java/org/apache/servicecomb/it/TestMain.java | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/integration-tests/it-consumer/src/test/java/org/apache/servicecomb/it/TestMain.java b/integration-tests/it-consumer/src/test/java/org/apache/servicecomb/it/TestMain.java index 62c8a82..ce4b42f 100644 --- a/integration-tests/it-consumer/src/test/java/org/apache/servicecomb/it/TestMain.java +++ b/integration-tests/it-consumer/src/test/java/org/apache/servicecomb/it/TestMain.java @@ -16,13 +16,15 @@ */ package org.apache.servicecomb.it; +import org.apache.servicecomb.it.junit.ITJUnitUtils; +import org.junit.Assert; import org.junit.Test; public class TestMain { @Test - public void testMain() { -//ConsumerMain.autoExit = false; -//ConsumerMain.main(new String[] {}); -//Assert.assertTrue(ITJUnitUtils.getFailures().isEmpty()); + public void testMain() throws Throwable { +ConsumerMain.autoExit = false; +ConsumerMain.main(new String[] {}); +Assert.assertTrue(ITJUnitUtils.getFailures().isEmpty()); } }
[incubator-servicecomb-java-chassis] 03/06: [SCB-793] support deploy serviceCenter: 1.reuse existing instance 2.deploy from environment "serviceCenterHome" 3.deploy from docker
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 1c5d87b21adcc899e569bc9dc9f1447b69ca8e32 Author: wujimin AuthorDate: Wed Aug 8 22:18:09 2018 +0800 [SCB-793] support deploy serviceCenter: 1.reuse existing instance 2.deploy from environment "serviceCenterHome" 3.deploy from docker --- .../org/apache/servicecomb/it/ConsumerMain.java| 6 +- .../servicecomb/it/deploy/DeployDefinition.java| 10 +++ .../org/apache/servicecomb/it/deploy/Deploys.java | 13 ++- .../apache/servicecomb/it/deploy/NormalDeploy.java | 7 +- .../servicecomb/it/deploy/ServiceCenterDeploy.java | 96 ++ 5 files changed, 127 insertions(+), 5 deletions(-) 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 528f972..a52e787 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 @@ -39,13 +39,17 @@ public class ConsumerMain { public static boolean autoExit = true; public static void main(String[] args) throws Throwable { +deploys.init(); +deploys.getServiceCenter().ensureReady(); + BeanUtils.init(); ITUtils.waitBootFinished(); -deploys.init(); run(); SCBEngine.getInstance().destroy(); +deploys.getServiceCenter().stop(); + resultPrinter.print(); if (autoExit) { diff --git a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/DeployDefinition.java b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/DeployDefinition.java index f685e47..99becf4 100644 --- a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/DeployDefinition.java +++ b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/DeployDefinition.java @@ -25,6 +25,8 @@ public class DeployDefinition { protected String startCompleteLog; + protected String workDir; + /** * * edge as the example: @@ -67,6 +69,14 @@ public class DeployDefinition { this.startCompleteLog = startCompleteLog; } + public String getWorkDir() { +return workDir; + } + + public void setWorkDir(String workDir) { +this.workDir = workDir; + } + public String getCmd() { return cmd; } diff --git a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/Deploys.java b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/Deploys.java index aae0dad..881ae6c 100644 --- a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/Deploys.java +++ b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/Deploys.java @@ -32,11 +32,17 @@ public class Deploys { private String pomVersion; - public MicroserviceDeploy edge; + private ServiceCenterDeploy serviceCenter; - public MicroserviceDeploy baseProducer; + private MicroserviceDeploy edge; - public MicroserviceDeploy zuul; + private MicroserviceDeploy baseProducer; + + private MicroserviceDeploy zuul; + + public ServiceCenterDeploy getServiceCenter() { +return serviceCenter; + } public MicroserviceDeploy getEdge() { return edge; @@ -54,6 +60,7 @@ public class Deploys { initPomVersion(); LOGGER.info("test version: {}", pomVersion); +serviceCenter = new ServiceCenterDeploy(); initEdge(); initBaseProducer(); //initZuul(); diff --git a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/NormalDeploy.java b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/NormalDeploy.java index 146ea5e..8db1828 100644 --- a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/NormalDeploy.java +++ b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/NormalDeploy.java @@ -18,6 +18,7 @@ package org.apache.servicecomb.it.deploy; import java.io.BufferedWriter; +import java.io.File; import java.io.OutputStreamWriter; import org.apache.commons.io.IOUtils; @@ -61,7 +62,11 @@ public class NormalDeploy { } protected ProcessBuilder createProcessBuilder(String[] cmds) { -return new ProcessBuilder(cmds).redirectErrorStream(true); +ProcessBuilder processBuilder = new ProcessBuilder(cmds).redirectErrorStream(true); +if (deployDefinition.getWorkDir() != null) { + processBuilder.directory(new File(deployDefinition.getWorkDir())); +} +return processBuilder; } public void waitStartComplete() { diff --git a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/deploy/ServiceCenterDeploy.java
[incubator-servicecomb-java-chassis] 06/06: [SCB-793] make demo output less log
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 a30e796134ffbbed278365237d32775fa6c9eef5 Author: wujimin AuthorDate: Thu Aug 9 12:55:48 2018 +0800 [SCB-793] make demo output less log --- .../java/org/apache/servicecomb/demo/signature/ClientSignature.java | 2 +- .../java/org/apache/servicecomb/demo/signature/ServerSignature.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/demo-signature/src/main/java/org/apache/servicecomb/demo/signature/ClientSignature.java b/demo/demo-signature/src/main/java/org/apache/servicecomb/demo/signature/ClientSignature.java index 6acd464..aa715d2 100644 --- a/demo/demo-signature/src/main/java/org/apache/servicecomb/demo/signature/ClientSignature.java +++ b/demo/demo-signature/src/main/java/org/apache/servicecomb/demo/signature/ClientSignature.java @@ -47,7 +47,7 @@ public class ClientSignature implements HttpClientFilter { String serverSignature = responseEx.getHeader("signature"); if (serverSignature != null) { - LOGGER.info("check response signature, client: {}, server: {}.", signature, serverSignature); + LOGGER.debug("check response signature, client: {}, server: {}.", signature, serverSignature); if (!signature.equals(serverSignature)) { LOGGER.error("check response signature failed"); return Response.create(Status.UNAUTHORIZED, "check response signature failed"); diff --git a/demo/demo-signature/src/main/java/org/apache/servicecomb/demo/signature/ServerSignature.java b/demo/demo-signature/src/main/java/org/apache/servicecomb/demo/signature/ServerSignature.java index 3554061..937aa7f 100644 --- a/demo/demo-signature/src/main/java/org/apache/servicecomb/demo/signature/ServerSignature.java +++ b/demo/demo-signature/src/main/java/org/apache/servicecomb/demo/signature/ServerSignature.java @@ -48,7 +48,7 @@ public class ServerSignature implements HttpServerFilter { public Response afterReceiveRequest(Invocation invocation, HttpServletRequestEx requestEx) { String signature = SignatureUtils.genSignature(requestEx); String clientSignature = requestEx.getHeader("signature"); -LOGGER.info("check request signature, client: {}, server: {}.", clientSignature, signature); +LOGGER.debug("check request signature, client: {}, server: {}.", clientSignature, signature); if (!signature.equals(clientSignature)) { LOGGER.error("check request signature failed: {}", invocation.getInvocationQualifiedName()); return Response
[GitHub] zhengyangyong opened a new pull request #247: [SCB-830] update chassis from 1.0.0-m2 to 1.0.0
zhengyangyong opened a new pull request #247: [SCB-830] update chassis from 1.0.0-m2 to 1.0.0 URL: https://github.com/apache/incubator-servicecomb-saga/pull/247 Signed-off-by: zhengyangyong 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] WillemJiang closed pull request #246: SCB-829 An index on TxEvent (globalTxId) should be added
WillemJiang closed pull request #246: SCB-829 An index on TxEvent (globalTxId) should be added URL: https://github.com/apache/incubator-servicecomb-saga/pull/246 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/resources/schema-mysql.sql b/alpha/alpha-server/src/main/resources/schema-mysql.sql index b1598573..85522a7a 100644 --- a/alpha/alpha-server/src/main/resources/schema-mysql.sql +++ b/alpha/alpha-server/src/main/resources/schema-mysql.sql @@ -30,7 +30,8 @@ CREATE TABLE IF NOT EXISTS TxEvent ( retries int(11) NOT NULL DEFAULT '0', retryMethod varchar(256) DEFAULT NULL, PRIMARY KEY (surrogateId), - INDEX saga_events_index (surrogateId, globalTxId, localTxId, type, expiryTime) + INDEX saga_events_index (surrogateId, globalTxId, localTxId, type, expiryTime), + INDEX saga_global_tx_index (globalTxId) ) DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS Command ( diff --git a/alpha/alpha-server/src/main/resources/schema-postgresql.sql b/alpha/alpha-server/src/main/resources/schema-postgresql.sql index b3f77023..bf8244b4 100644 --- a/alpha/alpha-server/src/main/resources/schema-postgresql.sql +++ b/alpha/alpha-server/src/main/resources/schema-postgresql.sql @@ -32,6 +32,7 @@ CREATE TABLE IF NOT EXISTS TxEvent ( ); CREATE INDEX IF NOT EXISTS saga_events_index ON TxEvent (surrogateId, globalTxId, localTxId, type, expiryTime); +CREATE INDEX IF NOT EXISTS saga_global_tx_index ON TxEvent (globalTxId); CREATE TABLE IF NOT EXISTS Command ( 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-829 Add index on TxEvent(globalTxId) to improve performance (#246)
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 0069792 SCB-829 Add index on TxEvent(globalTxId) to improve performance (#246) 0069792 is described below commit 0069792dbffe6efaf6c172f51fac10af8da4c53e Author: fcg <565817...@qq.com> AuthorDate: Fri Aug 10 09:55:44 2018 +0800 SCB-829 Add index on TxEvent(globalTxId) to improve performance (#246) --- alpha/alpha-server/src/main/resources/schema-mysql.sql | 3 ++- alpha/alpha-server/src/main/resources/schema-postgresql.sql | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/alpha/alpha-server/src/main/resources/schema-mysql.sql b/alpha/alpha-server/src/main/resources/schema-mysql.sql index b159857..85522a7 100644 --- a/alpha/alpha-server/src/main/resources/schema-mysql.sql +++ b/alpha/alpha-server/src/main/resources/schema-mysql.sql @@ -30,7 +30,8 @@ CREATE TABLE IF NOT EXISTS TxEvent ( retries int(11) NOT NULL DEFAULT '0', retryMethod varchar(256) DEFAULT NULL, PRIMARY KEY (surrogateId), - INDEX saga_events_index (surrogateId, globalTxId, localTxId, type, expiryTime) + INDEX saga_events_index (surrogateId, globalTxId, localTxId, type, expiryTime), + INDEX saga_global_tx_index (globalTxId) ) DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS Command ( diff --git a/alpha/alpha-server/src/main/resources/schema-postgresql.sql b/alpha/alpha-server/src/main/resources/schema-postgresql.sql index b3f7702..bf8244b 100644 --- a/alpha/alpha-server/src/main/resources/schema-postgresql.sql +++ b/alpha/alpha-server/src/main/resources/schema-postgresql.sql @@ -32,6 +32,7 @@ CREATE TABLE IF NOT EXISTS TxEvent ( ); CREATE INDEX IF NOT EXISTS saga_events_index ON TxEvent (surrogateId, globalTxId, localTxId, type, expiryTime); +CREATE INDEX IF NOT EXISTS saga_global_tx_index ON TxEvent (globalTxId); CREATE TABLE IF NOT EXISTS Command (
[GitHub] zhengyangyong commented on a change in pull request #862: [SCB-690] add check if connection is still connected before execute invocation
zhengyangyong commented on a change in pull request #862: [SCB-690] add check if connection is still connected before execute invocation URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/862#discussion_r209123004 ## File path: transports/transport-rest/transport-rest-vertx/src/main/java/org/apache/servicecomb/transport/rest/vertx/RestServerVerticle.java ## @@ -95,17 +99,21 @@ public void start(Future startFuture) throws Exception { HttpServer httpServer = createHttpServer(); httpServer.requestHandler(mainRouter::accept); httpServer.connectionHandler(connection -> { +String address = connection.remoteAddress().toString(); Review comment: I think the port in remote address is different 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 issue #858: org.apache.servicecomb:swagger-generator-core:jar:1.0.0-m2: java.lang.NoSuchMethodError caused by dependency conflicts due to org.yaml:snakeyaml:jar
liubao68 commented on issue #858: org.apache.servicecomb:swagger-generator-core:jar:1.0.0-m2: java.lang.NoSuchMethodError caused by dependency conflicts due to org.yaml:snakeyaml:jar URL: https://github.com/apache/incubator-servicecomb-java-chassis/issues/858#issuecomment-411945166 @LeoAugust19 Why you try this option? I think from ServiceComb view, we do not have any reason for users to customize this feature, so it should be false positive. 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] oliugian opened a new pull request #246: SCB-829 An index on TxEvent (globalTxId) should be added
oliugian opened a new pull request #246: SCB-829 An index on TxEvent (globalTxId) should be added URL: https://github.com/apache/incubator-servicecomb-saga/pull/246 https://issues.apache.org/jira/browse/SCB-829 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] LeoAugust19 edited a comment on issue #858: org.apache.servicecomb:swagger-generator-core:jar:1.0.0-m2: java.lang.NoSuchMethodError caused by dependency conflicts due to org.yaml:snakeyaml:ja
LeoAugust19 edited a comment on issue #858: org.apache.servicecomb:swagger-generator-core:jar:1.0.0-m2: java.lang.NoSuchMethodError caused by dependency conflicts due to org.yaml:snakeyaml:jar URL: https://github.com/apache/incubator-servicecomb-java-chassis/issues/858#issuecomment-411780300 @liubao68 But, can this branch be satisfied actually? If not, the stack trace maybe a false positive. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] WillemJiang commented on a change in pull request #243: [SCB-823] Setup the test in kubernetes
WillemJiang commented on a change in pull request #243: [SCB-823] Setup the test in kubernetes URL: https://github.com/apache/incubator-servicecomb-saga/pull/243#discussion_r208976061 ## File path: saga-demo/saga-k8s-resources/spring-demo/jmeter.configmap.yaml ## @@ -0,0 +1,265 @@ +apiVersion: v1 Review comment: ASF License header. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] coveralls commented on issue #866: [SCB-828]In some tomcat implementation inputstream available is null
coveralls commented on issue #866: [SCB-828]In some tomcat implementation inputstream available is null URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/866#issuecomment-411789185 [![Coverage Status](https://coveralls.io/builds/18407365/badge)](https://coveralls.io/builds/18407365) Coverage decreased (-0.02%) to 85.042% when pulling **c49787090de421a7da71e60b8aced1528571eb7d on liubao68:available** into **3edca801fe18fd6f93805bdf97f62aae58c99284 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] LeoAugust19 commented on issue #858: org.apache.servicecomb:swagger-generator-core:jar:1.0.0-m2: java.lang.NoSuchMethodError caused by dependency conflicts due to org.yaml:snakeyaml:jar
LeoAugust19 commented on issue #858: org.apache.servicecomb:swagger-generator-core:jar:1.0.0-m2: java.lang.NoSuchMethodError caused by dependency conflicts due to org.yaml:snakeyaml:jar URL: https://github.com/apache/incubator-servicecomb-java-chassis/issues/858#issuecomment-411780300 @liubao68 But, does this branch can be satisfied actually? If not, the stack trace maybe a false positive. 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 #857: [SCB-802]in rollback scenario, old versions meta is used and invocation is fail
liubao68 commented on a change in pull request #857: [SCB-802]in rollback scenario, old versions meta is used and invocation is fail URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/857#discussion_r208952522 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java ## @@ -191,9 +193,30 @@ private void setInstances(List pulledInstances, String rev microserviceVersionRule.setInstances(instances); } revision = rev; + // Clean up down versions in case of rollback and other interface not compatible scenarios. Users should ensure running versions are compatible. + pack(); } } + private void pack() { +Set microservices = new HashSet<>(instances.size()); +instances.forEach(item -> { + microservices.add(item.getServiceId()); +}); +Set downSet = new HashSet<>(instances.size()); +versions.keySet().forEach(item -> { + if (!microservices.contains(item)) { +downSet.add(item); + } +}); +downSet.forEach(item -> { + MicroserviceVersion version = versions.remove(item); + for (MicroserviceVersionRule microserviceVersionRule : versionRules.values()) { +microserviceVersionRule.deleteMicroserviceVersion(version); Review comment: In order to update latestVersion, we also have to check which versions are removed. And I think it is good to remove unused version, because some of them may never used 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] LeoAugust19 commented on issue #858: org.apache.servicecomb:swagger-generator-core:jar:1.0.0-m2: java.lang.NoSuchMethodError caused by dependency conflicts due to org.yaml:snakeyaml:jar
LeoAugust19 commented on issue #858: org.apache.servicecomb:swagger-generator-core:jar:1.0.0-m2: java.lang.NoSuchMethodError caused by dependency conflicts due to org.yaml:snakeyaml:jar URL: https://github.com/apache/incubator-servicecomb-java-chassis/issues/858#issuecomment-411778109 @liubao68 I forced the condition **"if(Feature.INDENT_ARRAYS.enableIn(_formatFeatures))"** to be true in method bulidDumperOptions(), as shown in the figure. Then, the crash can be triggered. 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 #853: [SCB-787]fix ping time gap bug and add configuration to time interval
liubao68 closed pull request #853: [SCB-787]fix ping time gap bug and add configuration to time interval URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/853 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/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/Configuration.java b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/Configuration.java index 1059e2ec1..bdc38317f 100644 --- a/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/Configuration.java +++ b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/Configuration.java @@ -31,6 +31,10 @@ 2.1 configuration items public static final String PROP_ROOT = "servicecomb.loadbalance."; + public static final String RPOP_SERVER_EXPIRED_IN_SECONDS = "servicecomb.loadbalance.stats.serverExpiredInSeconds"; + + public static final String RPOP_TIMER_INTERVAL_IN_MINIS = "servicecomb.loadbalance.stats.timerIntervalInMilis"; + public static final String PROP_POLICY = "NFLoadBalancerRuleClassName"; public static final String PROP_RULE_STRATEGY_NAME = "strategy.name"; diff --git a/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/ServiceCombLoadBalancerStats.java b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/ServiceCombLoadBalancerStats.java index 8993d7cbb..1b7be1d77 100644 --- a/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/ServiceCombLoadBalancerStats.java +++ b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/ServiceCombLoadBalancerStats.java @@ -37,6 +37,7 @@ import com.google.common.cache.LoadingCache; import com.google.common.cache.RemovalListener; import com.google.common.cache.RemovalNotification; +import com.netflix.config.DynamicPropertyFactory; /** * Add special stats that com.netflix.loadbalancer.LoadBalancerStats not provided @@ -46,9 +47,11 @@ private final Map pingView = new ConcurrentHashMap<>(); - private int serverExpireInSeconds = 10 * 60; + private int serverExpireInSeconds = DynamicPropertyFactory.getInstance() + .getIntProperty(Configuration.RPOP_SERVER_EXPIRED_IN_SECONDS, 300).get(); - private long timerIntervalInMilis = 1; + private long timerIntervalInMilis = DynamicPropertyFactory.getInstance() + .getLongProperty(Configuration.RPOP_TIMER_INTERVAL_IN_MINIS, 1).get(); private LoadingCache serverStatsCache; @@ -154,7 +157,7 @@ public void run() { while (instances.hasNext()) { ServiceCombServer server = instances.next(); ServiceCombServerStats stats = allServers.get(server); -if ((System.currentTimeMillis() - stats.getLastVisitTime() < timerIntervalInMilis) && !ping +if ((System.currentTimeMillis() - stats.getLastVisitTime() > timerIntervalInMilis) && !ping .ping(server.getInstance())) { LOGGER.info("ping mark server {} failure.", server.getInstance().getInstanceId()); stats.markFailure(); diff --git a/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestServiceCombLoadBalancerStats.java b/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestServiceCombLoadBalancerStats.java index 3602977cb..11dfe77bb 100644 --- a/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestServiceCombLoadBalancerStats.java +++ b/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestServiceCombLoadBalancerStats.java @@ -23,31 +23,57 @@ import java.util.concurrent.TimeUnit; import org.apache.servicecomb.core.Transport; +import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils; import org.apache.servicecomb.serviceregistry.api.registry.MicroserviceInstance; import org.apache.servicecomb.serviceregistry.cache.CacheEndpoint; +import org.apache.servicecomb.serviceregistry.consumer.MicroserviceInstancePing; import org.junit.Assert; +import org.junit.BeforeClass; import org.junit.Test; +import mockit.Expectations; import mockit.Injectable; +import mockit.Mocked; public class TestServiceCombLoadBalancerStats { + @BeforeClass + public static void beforeClass() { +// avoid mock +ServiceCombLoadBalancerStats.INSTANCE.getClass(); + } + @Test - public void testServiceExpire(@Injectable Transport transport) throws Exception { + public void testServiceExpire(@Injectable Transport transport, @Mocked SPIServiceUtils utils, @Injectable + MicroserviceInstancePing ping) throws Exception { +MicroserviceInstance instance = new
[incubator-servicecomb-java-chassis] branch master updated: [SCB-787]fix ping time gap bug and add configuration to time interval
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 The following commit(s) were added to refs/heads/master by this push: new 257d610 [SCB-787]fix ping time gap bug and add configuration to time interval 257d610 is described below commit 257d610b9bef711a1f0dd4a0aff397e9dccfa1b7 Author: liubao AuthorDate: Thu Aug 2 21:14:31 2018 +0800 [SCB-787]fix ping time gap bug and add configuration to time interval --- .../servicecomb/loadbalance/Configuration.java | 4 ++ .../loadbalance/ServiceCombLoadBalancerStats.java | 9 ++- .../TestServiceCombLoadBalancerStats.java | 72 +- 3 files changed, 66 insertions(+), 19 deletions(-) diff --git a/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/Configuration.java b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/Configuration.java index 1059e2e..bdc3831 100644 --- a/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/Configuration.java +++ b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/Configuration.java @@ -31,6 +31,10 @@ public final class Configuration { 2.1 configuration items public static final String PROP_ROOT = "servicecomb.loadbalance."; + public static final String RPOP_SERVER_EXPIRED_IN_SECONDS = "servicecomb.loadbalance.stats.serverExpiredInSeconds"; + + public static final String RPOP_TIMER_INTERVAL_IN_MINIS = "servicecomb.loadbalance.stats.timerIntervalInMilis"; + public static final String PROP_POLICY = "NFLoadBalancerRuleClassName"; public static final String PROP_RULE_STRATEGY_NAME = "strategy.name"; diff --git a/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/ServiceCombLoadBalancerStats.java b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/ServiceCombLoadBalancerStats.java index 8993d7c..1b7be1d 100644 --- a/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/ServiceCombLoadBalancerStats.java +++ b/handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/ServiceCombLoadBalancerStats.java @@ -37,6 +37,7 @@ import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; import com.google.common.cache.RemovalListener; import com.google.common.cache.RemovalNotification; +import com.netflix.config.DynamicPropertyFactory; /** * Add special stats that com.netflix.loadbalancer.LoadBalancerStats not provided @@ -46,9 +47,11 @@ public class ServiceCombLoadBalancerStats { private final Map pingView = new ConcurrentHashMap<>(); - private int serverExpireInSeconds = 10 * 60; + private int serverExpireInSeconds = DynamicPropertyFactory.getInstance() + .getIntProperty(Configuration.RPOP_SERVER_EXPIRED_IN_SECONDS, 300).get(); - private long timerIntervalInMilis = 1; + private long timerIntervalInMilis = DynamicPropertyFactory.getInstance() + .getLongProperty(Configuration.RPOP_TIMER_INTERVAL_IN_MINIS, 1).get(); private LoadingCache serverStatsCache; @@ -154,7 +157,7 @@ public class ServiceCombLoadBalancerStats { while (instances.hasNext()) { ServiceCombServer server = instances.next(); ServiceCombServerStats stats = allServers.get(server); -if ((System.currentTimeMillis() - stats.getLastVisitTime() < timerIntervalInMilis) && !ping +if ((System.currentTimeMillis() - stats.getLastVisitTime() > timerIntervalInMilis) && !ping .ping(server.getInstance())) { LOGGER.info("ping mark server {} failure.", server.getInstance().getInstanceId()); stats.markFailure(); diff --git a/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestServiceCombLoadBalancerStats.java b/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestServiceCombLoadBalancerStats.java index 3602977..11dfe77 100644 --- a/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestServiceCombLoadBalancerStats.java +++ b/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestServiceCombLoadBalancerStats.java @@ -23,31 +23,57 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import org.apache.servicecomb.core.Transport; +import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils; import org.apache.servicecomb.serviceregistry.api.registry.MicroserviceInstance; import org.apache.servicecomb.serviceregistry.cache.CacheEndpoint; +import org.apache.servicecomb.serviceregistry.consumer.MicroserviceInstancePing; import org.junit.Assert; +import org.junit.BeforeClass; import org.junit.Test; +import mockit.Expectations;
[GitHub] wujimin commented on a change in pull request #857: [SCB-802]in rollback scenario, old versions meta is used and invocation is fail
wujimin commented on a change in pull request #857: [SCB-802]in rollback scenario, old versions meta is used and invocation is fail URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/857#discussion_r208949639 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java ## @@ -191,9 +193,30 @@ private void setInstances(List pulledInstances, String rev microserviceVersionRule.setInstances(instances); } revision = rev; + // Clean up down versions in case of rollback and other interface not compatible scenarios. Users should ensure running versions are compatible. + pack(); } } + private void pack() { +Set microservices = new HashSet<>(instances.size()); +instances.forEach(item -> { + microservices.add(item.getServiceId()); +}); +Set downSet = new HashSet<>(instances.size()); +versions.keySet().forEach(item -> { + if (!microservices.contains(item)) { +downSet.add(item); + } +}); +downSet.forEach(item -> { + MicroserviceVersion version = versions.remove(item); + for (MicroserviceVersionRule microserviceVersionRule : versionRules.values()) { +microserviceVersionRule.deleteMicroserviceVersion(version); Review comment: maybe we just need to update latestVersion? 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 edited a comment on issue #858: org.apache.servicecomb:swagger-generator-core:jar:1.0.0-m2: java.lang.NoSuchMethodError caused by dependency conflicts due to org.yaml:snakeyaml:jar
liubao68 edited a comment on issue #858: org.apache.servicecomb:swagger-generator-core:jar:1.0.0-m2: java.lang.NoSuchMethodError caused by dependency conflicts due to org.yaml:snakeyaml:jar URL: https://github.com/apache/incubator-servicecomb-java-chassis/issues/858#issuecomment-411770455 @LeoAugust19 I mean you have got how to produce this error. Since you got the error stack, how it is happen? We do not encounter this error and do not know why. 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 issue #858: org.apache.servicecomb:swagger-generator-core:jar:1.0.0-m2: java.lang.NoSuchMethodError caused by dependency conflicts due to org.yaml:snakeyaml:jar
liubao68 commented on issue #858: org.apache.servicecomb:swagger-generator-core:jar:1.0.0-m2: java.lang.NoSuchMethodError caused by dependency conflicts due to org.yaml:snakeyaml:jar URL: https://github.com/apache/incubator-servicecomb-java-chassis/issues/858#issuecomment-411770455 @LeoAugust19 I mean you have got how to produce this error. Since you got the error stack, how it is happen? We do not encounter this error and do not why. 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/18405592/badge)](https://coveralls.io/builds/18405592) Coverage decreased (-0.05%) to 85.006% when pulling **13e0464880ca2a0c4f49508bbe9b67b5c9367088 on yhs0092:fix_DefaultHttpClientFilter_confusing_response** into **3edca801fe18fd6f93805bdf97f62aae58c99284 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/18404370/badge)](https://coveralls.io/builds/18404370) Coverage decreased (-0.1%) to 94.216% when pulling **2addd82a94cf1c955f0eb5c890ada10d6034277a on crystaldust:feature/kubernetes-demo** into **8fbf4ac64b9defe0bf40e06bf57123e4e42896bf on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] coveralls commented on issue #865: [SCB-827] Add response body decoding error log
coveralls commented 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/18404459/badge)](https://coveralls.io/builds/18404459) Coverage decreased (-0.05%) to 85.006% when pulling **4264e59fa281c9d872f8597965529ea8fd9f801a on yhs0092:fix_DefaultHttpClientFilter_confusing_response** into **3edca801fe18fd6f93805bdf97f62aae58c99284 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 opened a new pull request #865: [SCB-827] Add response body decoding error log
yhs0092 opened a new pull request #865: [SCB-827] Add response body decoding error log URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/865 Follow this checklist to help us incorporate your contribution quickly and easily: - [x] 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. - [x] Each commit in the pull request should have a meaningful subject line and body. - [x] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] 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). --- See details in [SCB-827](https://issues.apache.org/jira/browse/SCB-827) 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] little-cui opened a new pull request #413: SCB-792 More abundant metrics information
little-cui opened a new pull request #413: SCB-792 More abundant metrics information URL: https://github.com/apache/incubator-servicecomb-service-center/pull/413 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 With regards, Apache Git Services
[incubator-servicecomb-service-center.wiki] branch master updated: Updated _Footer (markdown)
This is an automated email from the ASF dual-hosted git repository. asifdxtreme pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-service-center.wiki.git The following commit(s) were added to refs/heads/master by this push: new b57e9ba Updated _Footer (markdown) b57e9ba is described below commit b57e9ba4e2d69116a334b428961278bb5612fe2f Author: Mohammad Asif Siddiqui AuthorDate: Thu Aug 9 14:48:36 2018 +0530 Updated _Footer (markdown) --- _Footer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_Footer.md b/_Footer.md index 1aa87cb..fd943cb 100644 --- a/_Footer.md +++ b/_Footer.md @@ -1 +1 @@ -## Apache ServiceComb Service-Center (Incubating) \ No newline at end of file +Apache ServiceComb Service-Center (Incubating) \ No newline at end of file
[incubator-servicecomb-service-center.wiki] branch master updated: Created _Footer (markdown)
This is an automated email from the ASF dual-hosted git repository. asifdxtreme pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-service-center.wiki.git The following commit(s) were added to refs/heads/master by this push: new ea8c61e Created _Footer (markdown) ea8c61e is described below commit ea8c61eb5c6abe6476814635eab28292d8b26758 Author: Mohammad Asif Siddiqui AuthorDate: Thu Aug 9 14:47:52 2018 +0530 Created _Footer (markdown) --- _Footer.md | 1 + 1 file changed, 1 insertion(+) diff --git a/_Footer.md b/_Footer.md new file mode 100644 index 000..1aa87cb --- /dev/null +++ b/_Footer.md @@ -0,0 +1 @@ +## Apache ServiceComb Service-Center (Incubating) \ No newline at end of file
[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/18400781/badge)](https://coveralls.io/builds/18400781) Coverage increased (+0.3%) to 94.175% when pulling **623f2167ff2702517cbb829d6fd15a705faa6344 on crystaldust:feature/kubernetes-demo** into **dcf9f2a28e062baacd96f22f80f08e40b485fc51 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] WillemJiang closed pull request #245: [SCB-825] fix SagaStartAnnotationProcessor class bug
WillemJiang closed pull request #245: [SCB-825] fix SagaStartAnnotationProcessor class bug URL: https://github.com/apache/incubator-servicecomb-saga/pull/245 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/SagaStartAnnotationProcessor.java b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/SagaStartAnnotationProcessor.java index 486f28cc..b264096d 100644 --- a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/SagaStartAnnotationProcessor.java +++ b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/SagaStartAnnotationProcessor.java @@ -52,6 +52,6 @@ public void postIntercept(String parentTxId, String compensationMethod) { @Override public void onError(String parentTxId, String compensationMethod, Throwable throwable) { String globalTxId = omegaContext.globalTxId(); -sender.send(new TxAbortedEvent(globalTxId, globalTxId, null, compensationMethod, throwable)); +sender.send(new TxAbortedEvent(globalTxId, omegaContext.localTxId(), null, compensationMethod, throwable)); } } 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: Update SagaStartAnnotationProcessor.java (#245)
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 8fbf4ac Update SagaStartAnnotationProcessor.java (#245) 8fbf4ac is described below commit 8fbf4ac64b9defe0bf40e06bf57123e4e42896bf Author: XiaoFu AuthorDate: Thu Aug 9 15:33:13 2018 +0800 Update SagaStartAnnotationProcessor.java (#245) --- .../saga/omega/transaction/SagaStartAnnotationProcessor.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/SagaStartAnnotationProcessor.java b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/SagaStartAnnotationProcessor.java index 486f28c..b264096 100644 --- a/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/SagaStartAnnotationProcessor.java +++ b/omega/omega-transaction/src/main/java/org/apache/servicecomb/saga/omega/transaction/SagaStartAnnotationProcessor.java @@ -52,6 +52,6 @@ class SagaStartAnnotationProcessor implements EventAwareInterceptor { @Override public void onError(String parentTxId, String compensationMethod, Throwable throwable) { String globalTxId = omegaContext.globalTxId(); -sender.send(new TxAbortedEvent(globalTxId, globalTxId, null, compensationMethod, throwable)); +sender.send(new TxAbortedEvent(globalTxId, omegaContext.localTxId(), null, compensationMethod, throwable)); } }
[GitHub] crystaldust commented on a change in pull request #243: [SCB-823] Setup the test in kubernetes
crystaldust commented on a change in pull request #243: [SCB-823] Setup the test in kubernetes URL: https://github.com/apache/incubator-servicecomb-saga/pull/243#discussion_r208830565 ## File path: saga-demo/saga-k8s-resources/base/alpha.yaml ## @@ -0,0 +1,37 @@ +apiVersion: v1 Review comment: I'll add the License header, btw, I'm considering reorganizing the folder structure into a base folder and demos folder. The base folder provide alpha-server and postgresql that all demos need. The demos folder provide the demo's services. Now I've done the reorganization and provide the spring-demo, pls take a look at the latest commit. 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/18400358/badge)](https://coveralls.io/builds/18400358) Coverage decreased (-0.08%) to 93.768% when pulling **1e89807dbf567d48722927adbcc2f898ac3fcbd5 on crystaldust:feature/kubernetes-demo** into **dcf9f2a28e062baacd96f22f80f08e40b485fc51 on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] WillemJiang commented on a change in pull request #243: [SCB-823] Setup the test in kubernetes
WillemJiang commented on a change in pull request #243: [SCB-823] Setup the test in kubernetes URL: https://github.com/apache/incubator-servicecomb-saga/pull/243#discussion_r208824120 ## File path: saga-demo/saga-k8s-resources/base/alpha.yaml ## @@ -0,0 +1,37 @@ +apiVersion: v1 Review comment: Please add ASF License header here. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] WillemJiang commented on a change in pull request #243: [SCB-823] Setup the test in kubernetes
WillemJiang commented on a change in pull request #243: [SCB-823] Setup the test in kubernetes URL: https://github.com/apache/incubator-servicecomb-saga/pull/243#discussion_r208824091 ## File path: saga-demo/saga-k8s-resources/base/alpha.yaml ## @@ -0,0 +1,37 @@ +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: Deployment +metadata: + name: alphaserver + namespace: servicecomb +spec: + replicas: 1 + template: +metadata: + labels: +app: alphaserver +version: v1 +spec: + containers: + - name: alphaserver +image: alpha-server:0.3.0-SNAPSHOT Review comment: Can we use the environment variable to specify the version? 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] heyile commented on a change in pull request #861: [SCB-612]delete useless MicroserviceMetaManager
heyile commented on a change in pull request #861: [SCB-612]delete useless MicroserviceMetaManager URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/861#discussion_r208820006 ## File path: core/src/main/java/org/apache/servicecomb/core/definition/loader/SchemaListenerManager.java ## @@ -74,12 +71,22 @@ public void notifySchemaListener(List schemaMetaList) { } public SchemaMeta ensureFindSchemaMeta(String microserviceName, String schemaId) { -MicroserviceMeta microserviceMeta = microserviceMetaManager.ensureFindValue(microserviceName); +if (!RegistryUtils.getMicroservice().getServiceName().equals(microserviceName)) { + LOGGER.error("miroserviceName : {} is different from the default microserviceName :{}", Review comment: this logic will not happen in the normal mode , and I have asked jimin about whether I could delete parameter microserviceName because it's no use now. He suggested me to keep it for the compatibility of the method with other classes or modules and he advised me to compare the parameter microserviceName with the default right micorserviceName. just make sure the program is running as we expected。 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] heyile commented on a change in pull request #861: [SCB-612]delete useless MicroserviceMetaManager
heyile commented on a change in pull request #861: [SCB-612]delete useless MicroserviceMetaManager URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/861#discussion_r208820164 ## File path: core/src/main/java/org/apache/servicecomb/core/definition/loader/SchemaListenerManager.java ## @@ -74,12 +71,22 @@ public void notifySchemaListener(List schemaMetaList) { } public SchemaMeta ensureFindSchemaMeta(String microserviceName, String schemaId) { -MicroserviceMeta microserviceMeta = microserviceMetaManager.ensureFindValue(microserviceName); +if (!RegistryUtils.getMicroservice().getServiceName().equals(microserviceName)) { + LOGGER.error("miroserviceName : {} is different from the default microserviceName :{}", + microserviceName, + RegistryUtils.getMicroservice().getServiceName()); +} +MicroserviceMeta microserviceMeta = SCBEngine.getInstance().getProducerMicroMeta(); return microserviceMeta.ensureFindSchemaMeta(schemaId); } public Collection getAllSchemaMeta(String microserviceName) { -MicroserviceMeta microserviceMeta = microserviceMetaManager.ensureFindValue(microserviceName); +if (!RegistryUtils.getMicroservice().getServiceName().equals(microserviceName)) { Review comment: same as above 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-service-center.wiki] branch master updated: Updated Service Center UI Re design (markdown)
This is an automated email from the ASF dual-hosted git repository. asifdxtreme pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-service-center.wiki.git The following commit(s) were added to refs/heads/master by this push: new 0a76d9b Updated Service Center UI Re design (markdown) 0a76d9b is described below commit 0a76d9bc8a7fe73118f6c6c58f5297b01ece168c Author: Mohammad Asif Siddiqui AuthorDate: Thu Aug 9 11:52:04 2018 +0530 Updated Service Center UI Re design (markdown) --- ...ce-Center-UI-Re-design-[Implemented-and-is-a-part-of-1.0.0-release].md | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Service-Center-UI-Re-design.md b/Service-Center-UI-Re-design-[Implemented-and-is-a-part-of-1.0.0-release].md similarity index 100% rename from Service-Center-UI-Re-design.md rename to Service-Center-UI-Re-design-[Implemented-and-is-a-part-of-1.0.0-release].md