From 578acbe21d655f8ef6e4f3807488974fa064691c Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Sat, 21 Sep 2019 16:14:23 -0400 Subject: [PATCH 1/4] Upgrade Prometheus client to 1.1 and go-kit to 0.9 Signed-off-by: Yuri Shkuro --- Gopkg.lock | 124 ++++++++++++-------------- Gopkg.toml | 6 +- Makefile | 8 +- glide.lock | 53 +++++------ glide.yaml | 4 +- metrics/go-kit/influx/factory_test.go | 4 +- 6 files changed, 93 insertions(+), 106 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 13d22a0..e2b31ec 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -10,12 +10,12 @@ version = "v1.0.0" [[projects]] - branch = "master" - digest = "1:5bb36304653e73c2ced864d49c9f344e7141a7ceef852442edcea212094ebc3c" + digest = "1:d6afaeed1502aa28e80a4ed0981d570ad91b2579193404256ce672ed0a609e0d" name = "github.com/beorn7/perks" packages = ["quantile"] pruneopts = "UT" - revision = "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9" + revision = "37c8de3658fcb183f997c4e13e8337516ab753e6" + version = "v1.0.1" [[projects]] branch = "master" @@ -34,15 +34,7 @@ version = "v1.1.1" [[projects]] - branch = "master" - digest = "1:5fe3f6ede1c208a2efd3b78fe4df0306aa9624edd39476143d14f0326e5a8d29" - name = "github.com/facebookgo/clock" - packages = ["."] - pruneopts = "UT" - revision = "600d898af40aa09a7a93ecb9265d87b0504b6f03" - -[[projects]] - digest = "1:59e6f6cad7d4e1d11bacf9194fa051959cf6dbefb97a09dd2192d0271f8d51fa" + digest = "1:83c5ef75cc53ba2e8a59e421f5f8b86acb780f2b143bbc386611ea3e1b5c4087" name = "github.com/go-kit/kit" packages = [ "log", @@ -54,42 +46,36 @@ "metrics/internal/lv", ] pruneopts = "UT" - revision = "a9ca6725cbbea455e61c6bc8a1ed28e81eb3493b" - version = "v0.5.0" + revision = "150a65a7ec6156b4b640c1fd55f26fd3d475d656" + version = "v0.9.0" [[projects]] - digest = "1:31a18dae27a29aa074515e43a443abfd2ba6deb6d69309d8d7ce789c45f34659" + digest = "1:4062bc6de62d73e2be342243cf138cf499b34d558876db8d9430e2149388a4d8" name = "github.com/go-logfmt/logfmt" packages = ["."] pruneopts = "UT" - revision = "390ab7935ee28ec6b286364bba9b4dd6410cb3d5" - version = "v0.3.0" + revision = "07c9b44f60d7ffdfb7d8efe1ad539965737836dc" + version = "v0.4.0" [[projects]] - digest = "1:1ecf6125aba01b53e87eef03594102941d7f96c106787b53683323bdebf70a0e" - name = "github.com/go-stack/stack" - packages = ["."] - pruneopts = "UT" - revision = "817915b46b97fd7bb80e8ab6b69f01a53ac3eebf" - version = "v1.6.0" - -[[projects]] - digest = "1:c53c0f117d427f9bbb9862f554a1570dfb30fa3a77891867252414f2c6e3a453" + digest = "1:573ca21d3669500ff845bdebee890eb7fc7f0f50c59f2132f2a0c6b03d85086a" name = "github.com/golang/protobuf" packages = ["proto"] pruneopts = "UT" - revision = "7cc19b78d562895b13596ddce7aafb59dd789318" + revision = "6c65a5562fc06764971b7c5d05c76c75e84bdbf7" + version = "v1.3.2" [[projects]] - digest = "1:3122b59f62d3f4065217ae96d9a680ce313b64e5f86e79ba58682b980858dc1d" - name = "github.com/influxdata/influxdb" + branch = "master" + digest = "1:50708c8fc92aec981df5c446581cf9f90ba9e2a5692118e0ce75d4534aaa14a2" + name = "github.com/influxdata/influxdb1-client" packages = [ - "client/v2", "models", "pkg/escape", + "v2", ] pruneopts = "UT" - revision = "f3f30726d822c4be8cd00137ba66b6e4fd68cca1" + revision = "fc22c7df067eefd070157f157893fbce961d6359" [[projects]] branch = "master" @@ -100,12 +86,12 @@ revision = "b84e30acd515aadc4b783ad4ff83aff3299bdfe0" [[projects]] - branch = "master" digest = "1:ff5ebae34cfbf047d505ee150de27e60570e8c394b3b8fdbb720ff6ac71985fc" name = "github.com/matttproud/golang_protobuf_extensions" packages = ["pbutil"] pruneopts = "UT" revision = "c12348ce28de40eed0136aa2b644d0ee0650e56c" + version = "v1.0.1" [[projects]] digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe" @@ -116,22 +102,26 @@ version = "v1.0.0" [[projects]] - digest = "1:b6221ec0f8903b556e127c449e7106b63e6867170c2d10a7c058623d086f2081" + digest = "1:7097829edd12fd7211fca0d29496b44f94ef9e6d72f88fb64f3d7b06315818ad" name = "github.com/prometheus/client_golang" - packages = ["prometheus"] + packages = [ + "prometheus", + "prometheus/internal", + ] pruneopts = "UT" - revision = "c5b7fccd204277076155f10851dad72b76a49317" - version = "v0.8.0" + revision = "170205fb58decfd011f1550d4cfb737230d7ae4f" + version = "v1.1.0" [[projects]] - digest = "1:32d10bdfa8f09ecf13598324dba86ab891f11db3c538b6a34d1c3b5b99d7c36b" + branch = "master" + digest = "1:2d5cd61daa5565187e1d96bae64dbbc6080dacf741448e9629c64fd93203b0d4" name = "github.com/prometheus/client_model" packages = ["go"] pruneopts = "UT" - revision = "6f3806018612930941127f2a7c6c453ba2c527d2" + revision = "14fe0d1b01d4d5fc031dd4bec1823bd3ebbe8016" [[projects]] - digest = "1:0d5f8e2195ad2beef202367f3217c4a7981582d96ccf4876b9aa2c5c9c9b3510" + digest = "1:f119e3205d3a1f0f19dbd7038eb37528e2c6f0933269dc344e305951fb87d632" name = "github.com/prometheus/common" packages = [ "expfmt", @@ -139,51 +129,55 @@ "model", ] pruneopts = "UT" - revision = "49fee292b27bfff7f354ee0f64e1bc4850462edf" + revision = "287d3e634a1e550c9e463dd7e5a75a422c614505" + version = "v0.7.0" [[projects]] - digest = "1:73bb422d231d18bcdbb7d0f11da82f032af798f9197107f7cf64cdde1ce8eec4" + digest = "1:a210815b437763623ecca8eb91e6a0bf4f2d6773c5a6c9aec0e28f19e5fd6deb" name = "github.com/prometheus/procfs" packages = [ ".", - "xfs", + "internal/fs", + "internal/util", ] pruneopts = "UT" - revision = "a1dba9ce8baed984a2495b658c82687f8157b98f" + revision = "499c85531f756d1129edd26485a5f73871eeb308" + version = "v0.0.5" [[projects]] - digest = "1:5da8ce674952566deae4dbc23d07c85caafc6cfa815b0b3e03e41979cedb8750" + digest = "1:99d32780e5238c2621fff621123997c3e3cca96db8be13179013aea77dfab551" name = "github.com/stretchr/testify" packages = [ "assert", "require", ] pruneopts = "UT" - revision = "ffdc059bfe9ce6a4e144ba849dbedead332c6053" - version = "v1.3.0" + revision = "221dbe5ed46703ee255b1da0dec05086f5035f62" + version = "v1.4.0" [[projects]] - digest = "1:e3521c6c8f39b482e953fd5bbe19a89d89916a173f421c3aded4c811033fe286" + digest = "1:228597ec86f00b7270b9f9e230f38abb285765850d5b7dfbe38b38f6ea1c409a" name = "github.com/uber-go/tally" packages = ["."] pruneopts = "UT" - revision = "be9e53c77349ae2dd4b8c03a6dc20ed9a88b9927" - version = "v3.2.0" + revision = "3332297784e46cd346ab6d9894fd4ea027dc9368" + version = "v3.3.12" [[projects]] - digest = "1:34d2f773960fa81274e8378bb667060f49a66695cf527c8734977cdbd574e03f" - name = "github.com/uber/jaeger-lib" - packages = [ - "metrics", - "metrics/adapters", - "metrics/go-kit", - "metrics/go-kit/expvar", - "metrics/metricstest", - "metrics/prometheus", - ] + branch = "master" + digest = "1:6f104e30a35d62427b90130710ff507d6b9fc95ca76ceafb0025cd2809d93232" + name = "golang.org/x/sys" + packages = ["windows"] + pruneopts = "UT" + revision = "14da1ac737ccc89e3a28bf770cbbd260ce7e190b" + +[[projects]] + digest = "1:4d2e5a73dc1500038e504a8d78b986630e3626dc027bc030ba5c75da257cdb96" + name = "gopkg.in/yaml.v2" + packages = ["."] pruneopts = "UT" - revision = "0e30338a695636fe5bcf7301e8030ce8dd2a8530" - version = "v2.0.0" + revision = "51d6538a90f86fe93ac480b35f37b2be17fef232" + version = "v2.2.2" [solve-meta] analyzer-name = "dep" @@ -196,18 +190,12 @@ "github.com/go-kit/kit/metrics/expvar", "github.com/go-kit/kit/metrics/generic", "github.com/go-kit/kit/metrics/influx", - "github.com/influxdata/influxdb/client/v2", + "github.com/influxdata/influxdb1-client/v2", "github.com/prometheus/client_golang/prometheus", "github.com/prometheus/client_model/go", "github.com/stretchr/testify/assert", "github.com/stretchr/testify/require", "github.com/uber-go/tally", - "github.com/uber/jaeger-lib/metrics", - "github.com/uber/jaeger-lib/metrics/adapters", - "github.com/uber/jaeger-lib/metrics/go-kit", - "github.com/uber/jaeger-lib/metrics/go-kit/expvar", - "github.com/uber/jaeger-lib/metrics/metricstest", - "github.com/uber/jaeger-lib/metrics/prometheus", ] solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 58b83d1..b532541 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -1,6 +1,6 @@ [[constraint]] name = "github.com/go-kit/kit" - version = "0.5.0" + version = "0.9.0" [[constraint]] name = "github.com/codahale/hdrhistogram" @@ -12,11 +12,11 @@ [[constraint]] name = "github.com/prometheus/client_golang" - version = "0.8.0" + version = "1.1.0" [[constraint]] name = "github.com/stretchr/testify" - version = "1.2.1" + version = "1.4.0" [prune] go-tests = true diff --git a/Makefile b/Makefile index 83b7e1c..cc82c92 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ PROJECT_ROOT=github.com/uber/jaeger-lib PACKAGES := $(go list ./... | awk -F/ 'NR>1 {print "./"$4"/..."}' | sort -u) # all .go files that don't exist in hidden directories -ALL_SRC := $(shell find . -name "*.go" | grep -v -e vendor -e thrift-gen \ +ALL_SRC := $(shell find . -name "*.go" | grep -v -e vendor \ -e ".*/\..*" \ -e ".*/_.*" \ -e ".*/mocks.*") @@ -16,12 +16,6 @@ GOFMT=gofmt FMT_LOG=fmt.log LINT_LOG=lint.log -THRIFT_VER=0.9.3 -THRIFT_IMG=thrift:$(THRIFT_VER) -THRIFT=docker run -v "${PWD}:/data" $(THRIFT_IMG) thrift -THRIFT_GO_ARGS=thrift_import="github.com/apache/thrift/lib/go/thrift" -THRIFT_GEN_DIR=thrift-gen - PASS=$(shell printf "\033[32mPASS\033[0m") FAIL=$(shell printf "\033[31mFAIL\033[0m") COLORIZE=sed ''/PASS/s//$(PASS)/'' | sed ''/FAIL/s//$(FAIL)/'' diff --git a/glide.lock b/glide.lock index 3974d38..fc351e0 100644 --- a/glide.lock +++ b/glide.lock @@ -1,20 +1,18 @@ -hash: 8ca2ebd4305a4aaead18ee8cc5a84da42e95c202d53c1bd78d11436aeb8be8e4 -updated: 2017-09-20T01:48:48.588894144+02:00 +hash: 7a027a82af7fac397e9a88e82717a5f8e0034200d8c60d8dd96accfad3162a3a +updated: 2019-09-21T16:11:52.102846-04:00 imports: - name: github.com/beorn7/perks - version: 4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9 + version: 37c8de3658fcb183f997c4e13e8337516ab753e6 subpackages: - quantile - name: github.com/codahale/hdrhistogram - version: f8ad88b59a584afeee9d334eff879b104439117b + version: 3a0bb77429bd3a61596f5e8a3172445844342120 - name: github.com/davecgh/go-spew - version: 04cdfd42973bb9c8589fd6a731800cf222fde1a9 + version: d8f796af33cc11cb798c1aaeb27a4ebc5099927d subpackages: - spew -- name: github.com/facebookgo/clock - version: 600d898af40aa09a7a93ecb9265d87b0504b6f03 - name: github.com/go-kit/kit - version: a9ca6725cbbea455e61c6bc8a1ed28e81eb3493b + version: 150a65a7ec6156b4b640c1fd55f26fd3d475d656 subpackages: - log - log/level @@ -23,56 +21,61 @@ imports: - metrics/generic - metrics/influx - metrics/internal/lv - - metrics/prometheus - name: github.com/go-logfmt/logfmt - version: 390ab7935ee28ec6b286364bba9b4dd6410cb3d5 -- name: github.com/go-stack/stack - version: 817915b46b97fd7bb80e8ab6b69f01a53ac3eebf + version: 432dd90af23366a89a611c020003fc8ba281ae5d - name: github.com/golang/protobuf - version: 7cc19b78d562895b13596ddce7aafb59dd789318 + version: 1680a479a2cfb3fa22b972af7e36d0a0fde47bf8 subpackages: - proto -- name: github.com/influxdata/influxdb - version: f3f30726d822c4be8cd00137ba66b6e4fd68cca1 +- name: github.com/influxdata/influxdb1-client + version: fc22c7df067eefd070157f157893fbce961d6359 subpackages: - - client/v2 - models - pkg/escape + - v2 - name: github.com/kr/logfmt version: b84e30acd515aadc4b783ad4ff83aff3299bdfe0 - name: github.com/matttproud/golang_protobuf_extensions - version: c12348ce28de40eed0136aa2b644d0ee0650e56c + version: c182affec369e30f25d3eb8cd8a478dee585ae7d subpackages: - pbutil - name: github.com/pmezard/go-difflib - version: d8ed2627bdf02c080bf22230dbb337003b7aba2d + version: 5d4384ee4fb2527b0a1256a821ebfc92f91efefc subpackages: - difflib - name: github.com/prometheus/client_golang - version: c5b7fccd204277076155f10851dad72b76a49317 + version: 170205fb58decfd011f1550d4cfb737230d7ae4f subpackages: - prometheus + - prometheus/internal - name: github.com/prometheus/client_model - version: 6f3806018612930941127f2a7c6c453ba2c527d2 + version: 14fe0d1b01d4d5fc031dd4bec1823bd3ebbe8016 subpackages: - go - name: github.com/prometheus/common - version: 49fee292b27bfff7f354ee0f64e1bc4850462edf + version: 287d3e634a1e550c9e463dd7e5a75a422c614505 subpackages: - expfmt - internal/bitbucket.org/ww/goautoneg - model - name: github.com/prometheus/procfs - version: a1dba9ce8baed984a2495b658c82687f8157b98f + version: de25ac347ef9305868b04dc42425c973b863b18c subpackages: - - xfs + - internal/fs + - internal/util - name: github.com/stretchr/testify - version: 05e8a0eda380579888eb53c394909df027f06991 + version: 85f2b59c4459e5bf57488796be8c3667cb8246d6 subpackages: - assert - require - name: github.com/uber-go/tally - version: be9e53c77349ae2dd4b8c03a6dc20ed9a88b9927 + version: 3332297784e46cd346ab6d9894fd4ea027dc9368 - name: github.com/VividCortex/gohistogram version: 51564d9861991fb0ad0f531c99ef602d0f9866e6 +- name: golang.org/x/sys + version: 14da1ac737ccc89e3a28bf770cbbd260ce7e190b + subpackages: + - windows +- name: gopkg.in/yaml.v2 + version: 51d6538a90f86fe93ac480b35f37b2be17fef232 testImports: [] diff --git a/glide.yaml b/glide.yaml index e134d1d..b12e678 100644 --- a/glide.yaml +++ b/glide.yaml @@ -2,12 +2,12 @@ package: github.com/uber/jaeger-lib import: - package: github.com/codahale/hdrhistogram - package: github.com/go-kit/kit - version: v0.5.0 + version: v0.9.0 subpackages: - metrics/influx - package: github.com/uber-go/tally version: '>= 2.1.0, < 4' - package: github.com/prometheus/client_golang - version: v0.8.0 + version: v1.1.0 testImport: - package: github.com/stretchr/testify diff --git a/metrics/go-kit/influx/factory_test.go b/metrics/go-kit/influx/factory_test.go index 21c4753..58ca3fc 100644 --- a/metrics/go-kit/influx/factory_test.go +++ b/metrics/go-kit/influx/factory_test.go @@ -8,13 +8,15 @@ import ( "github.com/go-kit/kit/log" "github.com/go-kit/kit/metrics/influx" - influxdb "github.com/influxdata/influxdb/client/v2" + influxdb "github.com/influxdata/influxdb1-client/v2" "github.com/stretchr/testify/assert" "github.com/uber/jaeger-lib/metrics" "github.com/uber/jaeger-lib/metrics/go-kit" ) +// "github.com/uber/jaeger-lib/vendor/github.com/influxdata/influxdb/client/v2".BatchPointsConfig +// "github.com/uber/jaeger-lib/vendor/github.com/influxdata/influxdb1-client/v2".BatchPointsConfig func TestCounter(t *testing.T) { in := influx.New(map[string]string{}, influxdb.BatchPointsConfig{}, log.NewNopLogger()) inf := NewFactory(in) From 475deea40f6ef4b21f141b886c6532bba7cfa44e Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Sat, 21 Sep 2019 17:19:14 -0400 Subject: [PATCH 2/4] Fix PACKAGES makefile var Signed-off-by: Yuri Shkuro --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cc82c92..f0b82c1 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ PROJECT_ROOT=github.com/uber/jaeger-lib -PACKAGES := $(go list ./... | awk -F/ 'NR>1 {print "./"$4"/..."}' | sort -u) +PACKAGES := $(shell go list ./... | awk -F/ 'NR>1 {print "./"$$4"/..."}' | sort -u) # all .go files that don't exist in hidden directories ALL_SRC := $(shell find . -name "*.go" | grep -v -e vendor \ -e ".*/\..*" \ From 6a2895e8737ebec5ecd3b3993bed23ff93776d1c Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Sun, 22 Sep 2019 21:04:05 -0400 Subject: [PATCH 3/4] Clean up Signed-off-by: Yuri Shkuro --- glide.lock | 6 +++--- glide.yaml | 4 ++-- metrics/go-kit/influx/factory_test.go | 2 -- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/glide.lock b/glide.lock index fc351e0..c77ec5f 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: 7a027a82af7fac397e9a88e82717a5f8e0034200d8c60d8dd96accfad3162a3a -updated: 2019-09-21T16:11:52.102846-04:00 +hash: d6b884cd5ad2c1622d157697251fbf2a0b5c5cd9e03af2258caf8f35cb03d8ba +updated: 2019-09-22T21:03:42.412209-04:00 imports: - name: github.com/beorn7/perks version: 37c8de3658fcb183f997c4e13e8337516ab753e6 @@ -73,7 +73,7 @@ imports: - name: github.com/VividCortex/gohistogram version: 51564d9861991fb0ad0f531c99ef602d0f9866e6 - name: golang.org/x/sys - version: 14da1ac737ccc89e3a28bf770cbbd260ce7e190b + version: 0a153f010e6963173baba2306531d173aa843137 subpackages: - windows - name: gopkg.in/yaml.v2 diff --git a/glide.yaml b/glide.yaml index b12e678..9a98748 100644 --- a/glide.yaml +++ b/glide.yaml @@ -2,12 +2,12 @@ package: github.com/uber/jaeger-lib import: - package: github.com/codahale/hdrhistogram - package: github.com/go-kit/kit - version: v0.9.0 + version: '~0.9' subpackages: - metrics/influx - package: github.com/uber-go/tally version: '>= 2.1.0, < 4' - package: github.com/prometheus/client_golang - version: v1.1.0 + version: '^1' testImport: - package: github.com/stretchr/testify diff --git a/metrics/go-kit/influx/factory_test.go b/metrics/go-kit/influx/factory_test.go index 58ca3fc..5a82426 100644 --- a/metrics/go-kit/influx/factory_test.go +++ b/metrics/go-kit/influx/factory_test.go @@ -15,8 +15,6 @@ import ( "github.com/uber/jaeger-lib/metrics/go-kit" ) -// "github.com/uber/jaeger-lib/vendor/github.com/influxdata/influxdb/client/v2".BatchPointsConfig -// "github.com/uber/jaeger-lib/vendor/github.com/influxdata/influxdb1-client/v2".BatchPointsConfig func TestCounter(t *testing.T) { in := influx.New(map[string]string{}, influxdb.BatchPointsConfig{}, log.NewNopLogger()) inf := NewFactory(in) From eae54fa3d5e187e53e41a595db4056c3d8f1e383 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Sun, 22 Sep 2019 21:48:37 -0400 Subject: [PATCH 4/4] Relax restriction in glide Signed-off-by: Yuri Shkuro --- glide.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glide.yaml b/glide.yaml index 9a98748..d80d32d 100644 --- a/glide.yaml +++ b/glide.yaml @@ -8,6 +8,6 @@ import: - package: github.com/uber-go/tally version: '>= 2.1.0, < 4' - package: github.com/prometheus/client_golang - version: '^1' + version: '>= 0.8, < 2' testImport: - package: github.com/stretchr/testify