You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2019/01/21 09:44:00 UTC
[servicecomb-service-center] branch master updated: SCB-1059 Update
Etcd version from v3.1.9 to v3.3.10 (#527)
This is an automated email from the ASF dual-hosted git repository.
littlecui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git
The following commit(s) were added to refs/heads/master by this push:
new 5733168 SCB-1059 Update Etcd version from v3.1.9 to v3.3.10 (#527)
5733168 is described below
commit 5733168f9237ed728f82e020087a905a0f8eaf4c
Author: little-cui <su...@qq.com>
AuthorDate: Mon Jan 21 17:43:56 2019 +0800
SCB-1059 Update Etcd version from v3.1.9 to v3.3.10 (#527)
* SCB-1059 Update Etcd version from v3.1.9 to v3.3.10
* SCB-1059 Using the go mod instead of glide
---
.travis.yml | 6 +-
glide.yaml | 412 ---------------------
go.mod | 25 +-
pkg/util/concurrent_map_test.go | 3 +-
.../{LICENSE-boltdb-bolt => LICENSE-coreos-bbolt} | 0
scripts/release/licenses/LICENSE-sirupsen-logrus | 21 ++
.../licenses/LICENSE-tmc-grpc-websocket-proxy | 7 +
.../plugin/pkg/registry/embededetcd/embededetcd.go | 34 +-
server/plugin/pkg/registry/etcd/common.go | 7 +-
server/plugin/pkg/registry/etcd/etcd.go | 20 +-
server/plugin/pkg/registry/etcd/logger_test.go | 2 +-
server/service/instance_test.go | 18 -
server/service/util/instance_util.go | 13 +-
13 files changed, 86 insertions(+), 482 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index f3e3b25..6a9e37a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,11 +6,10 @@ services:
- docker
go:
- - 1.9.2
+ - 1.11
before_install:
- go get github.com/mattn/goveralls
- - curl https://glide.sh/get | sh
- curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
- sudo apt-get install -y nodejs
- npm install -g bower
@@ -20,7 +19,8 @@ before_script:
- rsync -az ${TRAVIS_BUILD_DIR}/ $HOME/gopath/src/github.com/apache/servicecomb-service-center/
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/apache/servicecomb-service-center
- cd $HOME/gopath/src/github.com/apache/servicecomb-service-center
- - glide install
+ - GO111MODULE=on go mod download
+ - GO111MODULE=on go mod vendor
install: true
diff --git a/glide.yaml b/glide.yaml
deleted file mode 100644
index 21b66d6..0000000
--- a/glide.yaml
+++ /dev/null
@@ -1,412 +0,0 @@
-package: github.com/apache/servicecomb-service-center
-import:
-- package: github.com/Knetic/govaluate
- version: 91facc4ae520fef82c9aee6b6ae720d9ae789131
- repo: https://github.com/Knetic/govaluate
-- package: github.com/go-chassis/paas-lager
- version: 50655443dc96e3d633667ca6310251ba2a3fe5c9
- repo: https://github.com/go-chassis/paas-lager
- subpackages:
- - third_party/forked/cloudfoundry/lager
-- package: github.com/Shopify/sarama
- version: 9bb4a68d57ff6f623363aa172f0a8297aa289ba7
- repo: https://github.com/Shopify/sarama
-- package: github.com/apache/thrift
- version: 3d556248a8b97310da49939195330691dfe9d9ad
- repo: https://github.com/apache/thrift
-- package: github.com/astaxie/beego
- version: 323a1c4214101331a4b71922c23d19b7409ac71f
- repo: https://github.com/astaxie/beego
-- package: github.com/beego/x2j
- version: a0352aadc5420072ebe692481a5d6913d77f8cf0
- repo: https://github.com/beego/x2j
-- package: github.com/belogik/goes
- version: e54d722c3aff588e4c737fe11c07359019240824
- repo: https://github.com/belogik/goes
-- package: github.com/beorn7/perks
- version: 4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9
- repo: https://github.com/beorn7/perks
-- package: github.com/bgentry/speakeasy
- version: 4aabc24848ce5fd31929f7d1e4ea74d3709c14cd
- repo: https://github.com/bgentry/speakeasy
-- package: github.com/boltdb/bolt
- version: e9cf4fae01b5a8ff89d0ec6b32f0d9c9f79aefdd
- repo: https://github.com/boltdb/bolt
-- package: github.com/bradfitz/gomemcache
- version: 1952afaa557dc08e8e0d89eafab110fb501c1a2b
- repo: https://github.com/bradfitz/gomemcache
-- package: github.com/casbin/casbin
- version: 91e4fb9209910a1de86b67adc0fce5c35f17369f
- repo: https://github.com/casbin/casbin
-- package: github.com/cloudflare/golz4
- version: ef862a3cdc58a6f1fee4e3af3d44fbe279194cde
- repo: https://github.com/cloudflare/golz4
-- package: github.com/cockroachdb/cmux
- version: 30d10be492927e2dcae0089c374c455d42414fcb
- repo: https://github.com/cockroachdb/cmux
-- package: github.com/coreos/etcd
- version: 0f4a535c2fb7a2920e13e2e19b9eaf6b2e9285e5
- repo: https://github.com/coreos/etcd
- subpackages:
- - client
- - clientv3
- - embed
- - etcdserver/api/v3rpc/rpctypes
- - etcdserver/etcdserverpb
- - lease
- - mvcc/mvccpb
-- package: github.com/coreos/go-semver
- version: 1817cd4bea52af76542157eeabd74b057d1a199e
- repo: https://github.com/coreos/go-semver
-- package: github.com/coreos/go-systemd
- version: 24036eb3df68550d24a2736c5d013f4e83366866
- repo: https://github.com/coreos/go-systemd
-- package: github.com/coreos/pkg
- version: 8dbaa491b063ed47e2474b5363de0c0db91cf9f2
- repo: https://github.com/coreos/pkg
- subpackages:
- - capnslog
-- package: github.com/couchbase/go-couchbase
- version: 8f4d4dae4027367687241fb6a3d11c59e76d867e
- repo: https://github.com/couchbase/go-couchbase
-- package: github.com/couchbase/gomemcached
- version: 4ddb35b8aa8add8e7f6b58199f0bdaed5710e34b
- repo: https://github.com/couchbase/gomemcached
-- package: github.com/cupcake/rdb
- version: 43ba34106c765f2111c0dc7b74cdf8ee437411e0
- repo: https://github.com/cupcake/rdb
-- package: github.com/davecgh/go-spew
- version: 6cf5744a041a0022271cefed95ba843f6d87fd51
- repo: https://github.com/davecgh/go-spew
-- package: github.com/dgrijalva/jwt-go
- version: 06ea1031745cb8b3dab3f6a236daf2b0aa468b7e
- repo: https://github.com/dgrijalva/jwt-go
-- package: github.com/dustin/go-humanize
- version: 259d2a102b871d17f30e3cd9881a642961a1e486
- repo: https://github.com/dustin/go-humanize
-- package: github.com/eapache/go-resiliency
- version: 6800482f2c813e689c88b7ed3282262385011890
- repo: https://github.com/eapache/go-resiliency
-- package: github.com/eapache/go-xerial-snappy
- version: bb955e01b9346ac19dc29eb16586c90ded99a98c
- repo: https://github.com/eapache/go-xerial-snappy
-- package: github.com/eapache/queue
- version: ded5959c0d4e360646dc9e9908cff48666781367
- repo: https://github.com/eapache/queue
-- package: github.com/edsrzf/mmap-go
- version: 0bce6a6887123b67a60366d2c9fe2dfb74289d2e
- repo: https://github.com/edsrzf/mmap-go
-- package: github.com/garyburd/redigo
- version: 57f1cd7de6175c96b423e7ac2534ff2b39e2ef79
- repo: https://github.com/garyburd/redigo
-- package: github.com/ghodss/yaml
- version: 0ca9ea5df5451ffdf184b4428c902747c2c11cd7
- repo: https://github.com/ghodss/yaml
-- package: github.com/go-logfmt/logfmt
- version: 390ab7935ee28ec6b286364bba9b4dd6410cb3d5
- repo: https://github.com/go-logfmt/logfmt
-- package: github.com/gogo/protobuf
- version: baaac160ed234ed06b347cf51202683a0068efe4
- repo: https://github.com/gogo/protobuf
-- package: github.com/golang/protobuf
- version: 925541529c1fa6821df4e44ce2723319eb2be768
- repo: https://github.com/golang/protobuf
- subpackages:
- - proto
-- package: github.com/golang/snappy
- version: 553a641470496b2327abcac10b36396bd98e45c9
- repo: https://github.com/golang/snappy
-- package: github.com/google/btree
- version: 316fb6d3f031ae8f4d457c6c5186b9e3ded70435
- repo: https://github.com/google/btree
-- package: github.com/gorilla/websocket
- version: ea4d1f681babbce9545c9c5f3d5194a789c89f5b
- repo: https://github.com/gorilla/websocket
-- package: github.com/hsluoyz/casbin
- version: 91e4fb9209910a1de86b67adc0fce5c35f17369f
- repo: https://github.com/hsluoyz/casbin
-- package: github.com/jonboulle/clockwork
- version: bcac9884e7502bb2b474c0339d889cb981a2f27f
- repo: https://github.com/jonboulle/clockwork
-- package: github.com/karlseguin/ccache
- version: 3ba9789cfd2cb7b4fb4657efc994cc1c599a648c
- repo: https://github.com/karlseguin/ccache
-- package: github.com/klauspost/crc32
- version: cb6bfca970f6908083f26f39a79009d608efd5cd
- repo: https://github.com/klauspost/crc32
-- package: github.com/kr/pty
- version: 2c10821df3c3cf905230d078702dfbe9404c9b23
- repo: https://github.com/kr/pty
-- package: github.com/labstack/echo
- version: a5d81b8d4a627f3f49dcb3164ef2bb5239682227
- repo: https://github.com/labstack/echo
- subpackages:
- - middleware
-- package: github.com/labstack/gommon
- version: 3bc2d333a4c30531c47051369043bcabd62ff4c0
- repo: https://github.com/labstack/gommon
- subpackages:
- - bytes
- - color
- - log
- - random
-- package: github.com/lib/pq
- version: 8837942c3e09574accbc5f150e2c5e057189cace
- repo: https://github.com/lib/pq
-- package: github.com/mattn/go-colorable
- version: efa589957cd060542a26d2dd7832fd6a6c6c3ade
- repo: https://github.com/mattn/go-colorable
-- package: github.com/mattn/go-isatty
- version: 6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c
- repo: https://github.com/mattn/go-isatty
-- package: github.com/mattn/go-runewidth
- version: 97311d9f7767e3d6f422ea06661bc2c7a19e8a5d
- repo: https://github.com/mattn/go-runewidth
-- package: github.com/matttproud/golang_protobuf_extensions
- version: c12348ce28de40eed0136aa2b644d0ee0650e56c
- repo: https://github.com/matttproud/golang_protobuf_extensions
-- package: github.com/onsi/ginkgo
- version: a1f616c97771e46da1722d3aa9dcde0a43f55682
- repo: https://github.com/onsi/ginkgo
-- package: github.com/onsi/gomega
- version: 00acfa9d92a386415bd235ab069c52063f925998
- repo: https://github.com/onsi/gomega
-- package: github.com/opentracing-contrib/go-observer
- version: a52f2342449246d5bcc273e65cbdcfa5f7d6c63c
- repo: https://github.com/opentracing-contrib/go-observer
-- package: github.com/opentracing/opentracing-go
- version: 1949ddbfd147afd4d964a9f00b24eb291e0e7c38
- repo: https://github.com/opentracing/opentracing-go
- subpackages:
- - ext
-- package: github.com/openzipkin/zipkin-go-opentracing
- version: 6bb822a7f15fdc5800b9822a6ac1bfa0b7d9195d
- repo: https://github.com/openzipkin/zipkin-go-opentracing
- subpackages:
- - thrift/gen-go/zipkincore
- - types
-- package: github.com/pelletier/go-toml
- version: 69d355db5304c0f7f809a2edc054553e7142f016
- repo: https://github.com/pelletier/go-toml
-- package: github.com/prometheus/client_golang
- version: ab4214782d022e867e3195b4c9ddb1ca45413382
- repo: https://github.com/prometheus/client_golang
- subpackages:
- - prometheus
-- package: github.com/prometheus/client_model
- version: 6f3806018612930941127f2a7c6c453ba2c527d2
- repo: https://github.com/prometheus/client_model
- subpackages:
- - go
-- package: github.com/prometheus/common
- version: 0866df4b85a18d652b6965be022d007cdf076822
- repo: https://github.com/prometheus/common
-- package: github.com/prometheus/procfs
- version: 822d4a1f8edcbcbc71e8d1fd6527b12331a6d0ad
- repo: https://github.com/prometheus/procfs
-- package: github.com/rs/cors
- version: 8dd4211afb5d08dbb39a533b9bb9e4b486351df6
- repo: https://github.com/rs/cors
-- package: github.com/satori/go.uuid
- version: 879c5887cd475cd7864858769793b2ceb0d44feb
- repo: https://github.com/satori/go.uuid
-- package: github.com/siddontang/go
- version: cb568a3e5cc06256f91a2da5a87455f717eb33f4
- repo: https://github.com/siddontang/go
-- package: github.com/siddontang/ledisdb
- version: 0cb8e1a348b4877bff4648d59a75b793a0664b41
- repo: https://github.com/siddontang/ledisdb
-- package: github.com/siddontang/rdb
- version: fc89ed2e418d27e3ea76e708e54276d2b44ae9cf
- repo: https://github.com/siddontang/rdb
-- package: github.com/spf13/cobra
- version: 4d647c8944eb42504a714e57e97f244ed6344722
- repo: https://github.com/spf13/cobra
-- package: github.com/spf13/pflag
- version: e57e3eeb33f795204c1ca35f56c44f83227c6e66
- repo: https://github.com/spf13/pflag
-- package: github.com/syndtr/goleveldb
- version: 8c81ea47d4c41a385645e133e15510fc6a2a74b4
- repo: https://github.com/syndtr/goleveldb
-- package: github.com/ugorji/go
- version: 5efa3251c7f7d05e5d9704a69a984ec9f1386a40
- repo: https://github.com/ugorji/go
-- package: github.com/urfave/cli
- version: b892ba3809cd07fcf2b064e166b0c2e16e0147bd
- repo: https://github.com/urfave/cli
-- package: github.com/valyala/fasttemplate
- version: dcecefd839c4193db0d35b88ec65b4c12d360ab0
- repo: https://github.com/valyala/fasttemplate
-- package: github.com/widuu/gojson
- version: 7da9d2cd949b3f1b4e3039dd985773df8cf68a99
- repo: https://github.com/widuu/gojson
-- package: github.com/xiang90/probing
- version: 07dd2e8dfe18522e9c447ba95f2fe95262f63bb2
- repo: https://github.com/xiang90/probing
-- package: golang.org/x/crypto
- version: d6449816ce06963d9d136eee5a56fca5b0616e7e
- repo: https://github.com/golang/crypto
-- package: golang.org/x/net
- version: c81e7f25cb61200d8bf0ae971a0bac8cb638d5bc
- repo: https://github.com/golang/net
- subpackages:
- - context
-- package: golang.org/x/text
- version: 6353ef0f924300eea566d3438817aa4d3374817e
- repo: https://github.com/golang/text
-- package: golang.org/x/time
- version: 8be79e1e0910c292df4e79c241bb7e8f7e725959
- repo: https://github.com/golang/time
-- package: google.golang.org/genproto
- version: aa2eb687b4d3e17154372564ad8d6bf11c3cf21f
- repo: https://github.com/google/go-genproto
-- package: google.golang.org/grpc
- version: 3c33c26290b747350f8650c7d38bcc51b42dc785
- repo: https://github.com/grpc/grpc-go
- subpackages:
- - credentials
-- package: gopkg.in/cheggaaa/pb.v1
- version: f6ccf2184de4dd34495277e38dc19b6e7fbe0ea2
- repo: https://gopkg.in/cheggaaa/pb.v1
-- package: gopkg.in/yaml.v2
- version: d670f9405373e636a5a2765eea47fac0c9bc91a4
- repo: https://gopkg.in/yaml.v2
-- package: github.com/grpc-ecosystem/go-grpc-prometheus
- version: 6b7015e65d366bf3f19b2b2a000a831940f0f7e0
- repo: https://github.com/grpc-ecosystem/go-grpc-prometheus
-- package: github.com/grpc-ecosystem/grpc-gateway
- version: 84398b94e188ee336f307779b57b3aa91af7063c
- repo: https://github.com/grpc-ecosystem/grpc-gateway
-- package: go.uber.org/zap
- version: 4d45f9617f7d90f7a663ff21c7a4321dbe78098b
- repo: https://github.com/uber-go/zap
-- package: go.uber.org/atomic
- version: 1ea20fb1cbb1cc08cbd0d913a96dead89aa18289
- repo: https://github.com/uber-go/atomic
-- package: go.uber.org/multierr
- version: 3c4937480c32f4c13a875a1829af76c98ca3d40a
- repo: https://github.com/uber-go/multierr
-- package: github.com/natefinch/lumberjack
- version: a96e63847dc3c67d17befa69c303767e2f84e54f
- repo: https://github.com/natefinch/lumberjack
-- package: github.com/NYTimes/gziphandler
- version: 253f1acb9d9f896d86c313a3dc994c0b114f0e12
- repo: https://github.com/NYTimes/gziphandler
-
-# k8s 1.10.4 deps
-- package: k8s.io/client-go
- version: release-7.0
- repo: https://github.com/kubernetes/client-go
-- package: k8s.io/api
- version: kubernetes-1.10.4
- repo: https://github.com/kubernetes/api
- subpackages:
- - apps/v1
- - apps/v1beta1
- - apps/v1beta2
- - admissionregistration/v1alpha1
- - admissionregistration/v1beta1
- - authentication/v1
- - authentication/v1beta1
- - authorization/v1
- - authorization/v1beta1
- - autoscaling/v1
- - autoscaling/v2beta1
- - batch/v1
- - batch/v1beta1
- - batch/v2alpha1
- - certificates/v1beta1
- - core/v1
- - events/v1beta1
- - extensions/v1beta1
- - networking/v1
- - policy/v1beta1
- - rbac/v1
- - rbac/v1alpha1
- - rbac/v1beta1
- - scheduling/v1alpha1
- - settings/v1alpha1
- - storage/v1
- - storage/v1alpha1
- - storage/v1beta1
-- package: k8s.io/apimachinery
- version: kubernetes-1.10.4
- repo: https://github.com/kubernetes/apimachinery
- subpackages:
- - pkg/api/errors
- - pkg/api/meta
- - pkg/apis/meta/internalversion
- - pkg/apis/meta/v1
- - pkg/conversion
- - pkg/fields
- - pkg/labels
- - pkg/runtime
- - pkg/runtime/schema
- - pkg/runtime/serializer
- - pkg/runtime/serializer/json
- - pkg/runtime/serializer/streaming
- - pkg/runtime/serializer/versioning
- - pkg/types
- - pkg/util/cache
- - pkg/util/clock
- - pkg/util/diff
- - pkg/util/errors
- - pkg/util/net
- - pkg/util/runtime
- - pkg/util/sets
- - pkg/util/validation
- - pkg/util/wait
- - pkg/version
- - pkg/watch
-- package: github.com/golang/glog
- version: 95a09b2413e9d5d7c26c85f0ed3cff886cba7f1e
- repo: https://github.com/go-chassis/glog
-- package: github.com/googleapis/gnostic
- version: v0.1.0
- repo: https://github.com/googleapis/gnostic
- subpackages:
- - OpenAPIv2
-- package: github.com/howeyc/gopass
- version: bf9dde6d0d2c004a008c27aaee91170c786f6db8
- repo: https://github.com/howeyc/gopass
-- package: github.com/imdario/mergo
- version: 6633656539c1639d9d78127b7d47c622b5d7b6dc
- repo: https://github.com/imdario/mergo
-- package: github.com/kr/logfmt
- version: b84e30acd515aadc4b783ad4ff83aff3299bdfe0
- repo: https://github.com/kr/logfmt
-- package: golang.org/x/sys
- version: 378d26f46672a356c46195c28f61bdb4c0a781dd
- repo: https://github.com/golang/sys
- subpackages:
- - unix
- - windows
-- package: github.com/google/gofuzz
- version: 24818f796faf91cd76ec7bddd72458fbced7a6c1
- repo: https://github.com/google/gofuzz
-- package: github.com/hashicorp/golang-lru
- version: 0fb14efe8c47ae851c0034ed7a448854d3d34cf3
- repo: https://github.com/hashicorp/golang-lru
-- package: github.com/json-iterator/go
- version: 1.1.3
- repo: https://github.com/json-iterator/go
-- package: github.com/valyala/bytebufferpool
- version: master
- repo: https://github.com/valyala/bytebufferpool
-- package: gopkg.in/inf.v0
- version: v0.9.1
- repo: https://gopkg.in/inf.v0
-- package: github.com/modern-go/concurrent
- version: 1.0.3
- repo: https://github.com/modern-go/concurrent
-- package: github.com/modern-go/reflect2
- version: 1.0.0
- repo: https://github.com/modern-go/reflect2
-
-# scctl depends
-- package: github.com/olekukonko/tablewriter
- version: d4647c9c7a84d847478d890b816b7d8b62b0b279
- repo: https://github.com/olekukonko/tablewriter
-- package: github.com/cheggaaa/pb
- version: v1.0.25
- repo: https://github.com/cheggaaa/pb
diff --git a/go.mod b/go.mod
index 238ba93..6fcb88b 100644
--- a/go.mod
+++ b/go.mod
@@ -3,13 +3,13 @@ module github.com/apache/servicecomb-service-center
replace (
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b => github.com/go-chassis/glog v0.0.0-20180920075250-95a09b2413e9
go.uber.org/zap v1.9.0 => github.com/uber-go/zap v1.9.0
- golang.org/x/crypto v0.0.0-20180820150726-614d502a4dac => github.com/golang/crypto v0.0.0-20180820150726-614d502a4dac
+ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 => github.com/golang/crypto v0.0.0-20180904163835-0709b304e793
golang.org/x/net v0.0.0-20180824152047-4bcd98cce591 => github.com/golang/net v0.0.0-20180824152047-4bcd98cce591
- golang.org/x/sys v0.0.0-20180824143301-4910a1d54f87 => github.com/golang/sys v0.0.0-20180824143301-4910a1d54f87
+ golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 => github.com/golang/sys v0.0.0-20180905080454-ebe1bf3edb33
golang.org/x/text v0.0.0-20170627122817-6353ef0f9243 => github.com/golang/text v0.0.0-20170627122817-6353ef0f9243
golang.org/x/time v0.0.0-20170424234030-8be79e1e0910 => github.com/golang/time v0.0.0-20170424234030-8be79e1e0910
google.golang.org/genproto v0.0.0-20170531203552-aa2eb687b4d3 => github.com/google/go-genproto v0.0.0-20170531203552-aa2eb687b4d3
- google.golang.org/grpc v1.2.1-0.20170627165434-3c33c26290b7 => github.com/grpc/grpc-go v1.2.1-0.20170627165434-3c33c26290b7
+ google.golang.org/grpc v1.7.5 => github.com/grpc/grpc-go v1.7.5
k8s.io/api v0.0.0-20180601181742-8b7507fac302 => github.com/kubernetes/api v0.0.0-20180601181742-8b7507fac302
k8s.io/apimachinery v0.0.0-20180601181227-17529ec7eadb => github.com/kubernetes/apimachinery v0.0.0-20180601181227-17529ec7eadb
k8s.io/client-go v2.0.0-alpha.0.0.20180817174322-745ca8300397+incompatible => github.com/kubernetes/client-go v2.0.0-alpha.0.0.20180817174322-745ca8300397+incompatible
@@ -21,14 +21,13 @@ require (
github.com/apache/thrift v0.0.0-20180125231006-3d556248a8b9 // indirect
github.com/astaxie/beego v1.8.0
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 // indirect
- github.com/boltdb/bolt v1.3.1 // indirect
github.com/cheggaaa/pb v1.0.25
github.com/cockroachdb/cmux v0.0.0-20170110192607-30d10be49292 // indirect
- github.com/coreos/etcd v3.1.9+incompatible
+ github.com/coreos/bbolt v1.3.1-coreos.6 // indirect
+ github.com/coreos/etcd v3.3.6+incompatible
github.com/coreos/go-semver v0.2.0 // indirect
github.com/coreos/go-systemd v0.0.0-20180828140353-eee3db372b31 // indirect
github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea // v4
- github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/eapache/go-resiliency v1.1.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
@@ -45,8 +44,9 @@ require (
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf // indirect
github.com/googleapis/gnostic v0.2.0 // indirect
github.com/gorilla/websocket v1.2.0
+ github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
- github.com/grpc-ecosystem/grpc-gateway v1.1.1-0.20161105223513-84398b94e188 // indirect
+ github.com/grpc-ecosystem/grpc-gateway v1.3.0 // indirect
github.com/hashicorp/golang-lru v0.5.0 // indirect
github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c // indirect
github.com/hpcloud/tail v1.0.0 // indirect
@@ -75,13 +75,16 @@ require (
github.com/prometheus/client_golang v0.8.1-0.20170628125436-ab4214782d02
github.com/prometheus/client_model v0.0.0-20170216185247-6f3806018612
github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e // indirect
- github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273 // indirect
+ github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273
github.com/rcrowley/go-metrics v0.0.0-20180503174638-e2704e165165 // indirect
github.com/rs/cors v0.0.0-20170608165155-8dd4211afb5d // v1.1
github.com/satori/go.uuid v1.1.0
+ github.com/sirupsen/logrus v1.3.0 // indirect
+ github.com/soheilhy/cmux v0.1.4 // indirect
github.com/spf13/cobra v0.0.0-20170624150100-4d647c8944eb
github.com/spf13/pflag v1.0.0
- github.com/ugorji/go v0.0.0-20170620104852-5efa3251c7f7 // indirect
+ github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 // indirect
+ github.com/ugorji/go v1.1.1 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v0.0.0-20170224212429-dcecefd839c4 // indirect
github.com/widuu/gojson v0.0.0-20170212122013-7da9d2cd949b
@@ -89,13 +92,11 @@ require (
go.uber.org/atomic v1.3.2 // indirect
go.uber.org/multierr v1.1.0 // indirect
go.uber.org/zap v1.9.0
- golang.org/x/crypto v0.0.0-20180820150726-614d502a4dac // indirect
golang.org/x/net v0.0.0-20180824152047-4bcd98cce591
- golang.org/x/sys v0.0.0-20180824143301-4910a1d54f87 // indirect
golang.org/x/text v0.0.0-20170627122817-6353ef0f9243 // indirect
golang.org/x/time v0.0.0-20170424234030-8be79e1e0910 // indirect
google.golang.org/genproto v0.0.0-20170531203552-aa2eb687b4d3 // indirect
- google.golang.org/grpc v1.2.1-0.20170627165434-3c33c26290b7
+ google.golang.org/grpc v1.7.5
gopkg.in/fsnotify.v1 v1.4.7 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
diff --git a/pkg/util/concurrent_map_test.go b/pkg/util/concurrent_map_test.go
index a750903..dc451a5 100644
--- a/pkg/util/concurrent_map_test.go
+++ b/pkg/util/concurrent_map_test.go
@@ -110,13 +110,12 @@ func TestConcurrentMap_Fetch(t *testing.T) {
}
func BenchmarkConcurrentMap_Get(b *testing.B) {
- var v interface{}
cm := ConcurrentMap{}
cm.Put("a", "1")
b.ResetTimer()
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
- v, _ = cm.Get("a")
+ _, _ = cm.Get("a")
}
})
b.ReportAllocs()
diff --git a/scripts/release/licenses/LICENSE-boltdb-bolt b/scripts/release/licenses/LICENSE-coreos-bbolt
similarity index 100%
rename from scripts/release/licenses/LICENSE-boltdb-bolt
rename to scripts/release/licenses/LICENSE-coreos-bbolt
diff --git a/scripts/release/licenses/LICENSE-sirupsen-logrus b/scripts/release/licenses/LICENSE-sirupsen-logrus
new file mode 100644
index 0000000..f090cb4
--- /dev/null
+++ b/scripts/release/licenses/LICENSE-sirupsen-logrus
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Simon Eskildsen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/scripts/release/licenses/LICENSE-tmc-grpc-websocket-proxy b/scripts/release/licenses/LICENSE-tmc-grpc-websocket-proxy
new file mode 100644
index 0000000..95d0bc8
--- /dev/null
+++ b/scripts/release/licenses/LICENSE-tmc-grpc-websocket-proxy
@@ -0,0 +1,7 @@
+Copyright (C) 2016 Travis Cline
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/server/plugin/pkg/registry/embededetcd/embededetcd.go b/server/plugin/pkg/registry/embededetcd/embededetcd.go
index c3f2a01..aeef346 100644
--- a/server/plugin/pkg/registry/embededetcd/embededetcd.go
+++ b/server/plugin/pkg/registry/embededetcd/embededetcd.go
@@ -26,13 +26,14 @@ import (
"github.com/apache/servicecomb-service-center/pkg/util"
mgr "github.com/apache/servicecomb-service-center/server/plugin"
"github.com/apache/servicecomb-service-center/server/plugin/pkg/registry"
+ "github.com/coreos/etcd/compactor"
"github.com/coreos/etcd/embed"
+ "github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
"github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/lease"
"github.com/coreos/etcd/mvcc/mvccpb"
"golang.org/x/net/context"
- "google.golang.org/grpc"
"net/url"
"strings"
"time"
@@ -108,11 +109,11 @@ func (s *EtcdEmbed) toPutRequest(op registry.PluginOp) *etcdserverpb.PutRequest
valueBytes = op.Value
}
return &etcdserverpb.PutRequest{
- Key: op.Key,
- Value: valueBytes,
- PrevKv: op.PrevKV,
- Lease: op.Lease,
- // TODO WithIgnoreLease support
+ Key: op.Key,
+ Value: valueBytes,
+ PrevKv: op.PrevKV,
+ Lease: op.Lease,
+ IgnoreLease: op.IgnoreLease,
}
}
@@ -339,6 +340,11 @@ func (s *EtcdEmbed) TxnWithCmp(ctx context.Context, success []registry.PluginOp,
}
resp, err := s.Embed.Server.Txn(otCtx, txnRequest)
if err != nil {
+ if err.Error() == rpctypes.ErrKeyNotFound.Error() {
+ // etcd return ErrKeyNotFound if key does not exist and
+ // the PUT options contain WithIgnoreLease
+ return ®istry.PluginResponse{Succeeded: false}, nil
+ }
return nil, err
}
@@ -376,7 +382,7 @@ func (s *EtcdEmbed) LeaseRenew(ctx context.Context, leaseID int64) (int64, error
defer cancel()
ttl, err := s.Embed.Server.LeaseRenew(otCtx, lease.LeaseID(leaseID))
if err != nil {
- if err.Error() == grpc.ErrorDesc(rpctypes.ErrGRPCLeaseNotFound) {
+ if err.Error() == rpctypes.ErrLeaseNotFound.Error() {
return 0, err
}
return 0, errorsEx.RaiseError(err)
@@ -391,7 +397,7 @@ func (s *EtcdEmbed) LeaseRevoke(ctx context.Context, leaseID int64) error {
ID: leaseID,
})
if err != nil {
- if err.Error() == grpc.ErrorDesc(rpctypes.ErrGRPCLeaseNotFound) {
+ if err.Error() == rpctypes.ErrLeaseNotFound.Error() {
return err
}
return errorsEx.RaiseError(err)
@@ -549,14 +555,15 @@ func getEmbedInstance() mgr.PluginInstance {
}
serverCfg := embed.NewConfig()
+ serverCfg.EnableV2 = false
+ serverCfg.EnablePprof = false
+ serverCfg.QuotaBackendBytes = etcdserver.MaxQuotaBytes
// TODO 不支持使用TLS通信
// 存储目录,相对于工作目录
serverCfg.Dir = "data"
-
// 集群支持
serverCfg.Name = hostName
serverCfg.InitialCluster = registry.Configuration().ClusterAddresses
-
// 1. 管理端口
urls, err := parseURL(mgrAddrs)
if err != nil {
@@ -566,17 +573,16 @@ func getEmbedInstance() mgr.PluginInstance {
}
serverCfg.LPUrls = urls
serverCfg.APUrls = urls
-
// 2. 业务端口,关闭默认2379端口
serverCfg.LCUrls = nil
serverCfg.ACUrls = nil
+ // 自动压缩历史, 1 hour
+ serverCfg.AutoCompactionMode = compactor.ModePeriodic
+ serverCfg.AutoCompactionRetention = "1h"
log.Debugf("--initial-cluster %s --initial-advertise-peer-urls %s --listen-peer-urls %s",
serverCfg.InitialCluster, mgrAddrs, mgrAddrs)
- // 自动压缩历史, 1 hour
- serverCfg.AutoCompactionRetention = 1
-
etcd, err := embed.StartEtcd(serverCfg)
if err != nil {
log.Error("error to start etcd server", err)
diff --git a/server/plugin/pkg/registry/etcd/common.go b/server/plugin/pkg/registry/etcd/common.go
index d8d9832..f89f2c8 100644
--- a/server/plugin/pkg/registry/etcd/common.go
+++ b/server/plugin/pkg/registry/etcd/common.go
@@ -15,13 +15,18 @@
package etcd
-import "time"
+import (
+ "math"
+ "time"
+)
const (
// here will new an etcd connection after about 30s(=5s * 3 + (backoff:8s))
// when the connected etcd member was hung but tcp is still alive
healthCheckTimeout = 5 * time.Second
healthCheckRetryTimes = 3
+
+ maxRecvMsgSize = math.MaxInt64
)
const (
diff --git a/server/plugin/pkg/registry/etcd/etcd.go b/server/plugin/pkg/registry/etcd/etcd.go
index 9aca3be..bac5e43 100644
--- a/server/plugin/pkg/registry/etcd/etcd.go
+++ b/server/plugin/pkg/registry/etcd/etcd.go
@@ -32,7 +32,6 @@ import (
"github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/mvcc/mvccpb"
"golang.org/x/net/context"
- "google.golang.org/grpc"
"net/url"
"strconv"
"strings"
@@ -101,10 +100,10 @@ func (c *EtcdClient) Initialize() (err error) {
func (c *EtcdClient) newClient() (*clientv3.Client, error) {
client, err := clientv3.New(clientv3.Config{
- Endpoints: c.Endpoints,
- DialTimeout: c.DialTimeout,
- TLS: c.TLSConfig,
- AutoSyncInterval: 0,
+ Endpoints: c.Endpoints,
+ DialTimeout: c.DialTimeout,
+ TLS: c.TLSConfig,
+ MaxCallRecvMsgSize: maxRecvMsgSize,
})
defer func() {
if err != nil {
@@ -269,7 +268,7 @@ func (c *EtcdClient) toPutRequest(op registry.PluginOp) []clientv3.OpOption {
opts = append(opts, clientv3.WithLease(clientv3.LeaseID(op.Lease)))
}
if op.IgnoreLease {
- // TODO WithIgnoreLease support
+ opts = append(opts, clientv3.WithIgnoreLease())
}
return opts
}
@@ -565,6 +564,11 @@ func (c *EtcdClient) TxnWithCmp(ctx context.Context, success []registry.PluginOp
}
resp, err := txn.Commit()
if err != nil {
+ if err.Error() == rpctypes.ErrKeyNotFound.Error() {
+ // etcd return ErrKeyNotFound if key does not exist and
+ // the PUT options contain WithIgnoreLease
+ return ®istry.PluginResponse{Succeeded: false}, nil
+ }
return nil, err
}
log.LogNilOrWarnf(start, "registry client txn {if(%v): %s, then: %d, else: %d}, rev: %d",
@@ -622,7 +626,7 @@ func (c *EtcdClient) LeaseRenew(ctx context.Context, leaseID int64) (int64, erro
etcdResp, err := c.Client.KeepAliveOnce(otCtx, clientv3.LeaseID(leaseID))
if err != nil {
- if err.Error() == grpc.ErrorDesc(rpctypes.ErrGRPCLeaseNotFound) {
+ if err.Error() == rpctypes.ErrLeaseNotFound.Error() {
return 0, err
}
return 0, errorsEx.RaiseError(err)
@@ -646,7 +650,7 @@ func (c *EtcdClient) LeaseRevoke(ctx context.Context, leaseID int64) error {
_, err = c.Client.Revoke(otCtx, clientv3.LeaseID(leaseID))
if err != nil {
- if err.Error() == grpc.ErrorDesc(rpctypes.ErrGRPCLeaseNotFound) {
+ if err.Error() == rpctypes.ErrLeaseNotFound.Error() {
return err
}
return errorsEx.RaiseError(err)
diff --git a/server/plugin/pkg/registry/etcd/logger_test.go b/server/plugin/pkg/registry/etcd/logger_test.go
index 440059a..b44f7e1 100644
--- a/server/plugin/pkg/registry/etcd/logger_test.go
+++ b/server/plugin/pkg/registry/etcd/logger_test.go
@@ -28,7 +28,7 @@ func TestClientLogger_Print(t *testing.T) {
defer func() {
recover()
}()
- l.Fatalln("%s", "b")
+ l.Fatalln("a", "b")
}()
l.Fatalf("%s", "b")
}()
diff --git a/server/service/instance_test.go b/server/service/instance_test.go
index 3ccc136..601185e 100644
--- a/server/service/instance_test.go
+++ b/server/service/instance_test.go
@@ -39,7 +39,6 @@ var _ = Describe("'Instance' service", func() {
Describe("execute 'register' operartion", func() {
var (
serviceId1 string
- serviceId2 string
)
It("should be passed", func() {
@@ -55,19 +54,6 @@ var _ = Describe("'Instance' service", func() {
Expect(err).To(BeNil())
Expect(respCreate.Response.Code).To(Equal(pb.Response_SUCCESS))
serviceId1 = respCreate.ServiceId
-
- respCreate, err = serviceResource.Create(getContext(), &pb.CreateServiceRequest{
- Service: &pb.MicroService{
- ServiceName: "create_instance_service",
- AppId: "create_instance",
- Version: "1.0.1",
- Level: "FRONT",
- Status: pb.MS_UP,
- },
- })
- Expect(err).To(BeNil())
- Expect(respCreate.Response.Code).To(Equal(pb.Response_SUCCESS))
- serviceId2 = respCreate.ServiceId
})
Context("when register a instance", func() {
@@ -564,14 +550,10 @@ var _ = Describe("'Instance' service", func() {
})
Describe("execute 'clusterHealth' operartion", func() {
- var (
- scServiceId string
- )
It("should be passed", func() {
resp, err := serviceResource.Create(getContext(), core.CreateServiceRequest())
Expect(err).To(BeNil())
- scServiceId = resp.ServiceId
Expect(resp.Response.Code).To(Equal(pb.Response_SUCCESS))
})
diff --git a/server/service/util/instance_util.go b/server/service/util/instance_util.go
index 7c068c0..188caf1 100644
--- a/server/service/util/instance_util.go
+++ b/server/service/util/instance_util.go
@@ -210,14 +210,6 @@ func queryServiceInstancesKvs(ctx context.Context, serviceId string, rev int64)
}
func UpdateInstance(ctx context.Context, domainProject string, instance *pb.MicroServiceInstance) *scerr.Error {
- leaseID, err := GetLeaseId(ctx, domainProject, instance.ServiceId, instance.InstanceId)
- if err != nil {
- return scerr.NewError(scerr.ErrInternal, err.Error())
- }
- if leaseID == -1 {
- return scerr.NewError(scerr.ErrInstanceNotExists, "Instance's leaseId not exist.")
- }
-
instance.ModTimestamp = strconv.FormatInt(time.Now().Unix(), 10)
data, err := json.Marshal(instance)
if err != nil {
@@ -225,12 +217,11 @@ func UpdateInstance(ctx context.Context, domainProject string, instance *pb.Micr
}
key := apt.GenerateInstanceKey(domainProject, instance.ServiceId, instance.InstanceId)
-
resp, err := backend.Registry().TxnWithCmp(ctx,
[]registry.PluginOp{registry.OpPut(
registry.WithStrKey(key),
registry.WithValue(data),
- registry.WithLease(leaseID))},
+ registry.WithIgnoreLease())},
[]registry.CompareOp{registry.OpCmp(
registry.CmpVer(util.StringToBytesWithNoCopy(apt.GenerateServiceKey(domainProject, instance.ServiceId))),
registry.CMP_NOT_EQUAL, 0)},
@@ -239,7 +230,7 @@ func UpdateInstance(ctx context.Context, domainProject string, instance *pb.Micr
return scerr.NewError(scerr.ErrUnavailableBackend, err.Error())
}
if !resp.Succeeded {
- return scerr.NewError(scerr.ErrServiceNotExists, "Service does not exist.")
+ return scerr.NewError(scerr.ErrInstanceNotExists, "Instance does not exist.")
}
return nil
}