Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE-1057] bugfix upgrade go 1.21. #1058

Merged
merged 17 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

devkit change need to pass the multiple jenkins job, (csi-build, csi-kind-acceptance, csi-ci), as these tests are based on the devkit image.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

csi-build - PASSEDcsi-kind-acceptance, csi-ci

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
Loading