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

Check whether the action is a CSI action and whether CSI feature is #6968

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

blackpiglet
Copy link
Contributor

@blackpiglet blackpiglet commented Oct 17, 2023

enabled, before executing the action.

The DeleteItemAction is not checked, because the DIA doesn't have a method to get the action's plugin name.
This should be OK, because the CSI will check whether the VS and VSC have a backup name annotation. If the VS and VSC is not handled by the CSI plugin, then they don't have the annotation.

Thank you for contributing to Velero!

Please add a summary of your change

Does your change fix a particular issue?

Fixes #6585

Please indicate you've done the following:

  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Created a changelog file or added /kind changelog-not-required as a comment on this pull request.
  • Updated the corresponding documentation in site/content/docs/main.

@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

Merging #6968 (908e2c6) into main (5ff5073) will decrease coverage by 0.02%.
Report is 15 commits behind head on main.
The diff coverage is 13.33%.

@@            Coverage Diff             @@
##             main    #6968      +/-   ##
==========================================
- Coverage   61.03%   61.02%   -0.02%     
==========================================
  Files         251      252       +1     
  Lines       26837    26861      +24     
==========================================
+ Hits        16381    16392      +11     
- Misses       9303     9314      +11     
- Partials     1153     1155       +2     
Files Coverage Δ
internal/delete/delete_item_action_handler.go 71.79% <ø> (ø)
pkg/util/csi/util.go 100.00% <100.00%> (ø)
pkg/backup/item_backupper.go 69.15% <0.00%> (-0.55%) ⬇️
pkg/restore/restore.go 65.77% <0.00%> (-0.16%) ⬇️
pkg/cmd/server/server.go 22.03% <0.00%> (-0.15%) ⬇️

... and 4 files with indirect coverage changes

pkg/util/csi/util.go Outdated Show resolved Hide resolved
pkg/util/csi/util.go Outdated Show resolved Hide resolved
enabled, before executing the action.

The DeleteItemAction is not checked, because the DIA doesn't have a
method to get the action's plugin name.
This should be OK, because the CSI will check whether the VS and VSC
have a backup name annotation. If the VS and VSC is not handled by
the CSI plugin, then they don't have the annotation.

Signed-off-by: Xun Jiang <jxun@vmware.com>
@reasonerjt reasonerjt merged commit 941dd00 into vmware-tanzu:main Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSI plugin should not be called when CSI feature is not enabled
3 participants