[GitHub] codecov-io commented on issue #406: Make Instance statistics non-clickable
codecov-io commented on issue #406: Make Instance statistics non-clickable URL: https://github.com/apache/incubator-servicecomb-service-center/pull/406#issuecomment-409102640 # [Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/406?src=pr=h1) Report > Merging [#406](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/406?src=pr=desc) into [master](https://codecov.io/gh/apache/incubator-servicecomb-service-center/commit/babdcccb73f5b5e1c76d90166a44eb22f817687d?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/406/graphs/tree.svg?width=650=GAaF7zrg8R=150=pr)](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/406?src=pr=tree) ```diff @@ Coverage Diff @@ ## master #406 +/- ## === Coverage 71.74% 71.74% === Files 39 39 Lines4137 4137 === Hits 2968 2968 Misses 1003 1003 Partials 166 166 ``` | [Impacted Files](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/406?src=pr=tree) | Coverage Δ | | |---|---|---| | [server/service/notification/websocket.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/406/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2Uvbm90aWZpY2F0aW9uL3dlYnNvY2tldC5nbw==) | `80.28% <0%> (-0.71%)` | :arrow_down: | | [server/service/rule.go](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/406/diff?src=pr=tree#diff-c2VydmVyL3NlcnZpY2UvcnVsZS5nbw==) | `70.56% <0%> (+0.4%)` | :arrow_up: | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/406?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/406?src=pr=footer). Last update [babdccc...57157b7](https://codecov.io/gh/apache/incubator-servicecomb-service-center/pull/406?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 With regards, Apache Git Services
[incubator-servicecomb-service-center] branch master updated: Add docker builder pattern (#402)
This is an automated email from the ASF dual-hosted git repository. asifdxtreme pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-service-center.git The following commit(s) were added to refs/heads/master by this push: new 7157610 Add docker builder pattern (#402) 7157610 is described below commit 7157610d608704aa885ec278f053ae91e283fa85 Author: little-cui AuthorDate: Tue Jul 31 13:48:03 2018 +0800 Add docker builder pattern (#402) --- .gitignore | 2 + DockerGuide.md | 20 --- Dockerfile | 22 --- .../Dockerfile.tmpl => Dockerfile.build| 8 +- docker-compose.yml | 33 + docs/README.md | 4 +- docs/create-docker-image.md| 74 -- frontend/Readme.md | 2 +- .../mac/start-service-center.sh => build/deps.sh} | 30 +++- .../mac/start-service-center.sh => build/local.sh} | 25 +++- scripts/build/tools.sh | 148 +++ scripts/docker/README.md | 4 + .../docker/build-frontend-image/Dockerfile.tmpl| 8 +- scripts/docker/build-frontend-image/README.md | 17 +-- scripts/docker/build-frontend-image/build.sh | 50 --- .../{build-image => build-frontend-image}/start.sh | 19 ++- scripts/docker/build-image/Dockerfile.tmpl | 4 +- scripts/docker/build-image/README.md | 4 +- scripts/docker/build-image/build.sh| 40 ++--- scripts/docker/build-image/start.sh| 3 + scripts/release/make_release.sh| 163 +++-- .../{mac => darwin}/start-frontend.sh | 0 .../{mac => darwin}/start-service-center.sh| 0 .../start_scripts/{mac => darwin}/stop-frontend.sh | 0 .../{mac => darwin}/stop-service-center.sh | 0 25 files changed, 344 insertions(+), 336 deletions(-) diff --git a/.gitignore b/.gitignore index 74de4dd..84fb882 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 654b271..000 --- 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 1b51c34..000 --- 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/scripts/docker/build-frontend-image/Dockerfile.tmpl b/Dockerfile.build similarity index 83% copy from scripts/docker/build-frontend-image/Dockerfile.tmpl copy to Dockerfile.build index 318d845..9a96cab 100644 --- a/scripts/docker/build-frontend-image/Dockerfile.tmpl +++ b/Dockerfile.build @@ -13,10 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM ubuntu +FROM golang:1.8.3 -ADD frontend.tar.gz /opt +WORKDIR /go/src/github.com/apache/incubator-servicecomb-service-center -WORKDIR /opt/frontend +COPY . . -ENTRYPOINT ["/opt/frontend/start_linux.sh"] +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 000..6a9ec64 --- /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: +
[GitHub] coveralls commented on issue #406: Make Instance statistics non-clickable
coveralls commented on issue #406: Make Instance statistics non-clickable URL: https://github.com/apache/incubator-servicecomb-service-center/pull/406#issuecomment-409102596 [![Coverage Status](https://coveralls.io/builds/18242220/badge)](https://coveralls.io/builds/18242220) Coverage decreased (-0.02%) to 74.57% when pulling **57157b74e96d57b22cd121a0093414df44b66979 on asifdxtreme:master** into **babdcccb73f5b5e1c76d90166a44eb22f817687d on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asifdxtreme closed pull request #402: SCB-779 Add docker builder pattern scripts
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 Image](/scripts/docker/build-image) - [Making Front-end Image](/scripts/docker/build-frontend-image) diff --git a/docs/create-docker-image.md b/docs/create-docker-image.md deleted file mode 100644 index de497272.. --- a/docs/create-docker-image.md +++
[GitHub] asifdxtreme opened a new pull request #406: Make Instance statistics non-clickable
asifdxtreme opened a new pull request #406: Make Instance statistics non-clickable URL: https://github.com/apache/incubator-servicecomb-service-center/pull/406 Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `go build` `go test` `go fmt` `go vet` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). --- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asifdxtreme opened a new issue #405: Limit the topology view to only 100 microservices.
asifdxtreme opened a new issue #405: Limit the topology view to only 100 microservices. URL: https://github.com/apache/incubator-servicecomb-service-center/issues/405 If the microservices count is more than 100 that limit the display of Topology view and give user option to select some particular AppId to view the topology This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asifdxtreme opened a new issue #404: Aut-refresh the dashboard and service-list page every 10sec
asifdxtreme opened a new issue #404: Aut-refresh the dashboard and service-list page every 10sec URL: https://github.com/apache/incubator-servicecomb-service-center/issues/404 The refresh should only happen if the user is browsing that page This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] asifdxtreme opened a new issue #403: Verify the chinese version of the UI as all chinese text was translated using Google Translate
asifdxtreme opened a new issue #403: Verify the chinese version of the UI as all chinese text was translated using Google Translate URL: https://github.com/apache/incubator-servicecomb-service-center/issues/403 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wujimin opened a new pull request #847: [SCB-790] integration test support create new target microservice instance in one node
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 With regards, Apache Git Services
[GitHub] little-cui closed pull request #401: SCB-776 Log print more detailed
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 != nil { - util.Logger().Errorf(err, "register instance failed, invalid parameters, operator %s.", remoteIP) + util.Logger().Errorf(err, "register instance failed, invalid parameters, operator %s",
[GitHub] weichao666 closed pull request #25: public key black/white add feature: choose server by version
weichao666 closed pull request #25: public key black/white add feature: choose server by version URL: https://github.com/apache/incubator-servicecomb-docs/pull/25 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/java-chassis-reference/zh_CN/references-handlers/publickey.md b/java-chassis-reference/zh_CN/references-handlers/publickey.md index 4d540d7..3abc640 100644 --- a/java-chassis-reference/zh_CN/references-handlers/publickey.md +++ b/java-chassis-reference/zh_CN/references-handlers/publickey.md @@ -25,15 +25,15 @@ POM依赖: * 在pom.xml中增加依赖: ``` - - org.apache.servicecomb - handler-publickey-auth + + org.apache.servicecomb + handler-publickey-auth ``` ## 配置黑白名单 -基于公钥认证机制,ServiceComb提供了黑白名单功能。通过黑白名单,可以控制微服务允许其他哪些服务访问。目前支持通过配置服务属性来控制,配置项如下: +基于公钥认证机制,ServiceComb提供了黑白名单功能。通过黑白名单,可以控制微服务允许其他哪些服务访问。目前支持通过配置服务属性来控制,支持按照服务名或版本来筛选,配置项如下: ``` servicecomb: @@ -42,11 +42,12 @@ servicecomb: black: list01: category: property ## property, fixed value - propertyName: serviceName ## property name -# property value match expression. -# only supports prefix match and postfix match and exactly match. + propertyName: serviceName ## property name, e.g. serviceName or version +# property value match expression. +# if propertyName is serviceName, only supports prefix match and postfix match and exactly match. # e.g. hacker*, *hacker, hacker - rule: hacker +# if propertyName is version, only supports exactly match. e.g. 1.0.0(a.b.c) + rule: hacker white: list02: category: property @@ -56,4 +57,4 @@ servicecomb: 以上规则配置了黑名单,不允许微服务名称为hacker的访问;白名单,允许微服务名称为cust前缀的服务访问。 -ServiceComb提供了[trust-sample](https://github.com/apache/incubator-servicecomb-java-chassis/tree/master/samples/trust-sample)来演示黑白名单功能。 \ No newline at end of file +ServiceComb提供了[trust-sample](https://github.com/apache/incubator-servicecomb-java-chassis/tree/master/samples/trust-sample)来演示黑白名单功能。 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] weichao666 opened a new pull request #25: public key black/white add feature: choose server by version
weichao666 opened a new pull request #25: public key black/white add feature: choose server by version URL: https://github.com/apache/incubator-servicecomb-docs/pull/25 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] liubao68 commented on a change in pull request #846: [SCB-788] public key black/white add feature: choose server by version
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
[GitHub] liubao68 commented on a change in pull request #846: [SCB-788] public key black/white add feature: choose server by version
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
[GitHub] liubao68 commented on a change in pull request #846: [SCB-788] public key black/white add feature: choose server by version
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
[GitHub] liubao68 commented on a change in pull request #846: [SCB-788] public key black/white add feature: choose server by version
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
[GitHub] liubao68 commented on a change in pull request #846: [SCB-788] public key black/white add feature: choose server by version
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
[GitHub] weichao666 opened a new pull request #846: [SCB-788] public key black/white add feature: choose server by version
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 With regards, Apache Git Services
[GitHub] liubao68 opened a new pull request #845: [SCB]in small & simple situations, unavailable server not cleaned
liubao68 opened a new pull request #845: [SCB]in small & simple situations, unavailable server not cleaned URL: https://github.com/apache/incubator-servicecomb-java-chassis/pull/845 Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes. - [ ] Each commit in the pull request should have a meaningful subject line and body. - [ ] Format the pull request title like `[SCB-XXX] Fixes bug in ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA issue. - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [ ] Run `mvn clean install` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). --- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] WillemJiang closed pull request #126: Some typo fixes
WillemJiang closed pull request #126: Some typo fixes URL: https://github.com/apache/incubator-servicecomb-website/pull/126 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/_users/cn/service-definition.md b/_users/cn/service-definition.md index 364e21c3..a71a2c95 100644 --- a/_users/cn/service-definition.md +++ b/_users/cn/service-definition.md @@ -47,9 +47,9 @@ service_description: #服务描述 allowCrossApp: false key1: value1 key2: value2 - propertyExtentedClass: org.apache.servicecomb.serviceregistry.MicroServicePropertyExtendedStub + propertyExtendedClass: org.apache.servicecomb.serviceregistry.MicroServicePropertyExtendedStub instance_description: #实例描述 properties: #元数据 key3: value3 - propertyExtentedClass: org.apache.servicecomb.serviceregistry.MicroServicePropertyExtendedStub + propertyExtendedClass: org.apache.servicecomb.serviceregistry.MicroServicePropertyExtendedStub ``` diff --git a/_users/service-definition.md b/_users/service-definition.md index 56576d03..c43106ad 100644 --- a/_users/service-definition.md +++ b/_users/service-definition.md @@ -47,9 +47,9 @@ service_description: #Service description allowCrossApp: false key1: value1 key2: value2 - propertyExtentedClass: org.apache.servicecomb.serviceregistry.MicroServicePropertyExtendedStub + propertyExtendedClass: org.apache.servicecomb.serviceregistry.MicroServicePropertyExtendedStub instance_description: #Instance description properties: #Metadata key3: value3 - propertyExtentedClass: org.apache.servicecomb.serviceregistry.MicroServicePropertyExtendedStub + propertyExtendedClass: org.apache.servicecomb.serviceregistry.MicroServicePropertyExtendedStub ``` This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[incubator-servicecomb-website] branch master updated: Fix some typos
This is an automated email from the ASF dual-hosted git repository. ningjiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-website.git The following commit(s) were added to refs/heads/master by this push: new 4ed8219 Fix some typos 4ed8219 is described below commit 4ed8219c304d88838cf67dc688d30f29e7688213 Author: Zhen Ju AuthorDate: Mon Jul 30 17:43:39 2018 +0800 Fix some typos --- _users/cn/service-definition.md | 4 ++-- _users/service-definition.md| 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_users/cn/service-definition.md b/_users/cn/service-definition.md index 364e21c..a71a2c9 100644 --- a/_users/cn/service-definition.md +++ b/_users/cn/service-definition.md @@ -47,9 +47,9 @@ service_description: #服务描述 allowCrossApp: false key1: value1 key2: value2 - propertyExtentedClass: org.apache.servicecomb.serviceregistry.MicroServicePropertyExtendedStub + propertyExtendedClass: org.apache.servicecomb.serviceregistry.MicroServicePropertyExtendedStub instance_description: #实例描述 properties: #元数据 key3: value3 - propertyExtentedClass: org.apache.servicecomb.serviceregistry.MicroServicePropertyExtendedStub + propertyExtendedClass: org.apache.servicecomb.serviceregistry.MicroServicePropertyExtendedStub ``` diff --git a/_users/service-definition.md b/_users/service-definition.md index 56576d0..c43106a 100644 --- a/_users/service-definition.md +++ b/_users/service-definition.md @@ -47,9 +47,9 @@ service_description: #Service description allowCrossApp: false key1: value1 key2: value2 - propertyExtentedClass: org.apache.servicecomb.serviceregistry.MicroServicePropertyExtendedStub + propertyExtendedClass: org.apache.servicecomb.serviceregistry.MicroServicePropertyExtendedStub instance_description: #Instance description properties: #Metadata key3: value3 - propertyExtentedClass: org.apache.servicecomb.serviceregistry.MicroServicePropertyExtendedStub + propertyExtendedClass: org.apache.servicecomb.serviceregistry.MicroServicePropertyExtendedStub ```
[GitHub] imlidian opened a new pull request #127: update deploy logic and make arc and setup-env docs migration
imlidian opened a new pull request #127: update deploy logic and make arc and setup-env docs migration URL: https://github.com/apache/incubator-servicecomb-website/pull/127 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] crystaldust opened a new pull request #126: Some typo fixes
crystaldust opened a new pull request #126: Some typo fixes URL: https://github.com/apache/incubator-servicecomb-website/pull/126 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] coveralls edited a comment on issue #842: [SCB-782]support revision check when use pull mode with config center
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 With regards, Apache Git Services
[GitHub] heyile commented on a change in pull request #842: [SCB-782]support revision check when use pull mode with config center
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 With regards, Apache Git Services
[GitHub] heyile commented on a change in pull request #842: [SCB-782]support revision check when use pull mode with config center
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 With regards, Apache Git Services
[GitHub] heyile commented on a change in pull request #842: [SCB-782]support revision check when use pull mode with config center
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 With regards, Apache Git Services
[GitHub] asifdxtreme commented on issue #396: SCB-735 Add admin dump api
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 With regards, Apache Git Services
[GitHub] asifdxtreme commented on a change in pull request #396: SCB-735 Add admin dump api
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 With regards, Apache Git Services
[GitHub] WillemJiang commented on issue #232: [SCB-785] 支持在补偿方法里得到当前分布式事务的全局事务ID及本地事务ID
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 With regards, Apache Git Services
[GitHub] WillemJiang closed pull request #233: Fixed Spelling.
WillemJiang closed pull request #233: Fixed Spelling. URL: https://github.com/apache/incubator-servicecomb-saga/pull/233 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/saga-distribution/src/release/licenses/LICENSE-boringssl b/saga-distribution/src/release/licenses/LICENSE-boringssl index ae1de2be..728202f8 100644 --- a/saga-distribution/src/release/licenses/LICENSE-boringssl +++ b/saga-distribution/src/release/licenses/LICENSE-boringssl @@ -133,7 +133,7 @@ record keeping.) * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * The licence and distribution terms for any publically available version or + * The licence and distribution terms for any publicly available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] WillemJiang commented on issue #233: Fixed Spelling.
WillemJiang commented on issue #233: Fixed Spelling. URL: https://github.com/apache/incubator-servicecomb-saga/pull/233#issuecomment-408764799 @jimmycasey, as we just copy the License file from the third party library so we are not supposed to change this file unless the third party library changed the license file. So I just close the file for this PR. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] heyile commented on a change in pull request #842: [SCB-782]support revision check when use pull mode with config center
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 With regards, Apache Git Services
[GitHub] asifdxtreme commented on a change in pull request #402: SCB-779 Add docker builder pattern scripts
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 With regards, Apache Git Services
[GitHub] asifdxtreme commented on a change in pull request #402: SCB-779 Add docker builder pattern scripts
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 With regards, Apache Git Services
[GitHub] little-cui commented on a change in pull request #401: SCB-776 Log print more detailed
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 With regards, Apache Git Services
[GitHub] tianxiaoliang commented on a change in pull request #401: SCB-776 Log print more detailed
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 With regards, Apache Git Services
[GitHub] liubao68 commented on a change in pull request #842: [SCB-782]support revision check when use pull mode with config center
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 With regards, Apache Git Services
[GitHub] little-cui commented on a change in pull request #401: SCB-776 Log print more detailed
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 With regards, Apache Git Services
[GitHub] little-cui commented on a change in pull request #401: SCB-776 Log print more detailed
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 With regards, Apache Git Services
[GitHub] liubao68 commented on a change in pull request #842: [SCB-782]support revision check when use pull mode with config center
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 With regards, Apache Git Services
[GitHub] liubao68 commented on a change in pull request #842: [SCB-782]support revision check when use pull mode with config center
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 With regards, Apache Git Services
[GitHub] wujimin closed pull request #844: [SCB-786] when instances cache is not sync to SC caused by bug, auto fix it
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 With regards, Apache Git Services
[incubator-servicecomb-java-chassis] branch master updated: [SCB-786] when instances cache is not sync to SC caused by bug, auto fix it.
This is an automated email from the ASF dual-hosted git repository. wujimin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git The following commit(s) were added to refs/heads/master by this push: new 27a7556 [SCB-786] when instances cache is not sync to SC caused by bug, auto fix it. 27a7556 is described below commit 27a75565e8331e7b06fa003d1417a72b30847d9b Author: wujimin AuthorDate: Mon Jul 30 11:45:39 2018 +0800 [SCB-786] when instances cache is not sync to SC caused by bug, auto fix it. --- .../serviceregistry/consumer/MicroserviceVersions.java| 4 .../serviceregistry/diagnosis/instance/InstanceCacheChecker.java | 4 .../diagnosis/instance/TestInstanceCacheChecker.java | 8 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) 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 f867f6a..ab4f479 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 class MicroserviceVersions { 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 8e0e1d7..28fb4b6 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 @@ public class InstanceCacheChecker { 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 b932070..c84cc3e 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.Microservice; 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 @@ public class TestInstanceCacheChecker { 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 @@ public class TestInstanceCacheChecker { expectedSummary.setStatus(Status.ABNORMAL); Assert.assertEquals(Json.encode(expectedSummary), Json.encode(instanceCacheSummary)); +Assert.assertNull(microserviceVersions.getRevision()); } }
[GitHub] asifdxtreme commented on issue #402: SCB-779 Add docker builder pattern scripts
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 With regards, Apache Git Services