Page MenuHomePhabricator

Add `wikitech-grep` to puppet
Closed, ResolvedPublic

Description

I made a local copy of Ori's mwgrep script and hacked it to search over most things on wikitech. Its really handy for looking for things that need to be renamed or specific bad advice on the wiki. It lives in /home/bd808/wikitech-grep on labcontrol1001 right now but it should be put into Puppet and provisioned in /usr/local/bin.

Event Timeline

Is Special:Search really not sufficient?

Is Special:Search really not sufficient?

In theory, [[https://www.mediawiki.org/wiki/Help:CirrusSearch#Regular_expression_searches|insource:]] and a list of namespaces could be used to do something similar. Done via the Action API it could probably get close to the ease and functionality of this small python wrapper around direct use of the backing Elasticsearch index. Would it somehow be better for me to rewrite the tool to work this way? It seems like a waste of time to me. Are you really asking if cli tools are useful at all and time should instead be spent on making on-wiki experiences better?

chasemp triaged this task as Medium priority.Jul 7 2017, 9:11 PM
chasemp subscribed.

I have greatly appreciated the ability to search this way, as we are reorganizing docs especially.

Change 363896 had a related patch set uploaded (by Rush; owner: cpettet):
[operations/puppet@production] openstack: add wikitech-grep as utility for adminscripts

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

Is Special:Search really not sufficient?

In theory, [[https://www.mediawiki.org/wiki/Help:CirrusSearch#Regular_expression_searches|insource:]] and a list of namespaces could be used to do something similar. Done via the Action API it could probably get close to the ease and functionality of this small python wrapper around direct use of the backing Elasticsearch index. Would it somehow be better for me to rewrite the tool to work this way? It seems like a waste of time to me.

Building tools and workflows that are exclusive to shell users make it significantly harder for others to get involved. I'm sure there are plenty of people without shell access who would like to help with "things that need to be renamed or specific bad advice on the wiki", however if the expected workflow is that a shell user has to do something first, we're making it harder for others to get involved.

Are you really asking if cli tools are useful at all and time should instead be spent on making on-wiki experiences better?

Specifically "cli tools that are only accessible to shell users" yes. I'm suggesting that dogfooding is important in this area. A tool usable by all tool labs users that did wikitech-grep would be pretty welcome I think.

A tool usable by all tool labs users that did wikitech-grep would be pretty welcome I think.

Agreed. We are waiting on hardware to make that happen in all honesty. It was in the Cloud-Services FY17/18 ask for a joint project with the Discovery folks to put a 4 node Elasticsearch cluster into our Data-Services products that would attempt to provide a real-time mirror of the production CirrusSearch data. Unfortunately that ask did not make the final cut for budget priorities. I'm hopeful that we can get in line for any hardware budget surplus in Q3 or Q4 (Jan 2018 - June 2018) and still get the project started. If not we will ask again in the FY18/19 budget.

@Legoktm 's objections about this being an admin only tool made me stop and think for awhile. I agree the further from the every-user experience any admin gets the more possibility for ignoring obvious issues. Alternatively, we don't deny ourselves other administrative tooling and have a lot of access and ability that the every-user doesn't. It's a bummer this falls into that category for now. The flip side for me is, this is a utility I have found useful that seems like it should be in Puppet if we are really going to use it. The alternative is to keep it totally off the radar and that seems even worse.

Change 363896 merged by Rush:
[operations/puppet@production] openstack: add wikitech-grep as utility for adminscripts

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

chasemp claimed this task.