Merge ~lgp171188/launchpad:allow-setting-bing-custom-search-endpoint-launchpad-appserver-charm into launchpad:master

Proposed by Guruprasad
Status: Merged
Approved by: Guruprasad
Approved revision: 1a12c93b73729d9638de0e706c1c7b920e8d716b
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~lgp171188/launchpad:allow-setting-bing-custom-search-endpoint-launchpad-appserver-charm
Merge into: launchpad:master
Diff against target: 27 lines (+5/-0)
2 files modified
charm/launchpad-appserver/config.yaml (+4/-0)
charm/launchpad-appserver/templates/launchpad-appserver-lazr.conf (+1/-0)
Reviewer Review Type Date Requested Status
Clinton Fung Approve
Review via email: mp+464308@code.launchpad.net

Commit message

charm/launchpad-appserver: Make the bing custom search endpoint configurable

This allows us to update it without requiring any code changes to
Launchpad itself.

To post a comment you must log in.
Revision history for this message
Clinton Fung (clinton-fung) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/charm/launchpad-appserver/config.yaml b/charm/launchpad-appserver/config.yaml
2index 7db0b26..b82a3d1 100644
3--- a/charm/launchpad-appserver/config.yaml
4+++ b/charm/launchpad-appserver/config.yaml
5@@ -3,6 +3,10 @@ options:
6 type: string
7 description: Identifier for the Bing Custom Search instance.
8 default:
9+ bing_custom_search_endpoint:
10+ type: string
11+ description: The endpoint to send the Bing custom search requests to.
12+ default: "https://api.bing.microsoft.com/v7.0/custom/search"
13 bing_subscription_key:
14 type: string
15 description: >
16diff --git a/charm/launchpad-appserver/templates/launchpad-appserver-lazr.conf b/charm/launchpad-appserver/templates/launchpad-appserver-lazr.conf
17index 642d52e..5d10f6d 100644
18--- a/charm/launchpad-appserver/templates/launchpad-appserver-lazr.conf
19+++ b/charm/launchpad-appserver/templates/launchpad-appserver-lazr.conf
20@@ -12,6 +12,7 @@
21 extends: ../launchpad-db-lazr.conf
22
23 [bing]
24+site: {{ bing_custom_search_endpoint }}
25 {{- opt("custom_config_id", bing_custom_config_id) }}
26
27 [launchpad]

Subscribers

People subscribed via source and target branches

to status/vote changes: