launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #12111
[Merge] lp:~wgrant/python-oops-tools/bug-1050722 into lp:python-oops-tools
William Grant has proposed merging lp:~wgrant/python-oops-tools/bug-1050722 into lp:python-oops-tools.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1050722 in python-oops-tools: "prune only searches for OOPS references up to prune_until"
https://bugs.launchpad.net/python-oops-tools/+bug/1050722
For more details, see:
https://code.launchpad.net/~wgrant/python-oops-tools/bug-1050722/+merge/124852
oops_datedir_repo.prune and oopstools.scripts.prune have faulty reference finding logic. They only search for references up to the pruning threshold (usually a week ago), so OOPSes tend to only get kept if they're referenced within about 24 hours. The fix is trivial: just continue looking up until the current timestamp.
--
https://code.launchpad.net/~wgrant/python-oops-tools/bug-1050722/+merge/124852
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/python-oops-tools/bug-1050722 into lp:python-oops-tools.
=== modified file 'src/oopstools/NEWS.txt'
--- src/oopstools/NEWS.txt 2012-09-11 09:18:49 +0000
+++ src/oopstools/NEWS.txt 2012-09-18 07:47:23 +0000
@@ -5,6 +5,11 @@
NEXT
====
+* When pruning, look for OOPS references up to now rather than up to
+ prune_until. Otherwise we miss any references created in the last
+ week, probably only finding references within 24 hours of the OOPS
+ occurring. (William Grant, #1050722)
+
0.6.3
=====
=== modified file 'src/oopstools/scripts/prune.py'
--- src/oopstools/scripts/prune.py 2011-11-21 04:12:51 +0000
+++ src/oopstools/scripts/prune.py 2012-09-18 07:47:23 +0000
@@ -114,7 +114,8 @@
# The tracker finds all the references for the selected dates.
finder = tracker(options)
references = finder.find_oops_references(
- prune_from, prune_until, options.project, options.projectgroup)
+ prune_from, datetime.datetime.now(utc), options.project,
+ options.projectgroup)
# Then we can delete the unreferenced oopses.
PruneInfo.prune_unreferenced(prune_from, prune_until, references)
# And finally save the fact we have scanned up to the selected date.