-
-
Notifications
You must be signed in to change notification settings - Fork 0
schedule old production books to be deleted #149
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
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## cms-upgrade #149 +/- ##
===============================================
+ Coverage 77.05% 79.06% +2.00%
===============================================
Files 40 41 +1
Lines 1386 1533 +147
Branches 119 139 +20
===============================================
+ Hits 1068 1212 +144
- Misses 280 281 +1
- Partials 38 40 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
benoit74
left a comment
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.
Looks pretty good, I just think there is a bug in book sorting (unless I'm mistaken, but this is not tested so better to at least fix the test to cover it, probably fix the code). Situation to consider is that we could have multiple letters in the period, like 2021_01aa. And 2021_01a <2021_01b < 2021_01c < ... < 2021_01aa < 2021_01bg which is probably not what happens with the natural alphabetical sorting the code is using. Having two letters suffix is going to be extremely rare, but we need to take that into account. Sort expression which is already used in compute_target_filename is suffixes.sort(key=lambda s: (len(s), s))
|
I just noticed it looks like we should fix |
192f18b to
2ed78a3
Compare
benoit74
left a comment
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
11e2c0f to
f2d2fe9
Compare
Rationale
This PR enhances the
millto apply retention rules toprodtitles. It groups theprodtitles by flavour before applying the rules to determine which files to mark as deleted. Consequently, a new background task is added to theshuttlewhich actually deletes the files that have been marked for deletionChanages
deletion_dateto set the date the file should be deletedThis closes #141