Skip to content

Commit

Permalink
Update Go version to 1.20 (#1936)
Browse files Browse the repository at this point in the history
Also update following dependencies: cn-infra, gomega, logrus,
etcd/client, prometheus/client_golang, errors, go-cmp.

Signed-off-by: Peter Motičák <peter.moticak@pantheon.tech>
  • Loading branch information
pemoticak authored Aug 8, 2023
1 parent 1edf23d commit 9108df5
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 76 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.20.x
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.50
version: v1.53
args: --timeout 5m
checkproto:
name: check proto
Expand All @@ -45,7 +45,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.18
go-version: 1.20.x
- run: go mod tidy -v
- name: Check for changes in go.mod
run: |
Expand All @@ -57,7 +57,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.18
go-version: 1.20.x
- run: |
go build -v ./...
unittest:
Expand All @@ -67,6 +67,6 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: 1.18
go-version: 1.20.x
- run: |
go test -v ./...
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ clean-examples: ## Clean examples
cd examples/localclient_vpp/plugins && go clean

purge: ## Purge cached files
go clean -testcache -cache ./...
go clean -testcache -cache

debug-remote: ## Debug remotely
cd ./cmd/vpp-agent && dlv debug --headless --listen=:2345 --api-version=2 --accept-multiclient
Expand Down Expand Up @@ -263,7 +263,7 @@ gotestsumcmd := $(shell command -v gotestsum 2> /dev/null)

test-tools: ## install test tools
ifndef gotestsumcmd
go install gotest.tools/gotestsum@v1.8.1
go install gotest.tools/gotestsum@v1.10.1
endif
@env CGO_ENABLED=0 go build -ldflags="-s -w" -o $(BUILD_DIR)/test2json cmd/test2json

Expand All @@ -272,7 +272,7 @@ LINTER := $(shell command -v golangci-lint --version 2> /dev/null)
get-linters:
ifndef LINTER
@echo "# installing linters"
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.50.1
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.53.3
endif

lint: get-linters ## Lint Go code
Expand Down
4 changes: 2 additions & 2 deletions docker/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ${VPP_IMG} AS vppimg

RUN dpkg-query -f '${Version}' -W vpp > /vpp/version

FROM golang:1.18 AS verify-binapi
FROM golang:1.20 AS verify-binapi

RUN apt-get update && apt-get install -y --no-install-recommends \
patch \
Expand Down Expand Up @@ -76,7 +76,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

# Install Go
ENV GOLANG_VERSION 1.18.8
ENV GOLANG_VERSION 1.20.7
RUN set -eux; \
dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \
Expand Down
29 changes: 15 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.ligato.io/vpp-agent/v3

go 1.18
go 1.20

require (
github.com/alecthomas/jsonschema v0.0.0-20200217214135-7152f22193c9
Expand All @@ -10,10 +10,10 @@ require (
github.com/docker/docker v20.10.12+incompatible
github.com/fsouza/go-dockerclient v1.6.6
github.com/ghodss/yaml v1.0.0
github.com/go-errors/errors v1.0.1
github.com/go-errors/errors v1.4.2
github.com/goccy/go-graphviz v0.0.6
github.com/goccy/go-yaml v1.8.0
github.com/google/go-cmp v0.5.6
github.com/google/go-cmp v0.5.9
github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0
Expand All @@ -24,23 +24,23 @@ require (
github.com/moby/term v0.0.0-20200429084858-129dac9f73f6
github.com/namsral/flag v1.7.4-pre
github.com/olekukonko/tablewriter v0.0.4
github.com/onsi/gomega v1.19.0
github.com/onsi/gomega v1.24.1
github.com/pkg/errors v0.9.1
github.com/pkg/profile v1.5.0
github.com/prometheus/client_golang v1.11.0
github.com/prometheus/client_golang v1.11.1
github.com/segmentio/textio v1.2.0
github.com/sirupsen/logrus v1.8.1
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.5.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.7.0
github.com/unrolled/render v0.0.0-20180914162206-b9786414de4d
github.com/vishvananda/netlink v1.2.1-beta.2
github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74
github.com/xeipuuv/gojsonschema v1.1.0
go.etcd.io/etcd/client/v3 v3.5.1
go.etcd.io/etcd/client/v3 v3.5.7
go.fd.io/govpp v0.7.0
go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20220211111933-3d9ff310b1fa
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a
go.ligato.io/cn-infra/v2 v2.5.0-alpha.0.20230804085813-a0697d53e2c2
golang.org/x/sys v0.3.0
google.golang.org/grpc v1.47.0
google.golang.org/protobuf v1.28.0
)
Expand Down Expand Up @@ -122,19 +122,20 @@ require (
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036 // indirect
go.etcd.io/etcd/api/v3 v3.5.1 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.1 // indirect
go.etcd.io/etcd/api/v3 v3.5.7 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.7 // indirect
go.opencensus.io v0.23.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.17.0 // indirect
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 // indirect
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
golang.org/x/image v0.0.0-20200119044424-58c23975cae1 // indirect
golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/text v0.5.0 // indirect
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/genproto v0.0.0-20220607223854-30acc4cbd2aa // indirect
gopkg.in/ini.v1 v1.51.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 9108df5

Please sign in to comment.