Page MenuHomePhabricator

GrowthExperiments: Remove the unused /suggestions/info REST endpoint
Closed, ResolvedPublic

Description

Summary

The REST endpoint /w/rest.php/growthexperiments/v0/suggestions/info, served by SuggestionsInfoHandler, has no consumers and should be removed. It was added in March 2021 (T276795, T278413) to feed a public monitoring dashboard tracked in T249987: Scale: GrowthExperiments wiki monitoring dashboard, which was declined and never built.

Technical notes

Evidence that nothing consumes it: a repo-wide grep finds no callers (the only references are the route registration itself and its two i18n messages), a WMF-wide codesearch for the path returns only the route definition, and a wmf.webrequest query over the recent retention window shows no traffic to the path, with a control query against /user-impact/ confirming the query would have found traffic if any existed. Note the ~90-day webrequest retention means this rules out current use, not use at some point since 2021.

Both i18n messages are marked {{Experimental}} in qqq, so the endpoint carries no stability guarantee and does not need a deprecation cycle. The route was never given its own entry in the REST gateway route config added under T400132, so removal needs no coordination outside this repo.

The removal touches four files: delete includes/Rest/Handler/SuggestionsInfoHandler.php, drop the /suggestions/info block from includes/Rest/growthexperiments.v0.json, and remove rest-endpoint-desc-get-growthexperiments-suggestions-info and rest-endpoint-summ-get-growthexperiments-suggestions-info from i18n/Rest/en.json and i18n/Rest/qqq.json. No autoload change is needed (PSR-4).

Nothing else is removed. GrowthExperimentsSuggestionsInfo (CachedSuggestionsInfo wrapping SuggestionsInfo) still backs Special:NewcomerTasksInfo and HomepageHooks, and the Grafana metrics come from listTaskCounts --statsd, which never touched this endpoint. As a side effect the handler's redundant second WANObjectCache layer goes away — it duplicated CachedSuggestionsInfo under a different key and was never invalidated by getInfo( [ 'resetCache' => true ] ), so the endpoint could serve data up to an hour staler than Special:NewcomerTasksInfo.

Acceptance criteria

  • SuggestionsInfoHandler, its route entry, and its two i18n messages are removed.
  • Special:NewcomerTasksInfo and the listTaskCounts Grafana metrics still work.
  • The i18n banana checker and core's RestStructureTest pass.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Urbanecm_WMF triaged this task as Low priority.
Urbanecm_WMF moved this task from Inbox to Triaged on the Growth-Team board.

I noticed this while looking at T392944, and I noticed CachedSuggestionsInfo is double cached. Instead of just removing the double caching, I vote for removing the full endpoint, as it has no consumer.

Change #1343052 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] Rest: Remove the unused /suggestions/info endpoint

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

Change #1343052 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Rest: Remove the unused /suggestions/info endpoint

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