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.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | MMiller_WMF | T227728 [EPIC] Growth: Newcomer tasks 1.0 | |||
Resolved | kostajh | T235717 Newcomer tasks: non-HTTP-based ConfigurationLoader and TaskSuggester |
Event Timeline
Change 541404 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/extensions/GrowthExperiments@master] [WIP] Add LocalSearchEditSuggester
This was split out from T234426: Newcomer tasks: GrowthExperiments API for template tasks as a not strictly essential part.
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 .)
Change 554030 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Implement local configuration loader
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
Change 554069 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Implement local search task suggester
Change 554030 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Implement local configuration loader
Change 554039 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Ensure task types can be loaded before rendering suggested edits
Change 554069 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Implement local search task suggester
@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
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
Change 541404 abandoned by Kosta Harlan:
[WIP] Add LocalSearchEditSuggester
Reason:
Superseded by already merged code
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
Change 555932 abandoned by Kosta Harlan:
GrowthExperiments: Switch beta labs wikis to use local search/config
Reason:
Abandoned in favor of I7445d991422480b08b2f024def4cf3e06fad70e3
Change 556334 merged by jenkins-bot:
[operations/mediawiki-config@master] GrowthExperiments: Switch beta labs wikis to use local search/config
Change 555928 merged by jenkins-bot:
[operations/mediawiki-config@master] GrowthExperiments: Configure testwiki to use local search & config
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)
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
Change 561927 merged by jenkins-bot:
[operations/mediawiki-config@master] GrowthExperiments: use local search in production
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.