← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:remove-separate-long-descriptions-flag into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:remove-separate-long-descriptions-flag into launchpad:master.

Commit message:
Remove soyuz.ppa.separate_long_description feature rule

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

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

It's been enabled on all our environments for some time.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:remove-separate-long-descriptions-flag into launchpad:master.
diff --git a/lib/lp/archivepublisher/ddtp_tarball.py b/lib/lp/archivepublisher/ddtp_tarball.py
index eea7678..76b935e 100644
--- a/lib/lp/archivepublisher/ddtp_tarball.py
+++ b/lib/lp/archivepublisher/ddtp_tarball.py
@@ -21,7 +21,6 @@ from zope.component import getUtility
 from lp.archivepublisher.config import getPubConfig
 from lp.archivepublisher.customupload import CustomUpload
 from lp.registry.interfaces.distroseries import IDistroSeriesSet
-from lp.services.features import getFeatureFlag
 from lp.soyuz.enums import ArchivePurpose
 
 
@@ -107,10 +106,7 @@ class DdtpTarballUpload(CustomUpload):
                     return False
             else:
                 # See Publisher._writeComponentIndexes.
-                if (
-                    not self.distro_series.include_long_descriptions
-                    and getFeatureFlag("soyuz.ppa.separate_long_descriptions")
-                ):
+                if not self.distro_series.include_long_descriptions:
                     return False
         return True
 
diff --git a/lib/lp/archivepublisher/publishing.py b/lib/lp/archivepublisher/publishing.py
index 02da70f..87a78b9 100644
--- a/lib/lp/archivepublisher/publishing.py
+++ b/lib/lp/archivepublisher/publishing.py
@@ -49,7 +49,6 @@ from lp.registry.model.distroseries import DistroSeries
 from lp.services.database.bulk import load
 from lp.services.database.constants import UTC_NOW
 from lp.services.database.interfaces import IStore
-from lp.services.features import getFeatureFlag
 from lp.services.helpers import filenameToContentType
 from lp.services.librarian.client import LibrarianClient
 from lp.services.osutils import ensure_directory_exists, open_for_writing
@@ -1020,13 +1019,10 @@ class Publisher:
 
         separate_long_descriptions = False
         # Must match DdtpTarballUpload.shouldInstall.
-        if not distroseries.include_long_descriptions and getFeatureFlag(
-            "soyuz.ppa.separate_long_descriptions"
-        ):
-            # If include_long_descriptions is False and the feature flag is
-            # enabled, create a Translation-en file.
-            # build_binary_stanza_fields will also omit long descriptions
-            # from the Packages.
+        if not distroseries.include_long_descriptions:
+            # If include_long_descriptions is False, create a Translation-en
+            # file.  build_binary_stanza_fields will also omit long
+            # descriptions from the Packages.
             separate_long_descriptions = True
             packages = set()
             translation_en = RepositoryIndexFile(
diff --git a/lib/lp/archivepublisher/tests/test_ddtp_tarball.py b/lib/lp/archivepublisher/tests/test_ddtp_tarball.py
index 5cdc793..873d22f 100644
--- a/lib/lp/archivepublisher/tests/test_ddtp_tarball.py
+++ b/lib/lp/archivepublisher/tests/test_ddtp_tarball.py
@@ -14,7 +14,6 @@ from zope.component import getUtility
 from lp.archivepublisher.config import getPubConfig
 from lp.archivepublisher.ddtp_tarball import DdtpTarballUpload
 from lp.archivepublisher.interfaces.publisherconfig import IPublisherConfigSet
-from lp.services.features.testing import FeatureFixture
 from lp.services.tarfile_helpers import LaunchpadWriteTarFile
 from lp.soyuz.enums import ArchivePurpose
 from lp.testing import TestCaseWithFactory
@@ -130,13 +129,6 @@ class TestDdtpTarball(TestCaseWithFactory):
         self.archive = self.factory.makeArchive(
             distribution=self.distro, purpose=ArchivePurpose.PPA
         )
-        self.useFixture(
-            FeatureFixture(
-                {
-                    "soyuz.ppa.separate_long_descriptions": "on",
-                }
-            )
-        )
         self.distroseries.include_long_descriptions = False
         self.openArchive("20060728")
         en_names = ("Translation-en", "Translation-en.xz")
diff --git a/lib/lp/archivepublisher/tests/test_publisher.py b/lib/lp/archivepublisher/tests/test_publisher.py
index 0389130..084f53a 100644
--- a/lib/lp/archivepublisher/tests/test_publisher.py
+++ b/lib/lp/archivepublisher/tests/test_publisher.py
@@ -75,8 +75,6 @@ from lp.registry.interfaces.series import SeriesStatus
 from lp.services.config import config
 from lp.services.database.constants import UTC_NOW
 from lp.services.database.sqlbase import flush_database_caches
-from lp.services.features import getFeatureFlag
-from lp.services.features.testing import FeatureFixture
 from lp.services.gpg.interfaces import IGPGHandler
 from lp.services.log.logger import BufferLogger, DevNullLogger
 from lp.services.osutils import open_for_writing
@@ -1552,7 +1550,6 @@ class TestPublisher(TestPublisherBase):
     def setupPPAArchiveIndexTest(
         self,
         long_descriptions=True,
-        feature_flag=False,
         index_compressors=None,
     ):
         # Setup for testPPAArchiveIndex tests
@@ -1594,18 +1591,6 @@ class TestPublisher(TestPublisherBase):
             format=BinaryPackageFormat.UDEB,
         )[0]
 
-        if feature_flag:
-            # Enabled corresponding feature flag.
-            self.useFixture(
-                FeatureFixture(
-                    {"soyuz.ppa.separate_long_descriptions": "enabled"}
-                )
-            )
-            self.assertEqual(
-                "enabled",
-                getFeatureFlag("soyuz.ppa.separate_long_descriptions"),
-            )
-
         ds = self.ubuntutest.getSeries("breezy-autotest")
         if not long_descriptions:
             # Make sure that NMAF generates i18n/Translation-en* files.
@@ -1767,41 +1752,11 @@ class TestPublisher(TestPublisherBase):
         # remove PPA root
         shutil.rmtree(config.personalpackagearchive.root)
 
-    def testPPAArchiveIndexLongDescriptionsFalseFeatureFlagDisabled(self):
-        # Building Archive Indexes from PPA publications with
-        # include_long_descriptions = False but the feature flag being disabled
-        archive_publisher = self.setupPPAArchiveIndexTest(
-            long_descriptions=False
-        )
-
-        # Confirm that i18n files are not created
-        i18n_path = os.path.join(
-            archive_publisher._config.distsroot,
-            "breezy-autotest",
-            "main",
-            "i18n",
-        )
-        self.assertFalse(
-            os.path.exists(os.path.join(i18n_path, "Translation-en"))
-        )
-        self.assertFalse(
-            os.path.exists(os.path.join(i18n_path, "Translation-en.gz"))
-        )
-        self.assertFalse(
-            os.path.exists(os.path.join(i18n_path, "Translation-en.bz2"))
-        )
-        self.assertFalse(
-            os.path.exists(os.path.join(i18n_path, "Translation-en.xz"))
-        )
-
-        # remove PPA root
-        shutil.rmtree(config.personalpackagearchive.root)
-
     def testPPAArchiveIndexLongDescriptionsFalse(self):
         # Building Archive Indexes from PPA publications with
         # include_long_descriptions = False.
         archive_publisher = self.setupPPAArchiveIndexTest(
-            long_descriptions=False, feature_flag=True
+            long_descriptions=False
         )
 
         # Various compressed Sources files are written; ensure that they are
@@ -1982,7 +1937,6 @@ class TestPublisher(TestPublisherBase):
         # Archive index generation honours DistroSeries.index_compressors.
         archive_publisher = self.setupPPAArchiveIndexTest(
             long_descriptions=False,
-            feature_flag=True,
             index_compressors=[
                 IndexCompressionType.UNCOMPRESSED,
                 IndexCompressionType.XZ,
diff --git a/lib/lp/services/features/flags.py b/lib/lp/services/features/flags.py
index 27d660c..5eebeae 100644
--- a/lib/lp/services/features/flags.py
+++ b/lib/lp/services/features/flags.py
@@ -269,14 +269,6 @@ flag_info = sorted(
             "",
         ),
         (
-            "soyuz.ppa.separate_long_descriptions",
-            "boolean",
-            "If true, PPAs will create an i18n/Translations-en file",
-            "disabled",
-            "PPA Separate Long Descriptions",
-            "",
-        ),
-        (
             "soyuz.named_auth_token.allow_new",
             "boolean",
             "If true, allow creation of named authorization tokens for "