Page MenuHomePhabricator

Ensure "Search request is longer than the maximum allowed length" errors from suggested edits are logged to GrowthExperiments logstash channel
Closed, ResolvedPublic

Description

Background

In T279646, da.wikipedia community added too many templates to newcomer tasks configuration (via MediaWiki:NewcomerTasks.json). That partially broke newcomer tasks, since it didn't suggest any task at all.

This throws "Search request is longer than the maximum allowed length" error when running xxx.php, but I can't find that error in logstash, see https://logstash.wikimedia.org/goto/8d861102be2e1c28beea30cb7cb42992.

Task objective

Log "Search request is longer than the maximum allowed length" errors to logstash, so we can monitor re-occurence of this type of errors.

Notes

This task will probably become void if T279722: Exempt keywords from query length restrictions is implemented.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I think this logging is broken:

[urbanecm@mwlog1001 /srv/mw-log/archive]$ grep -i 'Search error' GrowthExperiments.log-20210409
[urbanecm@mwlog1001 /srv/mw-log/archive]$ zgrep -i 'Search error' GrowthExperiments.log-20210*.gz
[urbanecm@mwlog1001 /srv/mw-log/archive]$ cd ..
[urbanecm@mwlog1001 /srv/mw-log]$ grep -i 'Searh error' GrowthExperiments.log
[urbanecm@mwlog1001 /srv/mw-log]$

There don't appear to be any matches for "search error" Thanks to T279646, there are supposed to be some matching entries for dawiki at least.

Logging probably doesn't work in maintenance scripts that exit with fatalError() (which is basically just die()).

Logging probably doesn't work in maintenance scripts that exit with fatalError() (which is basically just die()).

Isn't this supposed to be an error that happens when you load your homepage when the config file has too many templates? I just tried it on testwiki, and https://test.wikipedia.org/w/api.php?action=query&format=json&prop=info%7Crevisions%7Cpageimages&inprop=protection&rvprop=ids&piprop=name%7Coriginal%7Cthumbnail&pithumbsize=332&generator=growthtasks&ggtlimit=250&ggttasktypes=expand&formatversion=2&uselang=en returned:

{"error":{"code":"cirrussearch-query-too-long","info":"Search request is longer than the maximum allowed length. (Actual: 439; allowed: 300)","docref":"See https://test.wikipedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."},"servedby":"mw1412"}

IMO that should get logged, so we can see if similar error happens elsewhere (basically disabling our features).

Change 678294 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] Fix logging of decorated task suggester

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

Oops, looks like we broke logging at some point.

Change 678294 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Fix logging of decorated task suggester

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

Etonkovidova claimed this task.