[GitHub] maheshrajus commented on a change in pull request #615: [SCB-324] Fault-Injection handler implementation

2018-03-20 Thread GitBox
maheshrajus commented on a change in pull request #615: [SCB-324] 
Fault-Injection handler implementation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/615#discussion_r175984119
 
 

 ##
 File path: 
handlers/handler-fault-injection/src/main/java/org/apache/servicecomb/faultinjection/AbortFault.java
 ##
 @@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.faultinjection;
+
+import org.apache.servicecomb.core.Invocation;
+import org.apache.servicecomb.swagger.invocation.exception.CommonExceptionData;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component
+public class AbortFault extends AbstractFault {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(FaultInjectionConfig.class);
+
+  @Override
+  public FaultResponse injectFault(Invocation invocation, FaultParam 
faultParam) {
+// get the config values related to delay.
+int abortPercent = FaultInjectionUtil.getFaultInjectionConfig(invocation,
+"abort.percent");
+
+if (abortPercent == FaultInjectionConst.FAULT_INJECTION_CFG_NULL) {
+  LOGGER.info("Fault injection: Abort percentage is not configured");
 
 Review comment:
   ok, this we will change to debug


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


With regards,
Apache Git Services


[GitHub] maheshrajus commented on a change in pull request #615: [SCB-324] Fault-Injection handler implementation

2018-03-20 Thread GitBox
maheshrajus commented on a change in pull request #615: [SCB-324] 
Fault-Injection handler implementation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/615#discussion_r175984140
 
 

 ##
 File path: 
handlers/handler-fault-injection/src/main/java/org/apache/servicecomb/faultinjection/AbortFault.java
 ##
 @@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.faultinjection;
+
+import org.apache.servicecomb.core.Invocation;
+import org.apache.servicecomb.swagger.invocation.exception.CommonExceptionData;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component
+public class AbortFault extends AbstractFault {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(FaultInjectionConfig.class);
+
+  @Override
+  public FaultResponse injectFault(Invocation invocation, FaultParam 
faultParam) {
+// get the config values related to delay.
+int abortPercent = FaultInjectionUtil.getFaultInjectionConfig(invocation,
+"abort.percent");
+
+if (abortPercent == FaultInjectionConst.FAULT_INJECTION_CFG_NULL) {
+  LOGGER.info("Fault injection: Abort percentage is not configured");
+  return new FaultResponse();
+}
+
+// check fault abort condition.
+boolean isAbort = 
FaultInjectionUtil.checkFaultInjectionDelayAndAbort(faultParam.getReqCount(), 
abortPercent);
+if (isAbort) {
+  // get the config values related to delay percentage.
+  int errorCode = FaultInjectionUtil.getFaultInjectionConfig(invocation,
+  "abort.httpStatus");
+
+  if (errorCode == FaultInjectionConst.FAULT_INJECTION_CFG_NULL) {
+LOGGER.info("Fault injection: Abort error code is not configured");
 
 Review comment:
   ok, this we will change to debug


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 #615: [SCB-324] Fault-Injection handler implementation

2018-03-20 Thread GitBox
liubao68 commented on a change in pull request #615: [SCB-324] Fault-Injection 
handler implementation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/615#discussion_r175968036
 
 

 ##
 File path: 
handlers/handler-fault-injection/src/main/java/org/apache/servicecomb/faultinjection/FaultInjectionConfig.java
 ##
 @@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.faultinjection;
+
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.servicecomb.foundation.common.concurrent.ConcurrentHashMapEx;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.netflix.config.DynamicIntProperty;
+import com.netflix.config.DynamicPropertyFactory;
+
+/**
+ * Handles the fault injection configuration read from micro service 
file/config
+ * center.
+ */
+public final class FaultInjectionConfig {
+
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(FaultInjectionConfig.class);
+
+  // key is configuration parameter.
+  private static Map cfgCallback = new ConcurrentHashMapEx<>();
+
+  public static int getConfigVal(String config, int defaultValue) {
+DynamicIntProperty dynamicIntProperty = 
DynamicPropertyFactory.getInstance().getIntProperty(config,
+defaultValue);
+
+if (cfgCallback.get(config) == null) {
 
 Review comment:
   This code can not prevent from creating several callbacks. It's not properly 
handle concurrent access. You can refer to ConcurrentHashMapExt provided by 
servicecomb and it's usage in code.


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 #615: [SCB-324] Fault-Injection handler implementation

2018-03-20 Thread GitBox
liubao68 commented on a change in pull request #615: [SCB-324] Fault-Injection 
handler implementation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/615#discussion_r175968036
 
 

 ##
 File path: 
handlers/handler-fault-injection/src/main/java/org/apache/servicecomb/faultinjection/FaultInjectionConfig.java
 ##
 @@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.faultinjection;
+
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.servicecomb.foundation.common.concurrent.ConcurrentHashMapEx;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.netflix.config.DynamicIntProperty;
+import com.netflix.config.DynamicPropertyFactory;
+
+/**
+ * Handles the fault injection configuration read from micro service 
file/config
+ * center.
+ */
+public final class FaultInjectionConfig {
+
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(FaultInjectionConfig.class);
+
+  // key is configuration parameter.
+  private static Map cfgCallback = new ConcurrentHashMapEx<>();
+
+  public static int getConfigVal(String config, int defaultValue) {
+DynamicIntProperty dynamicIntProperty = 
DynamicPropertyFactory.getInstance().getIntProperty(config,
+defaultValue);
+
+if (cfgCallback.get(config) == null) {
 
 Review comment:
   This code can not prevent from creating several callbacks. It's not properly 
handle concurrent access. You can refer to ConcurrentHashMapExt provider by 
servicecomb and it's usage in code.


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 #615: [SCB-324] Fault-Injection handler implementation

2018-03-20 Thread GitBox
liubao68 commented on a change in pull request #615: [SCB-324] Fault-Injection 
handler implementation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/615#discussion_r175969413
 
 

 ##
 File path: 
handlers/handler-fault-injection/src/main/java/org/apache/servicecomb/faultinjection/Fault.java
 ##
 @@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.faultinjection;
+
+import org.apache.servicecomb.core.Invocation;
+
+public interface Fault {
+
+  int getPriority();
+
+  FaultResponse injectFault(Invocation invocation, FaultParam faultAttributes);
 
 Review comment:
   I think this interface is not very good, it'll be changed when new Faults is 
added. 
   1. FaultParam is implementation dependent, we do not know which param need 
to pass to specific fault implementation
   2. FaultResponse is better to be an AsynCallback in order to handle deadlock 
problems mentioned in other review comments.


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 #615: [SCB-324] Fault-Injection handler implementation

2018-03-20 Thread GitBox
liubao68 commented on a change in pull request #615: [SCB-324] Fault-Injection 
handler implementation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/615#discussion_r175968717
 
 

 ##
 File path: 
handlers/handler-fault-injection/src/main/java/org/apache/servicecomb/faultinjection/FaultInjectionConst.java
 ##
 @@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.faultinjection;
+
+/**
+ * Handles the all constant values for fault injection.
+ */
+public class FaultInjectionConst {
+
+  public static final int FAULT_INJECTION_CFG_NULL = -1;
+
+  public static final String CONSUMER_FAULTINJECTION = 
"cse.governance.Consumer.";
+
+  public static final String CONSUMER_FAULTINJECTION_GLOBAL = 
"cse.governance.Consumer._global.";
+
+  public static final String CONSUMER_FAULTINJECTION_POLICY_PROTOCOLS = 
"policy.fault.protocols.";
+
+  public static final int FAULTINJECTION_PRIORITY_MIN = 10;
+
+  public static final int FAULTINJECTION_PRIORITY_MAX = 1;
 
 Review comment:
   using NULL, MIN, MAX to define these constants is quite confusing if we do 
not check the value. 


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


With regards,
Apache Git Services


[GitHub] liubao68 commented on a change in pull request #615: [SCB-324] Fault-Injection handler implementation

2018-03-20 Thread GitBox
liubao68 commented on a change in pull request #615: [SCB-324] Fault-Injection 
handler implementation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/615#discussion_r175968036
 
 

 ##
 File path: 
handlers/handler-fault-injection/src/main/java/org/apache/servicecomb/faultinjection/FaultInjectionConfig.java
 ##
 @@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.faultinjection;
+
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.servicecomb.foundation.common.concurrent.ConcurrentHashMapEx;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.netflix.config.DynamicIntProperty;
+import com.netflix.config.DynamicPropertyFactory;
+
+/**
+ * Handles the fault injection configuration read from micro service 
file/config
+ * center.
+ */
+public final class FaultInjectionConfig {
+
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(FaultInjectionConfig.class);
+
+  // key is configuration parameter.
+  private static Map cfgCallback = new ConcurrentHashMapEx<>();
+
+  public static int getConfigVal(String config, int defaultValue) {
+DynamicIntProperty dynamicIntProperty = 
DynamicPropertyFactory.getInstance().getIntProperty(config,
+defaultValue);
+
+if (cfgCallback.get(config) == null) {
 
 Review comment:
   This code can not prevent from creating several callbacks. It's not properly 
handle concurrent access.


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 #615: [SCB-324] Fault-Injection handler implementation

2018-03-20 Thread GitBox
liubao68 commented on a change in pull request #615: [SCB-324] Fault-Injection 
handler implementation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/615#discussion_r175968036
 
 

 ##
 File path: 
handlers/handler-fault-injection/src/main/java/org/apache/servicecomb/faultinjection/FaultInjectionConfig.java
 ##
 @@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.faultinjection;
+
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.servicecomb.foundation.common.concurrent.ConcurrentHashMapEx;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.netflix.config.DynamicIntProperty;
+import com.netflix.config.DynamicPropertyFactory;
+
+/**
+ * Handles the fault injection configuration read from micro service 
file/config
+ * center.
+ */
+public final class FaultInjectionConfig {
+
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(FaultInjectionConfig.class);
+
+  // key is configuration parameter.
+  private static Map cfgCallback = new ConcurrentHashMapEx<>();
+
+  public static int getConfigVal(String config, int defaultValue) {
+DynamicIntProperty dynamicIntProperty = 
DynamicPropertyFactory.getInstance().getIntProperty(config,
+defaultValue);
+
+if (cfgCallback.get(config) == null) {
 
 Review comment:
   This code can not prevent from creating several callbacks


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 #615: [SCB-324] Fault-Injection handler implementation

2018-03-20 Thread GitBox
liubao68 commented on a change in pull request #615: [SCB-324] Fault-Injection 
handler implementation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/615#discussion_r175967421
 
 

 ##
 File path: 
handlers/handler-fault-injection/src/main/java/org/apache/servicecomb/faultinjection/DelayFault.java
 ##
 @@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.faultinjection;
+
+import java.util.concurrent.CountDownLatch;
+
+import org.apache.servicecomb.core.Invocation;
+import org.apache.servicecomb.foundation.vertx.VertxUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+import io.vertx.core.Handler;
+import io.vertx.core.Vertx;
+
+@Component
+public class DelayFault extends AbstractFault {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(FaultInjectionHandler.class);
+
+  @Override
+  public int getPriority() {
+return FaultInjectionConst.FAULTINJECTION_PRIORITY_MAX;
+  }
+
+  @Override
+  public FaultResponse injectFault(Invocation invocation, FaultParam 
faultAttributes) {
+int delayPercent = FaultInjectionUtil.getFaultInjectionConfig(invocation,
+"delay.percent");
+
+if (delayPercent == FaultInjectionConst.FAULT_INJECTION_CFG_NULL) {
+  LOGGER.info("Fault injection: delay percentage is not configured");
+  return new FaultResponse();
+}
+
+// check fault delay condition.
+boolean isDelay = 
FaultInjectionUtil.checkFaultInjectionDelayAndAbort(faultAttributes.getReqCount(),
 delayPercent);
+if (isDelay) {
+  LOGGER.info("Fault injection: delay is added for the request by fault 
inject handler");
+  long delay = FaultInjectionUtil.getFaultInjectionConfig(invocation,
+  "delay.fixedDelay");
+
+  if (delay == FaultInjectionConst.FAULT_INJECTION_CFG_NULL) {
+LOGGER.info("Fault injection: delay is not configured");
+return new FaultResponse();
+  }
+
+  CountDownLatch latch = new CountDownLatch(1);
+  Vertx vertx = VertxUtils.getOrCreateVertxByName("faultinjection", null);
+  vertx.setTimer(delay, new Handler() {
+@Override
+public void handle(Long timeID) {
+  latch.countDown();
+}
+  });
+
+  try {
+latch.await();
+  } catch (InterruptedException e) {
+LOGGER.info("Interrupted exception is received");
+  }
 
 Review comment:
   This code may cause dead lock


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 #615: [SCB-324] Fault-Injection handler implementation

2018-03-20 Thread GitBox
liubao68 commented on a change in pull request #615: [SCB-324] Fault-Injection 
handler implementation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/615#discussion_r175966834
 
 

 ##
 File path: 
handlers/handler-fault-injection/src/main/java/org/apache/servicecomb/faultinjection/AbortFault.java
 ##
 @@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.faultinjection;
+
+import org.apache.servicecomb.core.Invocation;
+import org.apache.servicecomb.swagger.invocation.exception.CommonExceptionData;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component
+public class AbortFault extends AbstractFault {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(FaultInjectionConfig.class);
+
+  @Override
+  public FaultResponse injectFault(Invocation invocation, FaultParam 
faultParam) {
+// get the config values related to delay.
+int abortPercent = FaultInjectionUtil.getFaultInjectionConfig(invocation,
+"abort.percent");
+
+if (abortPercent == FaultInjectionConst.FAULT_INJECTION_CFG_NULL) {
+  LOGGER.info("Fault injection: Abort percentage is not configured");
+  return new FaultResponse();
+}
+
+// check fault abort condition.
+boolean isAbort = 
FaultInjectionUtil.checkFaultInjectionDelayAndAbort(faultParam.getReqCount(), 
abortPercent);
+if (isAbort) {
+  // get the config values related to delay percentage.
+  int errorCode = FaultInjectionUtil.getFaultInjectionConfig(invocation,
+  "abort.httpStatus");
+
+  if (errorCode == FaultInjectionConst.FAULT_INJECTION_CFG_NULL) {
+LOGGER.info("Fault injection: Abort error code is not configured");
 
 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


Re: [RESULT] [VOTE] Release Apache ServiceComb Service-Center (incubating) version 1.0.0-m1 - Fourth Attempt

2018-03-20 Thread Willem Jiang
Hi Roman,

Current we just published the binary to the  dev directory[1] for vote, not
the official release directory[2].
I think Asif just means publishing the release kit publically as a the
official release once the vote passed.

[1] https://dist.apache.org/repos/dist/dev/incubator/servicecomb/incubator-
servicecomb-service-center

[2] *https://dist.apache.org/repos/dist/release/incubator/servicecomb
*


Willem Jiang

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

On Wed, Mar 21, 2018 at 3:03 AM, Roman Shaposhnik 
wrote:

> On Mon, Mar 19, 2018 at 8:53 PM, Mohammad Asif Siddiqui
>  wrote:
> > Hi All,
> >
> > We will send this Release Candidate for IPMC approval, Once the vote
> passes there then we will publish the binaries.
>
> You can NOT do that. If binaries are to be published they need to be
> included in the vote.
>
> Thanks,
> Roman.
>


[GitHub] liubao68 commented on a change in pull request #615: [SCB-324] Fault-Injection handler implementation

2018-03-20 Thread GitBox
liubao68 commented on a change in pull request #615: [SCB-324] Fault-Injection 
handler implementation
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/615#discussion_r175966624
 
 

 ##
 File path: 
handlers/handler-fault-injection/src/main/java/org/apache/servicecomb/faultinjection/AbortFault.java
 ##
 @@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.servicecomb.faultinjection;
+
+import org.apache.servicecomb.core.Invocation;
+import org.apache.servicecomb.swagger.invocation.exception.CommonExceptionData;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component
+public class AbortFault extends AbstractFault {
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(FaultInjectionConfig.class);
+
+  @Override
+  public FaultResponse injectFault(Invocation invocation, FaultParam 
faultParam) {
+// get the config values related to delay.
+int abortPercent = FaultInjectionUtil.getFaultInjectionConfig(invocation,
+"abort.percent");
+
+if (abortPercent == FaultInjectionConst.FAULT_INJECTION_CFG_NULL) {
+  LOGGER.info("Fault injection: Abort percentage is not configured");
 
 Review comment:
   This will print so many logs during request. Delete it or turn to debug.


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


With regards,
Apache Git Services


Re: [RESULT] [VOTE] Release Apache ServiceComb Service-Center (incubating) version 1.0.0-m1 - Fourth Attempt

2018-03-20 Thread Roman Shaposhnik
On Mon, Mar 19, 2018 at 8:53 PM, Mohammad Asif Siddiqui
 wrote:
> Hi All,
>
> We will send this Release Candidate for IPMC approval, Once the vote passes 
> there then we will publish the binaries.

You can NOT do that. If binaries are to be published they need to be
included in the vote.

Thanks,
Roman.


[GitHub] maheshrajus opened a new pull request #615: [SCB-324] Fault-Injection handler implementation

2018-03-20 Thread GitBox
maheshrajus opened a new pull request #615: [SCB-324] Fault-Injection handler 
implementation
URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/615
 
 
   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.
- [x] 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


Re: [VOTE] Release Apache ServiceComb Java-Chassis (incubating) version 1.0.0-m1 - Third Attempt

2018-03-20 Thread bismy
+1 (binding)
Integrate the release candidate to internal integration tests and all test 
cases passed. 




-- Original --
From:  "Mohammad Asif Siddiqui";
Date:  Tue, Mar 20, 2018 05:33 PM
To:  "dev";

Subject:  Re: [VOTE] Release Apache ServiceComb Java-Chassis (incubating) 
version 1.0.0-m1 - Third Attempt



+ Binding  
  
I checked  
- incubating in name  
- hashes and signatures is good  
- DISCLAIMER/NOTICE/LICENSE exists  
- can make release kit from source  
- checked for archive matching git tag  
- Source file have ASF headers  
- Ran the demo's(pojo/springmvc) using the source archive  
  
Regards  
Asif  


On 2018/03/20 06:13:00, Mohammad Asif Siddiqui  wrote: 
> Hi All,  
>   
> This is a call for Vote to release Apache ServiceComb Java-Chassis 
> (Incubating) version 1.0.0-m1 
>   
> Release Notes : 
> https://github.com/apache/incubator-servicecomb-java-chassis/blob/master/etc/releaseNotes.md
>   
>   
> Release Candidate : 
> https://dist.apache.org/repos/dist/dev/incubator/servicecomb/incubator-servicecomb-java-chassis/1.0.0-m1/
>   
>   
> Staging Repo : 
> https://repository.apache.org/content/repositories/orgapacheservicecomb-1196  
>  
> Release Tag : 
> https://github.com/apache/incubator-servicecomb-java-chassis/releases/tag/1.0.0-m1
>  
>   
> Release CommitID : 901869b987c6f65c92b5b8b8f05eaf0f9f6e69cb  
>   
> Keys to verify the Release Candidate : 
> https://dist.apache.org/repos/dist/dev/incubator/servicecomb/KEYS  
>   
> Voting will start now ( Tuesday, 20th March, 2018) and will remain open for 
> next 72 hours, Request all PPMC members to give their vote.  
>   
> [ ] +1 Release this package as 1.0.0-m1  
> [ ] +0 No Opinion  
> [ ] -1 Do not release this package because  
>   
> Regards  
> Asif  
> 
>

Re: 回复: [VOTE] Release Apache ServiceComb Saga (incubating) version 0.1.0- Second Attempt

2018-03-20 Thread Jean-Baptiste Onofré
+1 (binding)

Build is ok. Signatures and headers are good too.

Regards
JB

Le 20 mars 2018 à 14:36, à 14:36, bismy  a écrit:
>+1 Non Binding
>Building from source in linux, and run demos and tests according to
>README.md, all test cases passed.
>
>
>-- 原始邮件 --
>发件人: "Zen Lin";
>发送时间: 2018年3月19日(星期一) 下午4:22
>收件人: "dev";
>
>主题: Re: [VOTE] Release Apache ServiceComb Saga (incubating) version
>0.1.0- Second Attempt
>
>
>
> +1 Non Binding
>
>2018-03-19 15:14 GMT+08:00 Bin Ma :
>
>> +1 Non Binding Checked the demo
>>
>>
>> 2018-03-19 13:06 GMT+08:00 Mahesh Raju Somalaraju <
>> maheshraju.o...@gmail.com
>> >:
>>
>> > +1 Non Binding
>> >
>> > - Ran java-chassis demos using service-center release binary.
>> > - Run the rat to verify the License header issue.
>> >
>> > Thanks & Regards
>> > -Mahesh Raju S
>> >
>> >
>> > On Sat, Mar 17, 2018 at 12:31 AM, Mohammad Asif Siddiqui <
>> > asifdxtr...@apache.org> wrote:
>> >
>> > > Hi All,
>> > >
>> > > This is a call for Vote to release Apache ServiceComb Saga
>(Incubating)
>> > > version 0.1.0
>> > >
>> > > Release Notes :
>https://issues.apache.org/jira/secure/ReleaseNote.jspa
>> ?
>> > > projectId=12321626&version=12342353
>> > >
>> > > Release Candidate :
>https://dist.apache.org/repos/dist/dev/incubator/
>> > > servicecomb/incubator-servicecomb-saga/0.1.0/
>> > >
>> > > Staging Repo :
>https://repository.apache.org/content/repositories/
>> > > orgapacheservicecomb-1166
>> > >
>> > > Release Tag :
>https://github.com/apache/incubator-servicecomb-saga/
>> > > releases/tag/0.1.0
>> > >
>> > > Release CommitID : 708eec092988dfd4a5960ca5f232fb7421d5fbdd
>> > >
>> > > Keys to verify the Release Candidate :
>https://dist.apache.org/repos/
>> > > dist/dev/incubator/servicecomb/KEYS
>> > >
>> > > Voting will start now ( Saturday, 17th March, 2018) and will
>remain
>> open
>> > > for next 72 hours, Request all PPMC members to give their vote
>> > >
>> > > [ ] +1 Release this package as 0.1.0
>> > > [ ] +0 No Opinion
>> > > [ ] -1 Do not release this package because
>> > >
>> > > Regards
>> > > Asif
>> > >
>> > >
>> >
>>


?????? [VOTE] Release Apache ServiceComb Saga (incubating) version 0.1.0- Second Attempt

2018-03-20 Thread bismy
+1 Non Binding
Building from source in linux, and run demos and tests according to README.md, 
all test cases passed.


--  --
??: "Zen Lin";
: 2018??3??19??(??) 4:22
??: "dev";

: Re: [VOTE] Release Apache ServiceComb Saga (incubating) version 0.1.0- 
Second Attempt



 +1 Non Binding

2018-03-19 15:14 GMT+08:00 Bin Ma :

> +1 Non Binding Checked the demo
>
>
> 2018-03-19 13:06 GMT+08:00 Mahesh Raju Somalaraju <
> maheshraju.o...@gmail.com
> >:
>
> > +1 Non Binding
> >
> > - Ran java-chassis demos using service-center release binary.
> > - Run the rat to verify the License header issue.
> >
> > Thanks & Regards
> > -Mahesh Raju S
> >
> >
> > On Sat, Mar 17, 2018 at 12:31 AM, Mohammad Asif Siddiqui <
> > asifdxtr...@apache.org> wrote:
> >
> > > Hi All,
> > >
> > > This is a call for Vote to release Apache ServiceComb Saga (Incubating)
> > > version 0.1.0
> > >
> > > Release Notes : https://issues.apache.org/jira/secure/ReleaseNote.jspa
> ?
> > > projectId=12321626&version=12342353
> > >
> > > Release Candidate : https://dist.apache.org/repos/dist/dev/incubator/
> > > servicecomb/incubator-servicecomb-saga/0.1.0/
> > >
> > > Staging Repo : https://repository.apache.org/content/repositories/
> > > orgapacheservicecomb-1166
> > >
> > > Release Tag : https://github.com/apache/incubator-servicecomb-saga/
> > > releases/tag/0.1.0
> > >
> > > Release CommitID : 708eec092988dfd4a5960ca5f232fb7421d5fbdd
> > >
> > > Keys to verify the Release Candidate : https://dist.apache.org/repos/
> > > dist/dev/incubator/servicecomb/KEYS
> > >
> > > Voting will start now ( Saturday, 17th March, 2018) and will remain
> open
> > > for next 72 hours, Request all PPMC members to give their vote
> > >
> > > [ ] +1 Release this package as 0.1.0
> > > [ ] +0 No Opinion
> > > [ ] -1 Do not release this package because
> > >
> > > Regards
> > > Asif
> > >
> > >
> >
>

[GitHub] WillemJiang closed pull request #156: SCB-390 Update to introduece the byteman to the acceptance tests

2018-03-20 Thread GitBox
WillemJiang closed pull request #156: SCB-390 Update to introduece the byteman 
to the acceptance tests
URL: https://github.com/apache/incubator-servicecomb-saga/pull/156
 
 
   

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/acceptance-tests/acceptance-pack/pom.xml 
b/acceptance-tests/acceptance-pack/pom.xml
index 49bd70bb..232c73b2 100644
--- a/acceptance-tests/acceptance-pack/pom.xml
+++ b/acceptance-tests/acceptance-pack/pom.xml
@@ -40,6 +40,11 @@
   jackson-databind
   ${jackson.version}
 
+
+  org.jboss.byteman
+  byteman-submit
+  ${byteman.version}
+
   
 
   
@@ -111,13 +116,17 @@
   car
   
 
-  
+  
+-Dorg.jboss.byteman.debug=true 
-Dorg.jboss.byteman.verbose=true
+
-javaagent:/maven/saga/byteman.jar=port:9091,address:0.0.0.0,listener:true
+  
 
 
   Started [a-zA-Z]+ in [0-9.]+ seconds
   
 
   8080
+  9091
 
   
   12
@@ -127,6 +136,7 @@
 
 
   car.port:8080
+  car.byteman.port:9091
 
   
 
@@ -135,13 +145,17 @@
   hotel
   
 
-  
+  
+-Dorg.jboss.byteman.debug=true 
-Dorg.jboss.byteman.verbose=true
+
-javaagent:/maven/saga/byteman.jar=port:9091,address:0.0.0.0,listener:true
+  
 
 
   Started [a-zA-Z]+ in [0-9.]+ seconds
   
 
   8080
+  9091
 
   
   12
@@ -151,6 +165,7 @@
 
 
   hotel.port:8080
+  hotel.byteman.port:9091
 
   
 
@@ -159,13 +174,17 @@
   booking
   
 
-  
+  
+-Dorg.jboss.byteman.debug=true 
-Dorg.jboss.byteman.verbose=true
+
-javaagent:/maven/saga/byteman.jar=port:9091,address:0.0.0.0,listener:true
+  
 
 
   Started [a-zA-Z]+ in [0-9.]+ seconds
   
 
   8080
+  9091
 
   
   12
@@ -177,6 +196,7 @@
 
 
   booking.port:8080
+  booking.byteman.port:9091
 
   
 
@@ -242,6 +262,18 @@
 
   
jdbc:postgresql://${docker.hostname}:${postgres.port}/saga?useSSL=false
 
+
+  ${docker.hostname}
+
+
+  ${car.byteman.port}
+
+
+  ${hotel.byteman.port}
+
+
+  ${booking.byteman.port}
+
   
   ${jacoco.failsafe.argLine}
 
diff --git 
a/acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java
 
b/acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java
index a433f65d..2646b1b9 100644
--- 
a/acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java
+++ 
b/acceptance-tests/acceptance-pack/src/test/java/org/apache/servicecomb/saga/PackStepdefs.java
@@ -29,6 +29,7 @@
 import java.util.Map;
 import java.util.function.Consumer;
 
+import org.jboss.byteman.agent.submit.Submit;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -65,6 +66,16 @@ public PackStepdefs() {
   probe(System.getProperty(ALPHA_REST_ADDRESS));
 });
 
+Given("^Install the byteman script ([A-Za-z0-9_\\.]+) to ([A-Za-z]+) 
Service$", (String script, String service) -> {
+  String address = System.getProperty("byteman.address");
+  String port = System.getProperty(service.toLowerCase() + 
".byteman.port");
+  log.info("Install the byteman script {} to 

[GitHub] WillemJiang commented on a change in pull request #156: SCB-390 Update to introduece the byteman to the acceptance tests

2018-03-20 Thread GitBox
WillemJiang commented on a change in pull request #156: SCB-390 Update to 
introduece the byteman to the acceptance tests
URL: 
https://github.com/apache/incubator-servicecomb-saga/pull/156#discussion_r175702856
 
 

 ##
 File path: saga-demo/booking/booking/pom.xml
 ##
 @@ -77,6 +77,17 @@
 
   
 
+
 
 Review comment:
   Can we define this profile in the booking directory pom?


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 #156: SCB-390 Update to introduece the byteman to the acceptance tests

2018-03-20 Thread GitBox
WillemJiang commented on a change in pull request #156: SCB-390 Update to 
introduece the byteman to the acceptance tests
URL: 
https://github.com/apache/incubator-servicecomb-saga/pull/156#discussion_r175702856
 
 

 ##
 File path: saga-demo/booking/booking/pom.xml
 ##
 @@ -77,6 +77,17 @@
 
   
 
+
 
 Review comment:
   Can we define this profile in the booking directory pom?


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


With regards,
Apache Git Services


Re: [VOTE] Release Apache ServiceComb Java-Chassis (incubating) version 1.0.0-m1 - Third Attempt

2018-03-20 Thread Mohammad Asif Siddiqui


On 2018/03/20 09:33:47, Mohammad Asif Siddiqui  wrote: 
> + Binding   
+1 Binding   
>   
> I checked  
> - incubating in name  
> - hashes and signatures is good  
> - DISCLAIMER/NOTICE/LICENSE exists  
> - can make release kit from source  
> - checked for archive matching git tag  
> - Source file have ASF headers  
> - Ran the demo's(pojo/springmvc) using the source archive  
>   
> Regards  
> Asif  
> 
> 
> On 2018/03/20 06:13:00, Mohammad Asif Siddiqui  
> wrote: 
> > Hi All,  
> >   
> > This is a call for Vote to release Apache ServiceComb Java-Chassis 
> > (Incubating) version 1.0.0-m1 
> >   
> > Release Notes : 
> > https://github.com/apache/incubator-servicecomb-java-chassis/blob/master/etc/releaseNotes.md
> >   
> >   
> > Release Candidate : 
> > https://dist.apache.org/repos/dist/dev/incubator/servicecomb/incubator-servicecomb-java-chassis/1.0.0-m1/
> >   
> >   
> > Staging Repo : 
> > https://repository.apache.org/content/repositories/orgapacheservicecomb-1196
> >   
> >  
> > Release Tag : 
> > https://github.com/apache/incubator-servicecomb-java-chassis/releases/tag/1.0.0-m1
> >  
> >   
> > Release CommitID : 901869b987c6f65c92b5b8b8f05eaf0f9f6e69cb  
> >   
> > Keys to verify the Release Candidate : 
> > https://dist.apache.org/repos/dist/dev/incubator/servicecomb/KEYS  
> >   
> > Voting will start now ( Tuesday, 20th March, 2018) and will remain open for 
> > next 72 hours, Request all PPMC members to give their vote.  
> >   
> > [ ] +1 Release this package as 1.0.0-m1  
> > [ ] +0 No Opinion  
> > [ ] -1 Do not release this package because  
> >   
> > Regards  
> > Asif  
> > 
> > 
> 


Re: [VOTE] Release Apache ServiceComb Java-Chassis (incubating) version 1.0.0-m1 - Third Attempt

2018-03-20 Thread Mohammad Asif Siddiqui
+ Binding  
  
I checked  
- incubating in name  
- hashes and signatures is good  
- DISCLAIMER/NOTICE/LICENSE exists  
- can make release kit from source  
- checked for archive matching git tag  
- Source file have ASF headers  
- Ran the demo's(pojo/springmvc) using the source archive  
  
Regards  
Asif  


On 2018/03/20 06:13:00, Mohammad Asif Siddiqui  wrote: 
> Hi All,  
>   
> This is a call for Vote to release Apache ServiceComb Java-Chassis 
> (Incubating) version 1.0.0-m1 
>   
> Release Notes : 
> https://github.com/apache/incubator-servicecomb-java-chassis/blob/master/etc/releaseNotes.md
>   
>   
> Release Candidate : 
> https://dist.apache.org/repos/dist/dev/incubator/servicecomb/incubator-servicecomb-java-chassis/1.0.0-m1/
>   
>   
> Staging Repo : 
> https://repository.apache.org/content/repositories/orgapacheservicecomb-1196  
>  
> Release Tag : 
> https://github.com/apache/incubator-servicecomb-java-chassis/releases/tag/1.0.0-m1
>  
>   
> Release CommitID : 901869b987c6f65c92b5b8b8f05eaf0f9f6e69cb  
>   
> Keys to verify the Release Candidate : 
> https://dist.apache.org/repos/dist/dev/incubator/servicecomb/KEYS  
>   
> Voting will start now ( Tuesday, 20th March, 2018) and will remain open for 
> next 72 hours, Request all PPMC members to give their vote.  
>   
> [ ] +1 Release this package as 1.0.0-m1  
> [ ] +0 No Opinion  
> [ ] -1 Do not release this package because  
>   
> Regards  
> Asif  
> 
> 


Re: [SAGA] introduce the byteman to the acceptance tests

2018-03-20 Thread Zheng Feng
You can use the multi-steps in the acceptance test. e.g.

Given Install byteman script timeout.btm to Car Service
Given Install byteman script timeout.btm to Hotel Service
Given Install byteman script timeout.btm to Booking Service


2018-03-20 15:25 GMT+08:00 Willem Jiang :

> Yeah, it's great feature that we can leverage.
>
> Thanks for Feng zheng's contribution.
>
> Now my question is do we only support submit the byteman rule for one
> service?
>
>
>
> Willem Jiang
>
> Blog: http://willemjiang.blogspot.com (English)
>   http://jnn.iteye.com  (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
> On Tue, Mar 20, 2018 at 2:29 PM, Zheng Feng  wrote:
>
> > Hi all,
> >
> > I just send the PR [1] to introduce the byteman[2] to our acceptance
> tests.
> >
> > The byteman could be used to inject the fault into the java classes. The
> PR
> > includes
> > 1. unpack the byteman.jar into the ${project.output.directory}/saga
> which
> > can be assembled into the docker image.
> > 2. set the JAVA_OPTS to
> > "-javaagent:/maven/saga/byteman.jar=port:9091,address:
> > 0.0.0.0,listener:true",
> > so we can submit the rule scripts to the remote jvm.
> > 3. update the step of the test to accept the rule of submitting the rule
> > script. such as
> > Given Install the byteman script ${path_to_the_btm} to
> ${service_name}
> > Service
> >
> > Anyway, now we are able to submit the byteman rule scripts to the demo
> > services. I will continue to write the rules to tests the scenarios of
> > timeout
> > and crashing and recovering.
> > Welcome to any feedback !
> >
> > Thanks,
> >
> > [1] https://github.com/apache/incubator-servicecomb-saga/pull/156
> > [2] http://byteman.jboss.org/
> >
>


Re: [SAGA] introduce the byteman to the acceptance tests

2018-03-20 Thread Willem Jiang
Yeah, it's great feature that we can leverage.

Thanks for Feng zheng's contribution.

Now my question is do we only support submit the byteman rule for one
service?



Willem Jiang

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

On Tue, Mar 20, 2018 at 2:29 PM, Zheng Feng  wrote:

> Hi all,
>
> I just send the PR [1] to introduce the byteman[2] to our acceptance tests.
>
> The byteman could be used to inject the fault into the java classes. The PR
> includes
> 1. unpack the byteman.jar into the ${project.output.directory}/saga which
> can be assembled into the docker image.
> 2. set the JAVA_OPTS to
> "-javaagent:/maven/saga/byteman.jar=port:9091,address:
> 0.0.0.0,listener:true",
> so we can submit the rule scripts to the remote jvm.
> 3. update the step of the test to accept the rule of submitting the rule
> script. such as
> Given Install the byteman script ${path_to_the_btm} to ${service_name}
> Service
>
> Anyway, now we are able to submit the byteman rule scripts to the demo
> services. I will continue to write the rules to tests the scenarios of
> timeout
> and crashing and recovering.
> Welcome to any feedback !
>
> Thanks,
>
> [1] https://github.com/apache/incubator-servicecomb-saga/pull/156
> [2] http://byteman.jboss.org/
>