Page MenuHomePhabricator

Newcomer tasks: non-HTTP-based ConfigurationLoader and TaskSuggester
Closed, ResolvedPublic

Description

Using internal services and DB is preferable to making HTTP calls to the wiki's own API. RemotePageConfigurationLoader and RemoteSearchTaskSuggester both do the latter; there should be a local version.

Event Timeline

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

Change 541404 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/extensions/GrowthExperiments@master] [WIP] Add LocalSearchEditSuggester

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

While at it, config validation should be split out of RemotePageConfigurationLoader; in part because of code sharing with LocalPageConfigurationLoader, but also to use it in EditFilter or some similar hook, to prevent config page edits which break the extension.
(Also, fix config validation to correctly handle the empty title issue mentioned at T237140: Newcomer tasks module setup is not complete for kowiki betalabs .)

Also, URLs have been added recently to the config; make sure those are safe.

Change 554030 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Implement local configuration loader

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

Change 554039 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Ensure task types can be loaded before rendering suggested edits

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

Change 554069 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Implement local search task suggester

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

Change 554030 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Implement local configuration loader

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

Change 554039 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Ensure task types can be loaded before rendering suggested edits

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

Change 554069 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Implement local search task suggester

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

kostajh added a subscriber: Etonkovidova.

@Etonkovidova we need to update one of the beta labs environments to use the local configuration + search. Maybe CS wiki? And we should probably switch Testwiki to use a local configuration and search as well.

@Etonkovidova we need to update one of the beta labs environments to use the local configuration + search. Maybe CS wiki? And we should probably switch Testwiki to use a local configuration and search as well.

@kostajh It seems that cswiki betalabs still has the issue that was fixed with https://gerrit.wikimedia.org/r/553175. At least the issue looks the same to me as what I reported in this comment - https://phabricator.wikimedia.org/T238178#5691682.

Change 555928 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[operations/mediawiki-config@master] GrowthExperiments: Configure testwiki to use local search & config

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

Change 555932 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[operations/mediawiki-config@master] GrowthExperiments: Switch beta labs wikis to use local search/config

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

Change 541404 abandoned by Kosta Harlan:
[WIP] Add LocalSearchEditSuggester

Reason:
Superseded by already merged code

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

Change 556334 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[operations/mediawiki-config@master] GrowthExperiments: Switch beta labs wikis to use local search/config

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

Change 555932 abandoned by Kosta Harlan:
GrowthExperiments: Switch beta labs wikis to use local search/config

Reason:
Abandoned in favor of I7445d991422480b08b2f024def4cf3e06fad70e3

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

Change 556334 merged by jenkins-bot:
[operations/mediawiki-config@master] GrowthExperiments: Switch beta labs wikis to use local search/config

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

Change 555928 merged by jenkins-bot:
[operations/mediawiki-config@master] GrowthExperiments: Configure testwiki to use local search & config

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

Mentioned in SAL (#wikimedia-operations) [2019-12-11T12:09:54Z] <urbanecm@deploy1001> Synchronized wmf-config/InitialiseSettings.php: SWAT: 7651c1a: GrowthExperiments: Configure testwiki to use local search & config (T235717) (duration: 01m 02s)

MediaWiki:NewcomerTasks.json is created for betalabs cswiki, kowiki, and arwiki.

Not really resolved though, production still uses HTTP for TaskSuggester. Or is there a separate task about that?

Change 561927 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[operations/mediawiki-config@master] GrowthExperiments: use local search in production

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

Change 561927 merged by jenkins-bot:
[operations/mediawiki-config@master] GrowthExperiments: use local search in production

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

Mentioned in SAL (#wikimedia-operations) [2020-01-07T00:45:31Z] <tgr@deploy1001> Synchronized wmf-config/InitialiseSettings-labs.php: SWAT: [[gerrit:561927|GrowthExperiments: use local search in production (T235717)]] (duration: 00m 58s)

Mentioned in SAL (#wikimedia-operations) [2020-01-07T00:46:40Z] <tgr@deploy1001> Synchronized wmf-config/InitialiseSettings.php: SWAT: [[gerrit:561927|GrowthExperiments: use local search in production (T235717)]] (duration: 00m 54s)

I would have expected this to speed up search, but there's basically no change (P10046). Granted, it is already fairly fast (<100ms) when called from within the cluster.

I would have expected this to speed up search, but there's basically no change (P10046). Granted, it is already fairly fast (<100ms) when called from within the cluster.

When I profiled the api.php request before this patch was SWAT'ed, about 300ms were spent on the HTTP loading of the config, so at least we've shaved off that much.