Last modified: 2013-07-26 10:23:02 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T47786, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45786 - search: craft a fake InitialiseSettings.php for lucene-search-2
search: craft a fake InitialiseSettings.php for lucene-search-2
Status: RESOLVED WONTFIX
Product: Wikimedia Labs
Classification: Unclassified
deployment-prep (beta) (Other open bugs)
unspecified
All All
: Normal enhancement
: ---
Assigned To: Antoine "hashar" Musso (WMF)
:
Depends on:
Blocks: 34250
  Show dependency treegraph
 
Reported: 2013-03-06 17:38 UTC by Antoine "hashar" Musso (WMF)
Modified: 2013-07-26 10:23 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Antoine "hashar" Musso (WMF) 2013-03-06 17:38:35 UTC
lucene-search-2 parse the production InitialiseSettings.php file to extract several settings arrays such as $wgCanonicalServer.  On beta, the settings are overridden by InitiaseSettings-labs.php which is unknown to lucene-search-2.

We could adapt the Java code base to recognize the -labs file, but it seems to be easier to write a tiny script that will read both files and craft a new one for lucene-search-2 consumption.
Comment 1 Antoine "hashar" Musso (WMF) 2013-03-06 17:46:10 UTC
In operations/debs/lucene-search-2 look for src/org/wikimedia/lsearch/util/PHPParser.java which has a list of accessor looking for some specific variables. Among them:

- wgLanguageCode
- wgCanonicalServer
- wgMetaNamespace
- wgMetaNamespaceTalk
- wgNamespacesToBeSearchedDefault
- wgNamespacesWithSubpages
- wgExtraNamespaces
- wgContentNamespaces

The one we care about is getServer() which is based on wgCanonicalServer.
Comment 2 Antoine "hashar" Musso (WMF) 2013-03-06 23:39:36 UTC
Some progress with patchsets 14 and 15 of Gerrit change #51677

I have made the puppet class to copy the InitialiseSettings-labs.php and have lsearch to load a configuration file named  /a/search/conf/mw-beta-context.php 

I have hacked it manually on the instance, that let us have lsearch query OAI update on beta labs. Will have to figure out how to generate that file automatically after the conf has been synchronized.
Comment 3 Antoine "hashar" Musso (WMF) 2013-04-15 20:30:35 UTC
We agreed with Ram that supporting beta configuration files should not be done in lucene-search-2 since that will slow him down on other projects.  I got a lame script handling the merge of the production and labs configuration files.  Need to Puppetize it though.
Comment 4 Antoine "hashar" Musso (WMF) 2013-07-26 10:23:02 UTC
There is a hack in place which is good enough for now.   The lucene-search is going to be phased out in favor of CirrusSearch extension with a SOLR or ElasticSearch backend.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links