-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add a filter_by_type param for purge_old_bank_snapshots #31191
Add a filter_by_type param for purge_old_bank_snapshots #31191
Conversation
Debating if I should add test function for purge_old_bank_snapshots or it would be an overkill. |
Codecov Report
@@ Coverage Diff @@
## master #31191 +/- ##
=======================================
Coverage 81.5% 81.5%
=======================================
Files 729 729
Lines 206560 206580 +20
=======================================
+ Hits 168402 168441 +39
+ Misses 38158 38139 -19 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, with new public functions/functionality, can you ensure there is test coverage?
27dce4d
to
e47b196
Compare
Adding test_purge_old_bank_snapshots() |
Created a function create_snapshot_dirs_for_tests to refactor the common code for creating test snapshot dirs in any numbers of PRE or POST states. |
914ce95
to
877553a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 😻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - nice separating out the testing helper fn
Problem
In #30978, we need more refined control of the snapshot dir purging behavior.
Before booting, we want to purge all PRE snapshot dirs.
During run time, we should purge only the POST snapshot dirs, letting AHV to process PRE snapshot dirs into POST.
Summary of Changes
Add the filter_by_type param. Call purging by type.
Fixes #