Updated sidecar to not require VolumeSnapshotClass for snapshot deletion#287
Conversation
|
Hi @huffmanca. 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 Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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/test-infra repository. |
|
I'm submitting this as a WIP, as I can't get it to fully past the delete tests. There's an issue with the expected number of delete events on these tests, where we're expecting 0 events, and the array of events is nil. I haven't been able to trace why this is the cause. Would you have any thoughts? |
|
/ok-to-test |
|
@huffmanca I think it is because this PR allows snapshot to be deleted when snapshot class is not found. Check if those failed tests have a snapshot class that is not found. |
|
@xing-yang is it valid to delete volumesnapshot if subjected SC not found? at times, we may require some params or data from SC to perform delete operation, Isnt it ? |
Yes, it is valid to delete snapshot even when SC is already deleted. We only need to have secrets when deleting the snapshot which is already added as annotation to the content. |
|
@huffmanca can you rebase your PR and see if you still have the issue with unit tests? |
|
@huffmanca: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions 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/test-infra repository. I understand the commands that are listed here. |
There was a problem hiding this comment.
@huffmanca, I added comments to the unit tests. It should pass after you've addressed my comments.
|
I've updated the PR, and the tests pass after following your instructions. I also rebased this PR, as there's been some time since the initial submission. With that being said, I haven't been able to reproduce the issue in the sidecar, and I'm hesitant about merging it blindly. It seems identical to the fix in the snapshot-controller, which is why it's been submitted. |
|
@huffmanca It is a timing issue, so I think whether it happens depends on the environment. Your fix looks right to me. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: huffmanca, xing-yang The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Cherry pick of #287: Updated sidecar to not require VolumeSnapshotClass for snapshot deletion
b12e407cc Merge pull request kubernetes-csi#289 from nixpanic/k8s-v1.34 bbe5e547e Use Kubernetes v1.34 and Kind v0.30 by default 4e9eb2c9e Merge pull request kubernetes-csi#288 from gnufied/add-gnufied-for-csi-approver 064e260d9 Add myself as csi approver c852fa797 Merge pull request kubernetes-csi#287 from andyzhangx/patch-7 bce16c103 fix: upgrade to go1.24.11 to fix CVE-2025-61727 git-subtree-dir: release-tools git-subtree-split: b12e407cc9556acf6702ed8745d3f8a29c9169bb
What type of PR is this?
/kind flake
What this PR does / why we need it:
Allows the sidecar to delete VolumeSnapshots if the VolumeSnapshotClass has already been deleted. This PR is a followup to #275 for the sidecar.
Which issue(s) this PR fixes:
Fixes #264
Special notes for your reviewer:
Does this PR introduce a user-facing change?: