Skip to content

Commit

Permalink
[ISSUE-1057] bugfix upgrade go 1.21. (#1058)
Browse files Browse the repository at this point in the history
* Upgrade go to 1.21

Signed-off-by: Andrzej Zukowski <[email protected]>

* Upgrade go to 1.21

Signed-off-by: Andrzej Zukowski <[email protected]>

* Upgrade go to 1.21

Signed-off-by: Andrzej Zukowski <[email protected]>

* Upgrade golangci-lint to v1.55.2

Signed-off-by: Andrzej Zukowski <[email protected]>

* Adjust golangci-lint configuration

Signed-off-by: Andrzej Zukowski <[email protected]>

* Upgrade net and grpc packages

Signed-off-by: Andrzej Zukowski <[email protected]>

* Use new API for grpc

Signed-off-by: Andrzej Zukowski <[email protected]>

* Use new version of healthprobe

Signed-off-by: Andrzej Zukowski <[email protected]>

* Upgrade certifi to 2023.07.22

Signed-off-by: Andrzej Zukowski <[email protected]>

* Upgrade yaml.v3 to v3.0.1

Signed-off-by: Andrzej Zukowski <[email protected]>

* Upgrade logrus to v1.9.3

Signed-off-by: Andrzej Zukowski <[email protected]>

* Upgrade urllib to 1.26.18

Signed-off-by: Andrzej Zukowski <[email protected]>

* Upgrade checkout action to v3

Signed-off-by: Andrzej Zukowski <[email protected]>

* Fix for checkout action #760

Signed-off-by: Andrzej Zukowski <[email protected]>

* Update modules for tests

Signed-off-by: Andrzej Zukowski <[email protected]>

* Remove test target

Signed-off-by: Andrzej Zukowski <[email protected]>

* Change e2e comment to match golangci version

Signed-off-by: Andrzej Zukowski <[email protected]>

---------

Signed-off-by: Andrzej Zukowski <[email protected]>
  • Loading branch information
Andrzej-Zukowski authored Nov 13, 2023
1 parent 4c3fd07 commit ade6eed
Show file tree
Hide file tree
Showing 11 changed files with 222 additions and 669 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:

env:
REGISTRY: 'ghcr.io/dell/csi-baremetal'
go_version: '1.19.2'
golangci_version: '1.48.0'
go_version: '1.21.3'
golangci_version: '1.55.2'
helm_version: '3.7.1'
kubectl_version: 'v1.25.3'
kind_config: 'small-kind.yaml'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ jobs:
- /tmp:/tmp
- /var/run/docker.sock:/var/run/docker.sock
steps:
- name: Trust My Directory # workaround for https://github.com/actions/checkout/issues/760
run: git config --global --add safe.directory /__w/csi-baremetal/csi-baremetal

- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set go_version variable
run: echo "go_version=`echo "$(go version)" | grep -oE '[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}'`" >> $GITHUB_ENV
Expand Down
100 changes: 100 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,106 @@ linters-settings:
# golint developers mention that this is imperfection. https://github.com/golang/lint/blob/master/lint.go#L376
# To prevent this checking set min-confidence level to 0.3
min-confidence: 0.3
depguard:
rules:
main:
files:
- $all
- "!$test"
allow:
- $gostd
- github.com/antonfisher/nested-logrus-formatter
- github.com/container-storage-interface/spec/lib/go/csi
- github.com/dell/csi-baremetal/api/generated/v1
- github.com/dell/csi-baremetal/api/v1
- github.com/dell/csi-baremetal/api/v1/availablecapacitycrd
- github.com/dell/csi-baremetal/api/v1/drivecrd
- github.com/dell/csi-baremetal/api/v1/lvgcrd
- github.com/dell/csi-baremetal/api/v1/nodecrd
- github.com/dell/csi-baremetal/api/v1/storagegroupcrd
- github.com/dell/csi-baremetal/api/v1/volumecrd
- github.com/dell/csi-baremetal/cmd/drivemgr
- github.com/dell/csi-baremetal/pkg/base
- github.com/dell/csi-baremetal/pkg/base/error
- github.com/dell/csi-baremetal/pkg/base/featureconfig
- github.com/dell/csi-baremetal/pkg/base/k8s
- github.com/dell/csi-baremetal/pkg/base/linuxutils/datadiscover
- github.com/dell/csi-baremetal/pkg/base/linuxutils/datadiscover/types
- github.com/dell/csi-baremetal/pkg/base/linuxutils/fs
- github.com/dell/csi-baremetal/pkg/base/linuxutils/ipmi
- github.com/dell/csi-baremetal/pkg/base/linuxutils/lsblk
- github.com/dell/csi-baremetal/pkg/base/linuxutils/lsscsi
- github.com/dell/csi-baremetal/pkg/base/linuxutils/lvm
- github.com/dell/csi-baremetal/pkg/base/linuxutils/nvmecli
- github.com/dell/csi-baremetal/pkg/base/linuxutils/partitionhelper
- github.com/dell/csi-baremetal/pkg/base/linuxutils/smartctl
- github.com/dell/csi-baremetal/pkg/base/logger
- github.com/dell/csi-baremetal/pkg/base/logger/objects
- github.com/dell/csi-baremetal/pkg/base/rpc
- github.com/dell/csi-baremetal/pkg/base/util
- github.com/dell/csi-baremetal/pkg/common
- github.com/dell/csi-baremetal/pkg/controller
- github.com/dell/csi-baremetal/pkg/controller/mountoptions
- github.com/dell/csi-baremetal/pkg/controller/node
- github.com/dell/csi-baremetal/pkg/crcontrollers/drive
- github.com/dell/csi-baremetal/pkg/crcontrollers/lvg
- github.com/dell/csi-baremetal/pkg/crcontrollers/node
- github.com/dell/csi-baremetal/pkg/crcontrollers/node/common
- github.com/dell/csi-baremetal/pkg/crcontrollers/reservation
- github.com/dell/csi-baremetal/pkg/crcontrollers/storagegroup
- github.com/dell/csi-baremetal/pkg/drivemgr
- github.com/dell/csi-baremetal/pkg/eventing
- github.com/dell/csi-baremetal/pkg/events
- github.com/dell/csi-baremetal/pkg/metrics
- github.com/dell/csi-baremetal/pkg/metrics/common
- github.com/dell/csi-baremetal/pkg/mocks/linuxutils
- github.com/dell/csi-baremetal/pkg/node
- github.com/dell/csi-baremetal/pkg/node/wbt/common
- github.com/dell/csi-baremetal/pkg/node/wbt/operations
- github.com/dell/csi-baremetal/pkg/scheduler/extender
- github.com/dell/csi-baremetal/pkg/scheduler/extender/healthserver
- github.com/dell/csi-baremetal/pkg/scheduler/extender/healthserver/common
- github.com/fsnotify/fsnotify
- github.com/golang/protobuf/ptypes/wrappers
- github.com/google/uuid
- github.com/grpc-ecosystem/go-grpc-prometheus
- github.com/prometheus/client_golang/prometheus
- github.com/sirupsen/logrus
- github.com/stretchr/testify/assert
- github.com/stretchr/testify/mock
- github.com/viney-shih/go-lock
- k8s.io/api/apps/v1
- k8s.io/api/core/v1
- k8s.io/api/storage/v1
- k8s.io/apimachinery/pkg/api/errors
- k8s.io/apimachinery/pkg/api/meta
- k8s.io/apimachinery/pkg/api/resource
- k8s.io/apimachinery/pkg/apis/meta/v1
- k8s.io/apimachinery/pkg/runtime
- k8s.io/apimachinery/pkg/types
- k8s.io/client-go/kubernetes
- k8s.io/client-go/plugin/pkg/client/auth/gcp
- k8s.io/client-go/rest
- k8s.io/client-go/tools/record
- k8s.io/client-go/tools/reference
- k8s.io/client-go/util/retry
- k8s.io/client-go/util/workqueue
- k8s.io/kube-scheduler/extender/v1
- k8s.io/utils/keymutex
- sigs.k8s.io/controller-runtime
- sigs.k8s.io/controller-runtime/pkg/cache
- sigs.k8s.io/controller-runtime/pkg/client
- sigs.k8s.io/controller-runtime/pkg/controller
- sigs.k8s.io/controller-runtime/pkg/event
- sigs.k8s.io/controller-runtime/pkg/handler
- sigs.k8s.io/controller-runtime/pkg/manager
- sigs.k8s.io/controller-runtime/pkg/predicate
- sigs.k8s.io/controller-runtime/pkg/source
test:
files:
- "$test"
allow:
- $gostd

linters:
# please, do not use `enable-all`: it is deprecated and will be removed soon.
Expand Down
6 changes: 3 additions & 3 deletions devkit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ TAG ?= $(major).$(minor).$(patch)-$(git_rev)
IMAGE_REPO_TAG := $(REPO):$(TAG)

DOCKER_VERSION ?= 20.10.14_ce
GO_VERSION ?= 1.19.10
GOLANGCI_VERSION ?= 1.48.0
GO_VERSION ?= 1.21.3
GOLANGCI_VERSION ?= 1.55.2
PROTOBUF_VERSION ?= 3.11.0
PROTOC_GEN_GO_VER ?= v1.3.2
KUBECTL_VERSION ?= 1.25.3
HELM_VERSION ?= 3.8.1
KIND_BUILDER ?= golang:1.19
KIND_BUILDER ?= golang:1.21
PYTHON_VERSION ?= 3.6.15

#
Expand Down
35 changes: 18 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
module github.com/dell/csi-baremetal

go 1.17
go 1.21

require (
github.com/antonfisher/nested-logrus-formatter v1.0.3
github.com/container-storage-interface/spec v1.5.0
github.com/fsnotify/fsnotify v1.5.1
github.com/golang/protobuf v1.5.2
github.com/google/uuid v1.1.2
github.com/golang/protobuf v1.5.3
github.com/google/uuid v1.3.1
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.17.0
github.com/prometheus/client_golang v1.13.0
github.com/sirupsen/logrus v1.8.1
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.7.0
github.com/viney-shih/go-lock v1.1.1
golang.org/x/net v0.7.0
google.golang.org/grpc v1.40.0
golang.org/x/net v0.17.0
google.golang.org/grpc v1.59.0
gopkg.in/yaml.v2 v2.4.0
gotest.tools v2.2.0+incompatible
k8s.io/api v0.23.4
Expand All @@ -28,15 +28,16 @@ require (
)

require (
cloud.google.com/go v0.81.0 // indirect
cloud.google.com/go/compute v1.23.2 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/go-logr/logr v1.2.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/imdario/mergo v0.3.12 // indirect
Expand All @@ -52,19 +53,19 @@ require (
github.com/prometheus/procfs v0.8.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.2.0 // indirect
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/term v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/oauth2 v0.11.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.23.0 // indirect
k8s.io/component-base v0.23.4 // indirect
k8s.io/klog/v2 v2.30.0 // indirect
Expand Down
Loading

0 comments on commit ade6eed

Please sign in to comment.