← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:trim-config-schema into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:trim-config-schema into launchpad:master.

Commit message:
Remove various deprecated configuration items

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

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

Our production configs no longer set any of these.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:trim-config-schema into launchpad:master.
diff --git a/configs/development/launchpad-lazr.conf b/configs/development/launchpad-lazr.conf
index 9cd9897..c8ca016 100644
--- a/configs/development/launchpad-lazr.conf
+++ b/configs/development/launchpad-lazr.conf
@@ -94,7 +94,6 @@ public_https: False
 devmode: true
 enable_test_openid_provider: True
 test_openid_provider_store: /var/tmp/testopenid
-openid_canonical_root: https://testopenid.test/
 openid_provider_root: https://testopenid.test/
 ca_certificates_path: /etc/ssl/certs/ca-certificates.crt
 code_domain: code.launchpad.test
@@ -169,7 +168,6 @@ password: guest
 virtual_host: /
 
 [snappy]
-store_search_url: https://api.snapcraft.io/
 tools_source: deb http://ppa.launchpad.net/snappy-dev/snapcraft-daily/ubuntu %(series)s main
 
 [rosetta]
diff --git a/configs/testrunner/launchpad-lazr.conf b/configs/testrunner/launchpad-lazr.conf
index cad74b1..8c485dd 100644
--- a/configs/testrunner/launchpad-lazr.conf
+++ b/configs/testrunner/launchpad-lazr.conf
@@ -108,7 +108,6 @@ max_attachment_size: 1024
 geoip_database: lib/lp/services/geoip/tests/data/test.mmdb
 logparser_max_parsed_lines: 100000
 homepage_recent_posts_feed: http://launchpad.test:8093/blog-feed
-openid_canonical_root: http://testopenid.test/
 openid_provider_root: http://testopenid.test/
 openid_alternate_provider_roots: http://login1.test/, http://login2.test/
 
diff --git a/lib/lp/app/stories/basics/xx-opstats.rst b/lib/lp/app/stories/basics/xx-opstats.rst
index 1cdc685..3ddf507 100644
--- a/lib/lp/app/stories/basics/xx-opstats.rst
+++ b/lib/lp/app/stories/basics/xx-opstats.rst
@@ -350,7 +350,7 @@ to somewhere that doesn't exist.
     ...     rw_main_standby: dbname=nonexistent
     ...
     ...     [launchpad_session]
-    ...     dbname: nonexistent
+    ...     database: dbname=nonexistent
     ...     """
     >>> config.push("no_db", no_db_overrides)
 
diff --git a/lib/lp/services/config/schema-lazr.conf b/lib/lp/services/config/schema-lazr.conf
index ad45db9..82fdc73 100644
--- a/lib/lp/services/config/schema-lazr.conf
+++ b/lib/lp/services/config/schema-lazr.conf
@@ -351,13 +351,6 @@ spew: False
 # datatype: boolean
 launch: False
 
-# Obsolete URL prefix, formerly used for links to the Bazaar code browser
-# for public branches.  This can be removed once no production configs refer
-# to it.
-#
-# datatype: urlbase
-codebrowse_root: http://bazaar.launchpad.net/
-
 # The URL prefix for links to the Bazaar code browser.  Links are
 # formed by appending the branch's unique name to the root URL.
 #
@@ -988,10 +981,6 @@ lag_check_timeout: 250
 # datatype: boolean
 launch: True
 
-# This setting has been deprecated, and will be removed once it's no longer set
-# in production/staging instances.
-openid_canonical_root: none
-
 # URL to the OpenID provider to authenticate against.
 openid_provider_root: none
 
@@ -1243,14 +1232,6 @@ dbuser: session
 # datatype: string
 cookie: launchpad
 
-# These are unused as of July 2011. Remove when far flung config files
-# have had a chance to remove these entries.
-#
-# datatype: string
-dbhost: none
-# datatype: string
-dbname: session_prod
-
 
 [librarianlogparser]
 logs_root: /srv/launchpadlibrarian.net-logs
@@ -1899,9 +1880,6 @@ store_url: none
 # The store's upload URL endpoint.
 store_upload_url: none
 
-# The store's search URL endpoint.
-store_search_url: none
-
 # Base64-encoded NaCl private key for decrypting store upload tokens.
 # This should only be set in secret overlays on systems that need to perform
 # store uploads on behalf of users.
diff --git a/lib/lp/services/webapp/adapter.py b/lib/lp/services/webapp/adapter.py
index 39e1cb2..458d6e5 100644
--- a/lib/lp/services/webapp/adapter.py
+++ b/lib/lp/services/webapp/adapter.py
@@ -529,21 +529,9 @@ class LaunchpadSessionDatabase(Postgres):
     name = "session"
 
     def raw_connect(self):
-        if config.launchpad_session.database is not None:
-            dsn = ConnectionString(config.launchpad_session.database)
-            dsn.user = config.launchpad_session.dbuser
-            self._dsn = str(dsn)
-        else:
-            # This is fallback code for old config files. It can be
-            # removed when all live configs have been updated to use the
-            # 'database' setting instead of 'dbname' + 'dbhost' settings.
-            self._dsn = "dbname=%s user=%s" % (
-                config.launchpad_session.dbname,
-                config.launchpad_session.dbuser,
-            )
-            if config.launchpad_session.dbhost:
-                self._dsn += " host=%s" % config.launchpad_session.dbhost
-
+        dsn = ConnectionString(config.launchpad_session.database)
+        dsn.user = config.launchpad_session.dbuser
+        self._dsn = str(dsn)
         flags = _get_dirty_commit_flags()
         raw_connection = super().raw_connect()
         if hasattr(raw_connection, "auto_close"):
diff --git a/lib/lp/snappy/tests/test_snapstoreclient.py b/lib/lp/snappy/tests/test_snapstoreclient.py
index 960bafa..91dbf15 100644
--- a/lib/lp/snappy/tests/test_snapstoreclient.py
+++ b/lib/lp/snappy/tests/test_snapstoreclient.py
@@ -259,7 +259,6 @@ class TestSnapStoreClient(TestCaseWithFactory):
             "snappy",
             store_url="http://sca.example/";,
             store_upload_url="http://updown.example/";,
-            store_search_url="http://search.example/";,
         )
         self.pushConfig(
             "launchpad", openid_provider_root="http://sso.example/";