Page MenuHomePhabricator

Make it possible to load the CirrusSearch configuration of another wiki in production
Closed, ResolvedPublic

Description

The work done in core to move globals behind a config object is the first step in being able to access the configuration of another wiki. We need to take this to the next step and actually read in the cirrussearch configuration of another wiki.

Ideally this should work both in wmf prod and in mediawiki-vagrant. This is *NOT* currently supported and we will have to figure out how to make it work. Currently the result of running InitializeSettings.php is cached but these are just the $wmgCirrusSearch* variables and not the $wgCirrusSearch* variables that we want.

Event Timeline

EBernhardson raised the priority of this task from to Needs Triage.
EBernhardson updated the task description. (Show Details)

Have you seen MW core's SiteConfiguration::getConfig function? It relies on the --wiki parameter to maintenance/getConfiguration.php, not sure if that will work in mediawiki-vagrant or not.

I hadn't seen that SiteConfiguration implemented that, thanks @Krenair. I don't know if that is going to be a viable long term solution, but we can certainly use it for now in our initial testing and come back and do something nicer if it proves to be useful.

Change 233615 had a related patch set uploaded (by Smalyshev):
Convert Searcher to use config object

https://gerrit.wikimedia.org/r/233615

There is a patch here, but it's a work in progress and is not ready to be merged. Keeping this in the "In progress" column for now.

Smalyshev triaged this task as Medium priority.Sep 1 2015, 9:38 PM

Change 233615 merged by jenkins-bot:
Convert Searcher to use config object

https://gerrit.wikimedia.org/r/233615