From 573984241499987cad1772b0f36e5f1a0706aa00 Mon Sep 17 00:00:00 2001 From: Sylvain Baubeau Date: Mon, 16 Nov 2020 23:27:20 +0100 Subject: [PATCH] Bump Go to latest 1.14 --- .mk/check.mk | 9 +------ .mk/dist.mk | 2 -- Makefile | 4 --- .../ansible/roles/skydive_dev/tasks/gimme.yml | 4 +-- contrib/packaging/rpm/specfile-update-bundles | 2 +- devstack/plugin.sh | 5 ++-- go.mod | 2 +- scripts/ci/devstack/run-openstack-tests.sh | 2 +- scripts/ci/install-go.sh | 26 ------------------- 9 files changed, 8 insertions(+), 48 deletions(-) delete mode 100755 scripts/ci/install-go.sh diff --git a/.mk/check.mk b/.mk/check.mk index 682c384594..38aa2d94f5 100644 --- a/.mk/check.mk +++ b/.mk/check.mk @@ -15,14 +15,7 @@ fmt: genlocalfiles .PHONY: vet vet: @echo "+ $@" - test -z "$$($(GO) tool vet $$( \ - $(GO) list ./... \ - | perl -pe 's|$(SKYDIVE_GITHUB)/?||g' \ - | grep -v '^tests') 2>&1 \ - | tee /dev/stderr \ - | grep -v '^flow/probes/afpacket/' \ - | grep -v 'exit status 1' \ - )" + go vet ./... .PHONY: check check: lint diff --git a/.mk/dist.mk b/.mk/dist.mk index 47744f85b5..0699ef1701 100644 --- a/.mk/dist.mk +++ b/.mk/dist.mk @@ -22,9 +22,7 @@ endef .PHONY: vendor vendor: genlocalfiles -ifeq (${GO111MODULE}, on) go mod vendor -endif .PHONY: localdist localdist: vendor diff --git a/Makefile b/Makefile index d89858729a..c796441298 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,3 @@ -export GO111MODULE?=on - define VERSION_CMD = eval ' \ define=""; \ @@ -153,9 +151,7 @@ skydive.clean: .PHONY: moddownload moddownload: -ifeq (${GO111MODULE}, on) go mod download -endif .PHONY: genlocalfiles genlocalfiles: $(EXTRA_BUILD_TARGET) .proto .bindata .gendecoder .easyjson .vppbinapi diff --git a/contrib/ansible/roles/skydive_dev/tasks/gimme.yml b/contrib/ansible/roles/skydive_dev/tasks/gimme.yml index 2724368270..ad84eb00e4 100644 --- a/contrib/ansible/roles/skydive_dev/tasks/gimme.yml +++ b/contrib/ansible/roles/skydive_dev/tasks/gimme.yml @@ -9,7 +9,7 @@ - name: run gimme in bash profile lineinfile: path: /home/vagrant/.bash_profile - line: 'eval "$(gimme 1.11.13)"' + line: 'eval "$(gimme 1.14.x)"' - name: set GOPATH lineinfile: @@ -22,6 +22,6 @@ line: 'export PATH=/home/vagrant/go/bin:$PATH' - name: run gimme once - command: /usr/local/bin/gimme 1.11.13 + command: /usr/local/bin/gimme 1.14.x become: yes become_user: vagrant diff --git a/contrib/packaging/rpm/specfile-update-bundles b/contrib/packaging/rpm/specfile-update-bundles index f2c0dec6da..03a8d881a7 100755 --- a/contrib/packaging/rpm/specfile-update-bundles +++ b/contrib/packaging/rpm/specfile-update-bundles @@ -14,7 +14,7 @@ if len(sys.argv) != 3: sys.exit(0) provides = [] -mod = json.loads(commands.getoutput("GO111MODULE=on go mod edit -json " + sys.argv[1])) +mod = json.loads(commands.getoutput("go mod edit -json " + sys.argv[1])) for package in mod["Require"]: provides.append("Provides: bundled(golang(%s)) = %s" % (package["Path"], package["Version"].split("-")[-1].split("+")[0])) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 7f2c8c11e8..6182721d0a 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -15,8 +15,8 @@ # The path where go binaries have to be installed GOROOT=${GOROOT:-/opt/go} -# golang version. Skydive needs at least version 1.11 -GO_VERSION=${GO_VERSION:-1.11.13} +# golang version. Skydive needs at least version 1.14 +GO_VERSION=${GO_VERSION:-1.14.x} # GOPATH where the go src, pkgs are installed GOPATH=/opt/stack/go @@ -100,7 +100,6 @@ function install_go { export GOROOT=$GOROOT export PATH=$PATH:$GOROOT/bin:$GOPATH/bin export GOPATH=$GOPATH - export GO111MODULE=on } function download_elasticsearch { diff --git a/go.mod b/go.mod index 783c9bf7f1..ca2ec36e6b 100644 --- a/go.mod +++ b/go.mod @@ -150,4 +150,4 @@ replace ( k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.0.0-20191016112829-06bb3c9d77c9 ) -go 1.11 +go 1.14 diff --git a/scripts/ci/devstack/run-openstack-tests.sh b/scripts/ci/devstack/run-openstack-tests.sh index b99361e52e..b0bcabf164 100755 --- a/scripts/ci/devstack/run-openstack-tests.sh +++ b/scripts/ci/devstack/run-openstack-tests.sh @@ -8,6 +8,6 @@ export OS_AUTH_URL=${OS_AUTH_URL}/v${OS_IDENTITY_API_VERSION} export PATH=$PATH:/opt/go/bin:/opt/stack/go/bin:/opt/stack/protoc/bin export GOROOT=/opt/go export GOPATH=/opt/stack/go -export GO_VERSION=1.11 +export GO_VERSION=1.14 cd /opt/stack/go/src/github.com/skydive-project/skydive/ SKYDIVE_ANALYZERS=localhost:8082 make test.functionals WITH_NEUTRON=true VERBOSE=true TIMEOUT=5m TEST_PATTERN=Neutron diff --git a/scripts/ci/install-go.sh b/scripts/ci/install-go.sh deleted file mode 100755 index 9246d0f89e..0000000000 --- a/scripts/ci/install-go.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -set -v - -# Set Environment -echo ${PATH} | grep -q "${HOME}/bin" || { - echo "Adding ${HOME}/bin to PATH" - export PATH="${PATH}:${HOME}/bin" -} - -# Install Go -mkdir -p ~/bin -curl -sL -o ~/bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme -chmod +x ~/bin/gimme - -# before changing this be sure that it will not break the RHEL packaging -eval "$(gimme 1.11.13)" - -export GO111MODULE=on -export GOPATH=$WORKSPACE -export PATH=$PATH:$GOPATH/bin - -# share compile cache -mkdir -p $HOME/pkg -rm -rf $GOPATH/pkg -ln -s $HOME/pkg $GOPATH/pkg \ No newline at end of file