From ccc2c0a8d4e117bd3e46ba18d7a8cbfea9ed0572 Mon Sep 17 00:00:00 2001 From: Marco Pracucci Date: Thu, 10 Feb 2022 17:05:47 +0100 Subject: [PATCH 1/2] Upgrade golang to 1.17 Signed-off-by: Marco Pracucci --- .drone/drone.jsonnet | 2 +- .drone/drone.yml | 10 +++---- go.mod | 63 +++++++++++++++++++++++++++++++++++++++----- 3 files changed, 62 insertions(+), 13 deletions(-) diff --git a/.drone/drone.jsonnet b/.drone/drone.jsonnet index 77ceba636..14c769ffc 100644 --- a/.drone/drone.jsonnet +++ b/.drone/drone.jsonnet @@ -1,4 +1,4 @@ -local image = 'golang:1.16.7'; +local image = 'golang:1.17.6'; local pipeline = { new(name):: { diff --git a/.drone/drone.yml b/.drone/drone.yml index 00107020e..7ca426e1e 100644 --- a/.drone/drone.yml +++ b/.drone/drone.yml @@ -7,21 +7,21 @@ "commands": [ "make mod-check" ], - "image": "golang:1.16.7", + "image": "golang:1.17.6", "name": "make-mod-check" }, { "commands": [ "make lint" ], - "image": "golang:1.16.7", + "image": "golang:1.17.6", "name": "make-lint" }, { "commands": [ "make test" ], - "image": "golang:1.16.7", + "image": "golang:1.17.6", "name": "make-test" }, { @@ -30,13 +30,13 @@ "go mod vendor", "make check-protos" ], - "image": "golang:1.16.7", + "image": "golang:1.17.6", "name": "make-check-protos" } ] } --- kind: signature -hmac: 3b4342022f2635d86f61ee26f7c1dfa66399233b91ea7b2d730a97b8d0a469e6 +hmac: ece0e7c96218aed975b8e9fa0399bee2a8b0d72bbe3ce0830d39fdc84d238b7a ... diff --git a/go.mod b/go.mod index c2e02a8b4..04c738b2b 100644 --- a/go.mod +++ b/go.mod @@ -1,20 +1,17 @@ module github.com/grafana/dskit -go 1.16 +go 1.17 require ( github.com/armon/go-metrics v0.3.0 - github.com/coreos/etcd v3.3.25+incompatible // indirect github.com/cristalhq/hedgedhttp v0.7.0 github.com/go-kit/log v0.1.0 github.com/gogo/protobuf v1.3.2 github.com/gogo/status v1.1.0 github.com/golang/snappy v0.0.4 - github.com/gorilla/mux v1.8.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 github.com/hashicorp/consul/api v1.9.1 github.com/hashicorp/go-cleanhttp v0.5.1 - github.com/hashicorp/go-msgpack v0.5.5 // indirect github.com/hashicorp/go-sockaddr v1.0.2 github.com/hashicorp/memberlist v0.2.3 github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e @@ -22,21 +19,73 @@ require ( github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.11.0 github.com/prometheus/common v0.26.0 - github.com/sercand/kuberesolver v2.4.0+incompatible // indirect - github.com/sirupsen/logrus v1.8.1 // indirect github.com/stretchr/testify v1.7.0 github.com/weaveworks/common v0.0.0-20210913144402-035033b78a78 go.etcd.io/etcd v3.3.25+incompatible go.etcd.io/etcd/api/v3 v3.5.0 go.etcd.io/etcd/client/v3 v3.5.0 go.uber.org/atomic v1.9.0 - golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b // indirect golang.org/x/sync v0.0.0-20210220032951-036812b2e83c golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6 google.golang.org/grpc v1.38.0 gopkg.in/yaml.v2 v2.4.0 ) +require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.1.1 // indirect + github.com/coreos/etcd v3.3.25+incompatible // indirect + github.com/coreos/go-semver v0.3.0 // indirect + github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect + github.com/coreos/go-systemd/v22 v22.3.2 // indirect + github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/fatih/color v1.9.0 // indirect + github.com/felixge/httpsnoop v1.0.1 // indirect + github.com/go-kit/kit v0.10.0 // indirect + github.com/go-logfmt/logfmt v0.5.0 // indirect + github.com/gogo/googleapis v1.1.0 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/btree v1.0.0 // indirect + github.com/gorilla/mux v1.8.0 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/hashicorp/go-hclog v0.12.0 // indirect + github.com/hashicorp/go-immutable-radix v1.0.0 // indirect + github.com/hashicorp/go-msgpack v0.5.5 // indirect + github.com/hashicorp/go-multierror v1.1.0 // indirect + github.com/hashicorp/go-rootcerts v1.0.2 // indirect + github.com/hashicorp/golang-lru v0.5.1 // indirect + github.com/hashicorp/serf v0.9.5 // indirect + github.com/mattn/go-colorable v0.1.6 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/miekg/dns v1.1.26 // indirect + github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/mapstructure v1.1.2 // indirect + github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/node_exporter v1.0.0-rc.0.0.20200428091818-01054558c289 // indirect + github.com/prometheus/procfs v0.6.0 // indirect + github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect + github.com/sercand/kuberesolver v2.4.0+incompatible // indirect + github.com/sirupsen/logrus v1.8.1 // indirect + github.com/stretchr/objx v0.1.1 // indirect + github.com/uber/jaeger-client-go v2.28.0+incompatible // indirect + github.com/uber/jaeger-lib v2.2.0+incompatible // indirect + github.com/weaveworks/promrus v1.2.0 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.0 // indirect + go.uber.org/multierr v1.6.0 // indirect + go.uber.org/zap v1.17.0 // indirect + golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b // indirect + golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect + golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40 // indirect + golang.org/x/text v0.3.5 // indirect + google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect + google.golang.org/protobuf v1.26.0 // indirect + gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect +) + replace k8s.io/client-go v12.0.0+incompatible => k8s.io/client-go v0.21.4 // Replace memberlist with our fork which includes some fixes that haven't been From d952c772bd8ea8251265ab55cf543d21b5292546 Mon Sep 17 00:00:00 2001 From: Marco Pracucci Date: Thu, 10 Feb 2022 17:08:22 +0100 Subject: [PATCH 2/2] Added instructions Signed-off-by: Marco Pracucci --- contributing/how-to-upgrade-golang-version.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 contributing/how-to-upgrade-golang-version.md diff --git a/contributing/how-to-upgrade-golang-version.md b/contributing/how-to-upgrade-golang-version.md new file mode 100644 index 000000000..d2ea98f70 --- /dev/null +++ b/contributing/how-to-upgrade-golang-version.md @@ -0,0 +1,7 @@ +# How to upgrade Golang version + +1. `go mod edit -go=1.17` +1. `go mod vendor && go mod tidy` +1. Change Drone image in `.drone/drone.jsonnet` +1. Export $DRONE_SERVER and $DRONE_TOKEN environment variables (you can get them logging in to [https://drone.grafana.net](https://drone.grafana.net)) +1. `make .drone/drone.yml`