kubernetes-csi / csi-test

CSI test frameworks
Apache License 2.0
158 stars 147 forks source link

Updated to CSI v1.10.0 and add support for the SnapshotMetadata service. #545

Closed carlbraganza closed 3 months ago

carlbraganza commented 3 months ago

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change /kind bug /kind cleanup /kind design /kind documentation /kind failing-test

/kind feature

/kind flake

What this PR does / why we need it:

This PR updates CSI to the v1.10.0 release and adds support for the new SnapshotMetadata service.

Which issue(s) this PR fixes:

Fixes Provide mocks for the SnapshotMetadata service

Special notes for your reviewer:

This PR does the following:

Does this PR introduce a user-facing change?:

Added mock interfaces for the `SnapshotMetadata` service introduced in CSI v1.10.0.
Added a `csi.SnapshotMetadataServer` interface to `CSIDriver` and `CSIDriverController`.
carlbraganza commented 3 months ago

Steps taken to update to CSI v1.10.0:

  1. Updated github.com/container-storage-interface/spec version in go.mod.
  2. Ran go mod tidy
  3. Ran go mod vendor
  4. Installed mockgen to my PATH with go install github.com/golang/mock/mockgen@v1.6.0
  5. Ran go generate in the driver directory.
  6. Applied the fix from https://github.com/kubernetes-csi/csi-test/pull/519 (added csi.Unsafe*** interfaces where necessary in driver and test).

Then I added the SnapshotMetadata interface to the following files in driver:

jsafrane commented 3 months ago

/lgtm /approve

jsafrane commented 3 months ago

thanks a lot!

k8s-ci-robot commented 3 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: carlbraganza, jsafrane

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: - ~~[OWNERS](https://github.com/kubernetes-csi/csi-test/blob/master/OWNERS)~~ [jsafrane] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment