From 96ad9c57d96b2bcd804d5f12df625b0c6b41874d Mon Sep 17 00:00:00 2001 From: Ross McDonald Date: Mon, 2 May 2016 12:56:27 -0500 Subject: [PATCH] Move to Go 1.6.2. --- CHANGELOG.md | 5 +++++ CONTRIBUTING.md | 14 +++++++++----- Dockerfile_build_ubuntu32 | 2 +- Dockerfile_build_ubuntu64 | 2 +- Dockerfile_build_ubuntu64_git | 2 +- appveyor.yml | 9 --------- client/influxdb_test.go | 5 +++-- stress/stress_test.go | 5 +++-- 8 files changed, 23 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b0402b35612..e2758257ac6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## v0.13.0 [unreleased] +### Release Notes + +With this release InfluxDB is moving to Go v1.6. + ### Features - [#6213](https://github.com/influxdata/influxdb/pull/6213): Make logging output location more programmatically configurable. @@ -24,6 +28,7 @@ - [#6494](https://github.com/influxdata/influxdb/issues/6494): Support booleans for min() and max(). - [#2074](https://github.com/influxdata/influxdb/issues/2074): Support offset argument in the GROUP BY time(...) call. - [#6533](https://github.com/influxdata/influxdb/issues/6533): Optimize SHOW SERIES +- [#6534](https://github.com/influxdata/influxdb/pull/6534): Move to Go v1.6.2 (over Go v1.4.3) ### Bugfixes diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 93b74894c87..8f0d1695f80 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -69,7 +69,7 @@ second to sign our CLA, which can be found Installing Go ------------- -InfluxDB requires Go 1.4.3. +InfluxDB requires Go 1.6.2. At InfluxDB 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). @@ -77,8 +77,8 @@ 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: - gvm install go1.4.3 - gvm use go1.4.3 --default + gvm install go1.6.2 + gvm use go1.6.2 --default Installing GDM ------------- @@ -144,9 +144,13 @@ To set the version and commit flags during the build pass the following to the * where `$VERSION` is the version, `$BRANCH` is the branch, and `$COMMIT` is the git commit hash. -If you want to build packages, see `package.sh` help: +If you want to build packages, see `build.py` usage information: + ```bash -package.sh -h +python build.py --help + +# Or to build a package for your current system +python build.py --package ``` To run the tests, execute the following command: diff --git a/Dockerfile_build_ubuntu32 b/Dockerfile_build_ubuntu32 index 26d0777e630..5f556923ebf 100644 --- a/Dockerfile_build_ubuntu32 +++ b/Dockerfile_build_ubuntu32 @@ -18,7 +18,7 @@ RUN gem install fpm # Install go ENV GOPATH /root/go -ENV GO_VERSION 1.4.3 +ENV GO_VERSION 1.6.2 ENV GO_ARCH 386 RUN wget https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz; \ tar -C /usr/local/ -xf /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz ; \ diff --git a/Dockerfile_build_ubuntu64 b/Dockerfile_build_ubuntu64 index a4873b5ace1..5c5ad69b740 100644 --- a/Dockerfile_build_ubuntu64 +++ b/Dockerfile_build_ubuntu64 @@ -18,7 +18,7 @@ RUN gem install fpm # Install go ENV GOPATH /root/go -ENV GO_VERSION 1.4.3 +ENV GO_VERSION 1.6.2 ENV GO_ARCH amd64 RUN wget https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz; \ tar -C /usr/local/ -xf /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz ; \ diff --git a/Dockerfile_build_ubuntu64_git b/Dockerfile_build_ubuntu64_git index 7059500ab7d..0fd7ecfdc29 100644 --- a/Dockerfile_build_ubuntu64_git +++ b/Dockerfile_build_ubuntu64_git @@ -26,7 +26,7 @@ VOLUME $PROJECT_DIR # Install go -ENV GO_VERSION 1.4.3 +ENV GO_VERSION 1.6.2 ENV GO_ARCH amd64 RUN wget https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz; \ tar -C /usr/local/ -xf /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz ; \ diff --git a/appveyor.yml b/appveyor.yml index ce50808a864..6e26c955455 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -30,17 +30,8 @@ install: # To run your custom scripts instead of automatic MSBuild build_script: - #Currently for gdm to work on Windows, we need go 1.6, but Influx is on go1.4.3, so switch the go environment - - set GOROOT=C:\go14 - - set PATH=%GOROOT%\bin;%GOPATH%\bin;%PATH% - - echo %PATH% - - echo %GOPATH% - go get -t -v ./... - -# To run your custom scripts instead of automatic tests -#test_script: - go test -race -v ./... # To disable deployment deploy: off - diff --git a/client/influxdb_test.go b/client/influxdb_test.go index 3d92ce03cf4..39349c19ee3 100644 --- a/client/influxdb_test.go +++ b/client/influxdb_test.go @@ -139,8 +139,8 @@ func TestClient_Ping(t *testing.T) { if err != nil { t.Fatalf("unexpected error. expected %v, actual %v", nil, err) } - if d == 0 { - t.Fatalf("expected a duration greater than zero. actual %v", d) + if d.Nanoseconds() == 0 { + t.Fatalf("expected a duration greater than zero. actual %v", d.Nanoseconds()) } if version != "x.x" { t.Fatalf("unexpected version. expected %s, actual %v", "x.x", version) @@ -549,6 +549,7 @@ func TestEpochToTime(t *testing.T) { func emptyTestServer() *httptest.Server { return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + time.Sleep(50 * time.Millisecond) w.Header().Set("X-Influxdb-Version", "x.x") return })) diff --git a/stress/stress_test.go b/stress/stress_test.go index 77e1ae59c64..0f5b70624d1 100644 --- a/stress/stress_test.go +++ b/stress/stress_test.go @@ -388,6 +388,7 @@ var basicQC = &BasicQueryClient{ func TestBasicQueryClient_Query(t *testing.T) { ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + time.Sleep(50 * time.Millisecond) w.Header().Set("X-Influxdb-Version", "x.x") var data client.Response w.WriteHeader(http.StatusOK) @@ -413,8 +414,8 @@ func TestBasicQueryClient_Query(t *testing.T) { } elapsed := r.Timer.Elapsed() - if elapsed == time.Duration(0) { - t.Errorf("Expected %v to not be 0", elapsed) + if elapsed.Nanoseconds() == 0 { + t.Errorf("Expected %v to not be 0", elapsed.Nanoseconds()) } }