From 6dd93480a754d959da0e75faed683662c6c30f7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20S=CC=8Ctibrany=CC=81?= Date: Thu, 18 Jun 2020 14:45:18 +0200 Subject: [PATCH 1/4] Set go version to 1.14. That enables vendoring by defualt. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Štibraný --- go.mod | 2 +- vendor/modules.txt | 68 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 1d362a79792..83c85f14dc3 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/cortexproject/cortex -go 1.13 +go 1.14 require ( cloud.google.com/go/bigtable v1.2.0 diff --git a/vendor/modules.txt b/vendor/modules.txt index 08e292246bf..9a4be681e03 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -9,18 +9,22 @@ cloud.google.com/go/internal/version cloud.google.com/go/longrunning cloud.google.com/go/longrunning/autogen # cloud.google.com/go/bigtable v1.2.0 +## explicit cloud.google.com/go/bigtable cloud.google.com/go/bigtable/bttest cloud.google.com/go/bigtable/internal/option # cloud.google.com/go/storage v1.6.0 +## explicit cloud.google.com/go/storage # github.com/Azure/azure-pipeline-go v0.2.2 +## explicit github.com/Azure/azure-pipeline-go/pipeline # github.com/Azure/azure-sdk-for-go v43.0.0+incompatible => github.com/Azure/azure-sdk-for-go v36.2.0+incompatible github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-10-01/compute github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-10-01/network github.com/Azure/azure-sdk-for-go/version # github.com/Azure/azure-storage-blob-go v0.8.0 +## explicit github.com/Azure/azure-storage-blob-go/azblob # github.com/Azure/go-autorest/autorest v0.10.2 github.com/Azure/go-autorest/autorest @@ -40,8 +44,10 @@ github.com/Azure/go-autorest/tracing # github.com/BurntSushi/toml v0.3.1 github.com/BurntSushi/toml # github.com/Masterminds/squirrel v0.0.0-20161115235646-20f192218cf5 +## explicit github.com/Masterminds/squirrel # github.com/NYTimes/gziphandler v1.1.1 +## explicit github.com/NYTimes/gziphandler # github.com/PuerkitoBio/purell v1.1.1 github.com/PuerkitoBio/purell @@ -51,13 +57,16 @@ github.com/PuerkitoBio/urlesc github.com/alecthomas/template github.com/alecthomas/template/parse # github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d +## explicit github.com/alecthomas/units # github.com/armon/go-metrics v0.3.3 +## explicit github.com/armon/go-metrics github.com/armon/go-metrics/prometheus # github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496 github.com/asaskevich/govalidator # github.com/aws/aws-sdk-go v1.31.9 +## explicit github.com/aws/aws-sdk-go/aws github.com/aws/aws-sdk-go/aws/arn github.com/aws/aws-sdk-go/aws/awserr @@ -111,12 +120,15 @@ github.com/aws/aws-sdk-go/service/sts/stsiface # github.com/beorn7/perks v1.0.1 github.com/beorn7/perks/quantile # github.com/blang/semver v3.5.0+incompatible +## explicit github.com/blang/semver # github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b +## explicit github.com/bradfitz/gomemcache/memcache # github.com/cenkalti/backoff v2.2.1+incompatible github.com/cenkalti/backoff # github.com/cespare/xxhash v1.1.0 +## explicit github.com/cespare/xxhash # github.com/cespare/xxhash/v2 v2.1.1 github.com/cespare/xxhash/v2 @@ -133,17 +145,21 @@ github.com/dgrijalva/jwt-go # github.com/docker/go-units v0.4.0 github.com/docker/go-units # github.com/dustin/go-humanize v1.0.0 +## explicit github.com/dustin/go-humanize # github.com/edsrzf/mmap-go v1.0.0 github.com/edsrzf/mmap-go # github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb +## explicit github.com/facette/natsort # github.com/fatih/color v1.9.0 github.com/fatih/color # github.com/fsouza/fake-gcs-server v1.7.0 +## explicit github.com/fsouza/fake-gcs-server/fakestorage github.com/fsouza/fake-gcs-server/internal/backend # github.com/go-kit/kit v0.10.0 +## explicit github.com/go-kit/kit/log github.com/go-kit/kit/log/level # github.com/go-logfmt/logfmt v0.5.0 @@ -181,6 +197,7 @@ github.com/go-openapi/validate # github.com/go-stack/stack v1.8.0 github.com/go-stack/stack # github.com/gocql/gocql v0.0.0-20200526081602-cd04bd7f22a7 => github.com/grafana/gocql v0.0.0-20200605141915-ba5dc39ece85 +## explicit github.com/gocql/gocql github.com/gocql/gocql/internal/lru github.com/gocql/gocql/internal/murmur @@ -188,6 +205,7 @@ github.com/gocql/gocql/internal/streams # github.com/gogo/googleapis v1.1.0 github.com/gogo/googleapis/google/rpc # github.com/gogo/protobuf v1.3.1 +## explicit github.com/gogo/protobuf/gogoproto github.com/gogo/protobuf/jsonpb github.com/gogo/protobuf/proto @@ -195,8 +213,10 @@ github.com/gogo/protobuf/protoc-gen-gogo/descriptor github.com/gogo/protobuf/sortkeys github.com/gogo/protobuf/types # github.com/gogo/status v1.0.3 +## explicit github.com/gogo/status # github.com/golang-migrate/migrate/v4 v4.7.0 +## explicit github.com/golang-migrate/migrate/v4 github.com/golang-migrate/migrate/v4/database github.com/golang-migrate/migrate/v4/database/postgres @@ -207,6 +227,7 @@ github.com/golang-migrate/migrate/v4/source/file github.com/golang/groupcache/lru github.com/golang/groupcache/singleflight # github.com/golang/protobuf v1.4.2 +## explicit github.com/golang/protobuf/descriptor github.com/golang/protobuf/internal/gengogrpc github.com/golang/protobuf/jsonpb @@ -220,8 +241,10 @@ github.com/golang/protobuf/ptypes/empty github.com/golang/protobuf/ptypes/timestamp github.com/golang/protobuf/ptypes/wrappers # github.com/golang/snappy v0.0.1 +## explicit github.com/golang/snappy # github.com/gomodule/redigo v2.0.0+incompatible +## explicit github.com/gomodule/redigo/internal github.com/gomodule/redigo/redis # github.com/google/btree v1.0.0 @@ -259,10 +282,12 @@ github.com/gophercloud/gophercloud/openstack/objectstorage/v1/objects github.com/gophercloud/gophercloud/openstack/utils github.com/gophercloud/gophercloud/pagination # github.com/gorilla/mux v1.7.3 +## explicit github.com/gorilla/mux # github.com/gorilla/websocket v1.4.0 github.com/gorilla/websocket # github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 +## explicit github.com/grpc-ecosystem/go-grpc-middleware github.com/grpc-ecosystem/go-grpc-middleware/tags github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing @@ -276,10 +301,12 @@ github.com/grpc-ecosystem/grpc-gateway/utilities # github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed github.com/hailocab/go-hostpool # github.com/hashicorp/consul/api v1.4.0 +## explicit github.com/hashicorp/consul/api # github.com/hashicorp/errwrap v1.0.0 github.com/hashicorp/errwrap # github.com/hashicorp/go-cleanhttp v0.5.1 +## explicit github.com/hashicorp/go-cleanhttp # github.com/hashicorp/go-hclog v0.12.2 github.com/hashicorp/go-hclog @@ -292,11 +319,13 @@ github.com/hashicorp/go-multierror # github.com/hashicorp/go-rootcerts v1.0.2 github.com/hashicorp/go-rootcerts # github.com/hashicorp/go-sockaddr v1.0.2 +## explicit github.com/hashicorp/go-sockaddr # github.com/hashicorp/golang-lru v0.5.4 github.com/hashicorp/golang-lru github.com/hashicorp/golang-lru/simplelru # github.com/hashicorp/memberlist v0.2.0 +## explicit github.com/hashicorp/memberlist # github.com/hashicorp/serf v0.9.0 github.com/hashicorp/serf/coordinate @@ -309,6 +338,7 @@ github.com/jonboulle/clockwork # github.com/jpillora/backoff v1.0.0 github.com/jpillora/backoff # github.com/json-iterator/go v1.1.9 +## explicit github.com/json-iterator/go # github.com/jstemmer/go-junit-report v0.9.1 github.com/jstemmer/go-junit-report @@ -323,6 +353,7 @@ github.com/lann/builder # github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 github.com/lann/ps # github.com/lib/pq v1.3.0 +## explicit github.com/lib/pq github.com/lib/pq/oid github.com/lib/pq/scram @@ -353,6 +384,7 @@ github.com/minio/sha256-simd # github.com/mitchellh/go-homedir v1.1.0 github.com/mitchellh/go-homedir # github.com/mitchellh/go-wordwrap v1.0.0 +## explicit github.com/mitchellh/go-wordwrap # github.com/mitchellh/mapstructure v1.2.2 github.com/mitchellh/mapstructure @@ -363,24 +395,31 @@ github.com/modern-go/reflect2 # github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f github.com/mwitkow/go-conntrack # github.com/ncw/swift v1.0.50 +## explicit github.com/ncw/swift # github.com/oklog/run v1.1.0 github.com/oklog/run # github.com/oklog/ulid v1.3.1 +## explicit github.com/oklog/ulid # github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02 +## explicit github.com/opentracing-contrib/go-grpc # github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9 +## explicit github.com/opentracing-contrib/go-stdlib/nethttp # github.com/opentracing/opentracing-go v1.1.1-0.20200124165624-2876d2018785 +## explicit github.com/opentracing/opentracing-go github.com/opentracing/opentracing-go/ext github.com/opentracing/opentracing-go/log # github.com/pkg/errors v0.9.1 +## explicit github.com/pkg/errors # github.com/pmezard/go-difflib v1.0.0 github.com/pmezard/go-difflib/difflib # github.com/prometheus/alertmanager v0.20.0 +## explicit github.com/prometheus/alertmanager/api github.com/prometheus/alertmanager/api/metrics github.com/prometheus/alertmanager/api/v1 @@ -421,6 +460,7 @@ github.com/prometheus/alertmanager/template github.com/prometheus/alertmanager/types github.com/prometheus/alertmanager/ui # github.com/prometheus/client_golang v1.6.1-0.20200604110148-03575cad4e55 +## explicit github.com/prometheus/client_golang/api github.com/prometheus/client_golang/api/prometheus/v1 github.com/prometheus/client_golang/prometheus @@ -431,8 +471,10 @@ github.com/prometheus/client_golang/prometheus/push github.com/prometheus/client_golang/prometheus/testutil github.com/prometheus/client_golang/prometheus/testutil/promlint # github.com/prometheus/client_model v0.2.0 +## explicit github.com/prometheus/client_model/go # github.com/prometheus/common v0.10.0 +## explicit github.com/prometheus/common/config github.com/prometheus/common/expfmt github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg @@ -446,6 +488,7 @@ github.com/prometheus/procfs github.com/prometheus/procfs/internal/fs github.com/prometheus/procfs/internal/util # github.com/prometheus/prometheus v1.8.2-0.20200609052543-1627d234da06 +## explicit github.com/prometheus/prometheus/config github.com/prometheus/prometheus/discovery github.com/prometheus/prometheus/discovery/azure @@ -501,6 +544,7 @@ github.com/prometheus/prometheus/util/testutil github.com/prometheus/prometheus/util/treecache github.com/prometheus/prometheus/web/api/v1 # github.com/rafaeljusto/redigomock v0.0.0-20190202135759-257e089e14a1 +## explicit github.com/rafaeljusto/redigomock # github.com/rs/cors v1.6.0 github.com/rs/cors @@ -511,6 +555,7 @@ github.com/satori/go.uuid # github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 github.com/sean-/seed # github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e +## explicit github.com/segmentio/fasthash/fnv1a # github.com/sercand/kuberesolver v2.4.0+incompatible github.com/sercand/kuberesolver @@ -525,6 +570,7 @@ github.com/sirupsen/logrus # github.com/soheilhy/cmux v0.1.4 github.com/soheilhy/cmux # github.com/spf13/afero v1.2.2 +## explicit github.com/spf13/afero github.com/spf13/afero/mem # github.com/spf13/pflag v1.0.5 @@ -532,10 +578,12 @@ github.com/spf13/pflag # github.com/stretchr/objx v0.2.0 github.com/stretchr/objx # github.com/stretchr/testify v1.5.1 +## explicit github.com/stretchr/testify/assert github.com/stretchr/testify/mock github.com/stretchr/testify/require # github.com/thanos-io/thanos v0.12.3-0.20200603113103-6d3e730e154d +## explicit github.com/thanos-io/thanos/pkg/block github.com/thanos-io/thanos/pkg/block/indexheader github.com/thanos-io/thanos/pkg/block/metadata @@ -573,6 +621,7 @@ github.com/thanos-io/thanos/pkg/tracing # github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5 github.com/tmc/grpc-websocket-proxy/wsproxy # github.com/uber/jaeger-client-go v2.23.1+incompatible +## explicit github.com/uber/jaeger-client-go github.com/uber/jaeger-client-go/config github.com/uber/jaeger-client-go/internal/baggage @@ -595,6 +644,7 @@ github.com/uber/jaeger-client-go/utils github.com/uber/jaeger-lib/metrics github.com/uber/jaeger-lib/metrics/prometheus # github.com/weaveworks/common v0.0.0-20200512154658-384f10054ec5 +## explicit github.com/weaveworks/common/aws github.com/weaveworks/common/errors github.com/weaveworks/common/grpc @@ -614,8 +664,10 @@ github.com/weaveworks/promrus # github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 github.com/xiang90/probing # go.etcd.io/bbolt v1.3.5-0.20200615073812-232d8fc87f50 +## explicit go.etcd.io/bbolt # go.etcd.io/etcd v0.5.0-alpha.5.0.20200520232829-54ba9589114f +## explicit go.etcd.io/etcd/auth go.etcd.io/etcd/auth/authpb go.etcd.io/etcd/client @@ -720,10 +772,12 @@ go.opencensus.io/trace/internal go.opencensus.io/trace/propagation go.opencensus.io/trace/tracestate # go.uber.org/atomic v1.6.0 +## explicit go.uber.org/atomic # go.uber.org/multierr v1.5.0 go.uber.org/multierr # go.uber.org/zap v1.14.1 +## explicit go.uber.org/zap go.uber.org/zap/buffer go.uber.org/zap/internal/bufferpool @@ -745,6 +799,7 @@ golang.org/x/lint/golint golang.org/x/mod/module golang.org/x/mod/semver # golang.org/x/net v0.0.0-20200602114024-627f9648deb9 +## explicit golang.org/x/net/bpf golang.org/x/net/context golang.org/x/net/context/ctxhttp @@ -768,9 +823,11 @@ golang.org/x/oauth2/internal golang.org/x/oauth2/jws golang.org/x/oauth2/jwt # golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a +## explicit golang.org/x/sync/errgroup golang.org/x/sync/semaphore # golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 +## explicit golang.org/x/sys/cpu golang.org/x/sys/internal/unsafeheader golang.org/x/sys/unix @@ -783,6 +840,7 @@ golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm golang.org/x/text/width # golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 +## explicit golang.org/x/time/rate # golang.org/x/tools v0.0.0-20200603131246-cc40288be839 golang.org/x/tools/cmd/goimports @@ -813,6 +871,7 @@ golang.org/x/tools/internal/packagesinternal golang.org/x/xerrors golang.org/x/xerrors/internal # google.golang.org/api v0.26.0 +## explicit google.golang.org/api/cloudresourcemanager/v1 google.golang.org/api/compute/v1 google.golang.org/api/googleapi @@ -853,6 +912,7 @@ google.golang.org/genproto/googleapis/rpc/status google.golang.org/genproto/googleapis/type/expr google.golang.org/genproto/protobuf/field_mask # google.golang.org/grpc v1.29.1 +## explicit google.golang.org/grpc google.golang.org/grpc/attributes google.golang.org/grpc/backoff @@ -960,6 +1020,7 @@ gopkg.in/inf.v0 # gopkg.in/ini.v1 v1.51.0 gopkg.in/ini.v1 # gopkg.in/yaml.v2 v2.3.0 +## explicit gopkg.in/yaml.v2 # gopkg.in/yaml.v3 v3.0.0-20200603094226-e3079894b1e8 gopkg.in/yaml.v3 @@ -1150,4 +1211,11 @@ rsc.io/binaryregexp/syntax # sigs.k8s.io/structured-merge-diff/v3 v3.0.0 sigs.k8s.io/structured-merge-diff/v3/value # sigs.k8s.io/yaml v1.2.0 +## explicit sigs.k8s.io/yaml +# github.com/Azure/azure-sdk-for-go => github.com/Azure/azure-sdk-for-go v36.2.0+incompatible +# github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.3.0+incompatible +# git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999 +# k8s.io/client-go => k8s.io/client-go v0.18.3 +# github.com/satori/go.uuid => github.com/satori/go.uuid v1.2.0 +# github.com/gocql/gocql => github.com/grafana/gocql v0.0.0-20200605141915-ba5dc39ece85 From 663e0efdf38ba00b43b2e90db201e974591f4290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20S=CC=8Ctibrany=CC=81?= Date: Thu, 18 Jun 2020 18:24:23 +0200 Subject: [PATCH 2/4] Don't complain about inconsistent vendor during testing. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Štibraný --- tools/test | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/test b/tools/test index c9329327014..db0c1aa32c2 100755 --- a/tools/test +++ b/tools/test @@ -10,6 +10,7 @@ PARALLEL= RACE="-race -covermode=atomic" TIMEOUT=5m VERBOSE= +export GOFLAGS="-mod=readonly" usage() { echo "$0 [-slow] [-in-container foo] [-netgo] [-(no-)go-get] [-timeout 1m]" From 10ab21a63c28732a91a3f115bfa45c19397af030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20S=CC=8Ctibrany=CC=81?= Date: Thu, 18 Jun 2020 18:47:31 +0200 Subject: [PATCH 3/4] Fix vendor issues by revendoring everything after go get. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Štibraný --- tools/test | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/test b/tools/test index db0c1aa32c2..8d3366267b6 100755 --- a/tools/test +++ b/tools/test @@ -10,7 +10,6 @@ PARALLEL= RACE="-race -covermode=atomic" TIMEOUT=5m VERBOSE= -export GOFLAGS="-mod=readonly" usage() { echo "$0 [-slow] [-in-container foo] [-netgo] [-(no-)go-get] [-timeout 1m]" @@ -105,6 +104,7 @@ run_test() { local dir=$1 if [ -z "$NO_GO_GET" ]; then go get -t -tags "${TAGS[@]}" "$dir" + go mod vendor # re-vendor everything fi local GO_TEST_ARGS_RUN=("${GO_TEST_ARGS[@]}") @@ -148,6 +148,8 @@ fi if [ -n "$SLOW" ] && [ -z "$COVERDIR" ]; then go get github.com/weaveworks/tools/cover + go mod vendor # re-vendor everything + cover "$coverdir"/* >profile.cov rm -rf "$coverdir" go tool cover -html=profile.cov -o=coverage.html From e1ec275c35ee9b5798f91d6a4946fac9169a33d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20S=CC=8Ctibrany=CC=81?= Date: Mon, 22 Jun 2020 10:01:17 +0200 Subject: [PATCH 4/4] Removed support for unused -go-get option. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Štibraný --- tools/test | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/tools/test b/tools/test index 8d3366267b6..214c30417c9 100755 --- a/tools/test +++ b/tools/test @@ -4,7 +4,6 @@ set -e DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SLOW= -NO_GO_GET=true TAGS= PARALLEL= RACE="-race -covermode=atomic" @@ -12,7 +11,7 @@ TIMEOUT=5m VERBOSE= usage() { - echo "$0 [-slow] [-in-container foo] [-netgo] [-(no-)go-get] [-timeout 1m]" + echo "$0 [-slow] [-in-container foo] [-netgo] [-timeout 1m]" } while [ $# -gt 0 ]; do @@ -29,14 +28,6 @@ while [ $# -gt 0 ]; do RACE= shift 1 ;; - "-no-go-get") - NO_GO_GET=true - shift 1 - ;; - "-go-get") - NO_GO_GET= - shift 1 - ;; "-netgo") TAGS="netgo" shift 1 @@ -102,10 +93,6 @@ PACKAGE_BASE=$(go list -e ./) run_test() { local dir=$1 - if [ -z "$NO_GO_GET" ]; then - go get -t -tags "${TAGS[@]}" "$dir" - go mod vendor # re-vendor everything - fi local GO_TEST_ARGS_RUN=("${GO_TEST_ARGS[@]}") if [ -n "$SLOW" ]; then