Page MenuHomePhabricator

Add EntitySchema extension to wikibase-docker bundle image
Closed, ResolvedPublic5 Estimated Story Points

Description

Initial ticket content

I would like to have my own wikibase instance with ShEx support as has been recently added to Wikidata...what would I need to do that?

Task

The EntitySchema extension should be loaded in the bundle image for wikibase.

This should only happen for version of mediawiki / wikibase where the extension was ready / released UNLESS compatability is checked and EntitySchema works on previous version of mediawiki / wikibase, then it could also be added there.
This is likely only the current / latest release? We might actually have to wait for the next release?

See other simple extensions for how to include: for example WikibaseImport. It seems likely that you'll need to the following steps:

In Dockerfile
    download
    copy extension to composer image
    install deps
    copy to final image
in config files
    add required default settings for extensions
update readmes to include new extension and links to docs

Event Timeline

Hi @Jelabra. This does not sound like something is wrong in the code base (a so-called "software bug"), but instead like a support request (how to change settings, questions how to do something, etc.) so I'm going to close this task.
As Wikimedia Phabricator/Maniphest is for bug reports and enhancement requests, please ask on the https://www.wikidata.org/wiki/Wikidata:Project_chat , the #wikidata IRC channel on Freenode, or the Wikidata mailing list at https://lists.wikimedia.org/mailman/listinfo/wikidata

No problem closing it, although in this case it could be considered also as a feature request to add ShEx to wikibase-docker.

Aklapper renamed this task from Add ShEx support to a wikibase instance to Add ShEx support to wikibase-docker.Jun 20 2019, 7:11 AM

That sounds like a well defined feature requests, hence I adjusted the summary and reopen :)

Addshore renamed this task from Add ShEx support to wikibase-docker to Add WikibaseScehma extension to wikibase-docker.Jun 20 2019, 6:09 PM
Addshore added a project: Wikidata-Campsite.
Addshore moved this task from Incoming to Ready to estimate on the Wikidata-Campsite board.

The one thing to be decided here is should this be in the base image or the bundle?
I'm personally leaning toward the bundle, and keeping the base image as just wikibase, no frills.

Addshore triaged this task as Medium priority.Jun 20 2019, 10:52 PM
Jelabra renamed this task from Add WikibaseScehma extension to wikibase-docker to Add WikibaseSchema extension to wikibase-docker.Jun 21 2019, 5:47 AM

The one thing to be decided here is should this be in the base image or the bundle?
I'm personally leaning toward the bundle, and keeping the base image as just wikibase, no frills.

Agreed.

Addshore renamed this task from Add WikibaseSchema extension to wikibase-docker to Add WikibaseSchema extension to wikibase-docker bundle image.Jun 21 2019, 10:44 PM
Addshore updated the task description. (Show Details)
Michael renamed this task from Add WikibaseSchema extension to wikibase-docker bundle image to Add EntitySchema extension to wikibase-docker bundle image.Jun 24 2019, 8:28 AM
Michael updated the task description. (Show Details)

EntitySchema is not in REL1_33. See https://www.mediawiki.org/w/api.php?action=query&list=extdistbranches&edbexts=EntitySchema&formatversion=2&format=json:

{"batchcomplete":true,"query":{"extdistbranches":{"extensions":{"EntitySchema":{"master":"https://extdist.wmflabs.org/dist/extensions/EntitySchema-master-deec406.tar.gz","source":"https://gerrit.wikimedia.org/r/mediawiki/extensions/EntitySchema.git"}}}}}

Compared to Wikibase:

{"batchcomplete":true,"query":{"extdistbranches":{"extensions":{"Wikibase":{"REL1_31":"https://extdist.wmflabs.org/dist/extensions/Wikibase-REL1_31-f690570.tar.gz","REL1_32":"https://extdist.wmflabs.org/dist/extensions/Wikibase-REL1_32-cd41afd.tar.gz","REL1_33":"https://extdist.wmflabs.org/dist/extensions/Wikibase-REL1_33-9344529.tar.gz","master":"https://extdist.wmflabs.org/dist/extensions/Wikibase-master-b308fab.tar.gz","source":"https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikibase.git"}}}}}

What to do now? Backport the whole extension to 1.33?

That could be an option.
Or we could alter the docker file to just grab the extension at a specific pinned commit for 1.33 that we know works.

This is the earliest branch cut I could put my hands on: https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/EntitySchema/+archive/wmf/1.34.0-wmf.8.tar.gz
The WikibaseSchema extension doesn't have any branch beside master but it has the commits while EntitySchema doesn't have the old commits. Maybe it works with 1.34-wmf.8. Worth a try.

I did a quick hack to load the extension, the container goes up but it looks very weird. I wonder why.

Looks very weird as in?

The "admin" user doesn't exist, modules are not loaded because all 404 because the http://localhost:8181/wiki/index.php/Main_Page doesn't seem right + all try to load http://localhost:8181/w/load.php. I dig deeper. I think it's a config change with 1.33

Basically because the resetPassword.php maint script can't find "admin" account (became case sensitive?), it fails, I commented it out to see if there's another issue and there it is:

wikibase_1         | Fatal error: Uncaught ExtensionDependencyError: EntitySchema is not compatible with the current MediaWiki core (version 1.33.0), it requires: >= 1.34.0.
wikibase_1         |  in /var/www/html/includes/registration/ExtensionRegistry.php:323
wikibase_1         | Stack trace:
wikibase_1         | #0 /var/www/html/includes/registration/ExtensionRegistry.php(172): ExtensionRegistry->readFromQueue(Array)
wikibase_1         | #1 /var/www/html/includes/Setup.php(127): ExtensionRegistry->loadFromQueue()
wikibase_1         | #2 /var/www/html/maintenance/doMaintenance.php(81): require_once('/var/www/html/i...')
wikibase_1         | #3 /var/www/html/maintenance/update.php(266): require_once('/var/www/html/m...')
wikibase_1         | #4 {main}
wikibase_1         |   thrown in /var/www/html/includes/registration/ExtensionRegistry.php on line 323

Is 1.34 actually required for anything?
Probably best to check with the origional Devs :)
Otherwise let's change that down!

Is 1.34 actually required for anything?
Probably best to check with the origional Devs :)
Otherwise let's change that down!

I think I remember that we are using 1.33 features. Not sure whether we are using 1.34 features, but certainly wouldn't rule it out either.
Did you try running the browser tests on an 1.33 installation?

If I recall correctly, the 1.33 release was branched fairly late during EntitySchema development, so I think there’s a good chance we’re compatible with 1.33, but I can’t say for sure.

Nice, applied the parent commit to see if that's working 💃