Fix cleanup of nightly built ISO images
http://nightly.tails.boum.org/build_Tails_ISO_experimental/ and http://nightly.tails.boum.org/build_Tails_ISO_devel/ only have artifacts for the last few days. In case it matters, these branches didn’t build for a few days, so perhaps the script expects more files and was a little lost?
Blocks Tails -
#4 Updated by intrigeri 2014-10-13 05:00:49
I suspect the correct algorithm would:
- keep one ISO for each of the last 8 days => we always have the most recent ISO from last week
- keep one ISO per week over the last 5 weeks => we always have an ISO from ~ last month
But anyway, I’m pretty sure this is a classical problem, that has well-known good solutions.
#7 Updated by intrigeri 2015-05-09 02:16:49
- Target version changed from Tails_1.4 to Tails_1.4.1
Postponing. Note that we can’t postpone it once more, so if you doubt you can do it in time, please say so ASAP so we can reallocate this work without going crazy at the last minute.
The code lives as
files/jenkins/slave/iso_builder/clean_old_jenkins_artifacts.rb in the
tails Puppet module. Any of Python, Ruby or Modern Perl are acceptable languages, as long as the code is good and the dependencies in Wheezy + backports (we’ve not migrated our builders to Jessie yet).
#12 Updated by intrigeri 2015-06-11 20:49:07
- Status changed from Confirmed to In Progress
- Assignee changed from intrigeri to bertagaz
- % Done changed from 0 to 50
- Feature Branch set to puppet-tails:bugfix/6439-fix-cleanup-of-nightly-built-ISO-images
I’ve pushed something that seems to work on a local test data set. The algorithm may not be perfect yet, and I didn’t bother refactoring the whole thing, but it seems to be better (given how the current algorithm deletes most ISOs we would like to keep, it can’t be much worse anyway). Please review, and if happy merge and deploy!
#13 Updated by bertagaz 2015-06-17 05:28:44
- Assignee changed from bertagaz to intrigeri
- % Done changed from 50 to 80
I’ve tested it on a local dataset too. It seems to work well, and have a better retention strategy than the previous version for sure, congrats!
So I’ve merged, deployed it, and tested it live. So far the build goes fine, and it doesn’t seem to mess up with the artifacts.
If you believe this does close this ticket, please do. I’m not sure if we should wait some time now that the code is live to see how it behaves, even if I’m confident it works better.
#14 Updated by intrigeri 2015-06-18 03:01:36
- Status changed from In Progress to Resolved
- % Done changed from 80 to 100
> So I’ve merged, deployed it, and tested it live. So far the build goes fine, and it doesn’t seem to mess up with the artifacts.
> If you believe this does close this ticket, please do.
> I’m not sure if we should wait some time now that the code is live to see how it behaves, even if I’m confident it works better.
We can still reopen this ticket (or create a new, more specific, one) if needed.