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

Only get VolumeSnapshotClass when DataUpload exists. #7974

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

blackpiglet
Copy link
Contributor

@blackpiglet blackpiglet commented Jul 3, 2024

Thank you for contributing to Velero!

Please add a summary of your change

Does your change fix a particular issue?

Fixes #7823

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.

Copy link

codecov bot commented Jul 3, 2024

Codecov Report

Attention: Patch coverage is 89.18919% with 8 lines in your changes missing coverage. Please review.

Project coverage is 59.09%. Comparing base (8fde4a0) to head (1d9fbcf).
Report is 36 commits behind head on main.

Files with missing lines Patch % Lines
internal/volume/volumes_information.go 89.18% 6 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7974      +/-   ##
==========================================
+ Coverage   59.02%   59.09%   +0.07%     
==========================================
  Files         364      364              
  Lines       30272    30340      +68     
==========================================
+ Hits        17867    17929      +62     
- Misses      10959    10968       +9     
+ Partials     1446     1443       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@blackpiglet blackpiglet requested a review from Lyndon-Li July 3, 2024 07:20
@sseago
Copy link
Collaborator

sseago commented Jul 3, 2024

Don't we also need VSClass for CSI snapshot backups without datamover?

@blackpiglet
Copy link
Contributor Author

Don't we also need VSClass for CSI snapshot backups without datamover?

Yes, but for the CSI plugin scenario, because the VolumeSnapshot-related CRs are persisted, so VolumeSnapshotClasses are already passed in by parameters.

func (v *BackupVolumesInformation) Result(
csiVolumeSnapshots []snapshotv1api.VolumeSnapshot,
csiVolumeSnapshotContents []snapshotv1api.VolumeSnapshotContent,
csiVolumesnapshotClasses []snapshotv1api.VolumeSnapshotClass,
crClient kbclient.Client,
logger logrus.FieldLogger,
) []*BackupVolumeInfo {
v.logger = logger
v.crClient = crClient
v.volumeSnapshots = csiVolumeSnapshots
v.volumeSnapshotContents = csiVolumeSnapshotContents
v.volumeSnapshotClasses = csiVolumesnapshotClasses
v.generateVolumeInfoForSkippedPV()
v.generateVolumeInfoForVeleroNativeSnapshot()
v.generateVolumeInfoForCSIVolumeSnapshot()
v.generateVolumeInfoFromPVB()
v.generateVolumeInfoFromDataUpload()
return v.volumeInfos

Lyndon-Li
Lyndon-Li previously approved these changes Jul 11, 2024
internal/volume/volumes_information.go Outdated Show resolved Hide resolved
internal/volume/volumes_information.go Outdated Show resolved Hide resolved
@blackpiglet
Copy link
Contributor Author

blackpiglet commented Aug 31, 2024

@kaovilai @shubham-pampattiwar
Modified according to comments. PTAL.

@blackpiglet blackpiglet merged commit e8632b2 into vmware-tanzu:main Sep 3, 2024
45 checks passed
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.

Velero backup gets partially failed when CSI is enabled but VolumeSnapshotClass CRD doesn't exist
5 participants