launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #28626
[Merge] ~cjwatson/launchpad:revision-status-report-longer-retention into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:revision-status-report-longer-retention into launchpad:master.
Commit message:
Bump RevisionStatusReport retention period to 90 days
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/425194
Keeping artifacts around for a bit longer is useful when preparing publications to Artifactory, and we have plenty of librarian space these days.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:revision-status-report-longer-retention into launchpad:master.
diff --git a/lib/lp/scripts/garbo.py b/lib/lp/scripts/garbo.py
index 90736eb..b5120b4 100644
--- a/lib/lp/scripts/garbo.py
+++ b/lib/lp/scripts/garbo.py
@@ -1805,7 +1805,7 @@ class PopulateSnapBuildStoreRevision(TunableLoop):
class RevisionStatusReportPruner(BulkPruner):
"""Removes old revision status reports and their artifacts."""
- older_than = 30 # artifacts older than 30 days
+ older_than = 90 # artifacts older than 90 days
target_table_class = RevisionStatusArtifact
ids_to_prune_query = """
SELECT DISTINCT RevisionStatusArtifact.id
diff --git a/lib/lp/scripts/tests/test_garbo.py b/lib/lp/scripts/tests/test_garbo.py
index 1a26ca7..65b908c 100644
--- a/lib/lp/scripts/tests/test_garbo.py
+++ b/lib/lp/scripts/tests/test_garbo.py
@@ -2091,15 +2091,15 @@ class TestGarbo(FakeAdapterMixin, TestCaseWithFactory):
self.assertEqual(build1._store_upload_revision, 1)
def test_RevisionStatusReportPruner(self):
- # Artifacts for report1 are older than 30 days
+ # Artifacts for report1 are older than 90 days
# and we expect the garbo job to delete them.
- # Artifacts for report2 are newer then 30 days and
+ # Artifacts for report2 are newer than 90 days and
# we expect them to survive the garbo job.
switch_dbuser('testadmin')
now = datetime.now(UTC)
report1 = removeSecurityProxy(self.factory.makeRevisionStatusReport())
report2 = self.factory.makeRevisionStatusReport()
- report1.date_created = now - timedelta(days=60)
+ report1.date_created = now - timedelta(days=120)
repo1 = report1.git_repository
repo2 = report2.git_repository
artifact1_1 = self.factory.makeRevisionStatusArtifact(