launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #18531
[Merge] lp:~wgrant/launchpad/bigger-p3as into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/bigger-p3as into lp:launchpad.
Commit message:
Default P3A quotas to 20GiB rather than 2GiB, since they're slightly more trustworthy.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/bigger-p3as/+merge/258833
Default P3A quotas to 20GiB rather than 2GiB, since they're slightly more trustworthy.
We probably want a per-person configurable default eventually, but this is a sensible default that covers most commercial cases for now.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/bigger-p3as into lp:launchpad.
=== modified file 'lib/lp/soyuz/model/archive.py'
--- lib/lp/soyuz/model/archive.py 2015-04-13 17:14:00 +0000
+++ lib/lp/soyuz/model/archive.py 2015-05-12 06:14:50 +0000
@@ -301,8 +301,7 @@
permit_obsolete_series_uploads = BoolCol(
dbName='permit_obsolete_series_uploads', default=False)
- authorized_size = IntCol(
- dbName='authorized_size', notNull=False, default=2048)
+ authorized_size = IntCol(dbName='authorized_size', notNull=False)
sources_cached = IntCol(
dbName='sources_cached', notNull=False, default=0)
@@ -2425,6 +2424,10 @@
else:
new_archive.private = private
+ if new_archive.is_ppa:
+ new_archive.authorized_size = (
+ 20480 if new_archive.private else 2048)
+
new_archive.suppress_subscription_notifications = (
suppress_subscription_notifications)
=== modified file 'lib/lp/soyuz/tests/test_person_createppa.py'
--- lib/lp/soyuz/tests/test_person_createppa.py 2012-08-14 23:27:07 +0000
+++ lib/lp/soyuz/tests/test_person_createppa.py 2015-05-12 06:14:50 +0000
@@ -31,6 +31,7 @@
with person_logged_in(person):
ppa = person.createPPA()
self.assertEqual(ppa.name, 'ppa')
+ self.assertEqual(2048, ppa.authorized_size)
def test_private(self):
with celebrity_logged_in('commercial_admin') as person:
@@ -67,4 +68,5 @@
team_admin, team_owner, status=TeamMembershipStatus.ADMIN)
with person_logged_in(team_admin):
ppa = private_team.createPPA(private=True)
- self.assertEqual(True, ppa.private)
+ self.assertEqual(True, ppa.private)
+ self.assertEqual(20480, ppa.authorized_size)
Follow ups