2019-10-09 04:18:50
|
<codezee>
|
Hi! I'm using mwapi to fetch revisions for an article. Strangely, for the article https://en.wikipedia.org/wiki/Apollo_program I'm only getting some sporadic 5-6 revisions, while clearly the article has a long dense history. What could possibly be wrong here?
|
2019-10-09 04:19:12
|
<codezee>
|
the api script is correct, since its correctly fetching revisions for some other articles
|
2019-10-09 04:26:24
|
<bawolff>
|
Can you post the exact api query used?
|
2019-10-09 04:35:27
|
<codezee>
|
bawolff: http://dpaste.com/3FE06MP
|
2019-10-09 04:37:50
|
<bawolff>
|
I meant more as an http url to the api
|
2019-10-09 04:40:12
|
<codezee>
|
let me see how to extract mwapi's generated request
|
2019-10-09 05:10:23
|
<codezee>
|
bawolff: nvm, the article has a small 'p' in program, has missed that
|
2019-10-09 14:00:31
|
<wm-bot>
|
Technical Advice IRC meeting starting in 60 minutes in channel #wikimedia-tech, hosts: @Lucas_WMDE & @James_F - all questions welcome, more infos: https://www.mediawiki.org/wiki/Technical_Advice_IRC_Meeting
|
2019-10-09 14:10:19
|
<Tulsi>
|
Someone please tell me the phab task number in which "Special:Contributions/newbies" has been removed
|
2019-10-09 14:11:29
|
<douglas>
|
https://phabricator.wikimedia.org/T220447 this one?
|
2019-10-09 14:36:20
|
<Tulsi>
|
oh yeah ... Thank you douglas :-D
|
2019-10-09 14:50:26
|
<wm-bot>
|
Technical Advice IRC meeting starting in 10 minutes in channel #wikimedia-tech, hosts: @Lucas_WMDE & @duesen - all questions welcome, more infos: https://www.mediawiki.org/wiki/Technical_Advice_IRC_Meeting
|
2019-10-09 14:51:08
|
<Lucas_WMDE>
|
now with 50% correcterer nicknames! :D
|
2019-10-09 15:01:28
|
<Lucas_WMDE>
|
okay, welcome to today’s Technical Advice IRC Meeting! :)
|
2019-10-09 15:02:49
|
<Lucas_WMDE>
|
I seem to be missing my co-host, but feel free to ask questions and I’ll do my best…
|
2019-10-09 15:03:56
|
<mainframe98>
|
Hi, I'm working on https://gerrit.wikimedia.org/r/c/mediawiki/core/+/535657 (Injecting services into special pages) but I've hit a snag: There's a recursive service issue with certain extensions. Based on stack traces it seems to be caused by a combination of GlobalPreferences and MobileFrontend
|
2019-10-09 15:04:13
|
<mainframe98>
|
The thing is, I can't reproduce it locally, and I'm not sure how I should proceed with that change.
|
2019-10-09 15:06:48
|
<Lucas_WMDE>
|
hm, where are those stack traces? I only see browser test failures in the most recent failed builds
|
2019-10-09 15:07:56
|
<mainframe98>
|
Those are annoying to obtain, so you'll have to browse to the artifacts of the failed build; https://integration.wikimedia.org/ci/job/wmf-quibble-selenium-php72-docker/1733/artifact/
|
2019-10-09 15:08:05
|
<mainframe98>
|
I'll upload one to phabricator like I did before
|
2019-10-09 15:08:22
|
<Lucas_WMDE>
|
ah, in mw-exception.log?
|
2019-10-09 15:08:50
|
<mainframe98>
|
I think? I used the images mostly, but I've extracted one on https://phabricator.wikimedia.org/T232506#5543660
|
2019-10-09 15:09:06
|
<Lucas_WMDE>
|
ah ok
|
2019-10-09 15:09:18
|
<Lucas_WMDE>
|
I found https://integration.wikimedia.org/ci/job/wmf-quibble-selenium-php72-docker/1733/artifact/log/mw-exception.log
|
2019-10-09 15:09:27
|
<mainframe98>
|
Neat!
|
2019-10-09 15:10:33
|
<mainframe98>
|
That's indeed the file I got the traces from; I cross referenced them with the failed selenium test based on request ID
|
2019-10-09 15:10:58
|
<Lucas_WMDE>
|
ok
|
2019-10-09 15:15:23
|
<duesen_>
|
wibbles
|
2019-10-09 15:15:32
|
<Lucas_WMDE>
|
waves
|
2019-10-09 15:15:37
|
<duesen_>
|
am I too late for the technical advice meeting? i was lurking on the wrong channel ;)
|
2019-10-09 15:15:43
|
<James_F>
|
Tulsi: Happy to just talk about T220447 here if you wish, too.
|
2019-10-09 15:15:44
|
<stashbot>
|
T220447: Split out or remove Special:Contributions/newbies functionality - https://phabricator.wikimedia.org/T220447
|
2019-10-09 15:15:51
|
<James_F>
|
duesen_: It's still going. :-)\
|
2019-10-09 15:16:12
|
<Lucas_WMDE>
|
currently looking into CI issues of https://gerrit.wikimedia.org/r/c/mediawiki/core/+/535657
|
2019-10-09 15:16:31
|
<Lucas_WMDE>
|
mainframe98: tried installing GlobalPreferences and MobileFrontend and can’t reproduce it either…
|
2019-10-09 15:17:53
|
<Lucas_WMDE>
|
when I put a breakpoint in GlobalPreferences’ Hooks::getPreferencesFactory(), the stack trace looks much shorter
|
2019-10-09 15:18:47
|
<duesen_>
|
what stack frame? I just see the selenium failure, no stack trace
|
2019-10-09 15:19:06
|
<mainframe98>
|
duesen_: https://integration.wikimedia.org/ci/job/wmf-quibble-selenium-php72-docker/1733/artifact/log/mw-exception.log
|
2019-10-09 15:19:35
|
<duesen_>
|
oh i see
|
2019-10-09 15:20:00
|
<duesen_>
|
PermissionManager -> SpecialPageFactory -> PreferencesFactory -> PermissionManager
|
2019-10-09 15:20:21
|
<duesen_>
|
o_O
|
2019-10-09 15:20:47
|
<duesen_>
|
sounds like we have to find out how creating PermissionManager triggers the creation of SpecialPageFactory
|
2019-10-09 15:21:12
|
<duesen_>
|
guess into the blue: something wants to enumerate the names of special pages
|
2019-10-09 15:21:31
|
<James_F>
|
Oh, and so needs to know what rights the user has to annotate said list? Yeah, that'd do it.
|
2019-10-09 15:21:53
|
<duesen_>
|
something like that
|
2019-10-09 15:22:20
|
<mainframe98>
|
From what I could determine at the gerrit change was "that the move of the call to the SpecialPage_initList hook to the service construction is what caused the problem; MobileFrontend does some preference related stuff in a hook handler, which inadvertently calls the PreferencesFactory, which needs the PermissionsManager."
|
2019-10-09 15:23:31
|
<Lucas_WMDE>
|
when I try it locally, the SpecialPageFactory is already instantiated in a stack trace that ends in WebStart
|
2019-10-09 15:23:39
|
<Lucas_WMDE>
|
a few lines above $mediaWiki->run() in index.php
|
2019-10-09 15:23:57
|
<Lucas_WMDE>
|
so I’m not sure why in CI, $mediaWiki->run() is what ends up instantiating these services
|
2019-10-09 15:26:16
|
<Lucas_WMDE>
|
all these services should be well set up by the time we leave Setup.php, it seems to me
|
2019-10-09 15:27:33
|
<duesen_>
|
It really boils down to a conceptual issue
|
2019-10-09 15:27:40
|
<duesen_>
|
I'm afraid it's not easily resolved.
|
2019-10-09 15:27:57
|
<duesen_>
|
Special pages need to check permissions. So the SpecialPageFactory needs the PermissionManager.
|
2019-10-09 15:28:10
|
<duesen_>
|
But PermissionManager takes a SpecialPageFactory as a constructor parameter
|
2019-10-09 15:29:05
|
<James_F>
|
What does it do with it?
|
2019-10-09 15:29:11
|
<duesen_>
|
resolve aliases
|
2019-10-09 15:29:15
|
<duesen_>
|
still figuring out why
|
2019-10-09 15:30:11
|
<duesen_>
|
for checking the read whitelist
|
2019-10-09 15:30:27
|
<duesen_>
|
so, the solution would be to separate special page alias resolution from the actual factory
|
2019-10-09 15:31:03
|
<James_F>
|
YetAnotherService™?
|
2019-10-09 15:31:13
|
<duesen_>
|
yep
|
2019-10-09 15:31:21
|
<James_F>
|
Oh goody.
|
2019-10-09 15:31:38
|
<duesen_>
|
SpecialPageFactory::getAliasList() relies on $this->contLang->getSpecialPageAliases();
|
2019-10-09 15:31:55
|
<James_F>
|
Yay circularity.
|
2019-10-09 15:32:36
|
<duesen_>
|
increasing granularity is the typical solution for circular dependencies
|
2019-10-09 15:32:54
|
<mainframe98>
|
Something like T231866, but with an increase of services as a solution then?
|
2019-10-09 15:32:54
|
<stashbot>
|
T231866: Circular dependency when creating service! ContentLanguage - https://phabricator.wikimedia.org/T231866
|
2019-10-09 15:32:59
|
<duesen_>
|
so... there is two methods in SPecialPageFactory that are language bases:
|
2019-10-09 15:33:14
|
<duesen_>
|
getLocalName and getAliasList (and, indirectly, resolveAlias())
|
2019-10-09 15:33:23
|
<duesen_>
|
splitting these into a separate service would fix the problem
|
2019-10-09 15:33:54
|
<duesen_>
|
mainframe98: yes, it'S quite similar, actually
|
2019-10-09 15:34:01
|
<mainframe98>
|
Hmm, that seems doable to me - at least it's something I'd like to try persuing. Is it appropriate to do it in the same patch?
|
2019-10-09 15:34:13
|
<duesen_>
|
no, separate patch please
|
2019-10-09 15:34:17
|
<duesen_>
|
ideally, separate ticket, too
|
2019-10-09 15:34:23
|
<duesen_>
|
bureaucracy, i know...
|
2019-10-09 15:34:36
|
<duesen_>
|
but higher granularity is good for patches and tickets, too :)
|
2019-10-09 15:34:45
|
<James_F>
|
Smaller, simpler patches => faster cycle time.
|
2019-10-09 15:34:52
|
<mainframe98>
|
I shall need no excuse to create a ticket, but I'll take it regardless.
|
2019-10-09 15:34:57
|
<duesen_>
|
longer chains -> more confusion ;)
|
2019-10-09 15:35:25
|
<duesen_>
|
mainframe98: thanks for digging in!
|
2019-10-09 15:35:29
|
<James_F>
|
I'm not sure I agree.
|
2019-10-09 15:35:41
|
<mainframe98>
|
I can already imagine the approach to take here, at least this has given me something to work with. Thanks all!
|
2019-10-09 15:36:25
|
<James_F>
|
Thank you for your work. :-)
|
2019-10-09 15:37:04
|
<Lucas_WMDE>
|
yeah, this looks super exciting in the big picture
|
2019-10-09 15:37:11
|
<Lucas_WMDE>
|
even if getting there is painful :)
|
2019-10-09 15:37:24
|
<mainframe98>
|
It is the best way to learn though, so I'll take it
|
2019-10-09 15:45:26
|
<Lucas_WMDE>
|
any other questions? we still have 15 minutes
|
2019-10-09 15:59:41
|
<duesen_>
|
James_F: as long as we don't let the small patches pile up, we won't get long chains. so it'S all good :)
|
2019-10-09 16:00:18
|
<James_F>
|
I think long chains are a good way to explain the thought process to reviewers (and lookers-on).
|
2019-10-09 16:06:27
|
<Lucas_WMDE>
|
anyways, the Technical Advice IRC Meeting is over!
|
2019-10-09 16:06:31
|
<Lucas_WMDE>
|
thanks to everyone who participated :)
|
2019-10-09 16:06:47
|
<Lucas_WMDE>
|
and you can always ask your questions over at the Wikimedia Developer Support forum: https://grafana.wikimedia.org/d/000000344/wikidata-quality?panelId=11&fullscreen&from=1539101128814&to=1570637128815
|
2019-10-09 16:06:50
|
<Lucas_WMDE>
|
oops ^^
|
2019-10-09 16:06:54
|
<Lucas_WMDE>
|
this one: https://discourse-mediawiki.wmflabs.org/
|