From f821cbe00afa0ec4721bfeed7e418d1a59ee842e Mon Sep 17 00:00:00 2001 From: Evgeny Slutsky Date: Mon, 23 Aug 2021 17:01:02 +0300 Subject: [PATCH] Bump golang to version 1.16 Signed-off-by: Evgeny Slutsky --- .ci-operator.yaml | 2 +- docs/dev/dependencies.md | 2 +- go.mod | 2 +- go.sum | 3 --- hack/build.sh | 2 +- hack/go-fmt.sh | 2 +- hack/go-genmock.sh | 2 +- hack/go-lint.sh | 2 +- hack/go-sec.sh | 2 +- hack/go-test.sh | 2 +- hack/go-vet.sh | 2 +- hack/verify-codegen.sh | 2 +- hack/verify-vendor.sh | 2 +- images/installer/Dockerfile.ci.rhel7 | 2 +- images/installer/Dockerfile.upi.ci | 2 +- images/installer/Dockerfile.upi.ci.rhel8 | 2 +- images/libvirt/Dockerfile.ci | 2 +- images/openstack/Dockerfile.ci | 2 +- 18 files changed, 17 insertions(+), 20 deletions(-) diff --git a/.ci-operator.yaml b/.ci-operator.yaml index e29ba18b0f..5b5cd20fdc 100644 --- a/.ci-operator.yaml +++ b/.ci-operator.yaml @@ -1,4 +1,4 @@ build_root_image: name: release namespace: openshift - tag: golang-1.14 + tag: golang-1.16 diff --git a/docs/dev/dependencies.md b/docs/dev/dependencies.md index 5f3d940cb1..1be94bf73e 100644 --- a/docs/dev/dependencies.md +++ b/docs/dev/dependencies.md @@ -18,7 +18,7 @@ We follow a hard flattening approach; i.e. direct and inherited dependencies are Dependencies are managed with [Go Modules](https://github.com/golang/go/wiki/Modules) but committed directly to the repository. -We require at least Go 1.14. +We require at least Go 1.16. - Add or update a dependency with `go get @`. - If you want to use a fork of a project or ensure that a dependency is not updated even when another dependency requires a newer version of it, manually add a [replace directive in the go.mod file](https://github.com/golang/go/wiki/Modules#when-should-i-use-the-replace-directive). diff --git a/go.mod b/go.mod index be19efac8c..09f5859557 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/openshift/installer -go 1.14 +go 1.16 require ( cloud.google.com/go v0.65.0 diff --git a/go.sum b/go.sum index bfbe5907fe..e8334bf5a2 100644 --- a/go.sum +++ b/go.sum @@ -490,7 +490,6 @@ github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkg github.com/elazarl/goproxy v0.0.0-20190911111923-ecfe977594f1 h1:yY9rWGoXv1U5pl4gxqlULARMQD7x0QG85lqEXTWysik= github.com/elazarl/goproxy v0.0.0-20190911111923-ecfe977594f1/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= -github.com/elazarl/goproxy/ext v0.0.0-20190911111923-ecfe977594f1 h1:8B7WF1rIoM8H1smfpXFvOawSAzlRDMVzoGu9zE3+OCk= github.com/elazarl/goproxy/ext v0.0.0-20190911111923-ecfe977594f1/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.0+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= @@ -1345,7 +1344,6 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= -github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy/FJl/rCYT0+EuS8+Z0z4= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= github.com/nbutton23/zxcvbn-go v0.0.0-20160627004424-a22cb81b2ecd/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= github.com/nbutton23/zxcvbn-go v0.0.0-20171102151520-eafdab6b0663/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= @@ -1936,7 +1934,6 @@ go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/ go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v0.0.0-20180814183419-67bc79d13d15/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.8.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= diff --git a/hack/build.sh b/hack/build.sh index 533ff20c67..7b7ccf7137 100755 --- a/hack/build.sh +++ b/hack/build.sh @@ -5,7 +5,7 @@ set -ex # shellcheck disable=SC2068 version() { IFS="."; printf "%03d%03d%03d\\n" $@; unset IFS;} -minimum_go_version=1.14 +minimum_go_version=1.16 current_go_version=$(go version | cut -d " " -f 3) if [ "$(version "${current_go_version#go}")" -lt "$(version "$minimum_go_version")" ]; then diff --git a/hack/go-fmt.sh b/hack/go-fmt.sh index 58c9458c0e..4eb2f71ce0 100755 --- a/hack/go-fmt.sh +++ b/hack/go-fmt.sh @@ -9,6 +9,6 @@ else --env IS_CONTAINER=TRUE \ --volume "${PWD}:/go/src/github.com/openshift/installer:z" \ --workdir /go/src/github.com/openshift/installer \ - docker.io/openshift/origin-release:golang-1.14 \ + docker.io/openshift/origin-release:golang-1.16 \ ./hack/go-fmt.sh "${@}" fi diff --git a/hack/go-genmock.sh b/hack/go-genmock.sh index c4599ddacc..8d39db6b76 100755 --- a/hack/go-genmock.sh +++ b/hack/go-genmock.sh @@ -9,6 +9,6 @@ else --env IS_CONTAINER=TRUE \ --volume "${PWD}:/go/src/github.com/openshift/installer:z" \ --workdir /go/src/github.com/openshift/installer \ - docker.io/openshift/origin-release:golang-1.14 \ + docker.io/openshift/origin-release:golang-1.16 \ ./hack/go-genmock.sh "${@}" fi diff --git a/hack/go-lint.sh b/hack/go-lint.sh index 6374e9c74d..366f10332b 100755 --- a/hack/go-lint.sh +++ b/hack/go-lint.sh @@ -8,6 +8,6 @@ else --env IS_CONTAINER=TRUE \ --volume "${PWD}:/go/src/github.com/openshift/installer:z" \ --workdir /go/src/github.com/openshift/installer \ - docker.io/openshift/origin-release:golang-1.14 \ + docker.io/openshift/origin-release:golang-1.16 \ ./hack/go-lint.sh "${@}" fi diff --git a/hack/go-sec.sh b/hack/go-sec.sh index 4b9dca614f..7f6fdfb527 100755 --- a/hack/go-sec.sh +++ b/hack/go-sec.sh @@ -12,6 +12,6 @@ else --env IS_CONTAINER=TRUE \ --volume "${PWD}:/go/src/github.com/openshift/installer:z" \ --workdir /go/src/github.com/openshift/installer \ - docker.io/openshift/origin-release:golang-1.14 \ + docker.io/openshift/origin-release:golang-1.16 \ ./hack/go-sec.sh "${@}" fi diff --git a/hack/go-test.sh b/hack/go-test.sh index 6e952c1030..198f4f5318 100755 --- a/hack/go-test.sh +++ b/hack/go-test.sh @@ -8,6 +8,6 @@ else --env IS_CONTAINER=TRUE \ --volume "${PWD}:/go/src/github.com/openshift/installer:z" \ --workdir /go/src/github.com/openshift/installer \ - docker.io/openshift/origin-release:golang-1.14 \ + docker.io/openshift/origin-release:golang-1.16 \ ./hack/go-test.sh "${@}" fi diff --git a/hack/go-vet.sh b/hack/go-vet.sh index 9ce18eea3e..70cff152af 100755 --- a/hack/go-vet.sh +++ b/hack/go-vet.sh @@ -6,6 +6,6 @@ else --env IS_CONTAINER=TRUE \ --volume "${PWD}:/go/src/github.com/openshift/installer:z" \ --workdir /go/src/github.com/openshift/installer \ - docker.io/openshift/origin-release:golang-1.14 \ + docker.io/openshift/origin-release:golang-1.16 \ ./hack/go-vet.sh "${@}" fi; diff --git a/hack/verify-codegen.sh b/hack/verify-codegen.sh index b06ca7eb98..58336a5172 100755 --- a/hack/verify-codegen.sh +++ b/hack/verify-codegen.sh @@ -11,6 +11,6 @@ else --env IS_CONTAINER=TRUE \ --volume "${PWD}:/go/src/github.com/openshift/installer:z" \ --workdir /go/src/github.com/openshift/installer \ - docker.io/openshift/origin-release:golang-1.14 \ + docker.io/openshift/origin-release:golang-1.16 \ ./hack/verify-codegen.sh "${@}" fi diff --git a/hack/verify-vendor.sh b/hack/verify-vendor.sh index 800888acc6..5be1cc8d05 100755 --- a/hack/verify-vendor.sh +++ b/hack/verify-vendor.sh @@ -11,6 +11,6 @@ else --env IS_CONTAINER=TRUE \ --volume "${PWD}:/go/src/github.com/openshift/installer:z" \ --workdir /go/src/github.com/openshift/installer \ - docker.io/openshift/origin-release:golang-1.14 \ + docker.io/openshift/origin-release:golang-1.16 \ ./hack/verify-vendor.sh "${@}" fi diff --git a/images/installer/Dockerfile.ci.rhel7 b/images/installer/Dockerfile.ci.rhel7 index 8701b1cd3b..bee7a3c617 100644 --- a/images/installer/Dockerfile.ci.rhel7 +++ b/images/installer/Dockerfile.ci.rhel7 @@ -1,7 +1,7 @@ # This Dockerfile is used by CI to publish the installer image. # It builds an image containing only the openshift-install. -FROM registry.ci.openshift.org/ocp/builder:rhel-7-golang-1.15-openshift-4.8 AS builder +FROM registry.ci.openshift.org/ocp/builder:rhel-7-golang-1.16-openshift-4.8 AS builder ARG TAGS="" WORKDIR /go/src/github.com/openshift/installer COPY . . diff --git a/images/installer/Dockerfile.upi.ci b/images/installer/Dockerfile.upi.ci index 055fd3a69a..646d162a4f 100644 --- a/images/installer/Dockerfile.upi.ci +++ b/images/installer/Dockerfile.upi.ci @@ -3,7 +3,7 @@ # It also contains the `upi` directory that contains various terraform and cloud formation templates that are used to create infrastructure resources. -FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.15-openshift-4.8 AS builder +FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.8 AS builder ARG TAGS="" WORKDIR /go/src/github.com/openshift/installer COPY . . diff --git a/images/installer/Dockerfile.upi.ci.rhel8 b/images/installer/Dockerfile.upi.ci.rhel8 index 83cd79061f..0ecf5989d9 100644 --- a/images/installer/Dockerfile.upi.ci.rhel8 +++ b/images/installer/Dockerfile.upi.ci.rhel8 @@ -3,7 +3,7 @@ # It builds an image containing binaries like jq, terraform, awscli, oc, etc. to allow bringing up UPI infrastructure. # It also contains the `upi` directory that contains various terraform and cloud formation templates that are used to create infrastructure resources. -FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.15-openshift-4.8 AS builder +FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.8 AS builder ARG TAGS="" WORKDIR /go/src/github.com/openshift/installer COPY . . diff --git a/images/libvirt/Dockerfile.ci b/images/libvirt/Dockerfile.ci index c18c074f09..097b62a037 100644 --- a/images/libvirt/Dockerfile.ci +++ b/images/libvirt/Dockerfile.ci @@ -1,7 +1,7 @@ # This Dockerfile is a used by CI to publish an installer image for creating libvirt clusters # It builds an image containing openshift-install and nss-wrapper for remote deployments, as well as the google cloud-sdk for nested GCE environments. -FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.15-openshift-4.8 AS builder +FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.8 AS builder ARG TAGS="libvirt" RUN yum install -y libvirt-devel && \ yum clean all && rm -rf /var/cache/yum/* diff --git a/images/openstack/Dockerfile.ci b/images/openstack/Dockerfile.ci index a52a08f489..cc9bfff4a1 100644 --- a/images/openstack/Dockerfile.ci +++ b/images/openstack/Dockerfile.ci @@ -1,6 +1,6 @@ # This Dockerfile is used by CI to test using OpenShift Installer against an OpenStack cloud. # It builds an image containing the openshift-install command as well as the openstack cli. -FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.15-openshift-4.8 AS builder +FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.8 AS builder ARG TAGS="" WORKDIR /go/src/github.com/openshift/installer COPY . .