← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:bump-ppa-quota into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:bump-ppa-quota into launchpad:master.

Commit message:
Bump default public PPA quota to 8 GiB

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/433283

We have a good deal more storage available than we used to, and we get a lot of legitimate support requests from people finding that 2 GiB is insufficient for even relatively modest needs nowadays, so let's just increase the default quota.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:bump-ppa-quota into launchpad:master.
diff --git a/lib/lp/archiveuploader/tests/test_ppauploadprocessor.py b/lib/lp/archiveuploader/tests/test_ppauploadprocessor.py
index 5965539..33973aa 100644
--- a/lib/lp/archiveuploader/tests/test_ppauploadprocessor.py
+++ b/lib/lp/archiveuploader/tests/test_ppauploadprocessor.py
@@ -1317,9 +1317,9 @@ class TestPPAUploadProcessorQuotaChecks(TestPPAUploadProcessorBase):
         the size of the upload plus the current PPA size must be smaller
         than the PPA.authorized_size, otherwise the upload will be rejected.
         """
-        # Stuff 2048 MiB in name16 PPA, so anything will be above the
-        # default quota limit, 2048 MiB.
-        self._fillArchive(self.name16.archive, 2048 * (2**20))
+        # Stuff 8192 MiB in name16 PPA, so anything will be above the
+        # default quota limit, 8192 MiB.
+        self._fillArchive(self.name16.archive, 8192 * (2**20))
 
         upload_dir = self.queueUpload("bar_1.0-1", "~name16/ubuntu")
         upload_results = self.processUpload(self.uploadprocessor, upload_dir)
@@ -1333,7 +1333,7 @@ class TestPPAUploadProcessorQuotaChecks(TestPPAUploadProcessorBase):
             "Subject: [~name16/ubuntu/ppa] bar_1.0-1_source.changes "
             "(Rejected)",
             "Rejected:",
-            "PPA exceeded its size limit (2048.00 of 2048.00 MiB). "
+            "PPA exceeded its size limit (8192.00 of 8192.00 MiB). "
             "Ask a question in https://answers.launchpad.net/soyuz/ "
             "if you need more space.",
         ]
@@ -1358,9 +1358,9 @@ class TestPPAUploadProcessorQuotaChecks(TestPPAUploadProcessorBase):
         The system start warning users for uploads exceeding 95 % of
         the current size limit.
         """
-        # Stuff 1945 MiB into name16 PPA, approximately 95 % of
-        # the default quota limit, 2048 MiB.
-        self._fillArchive(self.name16.archive, 2000 * (2**20))
+        # Stuff 7800 MiB into name16 PPA, approximately 95 % of
+        # the default quota limit, 8192 MiB.
+        self._fillArchive(self.name16.archive, 7800 * (2**20))
 
         # Ensure the warning is sent in the acceptance notification.
         upload_dir = self.queueUpload("bar_1.0-1", "~name16/ubuntu")
@@ -1368,7 +1368,7 @@ class TestPPAUploadProcessorQuotaChecks(TestPPAUploadProcessorBase):
         contents = [
             "Subject: [~name16/ubuntu/ppa/breezy] bar 1.0-1 (Accepted)",
             "Upload Warnings:",
-            "PPA exceeded 95 % of its size limit (2000.00 of 2048.00 MiB). "
+            "PPA exceeded 95 % of its size limit (7800.00 of 8192.00 MiB). "
             "Ask a question in https://answers.launchpad.net/soyuz/ "
             "if you need more space.",
         ]
@@ -1402,9 +1402,9 @@ class TestPPAUploadProcessorQuotaChecks(TestPPAUploadProcessorBase):
         [build] = self.name16.archive.getBuildRecords(name="bar")
         self.options.context = "buildd"
 
-        # Stuff 2048 MiB in name16 PPA, so anything will be above the
-        # default quota limit, 2048 MiB.
-        self._fillArchive(self.name16.archive, 2048 * (2**20))
+        # Stuff 8192 MiB in name16 PPA, so anything will be above the
+        # default quota limit, 8192 MiB.
+        self._fillArchive(self.name16.archive, 8192 * (2**20))
 
         upload_dir = self.queueUpload("bar_1.0-1_binary", "~name16/ubuntu")
         self.processUpload(self.build_uploadprocessor, upload_dir, build=build)
diff --git a/lib/lp/soyuz/doc/archive.rst b/lib/lp/soyuz/doc/archive.rst
index 250cd26..870e9d9 100644
--- a/lib/lp/soyuz/doc/archive.rst
+++ b/lib/lp/soyuz/doc/archive.rst
@@ -1079,10 +1079,10 @@ PPAs are created with the name attribute set to 'ppa' by default.
     ppa
 
 We can take the opportunity to check if the default 'authorized_size'
-corresponds to what we state in our policy, 2048 MiB:
+corresponds to what we state in our policy, 8192 MiB:
 
     >>> name16.archive.authorized_size
-    2048
+    8192
 
 An archive is also associated with a distribution.  This can be found on
 the distribution property.  The default distribution is "ubuntu":
diff --git a/lib/lp/soyuz/model/archive.py b/lib/lp/soyuz/model/archive.py
index 61acec4..ec04a41 100644
--- a/lib/lp/soyuz/model/archive.py
+++ b/lib/lp/soyuz/model/archive.py
@@ -3418,7 +3418,7 @@ class ArchiveSet:
 
         if new_archive.is_ppa:
             new_archive.authorized_size = (
-                20480 if new_archive.private else 2048
+                20480 if new_archive.private else 8192
             )
 
         new_archive.suppress_subscription_notifications = (
diff --git a/lib/lp/soyuz/stories/webservice/xx-archive.rst b/lib/lp/soyuz/stories/webservice/xx-archive.rst
index 9ea0d65..dec06cd 100644
--- a/lib/lp/soyuz/stories/webservice/xx-archive.rst
+++ b/lib/lp/soyuz/stories/webservice/xx-archive.rst
@@ -1507,7 +1507,7 @@ the IArchive context, in this case only Celso has it.
     >>> pprint_entry(
     ...     cprov_webservice.get("/~cprov/+archive/ubuntu/p3a").jsonBody()
     ... )
-    authorized_size: 2048
+    authorized_size: 8192
     dependencies_collection_link:
         'http://.../~cprov/+archive/ubuntu/p3a/dependencies'
     description: 'packages to help my friends.'
diff --git a/lib/lp/soyuz/tests/test_person_createppa.py b/lib/lp/soyuz/tests/test_person_createppa.py
index abd6bb7..6253edb 100644
--- a/lib/lp/soyuz/tests/test_person_createppa.py
+++ b/lib/lp/soyuz/tests/test_person_createppa.py
@@ -29,7 +29,7 @@ class TestCreatePPA(TestCaseWithFactory):
         with person_logged_in(person):
             ppa = person.createPPA()
         self.assertEqual(ppa.name, "ppa")
-        self.assertEqual(2048, ppa.authorized_size)
+        self.assertEqual(8192, ppa.authorized_size)
 
     def test_private(self):
         with celebrity_logged_in("commercial_admin") as person: