Page MenuHomePhabricator

dumpRdf is unable to dump lexemes (or any extension-defined type)
Closed, ResolvedPublic

Description

If I try to dump lexemes with mwscript extensions/Wikibase/repo/maintenance/dumpRdf.php --wiki=wikidatawiki --entity-type=lexeme - nothing is dumped.

It looks like it happens because of finalSetup() in DumpEntities, which initializes WikibaseRepo too early, before all the extensions are loaded.

Event Timeline

What seems to happen is that finalSetup creates WikibaseRepo while in setup callback, before all extension loader queues are processed. So WikibaseRepo at this stage does not know about lexemes. And this information is cached. This prevents all lookups from recognizing any extension-defined types.

Likely caused by 2c793862a9452dc84565e91ec451873400f869cc.

I checked and removing WikibaseRepo initialization in the finalSetup() function makes it work fine again.

One solution would be to switch from repo setting to global (icky, I know). Another would be somehow to "reset" the repo services so they would be re-initialized, or not initialize everything fully to just get access to settings.

Change 454373 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/Wikibase@master] DumpEntities::finalSetup Don't get WikibaseRepo instance

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

hoo added a project: Wikidata-Campsite.
hoo moved this task from Incoming to Peer Review on the Wikidata-Campsite board.
Smalyshev triaged this task as Medium priority.Aug 21 2018, 9:06 PM

Change 454373 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] DumpEntities::finalSetup Don't get WikibaseRepo instance

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