velero
velero copied to clipboard
Add more nil pointer check for CSI related code in backup controller
Add some corner cases checking for CSI snapshot in backup controller.
Signed-off-by: Xun Jiang [email protected]
Thank you for contributing to Velero!
Please add a summary of your change
Does your change fix a particular issue?
Fixes https://github.com/vmware-tanzu/velero/issues/5207 Fixes https://github.com/vmware-tanzu/velero/issues/5244
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 Report
Merging #5388 (027cba1) into main (66f6365) will increase coverage by
0.20%
. The diff coverage is9.52%
.
@@ Coverage Diff @@
## main #5388 +/- ##
==========================================
+ Coverage 40.56% 40.76% +0.20%
==========================================
Files 236 238 +2
Lines 20385 20446 +61
==========================================
+ Hits 8269 8335 +66
+ Misses 11511 11500 -11
- Partials 605 611 +6
Impacted Files | Coverage Δ | |
---|---|---|
pkg/builder/volume_snapshot_builder.go | 0.00% <0.00%> (ø) |
|
pkg/builder/volume_snapshot_content_builder.go | 0.00% <0.00%> (ø) |
|
pkg/controller/backup_controller.go | 56.52% <42.85%> (+8.36%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
@blackpiglet Please combine all the nil-pointer checking in this PR and make sure this is cherry-picked to v1.9.3
Tried to add a UT case for function waitVolumeSnapshotReadyToUse
, but didn't make the VolumeSnapshot informer Lister work in UT, so modified according to Yonghui's suggestion. Will add the UT case later.