[jira] [Commented] (SCB-788) public key black/white add feature: choose server by version
[ https://issues.apache.org/jira/browse/SCB-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561870#comment-16561870 ] ASF GitHub Bot commented on SCB-788: liubao68 commented on a change in pull request #846: [SCB-788] public key black/white add feature: choose server by version URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/846#discussion_r206118166 ## File path: handlers/handler-publickey-auth/src/main/java/org/apache/servicecomb/authentication/provider/AccessController.java ## @@ -86,18 +86,28 @@ private boolean matchFound(Microservice microservice, Map public key black/white add feature: choose server by version > > > Key: SCB-788 > URL: https://issues.apache.org/jira/browse/SCB-788 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Java-Chassis >Reporter: WeiChao >Assignee: WeiChao >Priority: Major > Fix For: java-chassis-1.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-788) public key black/white add feature: choose server by version
[ https://issues.apache.org/jira/browse/SCB-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561865#comment-16561865 ] ASF GitHub Bot commented on SCB-788: liubao68 commented on a change in pull request #846: [SCB-788] public key black/white add feature: choose server by version URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/846#discussion_r206117486 ## File path: handlers/handler-publickey-auth/src/main/java/org/apache/servicecomb/authentication/provider/AccessController.java ## @@ -86,18 +86,28 @@ private boolean matchFound(Microservice microservice, Map public key black/white add feature: choose server by version > > > Key: SCB-788 > URL: https://issues.apache.org/jira/browse/SCB-788 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Java-Chassis >Reporter: WeiChao >Assignee: WeiChao >Priority: Major > Fix For: java-chassis-1.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SCB-788) public key black/white add feature: choose server by version
WeiChao created SCB-788: --- Summary: public key black/white add feature: choose server by version Key: SCB-788 URL: https://issues.apache.org/jira/browse/SCB-788 Project: Apache ServiceComb Issue Type: New Feature Components: Java-Chassis Reporter: WeiChao Assignee: WeiChao Fix For: java-chassis-1.1.0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-788) public key black/white add feature: choose server by version
[ https://issues.apache.org/jira/browse/SCB-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561839#comment-16561839 ] ASF GitHub Bot commented on SCB-788: weichao666 opened a new pull request #846: [SCB-788] public key black/white add feature: choose server by version URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/846 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 > public key black/white add feature: choose server by version > > > Key: SCB-788 > URL: https://issues.apache.org/jira/browse/SCB-788 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Java-Chassis >Reporter: WeiChao >Assignee: WeiChao >Priority: Major > Fix For: java-chassis-1.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-788) public key black/white add feature: choose server by version
[ https://issues.apache.org/jira/browse/SCB-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561874#comment-16561874 ] ASF GitHub Bot commented on SCB-788: liubao68 commented on a change in pull request #846: [SCB-788] public key black/white add feature: choose server by version URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/846#discussion_r206118166 ## File path: handlers/handler-publickey-auth/src/main/java/org/apache/servicecomb/authentication/provider/AccessController.java ## @@ -86,18 +86,28 @@ private boolean matchFound(Microservice microservice, Map public key black/white add feature: choose server by version > > > Key: SCB-788 > URL: https://issues.apache.org/jira/browse/SCB-788 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Java-Chassis >Reporter: WeiChao >Assignee: WeiChao >Priority: Major > Fix For: java-chassis-1.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-788) public key black/white add feature: choose server by version
[ https://issues.apache.org/jira/browse/SCB-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561878#comment-16561878 ] ASF GitHub Bot commented on SCB-788: liubao68 commented on a change in pull request #846: [SCB-788] public key black/white add feature: choose server by version URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/846#discussion_r206118166 ## File path: handlers/handler-publickey-auth/src/main/java/org/apache/servicecomb/authentication/provider/AccessController.java ## @@ -86,18 +86,28 @@ private boolean matchFound(Microservice microservice, Map public key black/white add feature: choose server by version > > > Key: SCB-788 > URL: https://issues.apache.org/jira/browse/SCB-788 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Java-Chassis >Reporter: WeiChao >Assignee: WeiChao >Priority: Major > Fix For: java-chassis-1.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-788) public key black/white add feature: choose server by version
[ https://issues.apache.org/jira/browse/SCB-788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561877#comment-16561877 ] ASF GitHub Bot commented on SCB-788: liubao68 commented on a change in pull request #846: [SCB-788] public key black/white add feature: choose server by version URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/846#discussion_r206118166 ## File path: handlers/handler-publickey-auth/src/main/java/org/apache/servicecomb/authentication/provider/AccessController.java ## @@ -86,18 +86,28 @@ private boolean matchFound(Microservice microservice, Map public key black/white add feature: choose server by version > > > Key: SCB-788 > URL: https://issues.apache.org/jira/browse/SCB-788 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Java-Chassis >Reporter: WeiChao >Assignee: WeiChao >Priority: Major > Fix For: java-chassis-1.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SCB-787) Server States not clean unavailable server
liubao created SCB-787: -- Summary: Server States not clean unavailable server Key: SCB-787 URL: https://issues.apache.org/jira/browse/SCB-787 Project: Apache ServiceComb Issue Type: Bug Affects Versions: java-chassis-1.0.0 Reporter: liubao Assignee: liubao Fix For: java-chassis-1.1.0 LoadbalancerServerStates do not clean up unavailable servers when these server is gone. This is because guava does not cleanup when no "WRITE" operation is done. Although the logic is good, but in small & simple situations, will do unnecessary check. And should clean up earlier manually. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-776) Log print more detailed
[ https://issues.apache.org/jira/browse/SCB-776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16562992#comment-16562992 ] ASF GitHub Bot commented on SCB-776: little-cui closed pull request #401: SCB-776 Log print more detailed URL: https://github.com/apache/incubator-servicecomb-service-center/pull/401 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/pkg/util/net.go b/pkg/util/net.go index 777a96d4..60825069 100644 --- a/pkg/util/net.go +++ b/pkg/util/net.go @@ -33,7 +33,7 @@ type IpPort struct { func GetIPFromContext(ctx context.Context) string { v, ok := FromContext(ctx, "x-remote-ip").(string) if !ok { - return "" + return "UNKNOWN" } return v } diff --git a/server/api.go b/server/api.go index 6d1ea98c..f606fee3 100644 --- a/server/api.go +++ b/server/api.go @@ -97,10 +97,10 @@ func (s *APIServer) registryService(pCtx context.Context) error { return err } if respE.Response.Code == pb.Response_SUCCESS { - util.Logger().Warnf(nil, "service center service already registered, service id %s", respE.ServiceId) + util.Logger().Warnf(nil, "service center service already registered, serviceId %s", respE.ServiceId) respG, err := core.ServiceAPI.GetOne(ctx, core.GetServiceRequest(respE.ServiceId)) if respG.Response.Code != pb.Response_SUCCESS { - util.Logger().Errorf(err, "query service center service info failed, service id %s", respE.ServiceId) + util.Logger().Errorf(err, "query service center service info failed, serviceId %s", respE.ServiceId) return fmt.Errorf("service center service file lost.") } core.Service = respG.Service @@ -113,7 +113,7 @@ func (s *APIServer) registryService(pCtx context.Context) error { return err } core.Service.ServiceId = respS.ServiceId - util.Logger().Infof("register service center service successfully, service id %s", respS.ServiceId) + util.Logger().Infof("register service center service %s", respS.ServiceId) return nil } @@ -136,7 +136,7 @@ func (s *APIServer) registryInstance(pCtx context.Context) error { return err } core.Instance.InstanceId = respI.InstanceId - util.Logger().Infof("register service center instance successfully, instance %s/%s, endpoints %s", + util.Logger().Infof("register service center instance %s/%s, endpoints %s", core.Service.ServiceId, respI.InstanceId, endpoints) return nil } @@ -152,7 +152,7 @@ func (s *APIServer) unregisterInstance(pCtx context.Context) error { util.Logger().Error(err.Error(), nil) return err } - util.Logger().Warnf(nil, "unregister service center instance successfully, %s/%s", + util.Logger().Warnf(nil, "unregister service center instance %s/%s", core.Service.ServiceId, core.Instance.InstanceId) return nil } @@ -164,11 +164,11 @@ func (s *APIServer) doAPIServerHeartBeat(pCtx context.Context) { ctx := core.AddDefaultContextValue(pCtx) respI, err := core.InstanceAPI.Heartbeat(ctx, core.HeartbeatRequest()) if respI.Response.Code == pb.Response_SUCCESS { - util.Logger().Debugf("update service center %s heartbeat %s successfully", + util.Logger().Debugf("update service center instance %s/%s heartbeat", core.Instance.ServiceId, core.Instance.InstanceId) return } - util.Logger().Errorf(err, "update service center %s instance %s heartbeat failed", + util.Logger().Errorf(err, "update service center instance %s/%s heartbeat failed", core.Instance.ServiceId, core.Instance.InstanceId) //服务不存在,创建服务 @@ -215,7 +215,7 @@ func (s *APIServer) startRESTServer() (err error) { if err != nil { return } - util.Logger().Infof("Local listen address: %s, host: %s.", addr, s.HostName) + util.Logger().Infof("Local listen address: %s, host: %s", addr, s.HostName) s.goroutine.Do(func(_ context.Context) { err := s.restSrv.Serve() diff --git a/server/service/instance.go b/server/service/instance.go index 9b1ebaa0..2ecc3dc8 100644 --- a/server/service/instance.go +++ b/server/service/instance.go @@ -89,21 +89,20 @@ func (s *InstanceService) Register(ctx context.Context, in *pb.RegisterInstanceR remoteIP := util.GetIPFromContext(ctx) if err := Validate(in); err !=
[jira] [Created] (SCB-789) complete 8 index page of catalog
lidian created SCB-789: -- Summary: complete 8 index page of catalog Key: SCB-789 URL: https://issues.apache.org/jira/browse/SCB-789 Project: Apache ServiceComb Issue Type: Sub-task Components: website Affects Versions: java-chassis-1.0.0-m2 Reporter: lidian Assignee: lidian Fix For: java-chassis-1.0.0-m2 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SCB-790) support create new target microservice instance in one node
wujimin created SCB-790: --- Summary: support create new target microservice instance in one node Key: SCB-790 URL: https://issues.apache.org/jira/browse/SCB-790 Project: Apache ServiceComb Issue Type: Sub-task Components: Java-Chassis Reporter: wujimin Assignee: wujimin Fix For: java-chassis-1.1.0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-790) support create new target microservice instance in one node
[ https://issues.apache.org/jira/browse/SCB-790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563115#comment-16563115 ] ASF GitHub Bot commented on SCB-790: wujimin opened a new pull request #847: [SCB-790] integration test support create new target microservice instance in one node URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/847 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 create new target microservice instance in one node > --- > > Key: SCB-790 > URL: https://issues.apache.org/jira/browse/SCB-790 > Project: Apache ServiceComb > Issue Type: Sub-task > Components: Java-Chassis >Reporter: wujimin >Assignee: wujimin >Priority: Major > Fix For: java-chassis-1.1.0 > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-779) Add docker builder pattern scripts
[ https://issues.apache.org/jira/browse/SCB-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563166#comment-16563166 ] ASF GitHub Bot commented on SCB-779: asifdxtreme closed pull request #402: SCB-779 Add docker builder pattern scripts URL: https://github.com/apache/incubator-servicecomb-service-center/pull/402 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/.gitignore b/.gitignore index 74de4dd0..84fb8827 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,8 @@ service-center.iml .idea/ **/*junit.xml **/*.exe +**/*.tgz +**/apache-servicecomb-incubating-service-center-* vendor/** !vendor/manifest diff --git a/DockerGuide.md b/DockerGuide.md deleted file mode 100644 index 654b2713.. --- a/DockerGuide.md +++ /dev/null @@ -1,20 +0,0 @@ -### Guide to build the Docker Image - -## Step 1: -Clone the Dependency -``` -glide install -``` - -## Step 2: -Make the release - -``` -bash -x scripts/release/make_release.sh linux 1.0.0 latest -``` - -## Step 3: -Make the Docker Image -``` -docker build -t service-center:dev . -``` diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 1b51c34e.. --- a/Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -# 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. - -FROM ubuntu - -ADD apache-servicecomb-incubating-service-center-latest-linux-amd64 /app/ - -RUN sed -i 's/httpaddr = 127.0.0.1/httpaddr = 0.0.0.0/g' /app/conf/app.conf - -ENTRYPOINT ["/app/service-center"] diff --git a/Dockerfile.build b/Dockerfile.build new file mode 100644 index ..9a96cabc --- /dev/null +++ b/Dockerfile.build @@ -0,0 +1,22 @@ +# 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. + +FROM golang:1.8.3 + +WORKDIR /go/src/github.com/apache/incubator-servicecomb-service-center + +COPY . . + +RUN bash -x scripts/build/local.sh linux 1.0.0 latest diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index ..6a9ec642 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,33 @@ +version: '3' +services: + etcd: +image: 'quay.io/coreos/etcd:latest' +# restart: always +#ports: +# - "2379:2379" +environment: + ETCD_ADVERTISE_CLIENT_URLS: http://etcd:2379 + ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379 + ETCD_INITIAL_ADVERTISE_PEER_URLS: http://etcd:2380 + ETCD_LISTEN_PEER_URLS: http://0.0.0.0:2380 + ETCD_INITIAL_CLUSTER: default=http://etcd:2380 + + service-center: +depends_on: + - etcd +image: 'servicecomb/service-center:latest' +# restart: always +ports: + - "30100:30100" +environment: + BACKEND_ADDRESS: http://etcd:2379 + + scfrontend: +depends_on: + - service-center +image: 'servicecomb/scfrontend:latest' +# restart: always +ports: + - "30103:30103" +environment: + BACKEND_ADDRESS: http://service-center:30100 diff --git a/docs/README.md b/docs/README.md index 26c5894b..481d3f8e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -8,7 +8,9 @@ [Contribution Guide](/docs/contribution.md) - [Docker Image Guide](/docs/create-docker-image.md) + [Docker Image Guide](/scripts/docker) + +- [Making Service-Center
[jira] [Commented] (SCB-782) [SCB-782]support revision check when use pull mode with config center
[ https://issues.apache.org/jira/browse/SCB-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561459#comment-16561459 ] ASF GitHub Bot commented on SCB-782: liubao68 commented on a change in pull request #842: [SCB-782]support revision check when use pull mode with config center URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/842#discussion_r206022756 ## File path: dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java ## @@ -375,15 +374,17 @@ public void refreshConfig(String configcenter, boolean wait) { } latch.countDown(); }); - } else { + }else if (rsp.statusCode() == HttpResponseStatus.NOT_MODIFIED.code()){ Review comment: Please use $HOME/etc/**.xml file to format 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 > [SCB-782]support revision check when use pull mode with config center > - > > Key: SCB-782 > URL: https://issues.apache.org/jira/browse/SCB-782 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: 何一乐 >Assignee: 何一乐 >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-786) when instances cache is not sync to SC caused by bug, auto fix it.
[ https://issues.apache.org/jira/browse/SCB-786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561458#comment-16561458 ] ASF GitHub Bot commented on SCB-786: wujimin closed pull request #844: [SCB-786] when instances cache is not sync to SC caused by bug, auto fix it URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/844 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/consumer/MicroserviceVersions.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java index f867f6ae7..ab4f479d0 100644 --- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/consumer/MicroserviceVersions.java @@ -113,6 +113,10 @@ public String getRevision() { return revision; } + public void setRevision(String revision) { +this.revision = revision; + } + public List getPulledInstances() { return pulledInstances; } diff --git a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/InstanceCacheChecker.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/InstanceCacheChecker.java index 8e0e1d7a7..28fb4b662 100644 --- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/InstanceCacheChecker.java +++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/InstanceCacheChecker.java @@ -125,6 +125,10 @@ protected InstanceCacheResult check(MicroserviceVersions microserviceVersions) { remote); instanceCacheResult.setStatus(Status.ABNORMAL); instanceCacheResult.setDetail("instance cache not match"); + +// auto fix, will do a full pull request when invoke MicroserviceVersions.pullInstances +microserviceVersions.setRevision(null); + return instanceCacheResult; } diff --git a/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/TestInstanceCacheChecker.java b/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/TestInstanceCacheChecker.java index b932070b2..c84cc3e6b 100644 --- a/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/TestInstanceCacheChecker.java +++ b/service-registry/src/test/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/TestInstanceCacheChecker.java @@ -26,6 +26,7 @@ import org.apache.servicecomb.serviceregistry.api.registry.MicroserviceInstance; import org.apache.servicecomb.serviceregistry.api.response.FindInstancesResponse; import org.apache.servicecomb.serviceregistry.client.http.MicroserviceInstances; +import org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions; import org.apache.servicecomb.serviceregistry.definition.DefinitionConst; import org.apache.servicecomb.serviceregistry.diagnosis.Status; import org.apache.servicecomb.serviceregistry.registry.ServiceRegistryFactory; @@ -216,8 +217,10 @@ MicroserviceInstances findServiceInstances(String appId, String serviceName, registerMicroservice(appId, microserviceName); -serviceRegistry.getAppManager() -.getOrCreateMicroserviceVersionRule(appId, microserviceName, DefinitionConst.VERSION_RULE_ALL); +MicroserviceVersions microserviceVersions = serviceRegistry.getAppManager() +.getOrCreateMicroserviceVersions(appId, microserviceName); +microserviceVersions.setRevision("first"); + microserviceVersions.getOrCreateMicroserviceVersionRule(DefinitionConst.VERSION_RULE_ALL); Holder newFindHolder = createFindServiceInstancesResult(); newFindHolder.value.getInstancesResponse().getInstances().add(new MicroserviceInstance()); @@ -234,5 +237,6 @@ MicroserviceInstances findServiceInstances(String appId, String serviceName, expectedSummary.setStatus(Status.ABNORMAL); Assert.assertEquals(Json.encode(expectedSummary), Json.encode(instanceCacheSummary)); +Assert.assertNull(microserviceVersions.getRevision()); } } 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 > when instances cache is not sync to SC caused by bug, auto fix it. > -- >
[jira] [Commented] (SCB-782) [SCB-782]support revision check when use pull mode with config center
[ https://issues.apache.org/jira/browse/SCB-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561460#comment-16561460 ] ASF GitHub Bot commented on SCB-782: liubao68 commented on a change in pull request #842: [SCB-782]support revision check when use pull mode with config center URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/842#discussion_r206023617 ## File path: dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java ## @@ -375,15 +374,17 @@ public void refreshConfig(String configcenter, boolean wait) { } latch.countDown(); }); - } else { + }else if (rsp.statusCode() == HttpResponseStatus.NOT_MODIFIED.code()){ +latch.countDown(); + }else { rsp.bodyHandler(buf -> { LOGGER.error("Server error message is [{}].", buf); latch.countDown(); }); EventManager.post(new ConnFailEvent("fetch config fail")); LOGGER.error("Config refresh from {} failed.", configcenter); } -}); +}).setTimeout((BOOTUP_WAIT_TIME -1 )* 1000); Review comment: Thread control based on timeout may not be accurate. The pulling operation can be changed to blocking, but this code can not guarantee each pull run sequencially. 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 > [SCB-782]support revision check when use pull mode with config center > - > > Key: SCB-782 > URL: https://issues.apache.org/jira/browse/SCB-782 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: 何一乐 >Assignee: 何一乐 >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-782) [SCB-782]support revision check when use pull mode with config center
[ https://issues.apache.org/jira/browse/SCB-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561463#comment-16561463 ] ASF GitHub Bot commented on SCB-782: liubao68 commented on a change in pull request #842: [SCB-782]support revision check when use pull mode with config center URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/842#discussion_r206023906 ## File path: dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ParseConfigUtils.java ## @@ -40,13 +40,20 @@ public static final Map flatItems = new HashMap<>(); + public static String CURRENT_VERSION_INFO = "default"; + private UpdateHandler updateHandler; public ParseConfigUtils(UpdateHandler updateHandler) { this.updateHandler = updateHandler; } public void refreshConfigItems(Map> remoteItems) { + +CURRENT_VERSION_INFO = remoteItems.getOrDefault("revision",new HashMap<>()).getOrDefault("version","default").toString(); +//make sure the CURRENT_VERSION_INFO != "" +CURRENT_VERSION_INFO = CURRENT_VERSION_INFO.equals("") ? "default" : CURRENT_VERSION_INFO; +remoteItems.remove("revision");//the key revision is not the config setting Review comment: How about users have a key named revision? 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 > [SCB-782]support revision check when use pull mode with config center > - > > Key: SCB-782 > URL: https://issues.apache.org/jira/browse/SCB-782 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: 何一乐 >Assignee: 何一乐 >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-776) Log print more detailed
[ https://issues.apache.org/jira/browse/SCB-776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561472#comment-16561472 ] ASF GitHub Bot commented on SCB-776: little-cui commented on a change in pull request #401: SCB-776 Log print more detailed URL: https://github.com/apache/incubator-servicecomb-service-center/pull/401#discussion_r206027208 ## File path: server/service/instance.go ## @@ -89,43 +89,47 @@ func (s *InstanceService) Register(ctx context.Context, in *pb.RegisterInstanceR remoteIP := util.GetIPFromContext(ctx) if err := Validate(in); err != nil { - util.Logger().Errorf(err, "register instance failed, invalid parameters, operator %s.", remoteIP) + util.Logger().Errorf(err, "register instance failed, invalid parameters, operator %s", remoteIP) return { Response: pb.CreateResponse(scerr.ErrInvalidParams, err.Error()), }, nil } instance := in.GetInstance() - instanceFlag := util.StringJoin([]string{instance.ServiceId, instance.HostName}, "/") //允许自定义id //如果没填写 并且endpoints沒重復,則产生新的全局instance id oldInstanceId, checkErr := serviceUtil.InstanceExist(ctx, in.Instance) if checkErr != nil { - util.Logger().Errorf(checkErr, "instance existence check failed, service %s, operator %s.", - instanceFlag, remoteIP) + util.Logger().Errorf(checkErr, "instance existence check failed, endpoints %v, host '%s', serviceId %s, operator %s", + instance.Endpoints, instance.HostName, instance.ServiceId, remoteIP) resp := pb.CreateResponseWithSCErr(checkErr) if checkErr.InternalError() { return {Response: resp}, checkErr } return {Response: resp}, nil } if len(oldInstanceId) > 0 { - util.Logger().Infof("register instance successful, reuse service %s instance %s, operator %s.", + util.Logger().Infof("register instance successful, reuse service %s instance %s, operator %s", instance.ServiceId, oldInstanceId, remoteIP) return { - Response: pb.CreateResponse(pb.Response_SUCCESS, "instance more exist."), + Response: pb.CreateResponse(pb.Response_SUCCESS, "instance more exist"), InstanceId: oldInstanceId, }, nil } if err := s.preProcessRegisterInstance(ctx, instance); err != nil { - util.Logger().Errorf(err, "register instance failed, service %s, operator %s.", instanceFlag, remoteIP) + util.Logger().Errorf(err, "register instance failed, endpoints %v, host '%s', serviceId %s, operator %s", + instance.Endpoints, instance.HostName, instance.ServiceId, remoteIP) return { Response: pb.CreateResponseWithSCErr(err), }, nil } + ttl := int64(instance.HealthCheck.Interval * (instance.HealthCheck.Times + 1)) Review comment: not only for log, it is also used to grant a lease fo instance from etcd 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 > Log print more detailed > --- > > Key: SCB-776 > URL: https://issues.apache.org/jira/browse/SCB-776 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-779) Add docker builder pattern scripts
[ https://issues.apache.org/jira/browse/SCB-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561473#comment-16561473 ] ASF GitHub Bot commented on SCB-779: asifdxtreme commented on a change in pull request #402: SCB-779 Add docker builder pattern scripts URL: https://github.com/apache/incubator-servicecomb-service-center/pull/402#discussion_r206027326 ## File path: scripts/docker/build-frontend-image/build.sh ## @@ -20,37 +20,45 @@ set -e umask 027 SCRIPT_DIR=$(cd $(dirname $0); pwd) -BASE_DIR=${SCRIPT_DIR}/../../.. -mkdir -p $SCRIPT_DIR/frontend - -cd $BASE_DIR/frontend +BASE_DIR=${SCRIPT_DIR}/../../../ -# make CGO_ENABLED=0 since busybox will not execute if it is dynamically linked -export CGO_ENABLED=0 -export GOOS="linux" -export GOARCH="amd64" +# build all +PACKAGE=${1:-"latest"} -# buils scfrontend -go build -o $SCRIPT_DIR/frontend/scfrontend +PACKAGE_PREFIX=apache-servicecomb-incubating-service-center -#go to the script directory -#cd $SCRIPT_DIR +PACKAGE_DIR=$SCRIPT_DIR/../$PACKAGE_PREFIX-$PACKAGE-linux-amd64 -# copy the app conf folders to build-frontend-image/frontend -cp -r app conf $BASE_DIR/scripts/frontend/start_linux.sh $SCRIPT_DIR/frontend +source ${SCRIPT_DIR}/../../build/tools.sh -chmod 755 $SCRIPT_DIR/frontend/start_linux.sh $SCRIPT_DIR/frontend/scfrontend +if [ ! -d $PACKAGE_DIR ]; then +docker_builder_pattern $BASE_DIR $SCRIPT_DIR/../ +fi -sed -i "s|frontend_host_ip=127.0.0.1|frontend_host_ip=0.0.0.0|g" $SCRIPT_DIR/frontend/conf/app.conf +# create image base dir +mkdir -p $SCRIPT_DIR/frontend -#go to the script directory +# go to the script directory cd $SCRIPT_DIR -tar cf frontend.tar.gz frontend + +# copy the conf folder to build-frontend-image/frontend +cp -rp $PACKAGE_DIR/app $PACKAGE_DIR/conf $PACKAGE_DIR/frontend start.sh frontend + +chmod 500 frontend/start.sh frontend/frontend + +# store the base image name and version +BASE_IMAGE=${BASE_IMAGE:-"ubuntu"} + +BASE_IMAGE_VERSION=${BASE_IMAGE_VERSION:-"latest"} + cp Dockerfile.tmpl Dockerfile -docker build -t servicecomb/scfrontend . -docker save servicecomb/scfrontend:latest |gzip >scfrontend-dev.tgz +sed -i "s|{{.BASE_IMAGE}}|${BASE_IMAGE}|g" Dockerfile +sed -i "s|{{.BASE_IMAGE_VERSION}}|${BASE_IMAGE_VERSION}|g" Dockerfile + +docker build --no-cache -t servicecomb/scfrontend:$PACKAGE . +docker save servicecomb/scfrontend:$PACKAGE |gzip >scfrontend-dev.tgz Review comment: can we put the frontend and service-center in the same image instead of having 2 images If both are in same image then it will be easy to communicate between both 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 docker builder pattern scripts > -- > > Key: SCB-779 > URL: https://issues.apache.org/jira/browse/SCB-779 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-785) Cannot get the GlobalTxId and LocalTxId in the compensation method
[ https://issues.apache.org/jira/browse/SCB-785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561542#comment-16561542 ] ASF GitHub Bot commented on SCB-785: WillemJiang commented on issue #232: [SCB-785] 支持在补偿方法里得到当前分布式事务的全局事务ID及本地事务ID URL: https://github.com/apache/incubator-servicecomb-saga/pull/232#issuecomment-408765235 There is a compile error from CI. COMPILATION ERROR : - /home/travis/build/apache/incubator-servicecomb-saga/omega/omega-spring-tx/src/test/java/org/apache/servicecomb/saga/omega/transaction/spring/TransactionInterceptionTest.java:[365,14] constructor CompensationContext in class org.apache.servicecomb.saga.omega.context.CompensationContext cannot be applied to given types; required: org.apache.servicecomb.saga.omega.context.OmegaContext found: no arguments reason: actual and formal argument lists differ in length 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 > Cannot get the GlobalTxId and LocalTxId in the compensation method > -- > > Key: SCB-785 > URL: https://issues.apache.org/jira/browse/SCB-785 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Saga >Affects Versions: saga-0.2.0 >Reporter: Jeremy Xu >Priority: Minor > Fix For: saga-0.3.0 > > > 补偿方法里无法获取分布式事务的全局事务ID及本地事务ID > 因为在子事务业务处理方法中会将一部分中间数据存入外部缓存中,对应的补偿方法将可以通过这些中间数据进行合理的补偿操作,当时存入中间数据时会附带上globalTxId, > localTxId,后面将根据这个查找到之前存入的中间数据。但发现在业务方法中可以获取分布式事务的全局事务ID及本地事务ID,但对应的补偿方法里却不行。 > Customer may want to access the globalTxId and LocalTxId in application to > store these information into DB for the recovery. > 示例代码如下: > > {code:java} > @Autowired > OmegaContext omegaContext; > @Compensable(timeout=5, compensationMethod="cancel") > public boolean transferOut(String from, int amount) { > // 这里可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.reduceBalanceByUsername(from, amount); > } > public boolean cancel(String from, int amount) { > // 这里不可以获得 > System.out.println(omegaContext.globalTxId()); > System.out.println(omegaContext.localTxId()); > repo.addBalanceByUsername(from, amount); > } > {code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-779) Add docker builder pattern scripts
[ https://issues.apache.org/jira/browse/SCB-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561456#comment-16561456 ] ASF GitHub Bot commented on SCB-779: asifdxtreme commented on issue #402: SCB-779 Add docker builder pattern scripts URL: https://github.com/apache/incubator-servicecomb-service-center/pull/402#issuecomment-408756701 hold this merge till 1.0.0 is released as this change will make the [Make Build from source guide](https://github.com/apache/incubator-servicecomb-service-center/tree/master/scripts/release) invalid for 1.0.0 release. 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 docker builder pattern scripts > -- > > Key: SCB-779 > URL: https://issues.apache.org/jira/browse/SCB-779 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-776) Log print more detailed
[ https://issues.apache.org/jira/browse/SCB-776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561464#comment-16561464 ] ASF GitHub Bot commented on SCB-776: tianxiaoliang commented on a change in pull request #401: SCB-776 Log print more detailed URL: https://github.com/apache/incubator-servicecomb-service-center/pull/401#discussion_r206024447 ## File path: server/service/instance.go ## @@ -89,43 +89,47 @@ func (s *InstanceService) Register(ctx context.Context, in *pb.RegisterInstanceR remoteIP := util.GetIPFromContext(ctx) if err := Validate(in); err != nil { - util.Logger().Errorf(err, "register instance failed, invalid parameters, operator %s.", remoteIP) + util.Logger().Errorf(err, "register instance failed, invalid parameters, operator %s", remoteIP) return { Response: pb.CreateResponse(scerr.ErrInvalidParams, err.Error()), }, nil } instance := in.GetInstance() - instanceFlag := util.StringJoin([]string{instance.ServiceId, instance.HostName}, "/") //允许自定义id //如果没填写 并且endpoints沒重復,則产生新的全局instance id oldInstanceId, checkErr := serviceUtil.InstanceExist(ctx, in.Instance) if checkErr != nil { - util.Logger().Errorf(checkErr, "instance existence check failed, service %s, operator %s.", - instanceFlag, remoteIP) + util.Logger().Errorf(checkErr, "instance existence check failed, endpoints %v, host '%s', serviceId %s, operator %s", + instance.Endpoints, instance.HostName, instance.ServiceId, remoteIP) resp := pb.CreateResponseWithSCErr(checkErr) if checkErr.InternalError() { return {Response: resp}, checkErr } return {Response: resp}, nil } if len(oldInstanceId) > 0 { - util.Logger().Infof("register instance successful, reuse service %s instance %s, operator %s.", + util.Logger().Infof("register instance successful, reuse service %s instance %s, operator %s", instance.ServiceId, oldInstanceId, remoteIP) return { - Response: pb.CreateResponse(pb.Response_SUCCESS, "instance more exist."), + Response: pb.CreateResponse(pb.Response_SUCCESS, "instance more exist"), InstanceId: oldInstanceId, }, nil } if err := s.preProcessRegisterInstance(ctx, instance); err != nil { - util.Logger().Errorf(err, "register instance failed, service %s, operator %s.", instanceFlag, remoteIP) + util.Logger().Errorf(err, "register instance failed, endpoints %v, host '%s', serviceId %s, operator %s", + instance.Endpoints, instance.HostName, instance.ServiceId, remoteIP) return { Response: pb.CreateResponseWithSCErr(err), }, nil } + ttl := int64(instance.HealthCheck.Interval * (instance.HealthCheck.Times + 1)) Review comment: just for log, it need to consume CPU, is it necessary? 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 > Log print more detailed > --- > > Key: SCB-776 > URL: https://issues.apache.org/jira/browse/SCB-776 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-779) Add docker builder pattern scripts
[ https://issues.apache.org/jira/browse/SCB-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561474#comment-16561474 ] ASF GitHub Bot commented on SCB-779: asifdxtreme commented on a change in pull request #402: SCB-779 Add docker builder pattern scripts URL: https://github.com/apache/incubator-servicecomb-service-center/pull/402#discussion_r206027015 ## File path: Dockerfile.build ## @@ -0,0 +1,22 @@ +# 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. + +FROM golang:1.8.3 + +WORKDIR /go/src/github.com/apache/incubator-servicecomb-service-center + +COPY . . + +RUN bash -x scripts/build/local.sh linux 1.0.0 latest Review comment: This will increase the size of the docker image to be more than 50MB, please cleanup and just copy the release binary in alpine image 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 docker builder pattern scripts > -- > > Key: SCB-779 > URL: https://issues.apache.org/jira/browse/SCB-779 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-776) Log print more detailed
[ https://issues.apache.org/jira/browse/SCB-776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561461#comment-16561461 ] ASF GitHub Bot commented on SCB-776: little-cui commented on a change in pull request #401: SCB-776 Log print more detailed URL: https://github.com/apache/incubator-servicecomb-service-center/pull/401#discussion_r206023674 ## File path: server/service/instance.go ## @@ -89,43 +89,47 @@ func (s *InstanceService) Register(ctx context.Context, in *pb.RegisterInstanceR remoteIP := util.GetIPFromContext(ctx) if err := Validate(in); err != nil { - util.Logger().Errorf(err, "register instance failed, invalid parameters, operator %s.", remoteIP) + util.Logger().Errorf(err, "register instance failed, invalid parameters, operator %s", remoteIP) return { Response: pb.CreateResponse(scerr.ErrInvalidParams, err.Error()), }, nil } instance := in.GetInstance() - instanceFlag := util.StringJoin([]string{instance.ServiceId, instance.HostName}, "/") //允许自定义id //如果没填写 并且endpoints沒重復,則产生新的全局instance id oldInstanceId, checkErr := serviceUtil.InstanceExist(ctx, in.Instance) if checkErr != nil { - util.Logger().Errorf(checkErr, "instance existence check failed, service %s, operator %s.", - instanceFlag, remoteIP) + util.Logger().Errorf(checkErr, "instance existence check failed, endpoints %v, host '%s', serviceId %s, operator %s", + instance.Endpoints, instance.HostName, instance.ServiceId, remoteIP) resp := pb.CreateResponseWithSCErr(checkErr) if checkErr.InternalError() { return {Response: resp}, checkErr } return {Response: resp}, nil } if len(oldInstanceId) > 0 { - util.Logger().Infof("register instance successful, reuse service %s instance %s, operator %s.", + util.Logger().Infof("register instance successful, reuse service %s instance %s, operator %s", instance.ServiceId, oldInstanceId, remoteIP) return { - Response: pb.CreateResponse(pb.Response_SUCCESS, "instance more exist."), + Response: pb.CreateResponse(pb.Response_SUCCESS, "instance more exist"), InstanceId: oldInstanceId, }, nil } if err := s.preProcessRegisterInstance(ctx, instance); err != nil { - util.Logger().Errorf(err, "register instance failed, service %s, operator %s.", instanceFlag, remoteIP) + util.Logger().Errorf(err, "register instance failed, endpoints %v, host '%s', serviceId %s, operator %s", + instance.Endpoints, instance.HostName, instance.ServiceId, remoteIP) Review comment: we get the message like "[rest://127.0.0.1:8080]" 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 > Log print more detailed > --- > > Key: SCB-776 > URL: https://issues.apache.org/jira/browse/SCB-776 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-776) Log print more detailed
[ https://issues.apache.org/jira/browse/SCB-776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561462#comment-16561462 ] ASF GitHub Bot commented on SCB-776: little-cui commented on a change in pull request #401: SCB-776 Log print more detailed URL: https://github.com/apache/incubator-servicecomb-service-center/pull/401#discussion_r206023762 ## File path: server/service/instance.go ## @@ -89,43 +89,47 @@ func (s *InstanceService) Register(ctx context.Context, in *pb.RegisterInstanceR remoteIP := util.GetIPFromContext(ctx) if err := Validate(in); err != nil { - util.Logger().Errorf(err, "register instance failed, invalid parameters, operator %s.", remoteIP) + util.Logger().Errorf(err, "register instance failed, invalid parameters, operator %s", remoteIP) Review comment: the err object will print the details 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 > Log print more detailed > --- > > Key: SCB-776 > URL: https://issues.apache.org/jira/browse/SCB-776 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SCB-648) Omega support JDK7
[ https://issues.apache.org/jira/browse/SCB-648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Willem Jiang reassigned SCB-648: Assignee: Willem Jiang (was: Zhang Yonglun) > Omega support JDK7 > -- > > Key: SCB-648 > URL: https://issues.apache.org/jira/browse/SCB-648 > Project: Apache ServiceComb > Issue Type: Task > Components: Saga >Reporter: Willem Jiang >Assignee: Willem Jiang >Priority: Major > Labels: newbie > Fix For: saga-0.3.0 > > > Omega should support JDK 7 for more wild users, I just checked the GRPC, it > supports JDK7. > Current we just need to avoid the lamda function in Omega modules. > Steps > * Change the code compile support to java 7 > * Fix the find related issue. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-782) [SCB-782]support revision check when use pull mode with config center
[ https://issues.apache.org/jira/browse/SCB-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561535#comment-16561535 ] ASF GitHub Bot commented on SCB-782: heyile commented on a change in pull request #842: [SCB-782]support revision check when use pull mode with config center URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/842#discussion_r206028000 ## File path: dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java ## @@ -375,15 +374,17 @@ public void refreshConfig(String configcenter, boolean wait) { } latch.countDown(); }); - } else { + }else if (rsp.statusCode() == HttpResponseStatus.NOT_MODIFIED.code()){ +latch.countDown(); + }else { rsp.bodyHandler(buf -> { LOGGER.error("Server error message is [{}].", buf); latch.countDown(); }); EventManager.post(new ConnFailEvent("fetch config fail")); LOGGER.error("Config refresh from {} failed.", configcenter); } -}); +}).setTimeout((BOOTUP_WAIT_TIME -1 )* 1000); Review comment: I do not think so, I set the the time out of the sub thread to pull the setting from config-center is less than the main thread to wait . hence , the main thread will wait until sub thread finish pull or throw a time out exception. of course, it can gurantee each pull run sequentially 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 > [SCB-782]support revision check when use pull mode with config center > - > > Key: SCB-782 > URL: https://issues.apache.org/jira/browse/SCB-782 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: 何一乐 >Assignee: 何一乐 >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-735) Add admin dump api
[ https://issues.apache.org/jira/browse/SCB-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561559#comment-16561559 ] ASF GitHub Bot commented on SCB-735: asifdxtreme commented on issue #396: SCB-735 Add admin dump api URL: https://github.com/apache/incubator-servicecomb-service-center/pull/396#issuecomment-408768716 Please update the swagger.yaml for dump api's 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 admin dump api > -- > > Key: SCB-735 > URL: https://issues.apache.org/jira/browse/SCB-735 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-735) Add admin dump api
[ https://issues.apache.org/jira/browse/SCB-735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561558#comment-16561558 ] ASF GitHub Bot commented on SCB-735: asifdxtreme commented on a change in pull request #396: SCB-735 Add admin dump api URL: https://github.com/apache/incubator-servicecomb-service-center/pull/396#discussion_r206031120 ## File path: server/broker/util.go ## @@ -19,14 +19,14 @@ package broker import ( "context" "encoding/json" - "errors" "math" "net/url" "strconv" "strings" "github.com/ServiceComb/paas-lager/third_party/forked/cloudfoundry/lager" Review comment: lager location has been changed, this needs to be updated 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 admin dump api > -- > > Key: SCB-735 > URL: https://issues.apache.org/jira/browse/SCB-735 > Project: Apache ServiceComb > Issue Type: New Feature > Components: Service-Center >Reporter: little-cui >Assignee: little-cui >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-782) [SCB-782]support revision check when use pull mode with config center
[ https://issues.apache.org/jira/browse/SCB-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561582#comment-16561582 ] ASF GitHub Bot commented on SCB-782: heyile commented on a change in pull request #842: [SCB-782]support revision check when use pull mode with config center URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/842#discussion_r206041023 ## File path: dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ParseConfigUtils.java ## @@ -40,13 +40,20 @@ public static final Map flatItems = new HashMap<>(); + public static String CURRENT_VERSION_INFO = "default"; + private UpdateHandler updateHandler; public ParseConfigUtils(UpdateHandler updateHandler) { this.updateHandler = updateHandler; } public void refreshConfigItems(Map> remoteItems) { + +CURRENT_VERSION_INFO = remoteItems.getOrDefault("revision",new HashMap<>()).getOrDefault("version","default").toString(); +//make sure the CURRENT_VERSION_INFO != "" +CURRENT_VERSION_INFO = CURRENT_VERSION_INFO.equals("") ? "default" : CURRENT_VERSION_INFO; +remoteItems.remove("revision");//the key revision is not the config setting Review comment: it doesn't matter,as you know, if the user have a key named revision, it is shown as bellow { "springmvc@springmvctest": { "revision": "gg" }, "springmvc@springmvctest#0.0.3": { "revision": "" }, "revision": { "version": "default44-47" } } 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 > [SCB-782]support revision check when use pull mode with config center > - > > Key: SCB-782 > URL: https://issues.apache.org/jira/browse/SCB-782 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: 何一乐 >Assignee: 何一乐 >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-782) [SCB-782]support revision check when use pull mode with config center
[ https://issues.apache.org/jira/browse/SCB-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561584#comment-16561584 ] ASF GitHub Bot commented on SCB-782: heyile commented on a change in pull request #842: [SCB-782]support revision check when use pull mode with config center URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/842#discussion_r206028000 ## File path: dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java ## @@ -375,15 +374,17 @@ public void refreshConfig(String configcenter, boolean wait) { } latch.countDown(); }); - } else { + }else if (rsp.statusCode() == HttpResponseStatus.NOT_MODIFIED.code()){ +latch.countDown(); + }else { rsp.bodyHandler(buf -> { LOGGER.error("Server error message is [{}].", buf); latch.countDown(); }); EventManager.post(new ConnFailEvent("fetch config fail")); LOGGER.error("Config refresh from {} failed.", configcenter); } -}); +}).setTimeout((BOOTUP_WAIT_TIME -1 )* 1000); Review comment: I do not think so, I set the the timeout of the sub thread to pull the setting from config-center is less than the main thread to wait . hence , the main thread will wait until sub thread finish pull or throw a time out exception. of course, it can gurantee each pull run sequentially 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 > [SCB-782]support revision check when use pull mode with config center > - > > Key: SCB-782 > URL: https://issues.apache.org/jira/browse/SCB-782 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: 何一乐 >Assignee: 何一乐 >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-782) [SCB-782]support revision check when use pull mode with config center
[ https://issues.apache.org/jira/browse/SCB-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561589#comment-16561589 ] ASF GitHub Bot commented on SCB-782: heyile commented on a change in pull request #842: [SCB-782]support revision check when use pull mode with config center URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/842#discussion_r206042161 ## File path: dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/client/ConfigCenterClient.java ## @@ -375,15 +374,17 @@ public void refreshConfig(String configcenter, boolean wait) { } latch.countDown(); }); - } else { + }else if (rsp.statusCode() == HttpResponseStatus.NOT_MODIFIED.code()){ Review comment: ok, I see 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 > [SCB-782]support revision check when use pull mode with config center > - > > Key: SCB-782 > URL: https://issues.apache.org/jira/browse/SCB-782 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: 何一乐 >Assignee: 何一乐 >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SCB-782) [SCB-782]support revision check when use pull mode with config center
[ https://issues.apache.org/jira/browse/SCB-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16561644#comment-16561644 ] ASF GitHub Bot commented on SCB-782: coveralls edited a comment on issue #842: [SCB-782]support revision check when use pull mode with config center URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/842#issuecomment-408408198 [![Coverage Status](https://coveralls.io/builds/18223583/badge)](https://coveralls.io/builds/18223583) Coverage decreased (-0.2%) to 86.562% when pulling **a12879912afcb63137f575d0365de4d6d239ab01 on heyile:rkd_new_7_27** into **40981a8e93e6c9e135959074b1897950eda4b59e 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 > [SCB-782]support revision check when use pull mode with config center > - > > Key: SCB-782 > URL: https://issues.apache.org/jira/browse/SCB-782 > Project: Apache ServiceComb > Issue Type: Improvement > Components: Java-Chassis >Reporter: 何一乐 >Assignee: 何一乐 >Priority: Major > -- This message was sent by Atlassian JIRA (v7.6.3#76005)