Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to go 1.9.2 #9021

Merged
merged 6 commits into from
Oct 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
- [#8984](https://github.com/influxdata/influxdb/pull/8984): EXACT and estimated CARDINALITY queries.
- [#8893](https://github.com/influxdata/influxdb/pull/8893): Handle nil MeasurementIterator.
- [#8986](https://github.com/influxdata/influxdb/issues/8986): Add long-line support to client importer. Thanks @lets00!
- [#9021](https://github.com/influxdata/influxdb/pull/9021): Update to go 1.9.2

### Bugfixes

Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ second to sign our CLA, which can be found

Installing Go
-------------
InfluxDB requires Go 1.8.4.
InfluxDB requires Go 1.9.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).

After installing gvm you can install and set the default go version by
running the following:

gvm install go1.8.4
gvm use go1.8.4 --default
gvm install go1.9.2
gvm use go1.9.2 --default

Installing GDM
-------------
Expand Down
10 changes: 6 additions & 4 deletions Dockerfile_build_ubuntu32
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ioft/i386-ubuntu:14.04
FROM ioft/i386-ubuntu:xenial

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
python-software-properties \
Expand All @@ -9,6 +9,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
make \
ruby \
ruby-dev \
rubygems \
build-essential \
rpm \
zip \
python \
Expand All @@ -18,10 +20,10 @@ RUN gem install fpm

# Install go
ENV GOPATH /root/go
ENV GO_VERSION 1.8.4
ENV GO_VERSION 1.9.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 ; \
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 && \
rm /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz
ENV PATH /usr/local/go/bin:$PATH

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile_build_ubuntu64
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ RUN gem install fpm

# Install go
ENV GOPATH /root/go
ENV GO_VERSION 1.8.4
ENV GO_VERSION 1.9.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 ; \
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 && \
rm /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz
ENV PATH /usr/local/go/bin:$PATH

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile_build_ubuntu64_git
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ VOLUME $PROJECT_DIR


# Install go
ENV GO_VERSION 1.8.4
ENV GO_VERSION 1.9.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 ; \
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 && \
rm /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz

# Clone Go tip for compilation
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile_build_ubuntu64_go19
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ RUN gem install fpm

# Install go
ENV GOPATH /root/go
ENV GO_VERSION 1.9.1
ENV GO_VERSION 1.9.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The _go19 file isn't really necessary - it should be _go110 but I'm not sure whether that's available yet. I'm fine leaving the file around so we don't have to undo and redo the work to have circle test the next Go version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. I left it as is since I couldn't find a go1.10.

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 ; \
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 && \
rm /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz
ENV PATH /usr/local/go/bin:$PATH

Expand Down
6 changes: 2 additions & 4 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ machine:
services:
- docker
environment:
GODIST: "go1.8.4.linux-amd64.tar.gz"
GODIST: "go1.9.2.linux-amd64.tar.gz"
post:
- mkdir -p download
- test -e download/$GODIST || curl -o download/$GODIST https://storage.googleapis.com/golang/$GODIST
Expand All @@ -14,9 +14,7 @@ dependencies:
- "~/docker"
- ~/download
override:
- ./test.sh save:
# building the docker images can take a long time, hence caching
timeout: 1800
- ./test.sh count

test:
override:
Expand Down
2 changes: 0 additions & 2 deletions importer/v8/importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ func (i *Importer) processDDL(scanner *bufio.Reader) error {
}
i.queryExecutor(line)
}
return nil
}

func (i *Importer) processDML(scanner *bufio.Reader) error {
Expand Down Expand Up @@ -193,7 +192,6 @@ func (i *Importer) processDML(scanner *bufio.Reader) error {
}
i.batchAccumulator(line, start)
}
return nil
}

func (i *Importer) execute(command string) {
Expand Down
4 changes: 2 additions & 2 deletions releng/_go_versions.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# These are the current and "next" Go versions used to build influxdb.
# This file is meant to be sourced from other scripts.

export GO_CURRENT_VERSION=1.8.4
export GO_NEXT_VERSION=1.9.1
export GO_CURRENT_VERSION=1.9.2
export GO_NEXT_VERSION=1.9.2
57 changes: 1 addition & 56 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# 2: normal 32bit tests
# 3: tsi build
# 4: go 1.9
# save: build the docker images and save them to DOCKER_SAVE_DIR. Do not run tests.
# count: print the number of test environments
# *: to run all tests in parallel containers
#
Expand All @@ -24,12 +23,10 @@ cd $DIR
ENVIRONMENT_INDEX=$1
# Set the default OUTPUT_DIR
OUTPUT_DIR=${OUTPUT_DIR-./test-logs}
# Set the default DOCKER_SAVE_DIR
DOCKER_SAVE_DIR=${DOCKER_SAVE_DIR-$HOME/docker}
# Set default parallelism
PARALLELISM=${PARALLELISM-1}
# Set default timeout
TIMEOUT=${TIMEOUT-960s}
TIMEOUT=${TIMEOUT-1200s}

# Default to deleteing the container
DOCKER_RM=${DOCKER_RM-true}
Expand Down Expand Up @@ -97,33 +94,6 @@ function build_docker_image {
}


# Saves a docker image to $DOCKER_SAVE_DIR
function save_docker_image {
local dockerfile=$1
local imagename=$(filename2imagename "$dockerfile")
local imagefile="$DOCKER_SAVE_DIR/${imagename}.tar.gz"

if [ ! -d "$DOCKER_SAVE_DIR" ]
then
mkdir -p "$DOCKER_SAVE_DIR"
fi

if [[ -e "$imagefile" ]]
then
zcat $imagefile | docker load
fi
imageid=$(docker images -q --no-trunc "$imagename")
build_docker_image "$dockerfile" "$imagename"
newimageid=$(docker images -q --no-trunc "$imagename")
rc=0
if [ "$imageid" != "$newimageid" ]
then
docker save "$imagename" | gzip > "$imagefile"
rc="${PIPESTATUS[0]}"
fi
return "$rc"
}

if [ ! -d "$OUTPUT_DIR" ]
then
mkdir -p "$OUTPUT_DIR"
Expand Down Expand Up @@ -158,31 +128,6 @@ case $ENVIRONMENT_INDEX in
run_test_docker Dockerfile_build_ubuntu64_go19 test_64bit --test --junit-report
rc=$?
;;
"save")
# Save docker images for every Dockerfile_build* file.
# Useful for creating an external cache.
pids=()
for d in Dockerfile_build*
do
echo "Building and saving $d ..."
save_docker_image "$d" > $OUTPUT_DIR/${d}.log 2>&1 &
pids+=($!)
done
echo "Waiting..."
# Wait for all saves to finish
for pid in "${pids[@]}"
do
wait $pid
rc=$(($? + $rc))
done
# Check if all saves passed
if [ $rc -eq 0 ]
then
echo "All saves succeeded"
else
echo "Some saves failed, check logs in $OUTPUT_DIR"
fi
;;
"count")
echo $ENV_COUNT
;;
Expand Down