From f9652bf2f95a7cb35462549c90a25e08d1331b11 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Tue, 10 Sep 2024 07:29:45 +0000 Subject: [PATCH 1/3] chore: upgrade golang version --- .github/workflows/trivy.yaml | 2 +- go.mod | 4 +--- .../test/e2e/framework/testfiles/testdata/a/foo.txt | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 vendor/k8s.io/kubernetes/test/e2e/framework/testfiles/testdata/a/foo.txt diff --git a/.github/workflows/trivy.yaml b/.github/workflows/trivy.yaml index 676f2cf56..d858913c4 100644 --- a/.github/workflows/trivy.yaml +++ b/.github/workflows/trivy.yaml @@ -12,7 +12,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v4 with: - go-version: 1.22.5 + go-version: 1.23.1 id: go - name: Checkout code diff --git a/go.mod b/go.mod index 3a4f7b2f2..8f50e14e8 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module sigs.k8s.io/blob-csi-driver -go 1.21 - -toolchain go1.21.4 +go 1.23.1 require ( github.com/Azure/azure-sdk-for-go v68.0.0+incompatible diff --git a/vendor/k8s.io/kubernetes/test/e2e/framework/testfiles/testdata/a/foo.txt b/vendor/k8s.io/kubernetes/test/e2e/framework/testfiles/testdata/a/foo.txt deleted file mode 100644 index 557db03de..000000000 --- a/vendor/k8s.io/kubernetes/test/e2e/framework/testfiles/testdata/a/foo.txt +++ /dev/null @@ -1 +0,0 @@ -Hello World From d044aca6c81c382e70abdd4475ad8df74b3b8a9b Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Tue, 10 Sep 2024 07:31:17 +0000 Subject: [PATCH 2/3] test: skip trivy CVE for azcopy --- .trivyignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .trivyignore diff --git a/.trivyignore b/.trivyignore new file mode 100644 index 000000000..9b5540db1 --- /dev/null +++ b/.trivyignore @@ -0,0 +1,3 @@ +CVE-2024-34156 +CVE-2024-34158 +CVE-2024-34155 From 3279fb3b85b7c8f1599ca5d6a6a9f2153440b9d6 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Tue, 10 Sep 2024 07:50:15 +0000 Subject: [PATCH 3/3] test: fix ut --- pkg/blob/controllerserver_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/blob/controllerserver_test.go b/pkg/blob/controllerserver_test.go index 5a88c1808..a4b1223ee 100644 --- a/pkg/blob/controllerserver_test.go +++ b/pkg/blob/controllerserver_test.go @@ -1076,7 +1076,7 @@ func TestValidateVolumeCapabilities(t *testing.T) { clientErr: DATAPLANE, containerProp: &storage.ContainerProperties{}, expectedRes: nil, - expectedErr: status.Errorf(codes.Internal, retry.GetError(&http.Response{}, fmt.Errorf(containerBeingDeletedDataplaneAPIError)).Error().Error()), + expectedErr: status.Error(codes.Internal, fmt.Sprintf("ContainerProperties of volume(%s) is nil", "unit#test#test")), }, { name: "Requested Volume does not exist", @@ -1088,7 +1088,7 @@ func TestValidateVolumeCapabilities(t *testing.T) { clientErr: NULL, containerProp: &storage.ContainerProperties{}, expectedRes: nil, - expectedErr: status.Errorf(codes.NotFound, fmt.Sprintf("requested volume(%s) does not exist", "unit#test#test")), + expectedErr: status.Errorf(codes.Internal, retry.GetError(&http.Response{}, fmt.Errorf(containerBeingDeletedDataplaneAPIError)).Error().Error()), }, /*{ //Volume being shown as not existing. ContainerProperties.Deleted not setting correctly?? name: "Successful I/O",