There is an interest in providing an API to other clients (such as the apps) for getting image recommendations, regardless of whether the GrowthExperiments image recommendation feature is enabled. It would also be useful for our Beta cluster testing, via T335641: Use the prop=growthimagesuggestiondata API as an image recommendation source.
Description
Details
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Allow some interactions with disabled task types | mediawiki/extensions/GrowthExperiments | master | +93 -15 |
Related Objects
- Mentioned In
- T413370: image-suggestions service is intermittently unstable / timing out
T336419: Update Image Recommendations API or Growth Extension to allow Apps to deploy feature to more language wikis - Mentioned Here
- T335641: Use the prop=growthimagesuggestiondata API as an image recommendation source
Event Timeline
We don't have a way of disabling image recommendations for the frontend only, the way we do for link recommendations. If GENewcomerTasksImageRecommendationsEnabled is true, image recommendations show up in the task type selector. If it is false, the ConfigurationLoader doesn't return the image recommendation task type, even if it is defined in the JSON.
I can think of two ways to handle it:
- Add a GENewcomerTasksImageRecommendationsFrontendEnabled flag (or maybe generalize this to a way to enable / disable the frontend for any task type separately). Audit the current usage of GENewcomerTasksImageRecommendationsEnabled and replace some of it with the new flag, so it prevents the submission handler from working but not the configuration loader, and that it prevents the frontend-disabled task type from showing up in the task type selector (via NewcomerTasksUserOptionsLookup / TaskTypesAbFilter, presumably).
- Replace the call to the configuration loader in ApiQueryImageSuggestionData with some hard-coded task types. The details of the tasktype objects don't really matter, only their ID is used. Fix AddImageSubmissionHandler::invalidateRecommendation() to receive the tasktype as an argument instead of calling the configuration loader - we probably need to do this anyway.
The first is the safe & clean option, the second is the quick & dirty one. Once one of those gets done, we can just add an image recommendation tasktype to the JSON of every wiki, and the API should work, I think.
Change 919812 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):
[mediawiki/extensions/GrowthExperiments@master] Allow some interactions with disabled task types
Change 919812 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Allow some interactions with disabled task types
@Etonkovidova Based on the Android release of the Image Recommendations feature I think we can safely mark this task as resolved: https://www.mediawiki.org/wiki/Wikimedia_Apps/Team/Android/Image_Recommendations
But feel free to reopen if you disagree.