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

Update CSI Spec #1174

Merged
merged 1 commit into from
Nov 5, 2024
Merged

Update CSI Spec #1174

merged 1 commit into from
Nov 5, 2024

Conversation

yati1998
Copy link
Contributor

@yati1998 yati1998 commented Oct 25, 2024

this commit updates csi spec version to
include latest changes for volume group
snapshot

Update CSI spec to a commit after v1.10.0 where VolumeGroupSnapshot moved to GA

@k8s-ci-robot k8s-ci-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 25, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @yati1998. Thanks for your PR.

I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 25, 2024
@xing-yang
Copy link
Collaborator

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 25, 2024
@xing-yang
Copy link
Collaborator

We need to update again after CSI Spec is officially released.

@xing-yang
Copy link
Collaborator

Please add a release note.

@yati1998
Copy link
Contributor Author

We need to update again after CSI Spec is officially released.

sure, will add a TODO for that. lets get it for now.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Oct 29, 2024
go.mod Show resolved Hide resolved
@xing-yang
Copy link
Collaborator

You probably need to take a look at this PR: kubernetes-csi/external-provisioner#1262

@xing-yang
Copy link
Collaborator

Make this change, then it should work:

$ git diff main_test.go
diff --git a/cmd/csi-snapshotter/main_test.go b/cmd/csi-snapshotter/main_test.go
index c3ecf9d5..05c93e9e 100644
--- a/cmd/csi-snapshotter/main_test.go
+++ b/cmd/csi-snapshotter/main_test.go
@@ -23,6 +23,7 @@ import (

        "github.com/container-storage-interface/spec/lib/go/csi"
        "github.com/golang/mock/gomock"
+       "github.com/kubernetes-csi/csi-test/v5/utils"
        "github.com/kubernetes-csi/csi-lib-utils/connection"
        "github.com/kubernetes-csi/csi-lib-utils/metrics"
        "github.com/kubernetes-csi/csi-test/v5/driver"
@@ -125,7 +126,7 @@ func Test_supportsControllerCreateSnapshot(t *testing.T) {
                }

                // Setup expectation
-               controllerServer.EXPECT().ControllerGetCapabilities(gomock.Any(), in).Return(out, injectedErr).Times(1)
+               controllerServer.EXPECT().ControllerGetCapabilities(gomock.Any(), utils.Protobuf(in)).Return(out, injectedErr).Times(1)

@xing-yang
Copy link
Collaborator

Also here:

$ git diff snapshotter_test.go
diff --git a/pkg/snapshotter/snapshotter_test.go b/pkg/snapshotter/snapshotter_test.go
index 148848ff..8d6c79ef 100644
--- a/pkg/snapshotter/snapshotter_test.go
+++ b/pkg/snapshotter/snapshotter_test.go
@@ -25,6 +25,7 @@ import (

        "github.com/container-storage-interface/spec/lib/go/csi"
        "github.com/golang/mock/gomock"
+       "github.com/kubernetes-csi/csi-test/v5/utils"
        "github.com/kubernetes-csi/csi-lib-utils/connection"
        "github.com/kubernetes-csi/csi-lib-utils/metrics"
        "github.com/kubernetes-csi/csi-test/v5/driver"
@@ -210,7 +211,7 @@ func TestCreateSnapshot(t *testing.T) {
                // Setup expectation
                if in != nil {
                        identityServer.EXPECT().GetPluginInfo(gomock.Any(), gomock.Any()).Return(pluginInfoOutput, nil).Times(1)
-                       controllerServer.EXPECT().CreateSnapshot(gomock.Any(), in).Return(out, injectedErr).Times(1)
+                       controllerServer.EXPECT().CreateSnapshot(gomock.Any(), utils.Protobuf(in)).Return(out, injectedErr).Times(1)
                }

                s := NewSnapshotter(csiConn)
@@ -318,7 +319,7 @@ func TestDeleteSnapshot(t *testing.T) {

                // Setup expectation
                if in != nil {
-                       controllerServer.EXPECT().DeleteSnapshot(gomock.Any(), in).Return(out, injectedErr).Times(1)
+                       controllerServer.EXPECT().DeleteSnapshot(gomock.Any(), utils.Protobuf(in)).Return(out, injectedErr).Times(1)
                }

                s := NewSnapshotter(csiConn)
@@ -463,7 +464,7 @@ func TestGetSnapshotStatus(t *testing.T) {
                                Capabilities: controllerCapabilities,
                        }, nil).Times(1)
                        if test.listSnapshotsSupported {
-                               controllerServer.EXPECT().ListSnapshots(gomock.Any(), in).Return(out, injectedErr).Times(1)
+                               controllerServer.EXPECT().ListSnapshots(gomock.Any(), utils.Protobuf(in)).Return(out, injectedErr).Times(1)
                        }
                }

this commit updates csi spec version to
include latest changes for volume group
snapshot

Signed-off-by: yati1998 <ypadia@redhat.com>
@xing-yang
Copy link
Collaborator

/retest

@xing-yang xing-yang changed the title update csi spec Update CSI Spec Nov 5, 2024
@xing-yang
Copy link
Collaborator

/lgtm
/approve

Trivy failure is unrelated to this change.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 5, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xing-yang, yati1998

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 5, 2024
@k8s-ci-robot k8s-ci-robot merged commit 53f161f into kubernetes-csi:master Nov 5, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants