Page MenuHomePhabricator

Special:RecentChanges broken on Jenkins slaves
Closed, ResolvedPublic

Description

While running the first Selenium test for ORES (Gerrit, Jenkins, screenshot, mw-exception.log) @Etonkovidova and I have noticed that Special:RecentChanges is completely broken in CI.

2018-01-15 17:17:35 ci-jessie-wikimedia-940640 jenkins_u0_mw: [a69f5628272ccfee31582e49] /jenkins-mediawiki-core-qunit-selenium-jessie-13106/index.php?title=Special:RecentChanges   InvalidArgumentException from line 58 of /home/jenkins/workspace/mediawiki-core-qunit-selenium-jessie/src/extensions/ORES/includes/Storage/SqlModelLookup.php: No model available for [damaging]
#0 /home/jenkins/workspace/mediawiki-core-qunit-selenium-jessie/src/extensions/ORES/includes/ThresholdLookup.php(103): ORES\Storage\SqlModelLookup->getModelVersion(string)
#1 /home/jenkins/workspace/mediawiki-core-qunit-selenium-jessie/src/extensions/ORES/includes/ThresholdLookup.php(94): ORES\ThresholdLookup->fetchThresholdsFromCache(string)
#2 /home/jenkins/workspace/mediawiki-core-qunit-selenium-jessie/src/extensions/ORES/includes/ThresholdLookup.php(84): ORES\ThresholdLookup->fetchThresholds(string, boolean)
#3 /home/jenkins/workspace/mediawiki-core-qunit-selenium-jessie/src/extensions/ORES/includes/Hooks/ChangesListHooksHandler.php(65): ORES\ThresholdLookup->getThresholds(string)
#4 [internal function]: ORES\Hooks\ChangesListHooksHandler::onChangesListSpecialPageStructuredFilters(SpecialRecentChanges)
#5 /home/jenkins/workspace/mediawiki-core-qunit-selenium-jessie/src/includes/Hooks.php(177): call_user_func_array(string, array)
#6 /home/jenkins/workspace/mediawiki-core-qunit-selenium-jessie/src/includes/Hooks.php(205): Hooks::callHook(string, string, array, NULL)
#7 /home/jenkins/workspace/mediawiki-core-qunit-selenium-jessie/src/includes/specialpage/ChangesListSpecialPage.php(911): Hooks::run(string, array)
#8 /home/jenkins/workspace/mediawiki-core-qunit-selenium-jessie/src/includes/specials/SpecialRecentchanges.php(184): ChangesListSpecialPage->registerFilters()
#9 /home/jenkins/workspace/mediawiki-core-qunit-selenium-jessie/src/includes/specialpage/ChangesListSpecialPage.php(1052): SpecialRecentChanges->registerFilters()
#10 /home/jenkins/workspace/mediawiki-core-qunit-selenium-jessie/src/includes/specialpage/ChangesListSpecialPage.php(872): ChangesListSpecialPage->setup(NULL)
#11 /home/jenkins/workspace/mediawiki-core-qunit-selenium-jessie/src/includes/specialpage/ChangesListSpecialPage.php(558): ChangesListSpecialPage->getOptions()
#12 /home/jenkins/workspace/mediawiki-core-qunit-selenium-jessie/src/includes/specials/SpecialRecentchanges.php(166): ChangesListSpecialPage->execute(NULL)
#13 /home/jenkins/workspace/mediawiki-core-qunit-selenium-jessie/src/includes/specialpage/SpecialPage.php(522): SpecialRecentChanges->execute(NULL)
#14 /home/jenkins/workspace/mediawiki-core-qunit-selenium-jessie/src/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
#15 /home/jenkins/workspace/mediawiki-core-qunit-selenium-jessie/src/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)
#16 /home/jenkins/workspace/mediawiki-core-qunit-selenium-jessie/src/includes/MediaWiki.php(858): MediaWiki->performRequest()
#17 /home/jenkins/workspace/mediawiki-core-qunit-selenium-jessie/src/includes/MediaWiki.php(524): MediaWiki->main()
#18 /home/jenkins/workspace/mediawiki-core-qunit-selenium-jessie/src/index.php(42): MediaWiki->run()
#19 {main}

@hashar do you think the problem is in CI, or in ORES?

Details

Related Gerrit Patches:
mediawiki/extensions/ORES : masterDecorator to populate the model table if it's not there
mediawiki/extensions/ORES : masterDon't cache when sql model lookup returns empty

Event Timeline

Restricted Application added a project: Scoring-platform-team. · View Herald TranscriptJan 15 2018, 5:34 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I think I know what's going on here, When you install ORES extension the ores_model needs to be initialized, this process is rather automatic: Someone needs to make an edit, so the system can look up model name and versions from ores service. This won't be an issue in prod as when we enable it, immediately, someone somewhere makes an edit and the tables are filled (this automatic process is needed for updating the model version, not just initializing it, one stone, several birds). For this case, I'm pretty sure you need to make an edit before testing recent changes but I'm not sure if the service is properly set up for that, etc.

zeljkofilipin triaged this task as Low priority.

Special:RecentChanges is broken on a clean mediawiki-vagrant VM with the same error message. I'll test locally if creating an edit fixes the problem.

awight added a subscriber: awight.Jan 17 2018, 4:00 PM

I think E:ORES should handle the corner case more gracefully. Anyway, this is something we can log, then quietly disable the thresholds in S:RecentChanges.

Creating a page (via API) did not fix the problem (402863/5..6): log, screenshot.

zeljkofilipin removed zeljkofilipin as the assignee of this task.Jan 18 2018, 1:12 PM

I give this a try.

Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptJan 22 2018, 10:12 PM

Change 406039 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/ORES@master] Don't cache when sql model lookup returns empty

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

Change 406046 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/ORES@master] Decorator to populate the model table if it's not there

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

Change 406039 merged by jenkins-bot:
[mediawiki/extensions/ORES@master] Don't cache when sql model lookup returns empty

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

With the patches I made this now way more understandable now: https://integration.wikimedia.org/ci/job/mediawiki-core-qunit-selenium-jessie/13604/artifact/log/filters-are-present.png
I think fixing this should be that hard. Will take another look tomorrow.

Change 406046 merged by jenkins-bot:
[mediawiki/extensions/ORES@master] Decorator to populate the model table if it's not there

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

@Ladsgroup this is resolved, right? Is there anything left to do here, or can this task be resolved?

Ladsgroup closed this task as Resolved.Feb 19 2018, 4:13 PM

yup

awight mentioned this in Unknown Object (Phame Post).May 2 2018, 6:42 PM
awight mentioned this in Unknown Object (Phame Post).
awight mentioned this in Unknown Object (Phame Post).