Skip to content

Commit

Permalink
[release-0.19] go: Bump to 1.16 (#218)
Browse files Browse the repository at this point in the history
* go: Bump to 1.16

There is some proxy url not working with go 1.13:

parse https://proxy.golang.org|https://goproxy.io|direct: invalid character "|" in host name

This change bumps go to 1.16

Signed-off-by: Quique Llorente <[email protected]>

* go: Remove golint is deprecated

Signed-off-by: Quique Llorente <[email protected]>
  • Loading branch information
qinqon authored Feb 2, 2022
1 parent fe0f335 commit 63bb0d5
Show file tree
Hide file tree
Showing 345 changed files with 36,086 additions and 21,843 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ _out

# temp files
cluster/multus-daemonset.yml

# installed go toolchain
.gopath
31 changes: 10 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,45 +11,34 @@ BIN_DIR = $(CURDIR)/build/_output/bin/
export GOROOT=$(BIN_DIR)/go/
export GOBIN = $(GOROOT)/bin/
export PATH := $(GOBIN):$(PATH)
GOPATH = $(CURDIR)/.gopath
export GOFLAGS := -mod=vendor
ORG_PATH = github.com/kubevirt
PACKAGE = ovs-cni
REPO_PATH = $(ORG_PATH)/$(PACKAGE)
BASE = $(GOPATH)/src/$(REPO_PATH)
PKGS = $(or $(PKG),$(shell cd $(BASE) && env GOPATH=$(GOPATH) $(GO) list ./... | grep -v "$(PACKAGE)/vendor/" | grep -v "$(PACKAGE)/tests/cluster" | grep -v "$(PACKAGE)/tests/node"))
V = 0
Q = $(if $(filter 1,$V),,@)
PKGS = $(or $(PKG),$(shell $(GO) list ./... | grep -v "$(PACKAGE)/vendor/" | grep -v "$(PACKAGE)/tests/cluster" | grep -v "$(PACKAGE)/tests/node"))

all: lint build
all: build

GO := $(GOBIN)/go

$(GO):
hack/install-go.sh $(BIN_DIR)

$(BASE): ; $(info setting GOPATH...)
@mkdir -p $(dir $@)
@ln -sf $(CURDIR) $@

GOLINT = $(GOBIN)/golint
$(GOBIN)/golint: | $(BASE) ; $(info building golint...)
$Q go get -u golang.org/x/lint/golint

build: format $(patsubst %, build-%, $(COMPONENTS))

lint: | $(GO) $(BASE) $(GOLINT) ; $(info running golint...) @ ## Run golint
$Q cd $(BASE) && ret=0 && for pkg in $(PKGS); do \
test -z "$$($(GOLINT) $$pkg | tee /dev/stderr)" || ret=1 ; \
done ; exit $$ret

build-%: $(GO)
hack/version.sh > ./cmd/$(subst -,/,$*)/.version
cd cmd/$(subst -,/,$*) && $(GO) fmt && $(GO) vet && GOOS=linux GOARCH=amd64 CGO_ENABLED=0 GO111MODULE=on $(GO) build -tags no_openssl -mod vendor

format: $(GO)
format: $(GO) vet
$(GO) fmt ./pkg/... ./cmd/...

vet: $(GO)
$(GO) vet ./pkg/... ./cmd/...

check: $(GO) vet
test -z "$(shell $(GO)fmt -l pkg/ cmd/)"

test: $(GO)
$(GO) test ./cmd/... ./pkg/... -v --ginkgo.v

Expand Down Expand Up @@ -88,4 +77,4 @@ cluster-down:
cluster-sync: build
./cluster/sync.sh

.PHONY: build format test docker-build docker-push dep clean-dep manifests cluster-up cluster-down cluster-sync lint
.PHONY: build format check test docker-build docker-push dep clean-dep manifests cluster-up cluster-down cluster-sync
4 changes: 2 additions & 2 deletions automation/check-patch.e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ main() {
source automation/setup.sh
cd ${TMP_PROJECT_PATH}

echo 'Run golint'
make lint
echo 'Run check'
make check

echo 'Run functional tests'
make docker-test
Expand Down
4 changes: 2 additions & 2 deletions automation/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export GOPATH=/tmp/ovs-cni/go/path
mkdir -p $GOPATH
export PATH=${GOPATH}/bin:${GOROOT}/bin:${PATH}

echo 'Install Go 1.13'
export GIMME_GO_VERSION=1.13
export GIMME_GO_VERSION=$(grep '^go' go.mod |sed 's/go //')
echo 'Install Go $GIMME_GO_VERSION'
GIMME=/tmp/ovs-cni/go/gimme
mkdir -p $GIMME
curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | HOME=${GIMME} bash >> ${GIMME}/gimme.sh
Expand Down
6 changes: 5 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ require (
github.com/pkg/errors v0.9.1
github.com/socketplane/libovsdb v0.0.0-20170116174820-4de3618546de
github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
k8s.io/api v0.19.1
k8s.io/apimachinery v0.19.1
k8s.io/client-go v0.18.3
Expand Down Expand Up @@ -50,4 +54,4 @@ replace (

replace github.com/containernetworking/cni => github.com/containernetworking/cni v0.8.1

go 1.13
go 1.16
39 changes: 9 additions & 30 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion hack/docker-builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM quay.io/fedora/fedora:32-x86_64
RUN dnf -y install make git sudo gcc rsync-daemon rsync openvswitch hostname && \
dnf -y clean all

ENV GIMME_GO_VERSION=1.13
ENV GIMME_GO_VERSION=1.16

RUN mkdir -p /gimme && curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | HOME=/gimme bash >> /etc/profile.d/gimme.sh

Expand Down
1 change: 1 addition & 0 deletions vendor/golang.org/x/net/context/go17.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/golang.org/x/net/context/go19.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/golang.org/x/net/context/pre_go17.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/golang.org/x/net/context/pre_go19.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/golang.org/x/net/html/const.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

119 changes: 58 additions & 61 deletions vendor/golang.org/x/net/html/foreign.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 37 additions & 2 deletions vendor/golang.org/x/net/html/parse.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/golang.org/x/net/html/render.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions vendor/golang.org/x/net/http/httpguts/httplex.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/golang.org/x/net/http2/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 63bb0d5

Please sign in to comment.