← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~stevenk/launchpad/destroy-sharing_information-ff into lp:launchpad

 

Steve Kowalik has proposed merging lp:~stevenk/launchpad/destroy-sharing_information-ff into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #813145 in Launchpad itself: "Remove translations.sharing_information.enabled feature flag"
  https://bugs.launchpad.net/launchpad/+bug/813145

For more details, see:
https://code.launchpad.net/~stevenk/launchpad/destroy-sharing_information-ff/+merge/118303

Destroy the translations.sharing_information.enabled feature flag, it's fully enabled on production.
-- 
https://code.launchpad.net/~stevenk/launchpad/destroy-sharing_information-ff/+merge/118303
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/destroy-sharing_information-ff into lp:launchpad.
=== modified file 'lib/lp/services/features/flags.py'
--- lib/lp/services/features/flags.py	2012-07-31 00:08:37 +0000
+++ lib/lp/services/features/flags.py	2012-08-06 06:20:25 +0000
@@ -184,12 +184,6 @@
      '',
      '',
      ''),
-    ('translations.sharing_information.enabled',
-     'boolean',
-     'Enables display of sharing information on translation pages.',
-     '',
-     '',
-     ''),
     ('visible_render_time',
      'boolean',
      'Shows the server-side page render time in the login widget.',

=== modified file 'lib/lp/translations/browser/sourcepackage.py'
--- lib/lp/translations/browser/sourcepackage.py	2012-07-07 14:00:30 +0000
+++ lib/lp/translations/browser/sourcepackage.py	2012-08-06 06:20:25 +0000
@@ -12,13 +12,11 @@
 
 
 from lazr.restful.interfaces import IJSONRequestCache
-from zope.publisher.interfaces import NotFound
 
 from lp.app.enums import ServiceUsage
 from lp.registry.browser.productseries import ProductSeriesOverviewMenu
 from lp.registry.browser.sourcepackage import SourcePackageOverviewMenu
 from lp.registry.interfaces.sourcepackage import ISourcePackage
-from lp.services.features import getFeatureFlag
 from lp.services.webapp import (
     canonical_url,
     enabled_with_permission,
@@ -120,8 +118,6 @@
         return check_permission('launchpad.Edit', self.context.productseries)
 
     def initialize(self):
-        if not getFeatureFlag('translations.sharing_information.enabled'):
-            raise NotFound(self.context, '+sharing-details')
         super(SourcePackageTranslationSharingDetailsView, self).initialize()
         if self.is_configuration_complete and not self.is_sharing():
             self.request.response.addInfoNotification(

=== modified file 'lib/lp/translations/browser/tests/test_sharing_details.py'
--- lib/lp/translations/browser/tests/test_sharing_details.py	2012-07-07 14:00:30 +0000
+++ lib/lp/translations/browser/tests/test_sharing_details.py	2012-08-06 06:20:25 +0000
@@ -13,7 +13,6 @@
     )
 
 from lp.app.enums import ServiceUsage
-from lp.services.features.testing import FeatureFixture
 from lp.services.webapp import canonical_url
 from lp.services.webapp.servers import LaunchpadTestRequest
 from lp.testing import (
@@ -95,8 +94,6 @@
 
     def setUp(self):
         super(TestSourcePackageTranslationSharingDetailsView, self).setUp()
-        self.useFixture(FeatureFixture(
-            {'translations.sharing_information.enabled': 'on'}))
         distroseries = self.factory.makeUbuntuDistroSeries()
         self.sourcepackage = self.factory.makeSourcePackage(
             distroseries=distroseries)
@@ -707,11 +704,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestSourcePackageSharingDetailsPage, self).setUp()
-        self.useFixture(FeatureFixture(
-            {'translations.sharing_information.enabled': 'on'}))
-
     def _makeSourcePackage(self):
         """Make a source package in Ubuntu."""
         distroseries = self.factory.makeUbuntuDistroSeries()
@@ -1129,11 +1121,6 @@
 
     layer = DatabaseFunctionalLayer
 
-    def setUp(self):
-        super(TestTranslationSharingDetailsViewNotifications, self).setUp()
-        self.useFixture(FeatureFixture(
-            {'translations.sharing_information.enabled': 'on'}))
-
     def _getNotifications(self, view):
         notifications = view.request.response.notifications
         return [extract_text(notification.message)

=== modified file 'lib/lp/translations/browser/tests/test_sharing_information.py'
--- lib/lp/translations/browser/tests/test_sharing_information.py	2012-01-15 13:32:27 +0000
+++ lib/lp/translations/browser/tests/test_sharing_information.py	2012-08-06 06:20:25 +0000
@@ -81,8 +81,6 @@
     def _test_sharing_information(self, obj,
                                   id_under_test, expected_text,
                                   authorized=False):
-        self.useFixture(FeatureFixture(
-            {'translations.sharing_information.enabled': 'on'}))
         if authorized:
             user = self.getAuthorizedUser(obj)
         else:

=== modified file 'lib/lp/translations/stories/standalone/xx-potemplate-index.txt'
--- lib/lp/translations/stories/standalone/xx-potemplate-index.txt	2011-05-27 19:53:20 +0000
+++ lib/lp/translations/stories/standalone/xx-potemplate-index.txt	2012-08-06 06:20:25 +0000
@@ -69,11 +69,8 @@
 The template is sharing translations with the template of the same name in
 the Ubuntu source package. This information is displayed on the page.
 
-    >>> from lp.services.features.testing import FeatureFixture
-    >>> feature_flag = {'translations.sharing_information.enabled': 'on'}
-    >>> with FeatureFixture(feature_flag):
-    ...     anon_browser.open('http://translations.launchpad.dev/evolution'
-    ...         '/trunk/+pots/evolution-2.2')
+    >>> anon_browser.open('http://translations.launchpad.dev/evolution'
+    ...     '/trunk/+pots/evolution-2.2')
     >>> sharing_info = find_tag_by_id(
     ...     anon_browser.contents, 'sharing-information')
     >>> print extract_text(sharing_info)
@@ -87,9 +84,8 @@
 Likewise, the Ubuntu template gives information about how it is sharing
 translations with the upstream project.
 
-    >>> with FeatureFixture(feature_flag):
-    ...     anon_browser.open('http://translations.launchpad.dev/ubuntu'
-    ...         '/hoary/+source/evolution/+pots/evolution-2.2')
+    >>> anon_browser.open('http://translations.launchpad.dev/ubuntu'
+    ...     '/hoary/+source/evolution/+pots/evolution-2.2')
     >>> sharing_info = find_tag_by_id(
     ...     anon_browser.contents, 'sharing-information')
     >>> print extract_text(sharing_info)
@@ -103,9 +99,8 @@
 If the user has the right permissions, they are offered to edit the sharing
 information.
 
-    >>> with FeatureFixture(feature_flag):
-    ...     admin_browser.open('http://translations.launchpad.dev/evolution'
-    ...         '/trunk/+pots/evolution-2.2')
+    >>> admin_browser.open('http://translations.launchpad.dev/evolution'
+    ...     '/trunk/+pots/evolution-2.2')
     >>> sharing_details = find_tag_by_id(
     ...     admin_browser.contents, 'sharing-details')
     >>> print extract_text(sharing_details)

=== modified file 'lib/lp/translations/templates/pofile-translate.pt'
--- lib/lp/translations/templates/pofile-translate.pt	2012-02-01 15:31:32 +0000
+++ lib/lp/translations/templates/pofile-translate.pt	2012-08-06 06:20:25 +0000
@@ -59,7 +59,7 @@
         use-macro="context/@@+translations-macros/nav-pofile-subpages" />
 
       <!-- Sharing information -->
-      <div tal:condition="features/translations.sharing_information.enabled">
+      <div>
         <div id="sharing-information"
              tal:condition="view/is_sharing">
           <p tal:define="sharing_pofile view/sharing_pofile;

=== modified file 'lib/lp/translations/templates/potemplate-index.pt'
--- lib/lp/translations/templates/potemplate-index.pt	2012-03-02 16:17:46 +0000
+++ lib/lp/translations/templates/potemplate-index.pt	2012-08-06 06:20:25 +0000
@@ -47,8 +47,7 @@
               ">translation instructions</a>.
         </p>
       </div>
-      <div class="portlet" id="sharing-information"
-           tal:condition="features/translations.sharing_information.enabled">
+      <div class="portlet" id="sharing-information">
         <h3>Sharing Information</h3>
         <p tal:condition="not:view/is_sharing">
           This template is not sharing translations with

=== modified file 'lib/lp/translations/templates/productseries-translations.pt'
--- lib/lp/translations/templates/productseries-translations.pt	2012-01-09 13:43:37 +0000
+++ lib/lp/translations/templates/productseries-translations.pt	2012-08-06 06:20:25 +0000
@@ -75,8 +75,7 @@
                     ">translation instructions</a> first.
               </p>
             </div>
-            <div class="portlet" id="sharing-information"
-              tal:condition="features/translations.sharing_information.enabled">
+            <div class="portlet" id="sharing-information">
               <h3>Sharing Information</h3>
               <p tal:condition="not:view/is_sharing">
                 This project series is not sharing translations with

=== modified file 'lib/lp/translations/templates/sourcepackage-translations.pt'
--- lib/lp/translations/templates/sourcepackage-translations.pt	2011-03-04 16:35:24 +0000
+++ lib/lp/translations/templates/sourcepackage-translations.pt	2012-08-06 06:20:25 +0000
@@ -24,8 +24,7 @@
                  context/distroseries/distribution/@@+portlet-translation-groups-and-permission"/>
             </p>
           </div>
-          <div class="portlet" id="sharing-information"
-               tal:condition="features/translations.sharing_information.enabled">
+          <div class="portlet" id="sharing-information">
             <h3>Sharing Information</h3>
             <p tal:condition="not:view/is_sharing">
               This source package is not sharing translations with


Follow ups