[jira] [Updated] (SCB-531) x-java-interface change from require to optional
[ https://issues.apache.org/jira/browse/SCB-531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] wujimin updated SCB-531: Fix Version/s: java-chassis-1.0.0-m2 > x-java-interface change from require to optional > > > Key: SCB-531 > URL: https://issues.apache.org/jira/browse/SCB-531 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: wujimin >Priority: Major > Fix For: java-chassis-1.0.0-m2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SCB-575) Publish the Java doc of ServiceComb projects
Willem Jiang created SCB-575: Summary: Publish the Java doc of ServiceComb projects Key: SCB-575 URL: https://issues.apache.org/jira/browse/SCB-575 Project: Apache ServiceComb Issue Type: Improvement Components: Java-Chassis, Saga Reporter: Willem Jiang We should generate the API document and publish it to the website. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-573) Split the docker-compose file for debugging easily
[ https://issues.apache.org/jira/browse/SCB-573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16471420#comment-16471420 ] ASF GitHub Bot commented on SCB-573: WillemJiang commented on issue #190: SCB-573 Split the docker-compose file for debugging easily URL: https://github.com/apache/incubator-servicecomb-saga/pull/190#issuecomment-388245364 @zhanglongchun Thanks for the PR, do you mind updated the document for the new added two options? 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 > Split the docker-compose file for debugging easily > -- > > Key: SCB-573 > URL: https://issues.apache.org/jira/browse/SCB-573 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Reporter: longchun >Assignee: longchun >Priority: Minor > Fix For: saga-0.2.0 > > > currently the docker compose file will start all the services, but when we > would like to debug demo services, it is nice to start the alpha server > separately. > saga-demo.sh supporting 2 new arguments: > up-alpha: starting the alpha server only > up-demo:starting the 3 demo services > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-573) Split the docker-compose file for debugging easily
[ https://issues.apache.org/jira/browse/SCB-573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16471411#comment-16471411 ] ASF GitHub Bot commented on SCB-573: coveralls commented on issue #190: SCB-573 Split the docker-compose file for debugging easily URL: https://github.com/apache/incubator-servicecomb-saga/pull/190#issuecomment-388244167 [![Coverage Status](https://coveralls.io/builds/16932821/badge)](https://coveralls.io/builds/16932821) Coverage remained the same at 94.291% when pulling **3ce0dba511c17303b5b58374470dd02fc430aacb on zhanglongchun:SCB-573** into **877a2783f9a3336b71230eadef7fd54a5b40a125 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 > Split the docker-compose file for debugging easily > -- > > Key: SCB-573 > URL: https://issues.apache.org/jira/browse/SCB-573 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Reporter: longchun >Assignee: longchun >Priority: Minor > Fix For: saga-0.2.0 > > > currently the docker compose file will start all the services, but when we > would like to debug demo services, it is nice to start the alpha server > separately. > saga-demo.sh supporting 2 new arguments: > up-alpha: starting the alpha server only > up-demo:starting the 3 demo services > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-92) ip port was wrong when tesing schema
[ https://issues.apache.org/jira/browse/SCB-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated SCB-92: Fix Version/s: service-center-1.0.0-m2 > ip port was wrong when tesing schema > > > Key: SCB-92 > URL: https://issues.apache.org/jira/browse/SCB-92 > Project: Apache ServiceComb > Issue Type: Bug > Components: Service-Center >Reporter: Bo Li >Assignee: Mohammad Asif Siddiqui >Priority: Major > Fix For: service-center-1.0.0-m2 > > > ( Error while sending request due to : Post > http://10.63.185.117:2087/appServiceImpl2/queryApplicationFromInner: dial tcp > 10.63.185.117:2087: connectex: No connection could be made because the target > machine actively refused it. > 20879 and 2087 confusing me! -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-573) Split the docker-compose file for debugging easily
[ https://issues.apache.org/jira/browse/SCB-573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16471403#comment-16471403 ] ASF GitHub Bot commented on SCB-573: zhanglongchun opened a new pull request #190: SCB-573 Split the docker-compose file for debugging easily URL: https://github.com/apache/incubator-servicecomb-saga/pull/190 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 > Split the docker-compose file for debugging easily > -- > > Key: SCB-573 > URL: https://issues.apache.org/jira/browse/SCB-573 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Reporter: longchun >Assignee: longchun >Priority: Minor > Fix For: saga-0.2.0 > > > currently the docker compose file will start all the services, but when we > would like to debug demo services, it is nice to start the alpha server > separately. > saga-demo.sh supporting 2 new arguments: > up-alpha: starting the alpha server only > up-demo:starting the 3 demo services > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-573) Split the docker-compose file for debugging easily
[ https://issues.apache.org/jira/browse/SCB-573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] longchun updated SCB-573: - Summary: Split the docker-compose file for debugging easily (was: split the docker-compose file for debugging easily) > Split the docker-compose file for debugging easily > -- > > Key: SCB-573 > URL: https://issues.apache.org/jira/browse/SCB-573 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Reporter: longchun >Assignee: longchun >Priority: Minor > Fix For: saga-0.2.0 > > > currently the docker compose file will start all the services, but when we > would like to debug demo services, it is nice to start the alpha server > separately. > saga-demo.sh supporting 2 new arguments: > up-alpha: starting the alpha server only > up-demo:starting the 3 demo services > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-546) As a developer, want to reregistry schemas in the dev environment
[ https://issues.apache.org/jira/browse/SCB-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16471393#comment-16471393 ] ASF GitHub Bot commented on SCB-546: liubao68 closed pull request #698: [SCB-546] bug fix URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/698 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/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceRegisterTask.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceRegisterTask.java index d0aed66fe..8036baf15 100644 --- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceRegisterTask.java +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceRegisterTask.java @@ -145,7 +145,7 @@ private boolean registerSchemas() { String schemaId = entry.getKey(); String content = entry.getValue(); GetSchemaResponse existSchema = extractSchema(schemaId, existSchemas); - boolean exists = existSchema != null; + boolean exists = existSchema != null && existSchema.getSummary() != null; LOGGER.info("schemaId [{}] exists {}", schemaId, exists); if (!exists) { if (!srClient.registerSchema(microservice.getServiceId(), schemaId, content)) { diff --git a/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/task/TestMicroserviceRegisterTask.java b/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/task/TestMicroserviceRegisterTask.java index 2afbe482a..7932d6893 100644 --- a/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/task/TestMicroserviceRegisterTask.java +++ b/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/task/TestMicroserviceRegisterTask.java @@ -265,6 +265,43 @@ public void testReRegisteredSetForDev(@Mocked ServiceRegistryClient srClient) { Assert.assertEquals(1, taskList.size()); } + @Test + public void testFirstRegisterForProd(@Mocked ServiceRegistryClient srClient) { +Microservice otherMicroservice = new Microservice(); +otherMicroservice.setAppId(microservice.getAppId()); +otherMicroservice.setServiceName("ms1"); +otherMicroservice.addSchema("s1", ""); + +List list = new ArrayList<>(); +GetSchemaResponse resp = new GetSchemaResponse(); +resp.setSchemaId("s1"); +resp.setSummary(null); +list.add(resp); + +new Expectations() { + { +srClient.getMicroserviceId(anyString, anyString, anyString, anyString); +result = "serviceId"; +srClient.getMicroservice(anyString); +result = otherMicroservice; +srClient.getSchemas(anyString); +result = list; +srClient.registerSchema(microservice.getServiceId(), anyString, anyString); +result = true; + } +}; + +microservice.addSchema("s1", ""); +microservice.getInstance().setEnvironment("production"); +MicroserviceRegisterTask registerTask = new MicroserviceRegisterTask(eventBus, srClient, microservice); +registerTask.run(); + +Assert.assertEquals(true, registerTask.isRegistered()); +Assert.assertEquals(true, registerTask.isSchemaIdSetMatch()); +Assert.assertEquals("serviceId", microservice.getServiceId()); +Assert.assertEquals(1, taskList.size()); + } + @Test(expected = IllegalStateException.class) public void testReRegisteredSetForProd(@Mocked ServiceRegistryClient srClient) { Microservice otherMicroservice = new Microservice(); 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 > As a developer, want to reregistry schemas in the dev environment > - > > Key: SCB-546 > URL: https://issues.apache.org/jira/browse/SCB-546 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: jeho0815 >Assignee: jeho0815 >Priority: Major > Fix For: java-chassis-1.0.0-m2 > > > 1、the servicecenter has a new rest interface which return all schemas with > signature, so we can compare the summary to know whether to update the schema > 2、if the instance enviroment is dev, we reregistry the schemas, otherwize > throw a RuntimeException to
[jira] [Commented] (SCB-546) As a developer, want to reregistry schemas in the dev environment
[ https://issues.apache.org/jira/browse/SCB-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16471391#comment-16471391 ] ASF GitHub Bot commented on SCB-546: liubao68 commented on a change in pull request #698: [SCB-546] bug fix URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/698#discussion_r187506459 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceRegisterTask.java ## @@ -145,7 +145,7 @@ private boolean registerSchemas() { String schemaId = entry.getKey(); String content = entry.getValue(); GetSchemaResponse existSchema = extractSchema(schemaId, existSchemas); - boolean exists = existSchema != null; + boolean exists = existSchema != null && existSchema.getSummary() != null; Review comment: This PR is blocking, so I created a new issue to track this improvement: https://issues.apache.org/jira/browse/SCB-574 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 > As a developer, want to reregistry schemas in the dev environment > - > > Key: SCB-546 > URL: https://issues.apache.org/jira/browse/SCB-546 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: jeho0815 >Assignee: jeho0815 >Priority: Major > Fix For: java-chassis-1.0.0-m2 > > > 1、the servicecenter has a new rest interface which return all schemas with > signature, so we can compare the summary to know whether to update the schema > 2、if the instance enviroment is dev, we reregistry the schemas, otherwize > throw a RuntimeException to avoid make some potential exception in production > environment -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SCB-574) Using batch API to register schema to improve performance
liubao created SCB-574: -- Summary: Using batch API to register schema to improve performance Key: SCB-574 URL: https://issues.apache.org/jira/browse/SCB-574 Project: Apache ServiceComb Issue Type: Improvement Reporter: liubao code: [MicroserviceRegisterTask.java|https://github.com/apache/incubator-servicecomb-java-chassis/pull/698/files/5ca995bbd7edab576366cffbabcfa07256f14274#diff-559a4624cbadfc3ba996c6503a1f5d34] related PR: [https://github.com/apache/incubator-servicecomb-java-chassis/pull/698] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SCB-573) split the docker-compose file for debugging easily
longchun created SCB-573: Summary: split the docker-compose file for debugging easily Key: SCB-573 URL: https://issues.apache.org/jira/browse/SCB-573 Project: Apache ServiceComb Issue Type: Improvement Components: Saga Reporter: longchun Assignee: longchun Fix For: saga-0.2.0 currently the docker compose file will start all the services, but when we would like to debug demo services, it is nice to start the alpha server separately. saga-demo.sh supporting 2 new arguments: up-alpha: starting the alpha server only up-demo:starting the 3 demo services -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-482) Http2 support for java chassis
[ https://issues.apache.org/jira/browse/SCB-482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16471386#comment-16471386 ] ASF GitHub Bot commented on SCB-482: liubao68 closed pull request #648: [SCB-482] Http2 support for java-chassis URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/648 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/demo/demo-pojo/pojo-server/src/main/resources/microservice.yaml b/demo/demo-pojo/pojo-server/src/main/resources/microservice.yaml index 9ca4af41b..e70518320 100644 --- a/demo/demo-pojo/pojo-server/src/main/resources/microservice.yaml +++ b/demo/demo-pojo/pojo-server/src/main/resources/microservice.yaml @@ -24,7 +24,7 @@ servicecomb: registry: address: http://127.0.0.1:30100 rest: -address: 0.0.0.0:8080 +address: 0.0.0.0:8080?protocol=http2 highway: address: 0.0.0.0:7070 #executors: diff --git a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/net/URIEndpointObject.java b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/net/URIEndpointObject.java index 8ec116dd9..4c46e14f4 100644 --- a/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/net/URIEndpointObject.java +++ b/foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/net/URIEndpointObject.java @@ -33,8 +33,14 @@ public class URIEndpointObject extends IpPort { private static final String SSL_ENABLED_KEY = "sslEnabled"; + private static final String PROTOCOL_KEY = "protocol"; + + private static final String HTTP2 = "http2"; + private boolean sslEnabled; + private boolean http2Enabled; + private Mapquerys; public URIEndpointObject(String endpoint) { @@ -47,6 +53,10 @@ public URIEndpointObject(String endpoint) { setPort(uri.getPort()); querys = splitQuery(uri); sslEnabled = Boolean.parseBoolean(getFirst(SSL_ENABLED_KEY)); +String httpversion = getFirst(PROTOCOL_KEY); +if (httpversion != null && httpversion.equals(HTTP2)) { + http2Enabled = true; +} } public static Map splitQuery(URI uri) { @@ -65,6 +75,10 @@ public boolean isSslEnabled() { return sslEnabled; } + public boolean isHttp2Enabled() { +return http2Enabled; + } + public List getQuery(String key) { return querys.get(key); } diff --git a/foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/net/TestURIEndpointObject.java b/foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/net/TestURIEndpointObject.java index 9590687ce..5f7f4d418 100644 --- a/foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/net/TestURIEndpointObject.java +++ b/foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/net/TestURIEndpointObject.java @@ -41,6 +41,13 @@ public void testRestEndpointObject() { Assert.assertEquals(8080, obj.getPort()); Assert.assertTrue(obj.isSslEnabled()); Assert.assertNull(obj.getFirst("notExist")); + +obj = new URIEndpointObject("http://127.0.2.0:8080?sslEnabled=true=http2;); +Assert.assertEquals("127.0.2.0", obj.getHostOrIp()); +Assert.assertEquals(8080, obj.getPort()); +Assert.assertTrue(obj.isSslEnabled()); +Assert.assertTrue(obj.isHttp2Enabled()); +Assert.assertNull(obj.getFirst("notExist")); } @Test(expected = IllegalArgumentException.class) diff --git a/transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/RestTransportClient.java b/transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/RestTransportClient.java index 8c4381417..7b04ecb93 100644 --- a/transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/RestTransportClient.java +++ b/transports/transport-rest/transport-rest-client/src/main/java/org/apache/servicecomb/transport/rest/client/RestTransportClient.java @@ -21,6 +21,7 @@ import org.apache.servicecomb.common.rest.filter.HttpClientFilter; import org.apache.servicecomb.core.Invocation; +import org.apache.servicecomb.foundation.common.net.URIEndpointObject; import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils; import org.apache.servicecomb.foundation.vertx.VertxTLSBuilder; import org.apache.servicecomb.foundation.vertx.VertxUtils; @@ -36,6 +37,7 @@ import io.vertx.core.DeploymentOptions; import io.vertx.core.Vertx; import io.vertx.core.http.HttpClientOptions; +import
[jira] [Commented] (SCB-572) Can not convert error to status code
[ https://issues.apache.org/jira/browse/SCB-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16471373#comment-16471373 ] ASF GitHub Bot commented on SCB-572: little-cui closed pull request #347: SCB-572 Can not convert error to status code URL: https://github.com/apache/incubator-servicecomb-service-center/pull/347 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/server/error/error.go b/server/error/error.go index b30356ee..a12662ca 100644 --- a/server/error/error.go +++ b/server/error/error.go @@ -18,7 +18,6 @@ package error import ( "encoding/json" - "net/http" ) var errors = map[int32]string{ @@ -108,10 +107,7 @@ func (e Error) Marshal() []byte { } func (e Error) StatusCode() int { - if e.Code >= 50 { - return http.StatusInternalServerError - } - return http.StatusBadRequest + return int(e.Code / 1000) } func (e Error) InternalError() bool { diff --git a/server/error/error_test.go b/server/error/error_test.go new file mode 100644 index ..da0e6af5 --- /dev/null +++ b/server/error/error_test.go @@ -0,0 +1,29 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package error + +import ( + "net/http" + "testing" +) + +func TestError_StatusCode(t *testing.T) { + e := Error{Code: 503999} + if e.StatusCode() != http.StatusServiceUnavailable { + t.Fatalf("TestError_StatusCode %v failed", e) + } +} 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 > Can not convert error to status code > > > Key: SCB-572 > URL: https://issues.apache.org/jira/browse/SCB-572 > Project: Apache ServiceComb > Issue Type: Bug > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > Fix For: service-center-1.0.0-m2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-531) x-java-interface change from require to optional
[ https://issues.apache.org/jira/browse/SCB-531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16471371#comment-16471371 ] wujimin commented on SCB-531: - if there is no x-java-interface, and there is no x-java-class for definitions, then just can run, but performance is not good because every model should convert to contract model. > x-java-interface change from require to optional > > > Key: SCB-531 > URL: https://issues.apache.org/jira/browse/SCB-531 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: wujimin >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-534) generic class generate optimize
[ https://issues.apache.org/jira/browse/SCB-534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16471367#comment-16471367 ] wujimin commented on SCB-534: - unnecessary to do this. in normal process: already have related model, no need to dynamic create in edge: create or not, there is no any difference so just remove related comments and code. > generic class generate optimize > --- > > Key: SCB-534 > URL: https://issues.apache.org/jira/browse/SCB-534 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: wujimin >Priority: Major > > {code:java} > Generic > {code} > will not generate to be one class: Generic_User any more, > but to be two class: Generic and User -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-546) As a developer, want to reregistry schemas in the dev environment
[ https://issues.apache.org/jira/browse/SCB-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16471360#comment-16471360 ] ASF GitHub Bot commented on SCB-546: wujimin commented on a change in pull request #698: [SCB-546] bug fix URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/698#discussion_r187500931 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceRegisterTask.java ## @@ -145,7 +145,7 @@ private boolean registerSchemas() { String schemaId = entry.getKey(); String content = entry.getValue(); GetSchemaResponse existSchema = extractSchema(schemaId, existSchemas); - boolean exists = existSchema != null; + boolean exists = existSchema != null && existSchema.getSummary() != null; Review comment: SC support batch register schemas we should swtich to new api be careful that maybe will send too big request, need to split to multi request by max size of limit. 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 > As a developer, want to reregistry schemas in the dev environment > - > > Key: SCB-546 > URL: https://issues.apache.org/jira/browse/SCB-546 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: jeho0815 >Assignee: jeho0815 >Priority: Major > Fix For: java-chassis-1.0.0-m2 > > > 1、the servicecenter has a new rest interface which return all schemas with > signature, so we can compare the summary to know whether to update the schema > 2、if the instance enviroment is dev, we reregistry the schemas, otherwize > throw a RuntimeException to avoid make some potential exception in production > environment -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-491) Test Schema function of Service Center is not available
[ https://issues.apache.org/jira/browse/SCB-491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16471356#comment-16471356 ] ASF GitHub Bot commented on SCB-491: little-cui commented on a change in pull request #348: SCB-491 Add the Test Schema Feature URL: https://github.com/apache/incubator-servicecomb-service-center/pull/348#discussion_r187499074 ## File path: frontend/schema/schemahandler.go ## @@ -36,8 +36,7 @@ func SchemaHandleFunc(c echo.Context) (err error) { response *http.Response req*http.Request instanceIP = r.Header.Get("X-InstanceIP") - schemaName = r.Header.Get("X-SchemaName") - requestUrl = strings.Replace(r.RequestURI, "testSchema", schemaName, -1) + requestUrl = strings.Replace(r.RequestURI, "testSchema/", "", -1) Review comment: the 3rd parameter of replace function should be 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 > Test Schema function of Service Center is not available > --- > > Key: SCB-491 > URL: https://issues.apache.org/jira/browse/SCB-491 > Project: Apache ServiceComb > Issue Type: Bug > Components: Service-Center >Affects Versions: service-center-1.0.0-m1 >Reporter: mabin >Assignee: Mohammad Asif Siddiqui >Priority: Major > Fix For: service-center-1.0.0-m2 > > Attachments: bmi_test_schema.png > > > Service Center version: 1.0.0-m1 > Test case: > https://github.com/apache/incubator-servicecomb-java-chassis/tree/master/samples/bmi > !bmi_test_schema.png! -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-491) Test Schema function of Service Center is not available
[ https://issues.apache.org/jira/browse/SCB-491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16471355#comment-16471355 ] ASF GitHub Bot commented on SCB-491: little-cui commented on a change in pull request #348: SCB-491 Add the Test Schema Feature URL: https://github.com/apache/incubator-servicecomb-service-center/pull/348#discussion_r187500146 ## File path: frontend/app/scripts/modules/serviceCenter/controllers/schemaCtrl.js ## @@ -207,7 +211,13 @@ angular.module('serviceCenter.sc') $scope.selectedInstance = instances[0] || ''; $scope.addresses = addresses[0]; - $scope.selectedAddress = addresses[0][0] || ''; + angular.forEach($scope.addresses, function(addr){ + if(addr.indexOf("rest") >= 0){ +$scope.selectedAddress = addr; +} + }); +$scope.selectedAddress = ($scope.selectedAddress == '') ? addresses[0][0] : $scope.selectedAddress; +$scope.disableNext = $scope.selectedAddress.indexOf("highway") >= 0 ? true : false; Review comment: please do json format the 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 > Test Schema function of Service Center is not available > --- > > Key: SCB-491 > URL: https://issues.apache.org/jira/browse/SCB-491 > Project: Apache ServiceComb > Issue Type: Bug > Components: Service-Center >Affects Versions: service-center-1.0.0-m1 >Reporter: mabin >Assignee: Mohammad Asif Siddiqui >Priority: Major > Fix For: service-center-1.0.0-m2 > > Attachments: bmi_test_schema.png > > > Service Center version: 1.0.0-m1 > Test case: > https://github.com/apache/incubator-servicecomb-java-chassis/tree/master/samples/bmi > !bmi_test_schema.png! -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-491) Test Schema function of Service Center is not available
[ https://issues.apache.org/jira/browse/SCB-491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16471351#comment-16471351 ] ASF GitHub Bot commented on SCB-491: codecov-io commented on issue #348: SCB-491 Add the Test Schema Feature URL: https://github.com/apache/incubator-servicecomb-service-center/pull/348#issuecomment-388149405 # [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/348?src=pr=h1) Report > Merging [#348](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/348?src=pr=desc) into [master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/840b8c15e927e418cd9e3818cd834ba0734c2cac?src=pr=desc) will **not change** coverage. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/348/graphs/tree.svg?token=GAaF7zrg8R=650=pr=150)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/348?src=pr=tree) ```diff @@ Coverage Diff @@ ## master #348 +/- ## === Coverage 69.95% 69.95% === Files 17 17 Lines3418 3418 === Hits 2391 2391 Misses863 863 Partials 164 164 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/348?src=pr=tree) | Coverage Δ | | |---|---|---| | [server/service/instances.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/348/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvaW5zdGFuY2VzLmdv) | `71.13% <0%> (-0.19%)` | :arrow_down: | | [server/service/tag.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/348/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvdGFnLmdv) | `76.02% <0%> (+0.58%)` | :arrow_up: | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/348?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/348?src=pr=footer). Last update [840b8c1...c57de41](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/348?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Test Schema function of Service Center is not available > --- > > Key: SCB-491 > URL: https://issues.apache.org/jira/browse/SCB-491 > Project: Apache ServiceComb > Issue Type: Bug > Components: Service-Center >Affects Versions: service-center-1.0.0-m1 >Reporter: mabin >Assignee: Mohammad Asif Siddiqui >Priority: Major > Fix For: service-center-1.0.0-m2 > > Attachments: bmi_test_schema.png > > > Service Center version: 1.0.0-m1 > Test case: > https://github.com/apache/incubator-servicecomb-java-chassis/tree/master/samples/bmi > !bmi_test_schema.png! -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-92) ip port was wrong when tesing schema
[ https://issues.apache.org/jira/browse/SCB-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16471297#comment-16471297 ] Mohammad Asif Siddiqui commented on SCB-92: --- This issue is handled as a part of https://issues.apache.org/jira/secure/RapidBoard.jspa?rapidView=223=SCB=detail=SCB-491 > ip port was wrong when tesing schema > > > Key: SCB-92 > URL: https://issues.apache.org/jira/browse/SCB-92 > Project: Apache ServiceComb > Issue Type: Bug > Components: Service-Center >Reporter: Bo Li >Assignee: Mohammad Asif Siddiqui >Priority: Major > > ( Error while sending request due to : Post > http://10.63.185.117:2087/appServiceImpl2/queryApplicationFromInner: dial tcp > 10.63.185.117:2087: connectex: No connection could be made because the target > machine actively refused it. > 20879 and 2087 confusing me! -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-491) Test Schema function of Service Center is not available
[ https://issues.apache.org/jira/browse/SCB-491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470938#comment-16470938 ] ASF GitHub Bot commented on SCB-491: codecov-io commented on issue #348: SCB-491 Add the Test Schema Feature URL: https://github.com/apache/incubator-servicecomb-service-center/pull/348#issuecomment-388149405 # [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/348?src=pr=h1) Report > Merging [#348](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/348?src=pr=desc) into [master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/840b8c15e927e418cd9e3818cd834ba0734c2cac?src=pr=desc) will **not change** coverage. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/348/graphs/tree.svg?token=GAaF7zrg8R=pr=650=150)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/348?src=pr=tree) ```diff @@ Coverage Diff @@ ## master #348 +/- ## === Coverage 69.95% 69.95% === Files 17 17 Lines3418 3418 === Hits 2391 2391 Misses863 863 Partials 164 164 ``` -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/348?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/348?src=pr=footer). Last update [840b8c1...b338ef9](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/348?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Test Schema function of Service Center is not available > --- > > Key: SCB-491 > URL: https://issues.apache.org/jira/browse/SCB-491 > Project: Apache ServiceComb > Issue Type: Bug > Components: Service-Center >Affects Versions: service-center-1.0.0-m1 >Reporter: mabin >Assignee: Mohammad Asif Siddiqui >Priority: Major > Fix For: service-center-1.0.0-m2 > > Attachments: bmi_test_schema.png > > > Service Center version: 1.0.0-m1 > Test case: > https://github.com/apache/incubator-servicecomb-java-chassis/tree/master/samples/bmi > !bmi_test_schema.png! -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-491) Test Schema function of Service Center is not available
[ https://issues.apache.org/jira/browse/SCB-491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470909#comment-16470909 ] ASF GitHub Bot commented on SCB-491: asifdxtreme opened a new pull request #348: SCB-491 Add the Test Schema Feature URL: https://github.com/apache/incubator-servicecomb-service-center/pull/348 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 > Test Schema function of Service Center is not available > --- > > Key: SCB-491 > URL: https://issues.apache.org/jira/browse/SCB-491 > Project: Apache ServiceComb > Issue Type: Bug > Components: Service-Center >Affects Versions: service-center-1.0.0-m1 >Reporter: mabin >Assignee: Mohammad Asif Siddiqui >Priority: Major > Fix For: service-center-1.0.0-m2 > > Attachments: bmi_test_schema.png > > > Service Center version: 1.0.0-m1 > Test case: > https://github.com/apache/incubator-servicecomb-java-chassis/tree/master/samples/bmi > !bmi_test_schema.png! -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-571) Decouple OmegaContext in the Application
[ https://issues.apache.org/jira/browse/SCB-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470468#comment-16470468 ] ASF GitHub Bot commented on SCB-571: WillemJiang closed pull request #189: SCB-571 Decouple OmegaContext in the Application URL: https://github.com/apache/incubator-servicecomb-saga/pull/189 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 > Decouple OmegaContext in the Application > > > Key: SCB-571 > URL: https://issues.apache.org/jira/browse/SCB-571 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Reporter: Willem Jiang >Priority: Major > > In Current Demo Application, if we remove the \@EnableOmega, the application > should start without any issue. > OmegaContext should be optional, if the user doesn't enableOmega, the context > should be invisible to the application. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-572) Can not convert error to status code
[ https://issues.apache.org/jira/browse/SCB-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470434#comment-16470434 ] ASF GitHub Bot commented on SCB-572: codecov-io commented on issue #347: SCB-572 Can not convert error to status code URL: https://github.com/apache/incubator-servicecomb-service-center/pull/347#issuecomment-388067455 # [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/347?src=pr=h1) Report > Merging [#347](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/347?src=pr=desc) into [master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/840b8c15e927e418cd9e3818cd834ba0734c2cac?src=pr=desc) will **not change** coverage. > The diff coverage is `n/a`. [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/347/graphs/tree.svg?token=GAaF7zrg8R=pr=150=650)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/347?src=pr=tree) ```diff @@ Coverage Diff @@ ## master #347 +/- ## === Coverage 69.95% 69.95% === Files 17 17 Lines3418 3418 === Hits 2391 2391 Misses863 863 Partials 164 164 ``` -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/347?src=pr=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/347?src=pr=footer). Last update [840b8c1...17ab261](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/347?src=pr=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Can not convert error to status code > > > Key: SCB-572 > URL: https://issues.apache.org/jira/browse/SCB-572 > Project: Apache ServiceComb > Issue Type: Bug > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > Fix For: service-center-1.0.0-m2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-572) Can not convert error to status code
[ https://issues.apache.org/jira/browse/SCB-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470416#comment-16470416 ] ASF GitHub Bot commented on SCB-572: little-cui opened a new pull request #347: SCB-572 Can not convert error to status code URL: https://github.com/apache/incubator-servicecomb-service-center/pull/347 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 > Can not convert error to status code > > > Key: SCB-572 > URL: https://issues.apache.org/jira/browse/SCB-572 > Project: Apache ServiceComb > Issue Type: Bug > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > Fix For: service-center-1.0.0-m2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SCB-572) Can not convert error to status code
[ https://issues.apache.org/jira/browse/SCB-572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] little-cui resolved SCB-572. Resolution: Fixed > Can not convert error to status code > > > Key: SCB-572 > URL: https://issues.apache.org/jira/browse/SCB-572 > Project: Apache ServiceComb > Issue Type: Bug > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > Fix For: service-center-1.0.0-m2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SCB-572) Can not convert error to status code
little-cui created SCB-572: -- Summary: Can not convert error to status code Key: SCB-572 URL: https://issues.apache.org/jira/browse/SCB-572 Project: Apache ServiceComb Issue Type: Bug Components: Service-Center Reporter: little-cui Assignee: little-cui Fix For: service-center-1.0.0-m2 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SCB-565) Register instance with the same id will create redundant endpoint index data
[ https://issues.apache.org/jira/browse/SCB-565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] little-cui resolved SCB-565. Resolution: Fixed > Register instance with the same id will create redundant endpoint index data > > > Key: SCB-565 > URL: https://issues.apache.org/jira/browse/SCB-565 > Project: Apache ServiceComb > Issue Type: Bug > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > Fix For: service-center-1.0.0-m2 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-546) As a developer, want to reregistry schemas in the dev environment
[ https://issues.apache.org/jira/browse/SCB-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470405#comment-16470405 ] ASF GitHub Bot commented on SCB-546: wujimin commented on a change in pull request #698: [SCB-546] bug fix URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/698#discussion_r187333832 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceRegisterTask.java ## @@ -155,7 +155,7 @@ private boolean registerSchemas() { String curSchemaSumary = existSchema.getSummary(); String schemaSummary = Hashing.sha256().newHasher().putString(content, Charsets.UTF_8).hash().toString(); if (!schemaSummary.equals(curSchemaSumary)) { - if (microservice.getInstance().getEnvironment().equalsIgnoreCase("development")) { + if (curSchemaSumary == null || microservice.getInstance().getEnvironment().equalsIgnoreCase("development")) { Review comment: 1.must compatible with old version treat summary is null as schema not registered, register again with summary, SC allow this action. 2.currently getSchemas of local impl is not equals to SC, infact it's a bug 3.ok, remember to check it. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > As a developer, want to reregistry schemas in the dev environment > - > > Key: SCB-546 > URL: https://issues.apache.org/jira/browse/SCB-546 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: jeho0815 >Assignee: jeho0815 >Priority: Major > Fix For: java-chassis-1.0.0-m2 > > > 1、the servicecenter has a new rest interface which return all schemas with > signature, so we can compare the summary to know whether to update the schema > 2、if the instance enviroment is dev, we reregistry the schemas, otherwize > throw a RuntimeException to avoid make some potential exception in production > environment -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-506) 服务治理相关的需要事件上报
[ https://issues.apache.org/jira/browse/SCB-506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470394#comment-16470394 ] ASF GitHub Bot commented on SCB-506: wujimin commented on a change in pull request #678: [SCB-506]服务治理相关的需要事件上报 URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/678#discussion_r187331013 ## File path: handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/filter/IsolationServerListFilter.java ## @@ -112,10 +116,18 @@ private boolean allowVisit(Server server) { LOGGER.info("The Service {}'s instance {} has been break, will give a single test opportunity.", microserviceName, server); + EventManager.post(new IsolationServerEvent(microserviceName, totalRequest, currentCountinuousFailureCount, Review comment: still use global instance? 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 > 服务治理相关的需要事件上报 > - > > Key: SCB-506 > URL: https://issues.apache.org/jira/browse/SCB-506 > Project: Apache ServiceComb > Issue Type: Task > Components: Java-Chassis >Reporter: xuyiyun >Assignee: xuyiyun >Priority: Major > Fix For: java-chassis-1.0.0-m2 > > > 如果发生服务降级 实例隔离 熔断等操作,业务监控系统需要能获取到对应的通知,方便集成 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-506) 服务治理相关的需要事件上报
[ https://issues.apache.org/jira/browse/SCB-506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470388#comment-16470388 ] ASF GitHub Bot commented on SCB-506: wujimin commented on a change in pull request #678: [SCB-506]服务治理相关的需要事件上报 URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/678#discussion_r187329477 ## File path: handlers/handler-loadbalance/src/main/java/org/apache/servicecomb/loadbalance/event/IsolationServerEvent.java ## @@ -0,0 +1,99 @@ +/* + * 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.loadbalance.event; + +import java.util.HashMap; + +import org.apache.servicecomb.foundation.common.event.AlarmEvent; + +public class IsolationServerEvent extends AlarmEvent { + + private String microserviceName; + + //当前实例总请求数 + private long currentTotalRequest; + + //当前实例连续出错次数 + private int currentCountinuousFailureCount; + + //当前实例出错百分比 + private double currentErrorPercentage; + + private long enableRequestThreshold; + + private int continuousFailureThreshold; + + private int errorThresholdPercentage; + + private long singleTestTime; + + public IsolationServerEvent(String microserviceName, long totalRequest, int currentCountinuousFailureCount, + double currentErrorPercentage, int continuousFailureThreshold, + int errorThresholdPercentage, long enableRequestThreshold, long singleTestTime, Type type) { +super(type); +HashMapmsg = new HashMap<>(); +this.microserviceName = microserviceName; +this.currentTotalRequest = totalRequest; +this.currentCountinuousFailureCount = currentCountinuousFailureCount; +this.currentErrorPercentage = currentErrorPercentage; +this.enableRequestThreshold = enableRequestThreshold; +this.continuousFailureThreshold = continuousFailureThreshold; +this.errorThresholdPercentage = errorThresholdPercentage; +this.singleTestTime = singleTestTime; +msg.put("microserviceName", this.microserviceName); Review comment: why we need not only model, but also map? 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 > 服务治理相关的需要事件上报 > - > > Key: SCB-506 > URL: https://issues.apache.org/jira/browse/SCB-506 > Project: Apache ServiceComb > Issue Type: Task > Components: Java-Chassis >Reporter: xuyiyun >Assignee: xuyiyun >Priority: Major > Fix For: java-chassis-1.0.0-m2 > > > 如果发生服务降级 实例隔离 熔断等操作,业务监控系统需要能获取到对应的通知,方便集成 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-506) 服务治理相关的需要事件上报
[ https://issues.apache.org/jira/browse/SCB-506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470387#comment-16470387 ] ASF GitHub Bot commented on SCB-506: wujimin commented on a change in pull request #678: [SCB-506]服务治理相关的需要事件上报 URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/678#discussion_r187329270 ## File path: handlers/handler-bizkeeper/src/main/java/org/apache/servicecomb/bizkeeper/event/CircutBreakerEventNotifier.java ## @@ -0,0 +1,58 @@ +/* + * 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.bizkeeper.event; + +import java.util.concurrent.ConcurrentHashMap; + +import org.apache.servicecomb.foundation.common.event.EventManager; +import org.apache.servicecomb.foundation.common.event.AlarmEvent.Type; + +import com.netflix.hystrix.HystrixCommandKey; +import com.netflix.hystrix.HystrixEventType; +import com.netflix.hystrix.strategy.eventnotifier.HystrixEventNotifier; + +public class CircutBreakerEventNotifier extends HystrixEventNotifier { + + /** + * 使用circuitMarker来记录被熔断的接口 + */ + private static ConcurrentHashMapcircuitMarker = new ConcurrentHashMap<>(); + + @Override + public void markEvent(HystrixEventType eventType, HystrixCommandKey key) { +String keyName = key.name(); +switch (eventType) { + case SHORT_CIRCUITED: +if (circuitMarker.get(keyName) == null) { Review comment: ConcurrentHashMapEx circuitFlag = new ConcurrentHashMapEx<>(); AtomicBoolean flag = circuitFlag.computeIfAbsent(key, k -> new AtomicBoolean()); // circuit event if (flag.compareAndSet(false, true)) { // post xxx event } // success event if (flag.compareAndSet(true, false)) { // post xxx event } --- and infact, i don't know what does eventType mean, open/close/succeeded/failed 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 > 服务治理相关的需要事件上报 > - > > Key: SCB-506 > URL: https://issues.apache.org/jira/browse/SCB-506 > Project: Apache ServiceComb > Issue Type: Task > Components: Java-Chassis >Reporter: xuyiyun >Assignee: xuyiyun >Priority: Major > Fix For: java-chassis-1.0.0-m2 > > > 如果发生服务降级 实例隔离 熔断等操作,业务监控系统需要能获取到对应的通知,方便集成 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-482) Http2 support for java chassis
[ https://issues.apache.org/jira/browse/SCB-482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470348#comment-16470348 ] ASF GitHub Bot commented on SCB-482: coveralls commented on issue #648: [SCB-482] Http2 support for java-chassis URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/648#issuecomment-381568126 [![Coverage Status](https://coveralls.io/builds/16920459/badge)](https://coveralls.io/builds/16920459) Coverage increased (+0.03%) to 87.387% when pulling **aa57fe1abb7fe07bbbfa5b911286c60a5019aae3 on Rajadeepan:master** into **50b6b98966f0a5815d1968e1fd3b7d126c3749c5 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 > Http2 support for java chassis > -- > > Key: SCB-482 > URL: https://issues.apache.org/jira/browse/SCB-482 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Java-Chassis >Reporter: Rajadeepan >Priority: Minor > > Http2 support for java chassis. > Only Application for Rest Vertex and not applicable for servlet and highway. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-546) As a developer, want to reregistry schemas in the dev environment
[ https://issues.apache.org/jira/browse/SCB-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470249#comment-16470249 ] ASF GitHub Bot commented on SCB-546: coveralls commented on issue #698: [SCB-546] bug fix URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/698#issuecomment-388006686 [![Coverage Status](https://coveralls.io/builds/16919419/badge)](https://coveralls.io/builds/16919419) Coverage remained the same at 87.359% when pulling **5ca995bbd7edab576366cffbabcfa07256f14274 on jeho0815:Branch_master_SCB546** into **50b6b98966f0a5815d1968e1fd3b7d126c3749c5 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 > As a developer, want to reregistry schemas in the dev environment > - > > Key: SCB-546 > URL: https://issues.apache.org/jira/browse/SCB-546 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: jeho0815 >Assignee: jeho0815 >Priority: Major > Fix For: java-chassis-1.0.0-m2 > > > 1、the servicecenter has a new rest interface which return all schemas with > signature, so we can compare the summary to know whether to update the schema > 2、if the instance enviroment is dev, we reregistry the schemas, otherwize > throw a RuntimeException to avoid make some potential exception in production > environment -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-546) As a developer, want to reregistry schemas in the dev environment
[ https://issues.apache.org/jira/browse/SCB-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470222#comment-16470222 ] ASF GitHub Bot commented on SCB-546: jeho0815 commented on a change in pull request #698: [SCB-546] bug fix URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/698#discussion_r187299590 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceRegisterTask.java ## @@ -155,7 +155,7 @@ private boolean registerSchemas() { String curSchemaSumary = existSchema.getSummary(); String schemaSummary = Hashing.sha256().newHasher().putString(content, Charsets.UTF_8).hash().toString(); if (!schemaSummary.equals(curSchemaSumary)) { - if (microservice.getInstance().getEnvironment().equalsIgnoreCase("development")) { + if (curSchemaSumary == null || microservice.getInstance().getEnvironment().equalsIgnoreCase("development")) { Review comment: 1、has modified, but old version' summary content is null too, may has some potential problem 2、local impl work well, because it generate one list on startup 3、i don't know why CI can't check this error out. will check 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 > As a developer, want to reregistry schemas in the dev environment > - > > Key: SCB-546 > URL: https://issues.apache.org/jira/browse/SCB-546 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: jeho0815 >Assignee: jeho0815 >Priority: Major > Fix For: java-chassis-1.0.0-m2 > > > 1、the servicecenter has a new rest interface which return all schemas with > signature, so we can compare the summary to know whether to update the schema > 2、if the instance enviroment is dev, we reregistry the schemas, otherwize > throw a RuntimeException to avoid make some potential exception in production > environment -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-546) As a developer, want to reregistry schemas in the dev environment
[ https://issues.apache.org/jira/browse/SCB-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470216#comment-16470216 ] ASF GitHub Bot commented on SCB-546: jeho0815 commented on a change in pull request #698: [SCB-546] bug fix URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/698#discussion_r187299590 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceRegisterTask.java ## @@ -155,7 +155,7 @@ private boolean registerSchemas() { String curSchemaSumary = existSchema.getSummary(); String schemaSummary = Hashing.sha256().newHasher().putString(content, Charsets.UTF_8).hash().toString(); if (!schemaSummary.equals(curSchemaSumary)) { - if (microservice.getInstance().getEnvironment().equalsIgnoreCase("development")) { + if (curSchemaSumary == null || microservice.getInstance().getEnvironment().equalsIgnoreCase("development")) { Review comment: 1、has changed, but old version' summary content is null too, may has some potential problem 2、local impl work well, because it generate one list on startup 3、i don't know why CI can't check this error out. will check 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 > As a developer, want to reregistry schemas in the dev environment > - > > Key: SCB-546 > URL: https://issues.apache.org/jira/browse/SCB-546 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: jeho0815 >Assignee: jeho0815 >Priority: Major > Fix For: java-chassis-1.0.0-m2 > > > 1、the servicecenter has a new rest interface which return all schemas with > signature, so we can compare the summary to know whether to update the schema > 2、if the instance enviroment is dev, we reregistry the schemas, otherwize > throw a RuntimeException to avoid make some potential exception in production > environment -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-506) 服务治理相关的需要事件上报
[ https://issues.apache.org/jira/browse/SCB-506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470196#comment-16470196 ] ASF GitHub Bot commented on SCB-506: xuyiyun0929 commented on a change in pull request #678: [SCB-506]服务治理相关的需要事件上报 URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/678#discussion_r187295182 ## File path: handlers/handler-bizkeeper/src/main/java/org/apache/servicecomb/bizkeeper/event/CircutBreakerEventNotifier.java ## @@ -0,0 +1,58 @@ +/* + * 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.bizkeeper.event; + +import java.util.concurrent.ConcurrentHashMap; + +import org.apache.servicecomb.foundation.common.event.EventManager; +import org.apache.servicecomb.foundation.common.event.AlarmEvent.Type; + +import com.netflix.hystrix.HystrixCommandKey; +import com.netflix.hystrix.HystrixEventType; +import com.netflix.hystrix.strategy.eventnotifier.HystrixEventNotifier; + +public class CircutBreakerEventNotifier extends HystrixEventNotifier { + + /** + * 使用circuitMarker来记录被熔断的接口 + */ + private static ConcurrentHashMapcircuitMarker = new ConcurrentHashMap<>(); + + @Override + public void markEvent(HystrixEventType eventType, HystrixCommandKey key) { +String keyName = key.name(); +switch (eventType) { + case SHORT_CIRCUITED: +if (circuitMarker.get(keyName) == null) { Review comment: subscribers only need switch event, We need only send event when last time is OPEN and turn to be CLOSED. Can't send for each invocation.I discussed with Liu Bao. about concurrency problem,can you provide some improvement suggestions? 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 > 服务治理相关的需要事件上报 > - > > Key: SCB-506 > URL: https://issues.apache.org/jira/browse/SCB-506 > Project: Apache ServiceComb > Issue Type: Task > Components: Java-Chassis >Reporter: xuyiyun >Assignee: xuyiyun >Priority: Major > Fix For: java-chassis-1.0.0-m2 > > > 如果发生服务降级 实例隔离 熔断等操作,业务监控系统需要能获取到对应的通知,方便集成 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-571) Decouple OmegaContext in the Application
[ https://issues.apache.org/jira/browse/SCB-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470162#comment-16470162 ] ASF GitHub Bot commented on SCB-571: coveralls commented on issue #189: SCB-571 Decouple OmegaContext in the Application URL: https://github.com/apache/incubator-servicecomb-saga/pull/189#issuecomment-388008636 [![Coverage Status](https://coveralls.io/builds/16918049/badge)](https://coveralls.io/builds/16918049) Coverage decreased (-1.0%) to 94.199% when pulling **944e745c1b61d80afe916841f8e637ff7bb13a3c on SCB-571** into **d8ad37c3acc8a4e35bf2e346314a91e9f2e496d3 on 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 > Decouple OmegaContext in the Application > > > Key: SCB-571 > URL: https://issues.apache.org/jira/browse/SCB-571 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Reporter: Willem Jiang >Priority: Major > > In Current Demo Application, if we remove the \@EnableOmega, the application > should start without any issue. > OmegaContext should be optional, if the user doesn't enableOmega, the context > should be invisible to the application. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-569) Add document about SSL setup of Pack
[ https://issues.apache.org/jira/browse/SCB-569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470160#comment-16470160 ] ASF GitHub Bot commented on SCB-569: yangbor commented on issue #188: [SCB-569] Add document for enabling SSL URL: https://github.com/apache/incubator-servicecomb-saga/pull/188#issuecomment-388008417 @WillemJiang Done 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 > Add document about SSL setup of Pack > > > Key: SCB-569 > URL: https://issues.apache.org/jira/browse/SCB-569 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Reporter: Willem Jiang >Assignee: Yang Bo >Priority: Major > Fix For: saga-0.2.0 > > > As we already has the ssl support in Saga pack(Omega & Alpha), it's time to > update the document. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SCB-245) [pack] support to intercept dubbo's requests
[ https://issues.apache.org/jira/browse/SCB-245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang reassigned SCB-245: Assignee: wuzunqian > [pack] support to intercept dubbo's requests > > > Key: SCB-245 > URL: https://issues.apache.org/jira/browse/SCB-245 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.2.0 >Reporter: Eric Lee >Assignee: wuzunqian >Priority: Minor > Fix For: saga-0.2.0 > > > as a sdk, I want to be able to intercept the incoming and outgoing requests > of apps developed by dubbo and inject the transaction ids in its header. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-546) As a developer, want to reregistry schemas in the dev environment
[ https://issues.apache.org/jira/browse/SCB-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470153#comment-16470153 ] ASF GitHub Bot commented on SCB-546: coveralls commented on issue #698: [SCB-546] bug fix URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/698#issuecomment-388006686 [![Coverage Status](https://coveralls.io/builds/16918356/badge)](https://coveralls.io/builds/16918356) Coverage remained the same at 87.359% when pulling **3be7ca65199e43b1ba1218be430fc49add9ad9da on jeho0815:Branch_master_SCB546** into **50b6b98966f0a5815d1968e1fd3b7d126c3749c5 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 > As a developer, want to reregistry schemas in the dev environment > - > > Key: SCB-546 > URL: https://issues.apache.org/jira/browse/SCB-546 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: jeho0815 >Assignee: jeho0815 >Priority: Major > Fix For: java-chassis-1.0.0-m2 > > > 1、the servicecenter has a new rest interface which return all schemas with > signature, so we can compare the summary to know whether to update the schema > 2、if the instance enviroment is dev, we reregistry the schemas, otherwize > throw a RuntimeException to avoid make some potential exception in production > environment -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SCB-491) Test Schema function of Service Center is not available
[ https://issues.apache.org/jira/browse/SCB-491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang reassigned SCB-491: Assignee: Mohammad Asif Siddiqui (was: Yang Bo) > Test Schema function of Service Center is not available > --- > > Key: SCB-491 > URL: https://issues.apache.org/jira/browse/SCB-491 > Project: Apache ServiceComb > Issue Type: Bug > Components: Service-Center >Affects Versions: service-center-1.0.0-m1 >Reporter: mabin >Assignee: Mohammad Asif Siddiqui >Priority: Major > Fix For: service-center-1.0.0-m2 > > Attachments: bmi_test_schema.png > > > Service Center version: 1.0.0-m1 > Test case: > https://github.com/apache/incubator-servicecomb-java-chassis/tree/master/samples/bmi > !bmi_test_schema.png! -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-546) As a developer, want to reregistry schemas in the dev environment
[ https://issues.apache.org/jira/browse/SCB-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470132#comment-16470132 ] ASF GitHub Bot commented on SCB-546: wujimin commented on a change in pull request #698: [SCB-546] bug fix URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/698#discussion_r187280193 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceRegisterTask.java ## @@ -155,7 +155,7 @@ private boolean registerSchemas() { String curSchemaSumary = existSchema.getSummary(); String schemaSummary = Hashing.sha256().newHasher().putString(content, Charsets.UTF_8).hash().toString(); if (!schemaSummary.equals(curSchemaSumary)) { - if (microservice.getInstance().getEnvironment().equalsIgnoreCase("development")) { + if (curSchemaSumary == null || microservice.getInstance().getEnvironment().equalsIgnoreCase("development")) { Review comment: why CI passed for preview 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 > As a developer, want to reregistry schemas in the dev environment > - > > Key: SCB-546 > URL: https://issues.apache.org/jira/browse/SCB-546 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: jeho0815 >Assignee: jeho0815 >Priority: Major > Fix For: java-chassis-1.0.0-m2 > > > 1、the servicecenter has a new rest interface which return all schemas with > signature, so we can compare the summary to know whether to update the schema > 2、if the instance enviroment is dev, we reregistry the schemas, otherwize > throw a RuntimeException to avoid make some potential exception in production > environment -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-546) As a developer, want to reregistry schemas in the dev environment
[ https://issues.apache.org/jira/browse/SCB-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470131#comment-16470131 ] ASF GitHub Bot commented on SCB-546: wujimin commented on a change in pull request #698: [SCB-546] bug fix URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/698#discussion_r187280085 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceRegisterTask.java ## @@ -155,7 +155,7 @@ private boolean registerSchemas() { String curSchemaSumary = existSchema.getSummary(); String schemaSummary = Hashing.sha256().newHasher().putString(content, Charsets.UTF_8).hash().toString(); if (!schemaSummary.equals(curSchemaSumary)) { - if (microservice.getInstance().getEnvironment().equalsIgnoreCase("development")) { + if (curSchemaSumary == null || microservice.getInstance().getEnvironment().equalsIgnoreCase("development")) { Review comment: if schema content is null, then local registry impl works well? 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 > As a developer, want to reregistry schemas in the dev environment > - > > Key: SCB-546 > URL: https://issues.apache.org/jira/browse/SCB-546 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: jeho0815 >Assignee: jeho0815 >Priority: Major > Fix For: java-chassis-1.0.0-m2 > > > 1、the servicecenter has a new rest interface which return all schemas with > signature, so we can compare the summary to know whether to update the schema > 2、if the instance enviroment is dev, we reregistry the schemas, otherwize > throw a RuntimeException to avoid make some potential exception in production > environment -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-546) As a developer, want to reregistry schemas in the dev environment
[ https://issues.apache.org/jira/browse/SCB-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470130#comment-16470130 ] ASF GitHub Bot commented on SCB-546: wujimin commented on a change in pull request #698: [SCB-546] bug fix URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/698#discussion_r187279779 ## File path: service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceRegisterTask.java ## @@ -155,7 +155,7 @@ private boolean registerSchemas() { String curSchemaSumary = existSchema.getSummary(); String schemaSummary = Hashing.sha256().newHasher().putString(content, Charsets.UTF_8).hash().toString(); if (!schemaSummary.equals(curSchemaSumary)) { - if (microservice.getInstance().getEnvironment().equalsIgnoreCase("development")) { + if (curSchemaSumary == null || microservice.getInstance().getEnvironment().equalsIgnoreCase("development")) { Review comment: boolean exists = (existSchema != null) && (existSchema .getSummary() != null); 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 > As a developer, want to reregistry schemas in the dev environment > - > > Key: SCB-546 > URL: https://issues.apache.org/jira/browse/SCB-546 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: jeho0815 >Assignee: jeho0815 >Priority: Major > Fix For: java-chassis-1.0.0-m2 > > > 1、the servicecenter has a new rest interface which return all schemas with > signature, so we can compare the summary to know whether to update the schema > 2、if the instance enviroment is dev, we reregistry the schemas, otherwize > throw a RuntimeException to avoid make some potential exception in production > environment -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-546) As a developer, want to reregistry schemas in the dev environment
[ https://issues.apache.org/jira/browse/SCB-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470126#comment-16470126 ] ASF GitHub Bot commented on SCB-546: jeho0815 opened a new pull request #698: [SCB-546] bug fix URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/698 in production enviroment, first time register microservice, schemas's summary is null, registerSchemas will throw exception. if the summary is null, will re-gister the schema. 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 > As a developer, want to reregistry schemas in the dev environment > - > > Key: SCB-546 > URL: https://issues.apache.org/jira/browse/SCB-546 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: jeho0815 >Assignee: jeho0815 >Priority: Major > Fix For: java-chassis-1.0.0-m2 > > > 1、the servicecenter has a new rest interface which return all schemas with > signature, so we can compare the summary to know whether to update the schema > 2、if the instance enviroment is dev, we reregistry the schemas, otherwize > throw a RuntimeException to avoid make some potential exception in production > environment -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SCB-491) Test Schema function of Service Center is not available
[ https://issues.apache.org/jira/browse/SCB-491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang updated SCB-491: - Affects Version/s: (was: service-center-1.0.0-m2) service-center-1.0.0-m1 > Test Schema function of Service Center is not available > --- > > Key: SCB-491 > URL: https://issues.apache.org/jira/browse/SCB-491 > Project: Apache ServiceComb > Issue Type: Bug > Components: Service-Center >Affects Versions: service-center-1.0.0-m1 >Reporter: mabin >Priority: Major > Fix For: service-center-1.0.0-m2 > > Attachments: bmi_test_schema.png > > > Service Center version: 1.0.0-m1 > Test case: > https://github.com/apache/incubator-servicecomb-java-chassis/tree/master/samples/bmi > !bmi_test_schema.png! -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-543) optimize registry procedure
[ https://issues.apache.org/jira/browse/SCB-543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470111#comment-16470111 ] ASF GitHub Bot commented on SCB-543: liubao68 closed pull request #692: [SCB-543]optimize registry procedure URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/692 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/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceInstanceRegisterTask.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceInstanceRegisterTask.java index 37039b059..f0132b635 100644 --- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceInstanceRegisterTask.java +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceInstanceRegisterTask.java @@ -69,7 +69,7 @@ protected boolean doRegister() { String instanceId = srClient.registerMicroserviceInstance(microserviceInstance); if (StringUtils.isEmpty(instanceId)) { - LOGGER.error("Register microservice instance failed. microserviceId={}", + LOGGER.error("Register microservice instance failed,will back to register microservice again. microserviceId={}", microserviceInstance.getServiceId()); return false; } diff --git a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceRegisterTask.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceRegisterTask.java index b029d6277..905c34bff 100644 --- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceRegisterTask.java +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/task/MicroserviceRegisterTask.java @@ -52,6 +52,15 @@ public void onMicroserviceInstanceHeartbeatTask(MicroserviceInstanceHeartbeatTas } } + @Subscribe + public void onInstanceRegistryFailed(MicroserviceInstanceRegisterTask task) { +if (task.taskStatus != TaskStatus.FINISHED){ + LOGGER.info("read MicroserviceInstanceRegisterTask status is {}", task.taskStatus); + this.taskStatus = TaskStatus.READY; + this.registered = false; +} + } + @Override protected boolean doRegister() { LOGGER.info("running microservice register task."); 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 > optimize registry procedure > --- > > Key: SCB-543 > URL: https://issues.apache.org/jira/browse/SCB-543 > Project: Apache ServiceComb > Issue Type: Improvement >Reporter: TaoMeng >Assignee: TaoMeng >Priority: Major > > In one case of csp upgrade scene 1: successfully registry microsevice at > first , 2: then delete the microservice static information but instance is > still registrying , the result is registry instance in hanging on because sc > has no microservice static information.so in order to optimize this registry > halt , i put registry instance procedure to registry microservice again -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-571) Decouple OmegaContext in the Application
[ https://issues.apache.org/jira/browse/SCB-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470112#comment-16470112 ] ASF GitHub Bot commented on SCB-571: WillemJiang opened a new pull request #189: SCB-571 Decouple OmegaContext in the Application URL: https://github.com/apache/incubator-servicecomb-saga/pull/189 Now the demo application can use enableOmega or not. 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 > Decouple OmegaContext in the Application > > > Key: SCB-571 > URL: https://issues.apache.org/jira/browse/SCB-571 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Reporter: Willem Jiang >Priority: Major > > In Current Demo Application, if we remove the \@EnableOmega, the application > should start without any issue. > OmegaContext should be optional, if the user doesn't enableOmega, the context > should be invisible to the application. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-546) As a developer, want to reregistry schemas in the dev environment
[ https://issues.apache.org/jira/browse/SCB-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470102#comment-16470102 ] ASF GitHub Bot commented on SCB-546: jeho0815 closed pull request #697: [SCB-546] refactor the schemas registry logic URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/697 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/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/Const.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/Const.java index 8166bec46..57855c435 100644 --- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/Const.java +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/Const.java @@ -119,6 +119,15 @@ private Const() { } } +public static final String MICROSERVICE_ALL_SCHEMAs; +static { + if (VERSION_V3.equals(CURRENT_VERSION)) { +MICROSERVICE_ALL_SCHEMAs = "/registry/v3/microservices/%s/schemas"; + } else { +MICROSERVICE_ALL_SCHEMAs = V4_PREFIX + "/microservices/%s/schemas"; + } +} + public static final String MICROSERVICE_SCHEMA; static { if (VERSION_V3.equals(CURRENT_VERSION)) { diff --git a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/FrameworkVersions.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/FrameworkVersions.java index 5c878552d..f91ffd3a0 100644 --- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/FrameworkVersions.java +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/FrameworkVersions.java @@ -35,8 +35,10 @@ public static String allVersions() { frameworkVersions.forEach(version -> versions.putAll(version.loadVersion())); for (Iterator> iterator = versions.entrySet().iterator(); iterator.hasNext();) { entry = (Entry ) iterator.next(); - sb.append(entry.getKey()).append(":").append(entry.getValue()) -.append(iterator.hasNext() ? ";" : ""); + sb.append(entry.getKey()) + .append(":") + .append(entry.getValue()) + .append(iterator.hasNext() ? ";" : ""); } return sb.toString(); } diff --git a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/request/CreateSchemaRequest.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/request/CreateSchemaRequest.java index e7b52c684..8de28832a 100644 --- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/request/CreateSchemaRequest.java +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/request/CreateSchemaRequest.java @@ -20,6 +20,8 @@ public class CreateSchemaRequest { private String schema; + private String summary; + public String getSchema() { return schema; } @@ -27,4 +29,12 @@ public String getSchema() { public void setSchema(String schema) { this.schema = schema; } + + public String getSummary() { +return summary; + } + + public void setSummary(String summary) { +this.summary = summary; + } } diff --git a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/response/GetSchemaResponse.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/response/GetSchemaResponse.java index 28253858a..d54bc767d 100644 --- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/response/GetSchemaResponse.java +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/response/GetSchemaResponse.java @@ -20,6 +20,10 @@ public class GetSchemaResponse { private String schema; + private String schemaId; + + private String summary; + public String getSchema() { return schema; } @@ -27,4 +31,20 @@ public String getSchema() { public void setSchema(String schema) { this.schema = schema; } + + public String getSchemaId() { +return schemaId; + } + + public void setSchemaId(String schemaId) { +this.schemaId = schemaId; + } + + public String getSummary() { +return summary; + } + + public void setSummary(String summary) { +this.summary = summary; + } } diff --git a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/response/GetSchemasResponse.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/response/GetSchemasResponse.java new file mode 100644 index 0..0b4494fe0 --- /dev/null +++
[jira] [Commented] (SCB-546) As a developer, want to reregistry schemas in the dev environment
[ https://issues.apache.org/jira/browse/SCB-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470101#comment-16470101 ] ASF GitHub Bot commented on SCB-546: jeho0815 opened a new pull request #697: [SCB-546] refactor the schemas registry logic URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/697 Bug fix: At fix first time register microservice, will throw IllegalStateException 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 > As a developer, want to reregistry schemas in the dev environment > - > > Key: SCB-546 > URL: https://issues.apache.org/jira/browse/SCB-546 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m1 >Reporter: jeho0815 >Assignee: jeho0815 >Priority: Major > Fix For: java-chassis-1.0.0-m2 > > > 1、the servicecenter has a new rest interface which return all schemas with > signature, so we can compare the summary to know whether to update the schema > 2、if the instance enviroment is dev, we reregistry the schemas, otherwize > throw a RuntimeException to avoid make some potential exception in production > environment -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-548) Support Gracefully Shutdown
[ https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470079#comment-16470079 ] ASF GitHub Bot commented on SCB-548: wujimin commented on issue #693: [SCB-548] support gracefully shutdown URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/693#issuecomment-387991593 if ContextCloseEvent and handler/ShutdownHookHandler.java is random ordered, then it's not ok This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Support Gracefully Shutdown > --- > > Key: SCB-548 > URL: https://issues.apache.org/jira/browse/SCB-548 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m2 >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > > We did not implement gracefully shutdown yet: > ```java > // 当程序退出时,进行相关清理,注意:kill -9 {pid}下无效 > // 1. 去注册实例信息 > // TODO 服务优雅退出 > if (applicationContext instanceof AbstractApplicationContext) { > ((AbstractApplicationContext) > applicationContext).registerShutdownHook(); > } > ``` > > And had got an issue : > https://github.com/apache/incubator-servicecomb-java-chassis/issues/685 from > user. > So it's time we must do it and remove this TODO -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-543) optimize registry procedure
[ https://issues.apache.org/jira/browse/SCB-543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470078#comment-16470078 ] ASF GitHub Bot commented on SCB-543: coveralls commented on issue #692: [SCB-543]optimize registry procedure URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/692#issuecomment-386952358 [![Coverage Status](https://coveralls.io/builds/16917596/badge)](https://coveralls.io/builds/16917596) Coverage increased (+0.003%) to 87.359% when pulling **36437123bdf82c9fb70f2a406930cd04a2f96a21 on mt-monster:master** into **26cbe80ecbc70ad48d1d062a3b4407fc2fd8f01b 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 > optimize registry procedure > --- > > Key: SCB-543 > URL: https://issues.apache.org/jira/browse/SCB-543 > Project: Apache ServiceComb > Issue Type: Improvement >Reporter: TaoMeng >Assignee: TaoMeng >Priority: Major > > In one case of csp upgrade scene 1: successfully registry microsevice at > first , 2: then delete the microservice static information but instance is > still registrying , the result is registry instance in hanging on because sc > has no microservice static information.so in order to optimize this registry > halt , i put registry instance procedure to registry microservice again -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-548) Support Gracefully Shutdown
[ https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470029#comment-16470029 ] ASF GitHub Bot commented on SCB-548: zhengyangyong commented on issue #693: [SCB-548] support gracefully shutdown URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/693#issuecomment-387979711 [[1;31mERROR[m] Failed to execute goal [32mio.fabric8:docker-maven-plugin:0.20.0:start[m [1m(start)[m on project [36mdynamic-config-tests[m: [1;31mExecution start of goal io.fabric8:docker-maven-plugin:0.20.0:start failed: Start-Job failed with unexpected exception: [nobodyiam/apollo-quick-start] "apollo.servicecomb.apache.org": Timeout after 120033 ms while waiting on log out 'Portal started' and on tcp port '[/172.17.0.3:8080, /172.17.0.3:8070]'[m -> [1m[Help 1][m Failed by apollo IT This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Support Gracefully Shutdown > --- > > Key: SCB-548 > URL: https://issues.apache.org/jira/browse/SCB-548 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m2 >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > > We did not implement gracefully shutdown yet: > ```java > // 当程序退出时,进行相关清理,注意:kill -9 {pid}下无效 > // 1. 去注册实例信息 > // TODO 服务优雅退出 > if (applicationContext instanceof AbstractApplicationContext) { > ((AbstractApplicationContext) > applicationContext).registerShutdownHook(); > } > ``` > > And had got an issue : > https://github.com/apache/incubator-servicecomb-java-chassis/issues/685 from > user. > So it's time we must do it and remove this TODO -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-548) Support Gracefully Shutdown
[ https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470027#comment-16470027 ] ASF GitHub Bot commented on SCB-548: zhengyangyong opened a new pull request #693: [SCB-548] support gracefully shutdown URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/693 Signed-off-by: zhengyangyongFollow 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). --- When user call system.exit(0),these three works will do: 1.Unregister microservice instance from Service Center: this work will do by process ContextClosedEvent, we need unregister immediately for stopping provide service any more. 2.Waiting for all invocations to finish: this work will do by ShutdownHandler, when all invocations finished or 'deadline time reached', cc and transport vertx threads will close. 3.All spring bean do close process we had registerShutdownHook for spring ApplicationContext and beans can define 'destroy-method' do cleaning. here is example: Spring mvc Hello Java Chassis Pojo Hello person ServiceComb/Java Chassis Jaxrs Hello person ServiceComb/Java Chassis Spring mvc Hello person ServiceComb/Java Chassis 2018-05-09 16:02:14,288 [WARN] handler chain is shutting down org.apache.servicecomb.core.handler.ShutdownHookHandler.run(ShutdownHookHandler.java:87) 2018-05-09 16:02:14,289 [INFO] Closing org.springframework.context.support.ClassPathXmlApplicationContext@7cf10a6f: startup date [Wed May 09 16:02:05 CST 2018]; root of context hierarchy org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:984) 2018-05-09 16:02:14,290 [WARN] cse is closing now... org.apache.servicecomb.core.CseApplicationListener.onApplicationEvent(CseApplicationListener.java:148) 2018-05-09 16:02:14,291 [INFO] service center task is shutdown. org.apache.servicecomb.serviceregistry.registry.RemoteServiceRegistry.onShutdown(RemoteServiceRegistry.java:72) 2018-05-09 16:02:14,295 [WARN] handler chain is shut down org.apache.servicecomb.core.handler.ShutdownHookHandler.run(ShutdownHookHandler.java:103) 2018-05-09 16:02:14,296 [INFO] Unregister microservice instance success. microserviceId=90b76fd551c511e8b51db4b676a39f40 instanceId=481f630d535f11e8bc19b4b676a39f40 org.apache.servicecomb.serviceregistry.registry.AbstractServiceRegistry.unregisterInstance(AbstractServiceRegistry.java:232) Process finished with exit code 0 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Support Gracefully Shutdown > --- > > Key: SCB-548 > URL: https://issues.apache.org/jira/browse/SCB-548 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Affects Versions: java-chassis-1.0.0-m2 >Reporter: yangyongzheng >Assignee: yangyongzheng >Priority: Major > > We did not implement gracefully shutdown yet: > ```java > // 当程序退出时,进行相关清理,注意:kill -9 {pid}下无效 > // 1. 去注册实例信息 > // TODO 服务优雅退出 > if (applicationContext instanceof AbstractApplicationContext) { > ((AbstractApplicationContext) > applicationContext).registerShutdownHook(); > } > ``` > > And had got an issue : > https://github.com/apache/incubator-servicecomb-java-chassis/issues/685 from > user. > So it's time we must do it and remove this TODO -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-548) Support Gracefully Shutdown
[ https://issues.apache.org/jira/browse/SCB-548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470026#comment-16470026 ] ASF GitHub Bot commented on SCB-548: zhengyangyong closed pull request #693: [SCB-548] support gracefully shutdown URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/693 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/core/src/main/java/org/apache/servicecomb/core/CseApplicationListener.java b/core/src/main/java/org/apache/servicecomb/core/CseApplicationListener.java index 4952f35f3..0cd57f64f 100644 --- a/core/src/main/java/org/apache/servicecomb/core/CseApplicationListener.java +++ b/core/src/main/java/org/apache/servicecomb/core/CseApplicationListener.java @@ -33,6 +33,7 @@ import org.apache.servicecomb.foundation.common.event.EventManager; import org.apache.servicecomb.foundation.common.utils.BeanUtils; import org.apache.servicecomb.foundation.common.utils.FortifyUtils; +import org.apache.servicecomb.foundation.vertx.VertxUtils; import org.apache.servicecomb.serviceregistry.RegistryUtils; import org.apache.servicecomb.serviceregistry.task.MicroserviceInstanceRegisterTask; import org.slf4j.Logger; @@ -135,8 +136,6 @@ public void onApplicationEvent(ApplicationEvent event) { RegistryUtils.run(); // 当程序退出时,进行相关清理,注意:kill -9 {pid}下无效 - // 1. 去注册实例信息 - // TODO 服务优雅退出 if (applicationContext instanceof AbstractApplicationContext) { ((AbstractApplicationContext) applicationContext).registerShutdownHook(); } @@ -148,12 +147,18 @@ public void onApplicationEvent(ApplicationEvent event) { } else if (event instanceof ContextClosedEvent) { LOGGER.warn("cse is closing now..."); triggerEvent(EventType.BEFORE_CLOSE); + + //Unregister microservice instance from Service Center and close vertx + //We need unregister from service center immediately RegistryUtils.destroy(); + VertxUtils.closeVertxByName("registry"); + triggerEvent(EventType.AFTER_CLOSE); isInit = false; } } + /** * As the process of instance registry is asynchronous, the {@code AFTER_REGISTRY} * event should not be sent immediately after {@link RegistryUtils#run()} is invoked. diff --git a/core/src/main/java/org/apache/servicecomb/core/handler/ShutdownHookHandler.java b/core/src/main/java/org/apache/servicecomb/core/handler/ShutdownHookHandler.java index 8d1318aa3..019aab266 100644 --- a/core/src/main/java/org/apache/servicecomb/core/handler/ShutdownHookHandler.java +++ b/core/src/main/java/org/apache/servicecomb/core/handler/ShutdownHookHandler.java @@ -22,6 +22,7 @@ import org.apache.servicecomb.core.Handler; import org.apache.servicecomb.core.Invocation; +import org.apache.servicecomb.foundation.vertx.VertxUtils; import org.apache.servicecomb.swagger.invocation.AsyncResponse; import org.apache.servicecomb.swagger.invocation.Response; import org.slf4j.Logger; @@ -92,6 +93,11 @@ public void run() { time = time + period; LOG.warn("waiting invocation to finish in seconds " + time); } + +//Stop vertx to prevent blocking exit, this work need do after invocation waiting timeout +VertxUtils.closeVertxByName("config-center"); +VertxUtils.closeVertxByName("transport"); + LOG.warn("handler chain is shut down"); } } diff --git a/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/VertxUtils.java b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/VertxUtils.java index 4aba612f2..d5e55f463 100644 --- a/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/VertxUtils.java +++ b/foundations/foundation-vertx/src/main/java/org/apache/servicecomb/foundation/vertx/VertxUtils.java @@ -157,6 +157,13 @@ public static Vertx getVertxByName(String name) { return vertxMap.get(name); } + public static void closeVertxByName(String name) { +Vertx vertx = vertxMap.remove(name); +if (vertx != null) { + vertx.close(); +} + } + public static void runInContext(Context context, AsyncResultCallback callback, T result, Throwable e) { if (context == Vertx.currentContext()) { complete(callback, result, e); diff --git a/integration-tests/spring-zuul-tracing-tests/src/test/java/org/apache/servicecomb/spring/cloud/zuul/tracing/SpringCloudZuulTracingTest.java b/integration-tests/spring-zuul-tracing-tests/src/test/java/org/apache/servicecomb/spring/cloud/zuul/tracing/SpringCloudZuulTracingTest.java index 35a82b1de..1402cc237 100644 ---
[jira] [Created] (SCB-571) Decouple OmegaContext in the Application
Willem Jiang created SCB-571: Summary: Decouple OmegaContext in the Application Key: SCB-571 URL: https://issues.apache.org/jira/browse/SCB-571 Project: Apache ServiceComb Issue Type: Improvement Components: Saga Reporter: Willem Jiang In Current Demo Application, if we remove the \@EnableOmega, the application should start without any issue. OmegaContext should be optional, if the user doesn't enableOmega, the context should be invisible to the application. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-546) As a developer, want to reregistry schemas in the dev environment
[ https://issues.apache.org/jira/browse/SCB-546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16469961#comment-16469961 ] ASF GitHub Bot commented on SCB-546: liubao68 closed pull request #691: [SCB-546] refactor the schemas registry logic URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/691 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/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/Const.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/Const.java index 8166bec46..57855c435 100644 --- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/Const.java +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/Const.java @@ -119,6 +119,15 @@ private Const() { } } +public static final String MICROSERVICE_ALL_SCHEMAs; +static { + if (VERSION_V3.equals(CURRENT_VERSION)) { +MICROSERVICE_ALL_SCHEMAs = "/registry/v3/microservices/%s/schemas"; + } else { +MICROSERVICE_ALL_SCHEMAs = V4_PREFIX + "/microservices/%s/schemas"; + } +} + public static final String MICROSERVICE_SCHEMA; static { if (VERSION_V3.equals(CURRENT_VERSION)) { diff --git a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/FrameworkVersions.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/FrameworkVersions.java index 5c878552d..f91ffd3a0 100644 --- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/FrameworkVersions.java +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/FrameworkVersions.java @@ -35,8 +35,10 @@ public static String allVersions() { frameworkVersions.forEach(version -> versions.putAll(version.loadVersion())); for (Iterator> iterator = versions.entrySet().iterator(); iterator.hasNext();) { entry = (Entry ) iterator.next(); - sb.append(entry.getKey()).append(":").append(entry.getValue()) -.append(iterator.hasNext() ? ";" : ""); + sb.append(entry.getKey()) + .append(":") + .append(entry.getValue()) + .append(iterator.hasNext() ? ";" : ""); } return sb.toString(); } diff --git a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/request/CreateSchemaRequest.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/request/CreateSchemaRequest.java index e7b52c684..8de28832a 100644 --- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/request/CreateSchemaRequest.java +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/request/CreateSchemaRequest.java @@ -20,6 +20,8 @@ public class CreateSchemaRequest { private String schema; + private String summary; + public String getSchema() { return schema; } @@ -27,4 +29,12 @@ public String getSchema() { public void setSchema(String schema) { this.schema = schema; } + + public String getSummary() { +return summary; + } + + public void setSummary(String summary) { +this.summary = summary; + } } diff --git a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/response/GetSchemaResponse.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/response/GetSchemaResponse.java index 28253858a..d54bc767d 100644 --- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/response/GetSchemaResponse.java +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/response/GetSchemaResponse.java @@ -20,6 +20,10 @@ public class GetSchemaResponse { private String schema; + private String schemaId; + + private String summary; + public String getSchema() { return schema; } @@ -27,4 +31,20 @@ public String getSchema() { public void setSchema(String schema) { this.schema = schema; } + + public String getSchemaId() { +return schemaId; + } + + public void setSchemaId(String schemaId) { +this.schemaId = schemaId; + } + + public String getSummary() { +return summary; + } + + public void setSummary(String summary) { +this.summary = summary; + } } diff --git a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/response/GetSchemasResponse.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/response/GetSchemasResponse.java new file mode 100644 index 0..0b4494fe0 --- /dev/null +++