Page MenuHomePhabricator

Add models when initializing the table
Closed, ResolvedPublic

Description

Details

Related Gerrit Patches:
mediawiki/extensions/ORES : masterUpdate model version when model lookup can't find the model
mediawiki/extensions/ORES : masterAdd models when ores_model is empty

Event Timeline

Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptJan 3 2018, 10:34 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 401815 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/ORES@master] Add models when ores_model is empty

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

Change 401827 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/ORES@master] Update model version when model lookup can't find the model

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

Change 401815 abandoned by Ladsgroup:
Add models when ores_model is empty

Reason:
In favor of https://gerrit.wikimedia.org/r/401827

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

Change 401827 merged by jenkins-bot:
[mediawiki/extensions/ORES@master] Update model version when model lookup can't find the model

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

awight added a subscriber: awight.Jan 5 2018, 1:58 AM

This looks like another edge case:

  • Fresh wiki
  • Navigate to Special:RecentChanges

1[2bbb46b4cc364b985b416eea] /wiki/Special:RecentChanges InvalidArgumentException from line 58 of /vagrant/mediawiki/extensions/ORES/includes/Storage/SqlModelLookup.php: No model available for [damaging]
2
3Backtrace:
4
5#0 /vagrant/mediawiki/extensions/ORES/includes/ThresholdLookup.php(103): ORES\Storage\SqlModelLookup->getModelVersion(string)
6#1 /vagrant/mediawiki/extensions/ORES/includes/ThresholdLookup.php(94): ORES\ThresholdLookup->fetchThresholdsFromCache(string)
7#2 /vagrant/mediawiki/extensions/ORES/includes/ThresholdLookup.php(84): ORES\ThresholdLookup->fetchThresholds(string, boolean)
8#3 /vagrant/mediawiki/extensions/ORES/includes/Hooks/ChangesListHooksHandler.php(63): ORES\ThresholdLookup->getThresholds(string)
9#4 /vagrant/mediawiki/includes/Hooks.php(177): ORES\Hooks\ChangesListHooksHandler::onChangesListSpecialPageStructuredFilters(SpecialRecentChanges)
10#5 /vagrant/mediawiki/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)
11#6 /vagrant/mediawiki/includes/specialpage/ChangesListSpecialPage.php(911): Hooks::run(string, array)
12#7 /vagrant/mediawiki/includes/specials/SpecialRecentchanges.php(184): ChangesListSpecialPage->registerFilters()
13#8 /vagrant/mediawiki/includes/specialpage/ChangesListSpecialPage.php(1052): SpecialRecentChanges->registerFilters()
14#9 /vagrant/mediawiki/includes/specialpage/ChangesListSpecialPage.php(872): ChangesListSpecialPage->setup(NULL)
15#10 /vagrant/mediawiki/includes/specialpage/ChangesListSpecialPage.php(642): ChangesListSpecialPage->getOptions()
16#11 /vagrant/mediawiki/includes/specialpage/ChangesListSpecialPage.php(556): ChangesListSpecialPage->considerActionsForDefaultSavedQuery(NULL)
17#12 /vagrant/mediawiki/includes/specials/SpecialRecentchanges.php(166): ChangesListSpecialPage->execute(NULL)
18#13 /vagrant/mediawiki/includes/specialpage/SpecialPage.php(522): SpecialRecentChanges->execute(NULL)
19#14 /vagrant/mediawiki/includes/specialpage/SpecialPageFactory.php(578): SpecialPage->run(NULL)
20#15 /vagrant/mediawiki/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)
21#16 /vagrant/mediawiki/includes/MediaWiki.php(854): MediaWiki->performRequest()
22#17 /vagrant/mediawiki/includes/MediaWiki.php(524): MediaWiki->main()
23#18 /vagrant/mediawiki/index.php(42): MediaWiki->run()
24#19 /var/www/w/index.php(5): include(string)
25#20 {main}

Yeah, I already knew about this problem but I can't think of any easy solution except that the person needs to make an edit to trigger the update (or run the populate database maintenance script which does the same as well.) what do you think?

awight added a comment.Jan 8 2018, 2:03 PM

Maybe, the hook should log a warning, and gracefully return that there are no available thresholds?

Ladsgroup moved this task from Incoming to Done on the User-Ladsgroup board.Jan 12 2018, 12:15 PM
Halfak closed this task as Resolved.Jan 30 2018, 8:31 PM