libopenstorage / stork

Stork - Storage Orchestration Runtime for Kubernetes
Apache License 2.0
392 stars 89 forks source link

PWX-38559: clean errored out snapshot cr older than a certain time period #1839

Closed strivedi-px closed 2 months ago

strivedi-px commented 2 months ago

What type of PR is this?

bug-fix

What this PR does / why we need it: Addresses PWX-38559. Adds utility to clean up volumesnapshot CRs that are in Error state and are older than a certain cutoff time period.

Does this PR change a user-facing CRD or CLI?: No

Is a release note needed?: No

Does this change need to be cherry-picked to a release branch?: Yes, 24.3.1 I suppose.

Sample test run Screenshot from 2024-08-29 10-10-54

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 25.78616% with 118 lines in your changes missing coverage. Please review.

Please upload report for BASE (stork-24.3.1-fb@c118327). Learn more about missing BASE report.

Files with missing lines Patch % Lines
pkg/snapshot/controllers/snapshot.mock.go 19.82% 93 Missing :warning:
pkg/snapshot/controllers/snapshotschedule.go 41.86% 21 Missing and 4 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## stork-24.3.1-fb #1839 +/- ## ================================================== Coverage ? 32.66% ================================================== Files ? 60 Lines ? 13640 Branches ? 0 ================================================== Hits ? 4455 Misses ? 8781 Partials ? 404 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.