Skip to content

Commit

Permalink
build: upgrade to go1.17 (influxdata#22363)
Browse files Browse the repository at this point in the history
  • Loading branch information
danxmoran authored Sep 1, 2021
1 parent 12c8fd2 commit 1c2d68b
Show file tree
Hide file tree
Showing 17 changed files with 152 additions and 20 deletions.
22 changes: 9 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ commands:
# GO_VERSION_HASH is from https://golang.org/dl/
command: |
mkdir -p ${HOME}/.tools
GO_VERSION=1.16.5
GO_VERSION_HASH=b12c23023b68de22f74c0524f10b753e7b08b1504cb7e417eccebdd3fae49061
GO_VERSION=1.17
GO_VERSION_HASH=6bf89fc4f5ad763871cf7eac80a2d594492de7a818303283f1366a7f6a30372d
wget https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz
echo "${GO_VERSION_HASH} go${GO_VERSION}.linux-amd64.tar.gz" | sha256sum --check --
tar -C ${HOME}/.tools -xzf go${GO_VERSION}.linux-amd64.tar.gz
Expand Down Expand Up @@ -360,7 +360,7 @@ jobs:

godeps:
docker:
- image: cimg/go:1.16.5
- image: cimg/go:1.17
environment:
TMPDIR: /mnt/ramdisk
working_directory: /home/circleci/go/src/github.com/influxdata/influxdb
Expand All @@ -370,10 +370,6 @@ jobs:
name: Restore GOPATH/pkg/mod
keys:
- influxdb-gomod-sum-{{ checksum "go.sum" }}
# NOTE: On go1.16 `go mod download` and `go mod tidy` no longer agree
# with each other. The Go team recommends using `go mod tidy` to download
# all the modules needed for build/test, so we check tidiness while we're
# at it. See https://github.com/golang/go/issues/43994#issuecomment-770053099
- run: make checktidy
- save_cache:
name: Save GOPATH/pkg/mod
Expand All @@ -383,7 +379,7 @@ jobs:

golint:
docker:
- image: cimg/go:1.16.5
- image: cimg/go:1.17
environment:
TMPDIR: /mnt/ramdisk
working_directory: /home/circleci/go/src/github.com/influxdata/influxdb
Expand Down Expand Up @@ -420,7 +416,7 @@ jobs:

gotest:
docker:
- image: cimg/go:1.16.5
- image: cimg/go:1.17
resource_class: large
environment:
TMPDIR: /mnt/ramdisk
Expand Down Expand Up @@ -448,7 +444,7 @@ jobs:

fluxtest:
docker:
- image: cimg/go:1.16.5
- image: cimg/go:1.17
environment:
TMPDIR: /mnt/ramdisk
working_directory: /home/circleci/go/src/github.com/influxdata/influxdb
Expand All @@ -463,7 +459,7 @@ jobs:

tlstest:
docker:
- image: cimg/go:1.16.5
- image: cimg/go:1.17
environment:
TMPDIR: /mnt/ramdisk
working_directory: /home/circleci/go/src/github.com/influxdata/influxdb
Expand All @@ -482,7 +478,7 @@ jobs:

build:
docker:
- image: cimg/go:1.16.5
- image: cimg/go:1.17
resource_class: large
environment:
TMPDIR: /mnt/ramdisk
Expand Down Expand Up @@ -727,7 +723,7 @@ jobs:

e2e-monitor-ci:
docker:
- image: cimg/go:1.16.5
- image: cimg/go:1.17
steps:
- checkout
- run:
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## unreleased

### Go Version

This release upgrades the project to `go` version 1.17.

#### Minimum macOS Version

Because of the version bump to `go`, the macOS build for this release requires at least version 10.13 High Sierra to run.

### `influx` CLI moved to separate repository

The `influx` CLI has been moved to its [own GitHub repository](https://github.com/influxdata/influx-cli/). Release artifacts
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ If you are going to be contributing back to InfluxDB please take a second to sig

### Installing Go

InfluxDB requires Go 1.16.
InfluxDB requires Go 1.17.

At InfluxData we find `gvm`, a Go version manager, useful for installing Go.
For instructions on how to install it see [the gvm page on github](https://github.com/moovweb/gvm).

After installing gvm you can install and set the default go version by running the following:
```bash
$ gvm install go1.16
$ gvm use go1.16 --default
$ gvm install go1.17
$ gvm use go1.17 --default
```

InfluxDB requires Go module support. Set `GO111MODULE=on` or build the project outside of your `GOPATH` for it to succeed. For information about modules, please refer to the [wiki](https://github.com/golang/go/wiki/Modules).
Expand Down
4 changes: 2 additions & 2 deletions annotations/service_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// +build sqlite_json
// +build sqlite_foreign_keys
//go:build sqlite_json && sqlite_foreign_keys
// +build sqlite_json,sqlite_foreign_keys

package annotations

Expand Down
1 change: 1 addition & 0 deletions cmd/influxd/upgrade/logging_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package upgrade
Expand Down
118 changes: 117 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,58 +1,139 @@
module github.com/influxdata/influxdb/v2

go 1.16
go 1.17

require (
cloud.google.com/go v0.52.0 // indirect
cloud.google.com/go/bigquery v1.4.0 // indirect
cloud.google.com/go/bigtable v1.3.0 // indirect
github.com/AlecAivazis/survey/v2 v2.2.9 // indirect
github.com/Azure/azure-pipeline-go v0.2.3 // indirect
github.com/Azure/azure-storage-blob-go v0.13.0 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.9 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.5 // indirect
github.com/Azure/go-autorest/autorest/azure/auth v0.5.3 // indirect
github.com/Azure/go-autorest/autorest/azure/cli v0.4.2 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.0 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/BurntSushi/toml v0.3.1
github.com/DATA-DOG/go-sqlmock v1.4.1 // indirect
github.com/Masterminds/semver v1.4.2 // indirect
github.com/Masterminds/sprig v2.16.0+incompatible // indirect
github.com/Masterminds/squirrel v1.5.0
github.com/Microsoft/go-winio v0.4.11 // indirect
github.com/NYTimes/gziphandler v1.0.1
github.com/RoaringBitmap/roaring v0.4.16
github.com/SAP/go-hdb v0.14.1 // indirect
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883
github.com/aokoli/goutils v1.0.1 // indirect
github.com/apache/arrow/go/arrow v0.0.0-20200923215132-ac86123a3f01
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da // indirect
github.com/aws/aws-sdk-go v1.29.16 // indirect
github.com/aws/aws-sdk-go-v2 v1.3.2 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.1.5 // indirect
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.1.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.0.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.0.6 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.2.2 // indirect
github.com/aws/aws-sdk-go-v2/service/s3 v1.5.0 // indirect
github.com/aws/smithy-go v1.3.1 // indirect
github.com/benbjohnson/clock v0.0.0-20161215174838-7dc76406b6d3
github.com/benbjohnson/immutable v0.2.1 // indirect
github.com/benbjohnson/tmpl v1.0.0
github.com/beorn7/perks v1.0.1 // indirect
github.com/boltdb/bolt v1.3.1 // indirect
github.com/bonitoo-io/go-sql-bigquery v0.3.4-1.4.0 // indirect
github.com/buger/jsonparser v0.0.0-20191004114745-ee4c978eae7e
github.com/c-bata/go-prompt v0.2.2 // indirect
github.com/cespare/xxhash v1.1.0
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/davecgh/go-spew v1.1.1
github.com/deepmap/oapi-codegen v1.6.0 // indirect
github.com/denisenkom/go-mssqldb v0.10.0 // indirect
github.com/dgryski/go-bitstream v0.0.0-20180413035011-3522498ce2c8
github.com/dimchansky/utfbom v1.1.0 // indirect
github.com/docker/distribution v2.7.0+incompatible // indirect
github.com/docker/docker v1.13.1 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.3.3 // indirect
github.com/dustin/go-humanize v1.0.0
github.com/eclipse/paho.mqtt.golang v1.2.0 // indirect
github.com/editorconfig-checker/editorconfig-checker v0.0.0-20190819115812-1474bdeaf2a2
github.com/editorconfig/editorconfig-core-go/v2 v2.1.1 // indirect
github.com/elazarl/go-bindata-assetfs v1.0.0
github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect
github.com/fsnotify/fsnotify v1.4.7 // indirect
github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2 // indirect
github.com/glycerine/goconvey v0.0.0-20180728074245-46e3a41ad493 // indirect
github.com/go-chi/chi v4.1.0+incompatible
github.com/go-sql-driver/mysql v1.5.0 // indirect
github.com/go-stack/stack v1.8.0
github.com/gofrs/uuid v3.3.0+incompatible // indirect
github.com/gogo/protobuf v1.3.2
github.com/golang-jwt/jwt v3.2.1+incompatible
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe // indirect
github.com/golang/gddo v0.0.0-20181116215533-9bd4a3295021
github.com/golang/geo v0.0.0-20190916061304-5b978397cfec // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/mock v1.5.0
github.com/golang/protobuf v1.3.3
github.com/golang/snappy v0.0.1
github.com/google/btree v1.0.0
github.com/google/flatbuffers v2.0.0+incompatible // indirect
github.com/google/go-cmp v0.5.5
github.com/google/go-jsonnet v0.17.0
github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible // indirect
github.com/google/uuid v1.1.1 // indirect
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.1 // indirect
github.com/hashicorp/go-immutable-radix v1.0.0 // indirect
github.com/hashicorp/go-msgpack v0.0.0-20150518234257-fa3f63826f7c // indirect
github.com/hashicorp/go-multierror v1.0.0 // indirect
github.com/hashicorp/go-retryablehttp v0.6.4 // indirect
github.com/hashicorp/go-rootcerts v1.0.0 // indirect
github.com/hashicorp/go-sockaddr v1.0.2 // indirect
github.com/hashicorp/golang-lru v0.5.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/raft v1.0.0 // indirect
github.com/hashicorp/vault/api v1.0.2
github.com/hashicorp/vault/sdk v0.1.8 // indirect
github.com/huandu/xstrings v1.0.0 // indirect
github.com/imdario/mergo v0.3.9 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/influxdata/cron v0.0.0-20201006132531-4bb0a200dcbe
github.com/influxdata/flux v0.127.1
github.com/influxdata/httprouter v1.3.1-0.20191122104820-ee83e2772f69
github.com/influxdata/influx-cli/v2 v2.1.1-0.20210813175002-13799e7662c0
github.com/influxdata/influxdb-client-go/v2 v2.3.1-0.20210518120617-5d1fff431040 // indirect
github.com/influxdata/influxql v0.0.0-20180925231337-1cbfca8e56b6
github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 // indirect
github.com/influxdata/pkg-config v0.2.8
github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jmoiron/sqlx v1.3.4
github.com/jstemmer/go-junit-report v0.9.1 // indirect
github.com/jsternberg/zap-logfmt v1.2.0
github.com/jwilder/encoding v0.0.0-20170811194829-b4e1701a28ef
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/kevinburke/go-bindata v3.22.0+incompatible
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
github.com/lib/pq v1.2.0 // indirect
github.com/magiconair/properties v1.8.1 // indirect
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mattn/go-ieproxy v0.0.1 // indirect
github.com/mattn/go-isatty v0.0.13
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mattn/go-sqlite3 v1.14.7
github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
github.com/mileusna/useragent v0.0.0-20190129205925-3e331f0949a5
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.1.2 // indirect
github.com/mna/pigeon v1.0.1-0.20180808201053-bb0192cfc2ae
github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae // indirect
github.com/nats-io/gnatsd v1.3.0
Expand All @@ -63,36 +144,71 @@ require (
github.com/nats-io/nuid v1.0.0 // indirect
github.com/onsi/ginkgo v1.11.0 // indirect
github.com/onsi/gomega v1.8.1 // indirect
github.com/opencontainers/go-digest v1.0.0-rc1 // indirect
github.com/opentracing/opentracing-go v1.2.0
github.com/pelletier/go-toml v1.2.0 // indirect
github.com/philhofer/fwd v1.0.0 // indirect
github.com/pierrec/lz4 v2.0.5+incompatible // indirect
github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4 // indirect
github.com/pkg/errors v0.9.1
github.com/pkg/term v0.0.0-20180730021639-bffc007b7fd5 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.5.1
github.com/prometheus/client_model v0.2.0
github.com/prometheus/common v0.9.1
github.com/prometheus/procfs v0.0.8 // indirect
github.com/retailnext/hllpp v1.0.0
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
github.com/segmentio/kafka-go v0.1.0 // indirect
github.com/sergi/go-diff v1.1.0 // indirect
github.com/sirupsen/logrus v1.7.0 // indirect
github.com/snowflakedb/gosnowflake v1.6.1 // indirect
github.com/spf13/afero v1.1.2 // indirect
github.com/spf13/cast v1.3.0
github.com/spf13/cobra v1.0.0
github.com/spf13/jwalterweatherman v1.0.0 // indirect
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.6.1
github.com/stretchr/objx v0.1.1 // indirect
github.com/stretchr/testify v1.7.0
github.com/subosito/gotenv v1.2.0 // indirect
github.com/testcontainers/testcontainers-go v0.0.0-20190108154635-47c0da630f72
github.com/tinylib/msgp v1.1.0
github.com/uber-go/tally v3.3.15+incompatible // indirect
github.com/uber/athenadriver v1.1.4 // indirect
github.com/uber/jaeger-client-go v2.28.0+incompatible
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
github.com/willf/bitset v1.1.9 // indirect
github.com/xlab/treeprint v1.0.0
github.com/yudai/gojsondiff v1.0.0
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
github.com/yudai/pp v2.0.1+incompatible // indirect
go.etcd.io/bbolt v1.3.6
go.opencensus.io v0.22.3 // indirect
go.uber.org/atomic v1.6.0 // indirect
go.uber.org/multierr v1.5.0
go.uber.org/zap v1.14.1
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 // indirect
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
golang.org/x/mod v0.3.0 // indirect
golang.org/x/net v0.0.0-20210119194325-5f4716e94777 // indirect
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9
golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
golang.org/x/text v0.3.5
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba
golang.org/x/tools v0.1.0
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
gonum.org/v1/gonum v0.8.2 // indirect
google.golang.org/api v0.17.0 // indirect
google.golang.org/appengine v1.6.5 // indirect
google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce // indirect
google.golang.org/grpc v1.27.1 // indirect
gopkg.in/ini.v1 v1.51.0 // indirect
gopkg.in/square/go-jose.v2 v2.3.1 // indirect
gopkg.in/vmihailenco/msgpack.v2 v2.9.1 // indirect
gopkg.in/yaml.v2 v2.3.0
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c
Expand Down
1 change: 1 addition & 0 deletions jsonweb/fuzz.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build gofuzz
// +build gofuzz

package jsonweb
Expand Down
1 change: 1 addition & 0 deletions pkg/file/file_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package file
Expand Down
1 change: 1 addition & 0 deletions pkg/fs/fs_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package fs
Expand Down
1 change: 1 addition & 0 deletions pkg/mincore/mincore_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build darwin || dragonfly || freebsd || linux || nacl || netbsd || openbsd
// +build darwin dragonfly freebsd linux nacl netbsd openbsd

package mincore
Expand Down
1 change: 1 addition & 0 deletions pkg/mincore/mincore_windows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build windows
// +build windows

package mincore
Expand Down
1 change: 1 addition & 0 deletions pkg/mmap/mmap_solaris.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build solaris
// +build solaris

package mmap
Expand Down
1 change: 1 addition & 0 deletions pkg/mmap/mmap_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build darwin || dragonfly || freebsd || linux || nacl || netbsd || openbsd
// +build darwin dragonfly freebsd linux nacl netbsd openbsd

// Copyright 2015 The Go Authors. All rights reserved.
Expand Down
1 change: 1 addition & 0 deletions static/TODO.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !assets
// +build !assets

package static
Expand Down
3 changes: 2 additions & 1 deletion tools.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//+build tools
//go:build tools
// +build tools

package influxdb

Expand Down
1 change: 1 addition & 0 deletions tsdb/engine/tsm1/mmap_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows && !plan9
// +build !windows,!plan9

package tsm1
Expand Down
Loading

0 comments on commit 1c2d68b

Please sign in to comment.