Page MenuHomePhabricator

Section-level images: Set up beta cluster
Closed, ResolvedPublic

Description

See also:

Event Timeline

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

[operations/mediawiki-config@master] [beta] GrowthExperiments: Use ActionApiImageRecommendationApiHandler

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

Mentioned in SAL (#wikimedia-operations) [2023-05-24T12:47:22Z] <tgr_> running changeWikiConfig.php on Growth pilot wikis for T337348

Beta:

tgr@deployment-mwmaint02:~$ for WIKI in ar bn cs es; do mwscript GrowthExperiments:changeWikiConfig.php --wiki=${WIKI}wiki --json --page MediaWiki:NewcomerTasks.json --summary 'Prepare section image recommendations. This should have no visible effect (disabled via other means). [[phab:T337330]] [[phab:T321754]]' --create-only section-image-recommendation '{"type": "section-image-recommendation", "group": "medium", "maxTasksPerDay": 25}' ; done

Production (needed because of T337330):

tgr@mwmaint1002:~$ for WIKI in ar bn cs es fr; do mwscript GrowthExperiments:changeWikiConfig.php --wiki=${WIKI}wiki --json --page MediaWiki:NewcomerTasks.json --summary 'Prepare section image recommendations. This should have no visible effect (disabled via other means). [[phab:T337330]] [[phab:T321754]]' --create-only section-image-recommendation '{"type": "section-image-recommendation", "group": "medium", "maxTasksPerDay": 25}' ; done

Change 920283 merged by jenkins-bot:

[operations/mediawiki-config@master] [beta] GrowthExperiments: Use ActionApiImageRecommendationApiHandler

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

Beta:

tgr@deployment-mwmaint02:~$ for WIKI in ar bn cs es; do mwscript GrowthExperiments:changeWikiConfig.php --wiki=${WIKI}wiki --json --page MediaWiki:NewcomerTasks.json --summary 'Prepare section image recommendations. This should have no visible effect (disabled via other means). [[phab:T337330]] [[phab:T321754]]' --create-only section-image-recommendation '{"type": "section-image-recommendation", "group": "medium", "maxTasksPerDay": 25}' ; done

Production (needed because of T337330):

tgr@mwmaint1002:~$ for WIKI in ar bn cs es fr; do mwscript GrowthExperiments:changeWikiConfig.php --wiki=${WIKI}wiki --json --page MediaWiki:NewcomerTasks.json --summary 'Prepare section image recommendations. This should have no visible effect (disabled via other means). [[phab:T337330]] [[phab:T321754]]' --create-only section-image-recommendation '{"type": "section-image-recommendation", "group": "medium", "maxTasksPerDay": 25}' ; done

Also ran those on beta/prod enwiki, forgot that last time.

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

[operations/mediawiki-config@master] [beta] GrowthExperiments: Fix variable name

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

Change 924110 merged by jenkins-bot:

[operations/mediawiki-config@master] [beta] GrowthExperiments: Fix variable name

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

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

[operations/mediawiki-config@master] GrowthExperiments: Fix beta $wgGEImageRecommendationServiceUrl

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

Change 924111 merged by jenkins-bot:

[operations/mediawiki-config@master] [beta] GrowthExperiments: Fix beta $wgGEImageRecommendationServiceUrl

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

Add 500 test pages per wiki
for LANG in en ar bn cs es; do
    echo "$LANG>>>"
    # get list of pages with recommendations
    curl -s "https://${LANG}.wikipedia.org/w/api.php?action=query&format=json&export=1&generator=search&formatversion=2&gsrsearch=hasrecommendation%3Aimage_section&gsrlimit=500" > export.json
    cat export.json | jq --raw-output '.query.export' > export.xml
    cat export.json | jq --raw-output '.query.pages[].title' > pages-$LANG.txt
    # import pages
    mwscript importDump.php ${LANG}wiki --username-prefix prod --no-local-users --report 50 export.xml
    mwscript rebuildrecentchanges.php ${LANG}wiki
    mwscript initSiteStats.php ${LANG}wiki --update
    # update search index
    mwscript CirrusSearch:ForceSearchIndex.php ${LANG}wiki --namespace 0 --skipLinks --indexOnSkip
    mwscript CirrusSearch:ForceSearchIndex.php ${LANG}wiki --namespace 0 --skipParse
    mwscript GrowthExperiments:importOresTopics.php ${LANG}wiki --apiUrl="https://${LANG}.wikipedia.org/w/api.php" --wikiId=${LANG}wiki --pageList pages-$LANG.txt
    mwscript CirrusSearch:UpdateWeightedTags.php ${LANG}wiki --tagType=recommendation.image_section --page-list pages-$LANG.txt
done

#validate
for LANG in en ar bn cs es; do
    mwscript GrowthExperiments:listTaskCounts.php ${LANG}wiki --topictype ores --tasktype section-image-recommendation --output json | jq '.taskTypeCounts["section-image-recommendation"]'
done

Recommendations are set up on beta enwiki, arwiki, bnwiki, cswiki, eswiki. (There is no beta frwiki and setting it up didn't seem worth the effort.)

Users need to opt in with ge.utils.enableSectionImageRecommendations() right now, that will be fixed soon.

Note that beta enwiki has lots of false positives ("the section already has an image"). I think that's just due to content changing more quickly on production enwiki. Beta en is also quite slow, no idea about that.

Etonkovidova awarded a token.
Etonkovidova added a subscriber: Etonkovidova.

Section-level add image task is present in en, bn, es, cs, ar beta wikis - works as expected. Thanks, @Tgr!