Page MenuHomePhabricator

Remove legacy EntitySchema Datatype in WikibaseRepo
Closed, ResolvedPublic

Description

Based on ADR 0003, we want EntitySchema to make use of Wikibase's hooks for adding a new Datatype.
Hence, legacy implementation of an EntitySchema Datatype (which is currently disabled on Wikidata) can be removed.

The legacy datatype was added in Add EntitySchema data type (I9d0ddb82) and we should make sure that we're not leaving dead code (services, formatters, etc.) around when removing it.

Things to remove:

  • WikiLinkExistsValidator

Things to move to EntitySchema:

  • i18n messages wikibase-listdatatypes-entity-schema-head, wikibase-listdatatypes-entity-schema-body
  • …?

Open Questions:

  • Is removing that legacy Datatype defacto required for us to be able to create a new one, or could this be a standalone cleanup task?

Event Timeline

Given that we made the datatype available by default in multiple Wikibase releases (😦), could this be considered a breaking change?

Do we know of any third-party Wikibases actually using this datatype? Or do we have any way to find them?

I guess if it is possible to figure out, then that would be a question that the Suite Team could answer (cc @darthmon_wmde). Do we ship EntitySchema with Wikibase Suite? Is such information maybe contained in that pingback information from WikibaseManifest?

Also, what is the state of this on wikibase.cloud? (cc @Tarrow )

My hope is that we can just turn this "unannounced" "internal" feature off again, without anyone noticing. 🤞

The data type is enabled on this random Wikibase Cloud wiki I pulled out of my browser history: https://coffeebase.wikibase.cloud/wiki/Special:ListDatatypes

The data type is enabled on this random Wikibase Cloud wiki I pulled out of my browser history: https://coffeebase.wikibase.cloud/wiki/Special:ListDatatypes

😬

At least that project does not actually have a property with that Datatype. I guess on cloud we should be in principle able to run some sql against every Wikibase to figure out if there is one that has created a Property with the EntitySchema datatype?

I guess we can check their Special:ListProperties/entity-schema if we have a list of Wikibases… (I don’t think there’s an API equivalent of that, actually)

We seem to get "lucky" insofar as using the OnWikibaseRepoDataTypes hook, we can just "override" the existing legacy Wikibase Datatype. So they are not conflicting and this task does not seem to be a blocker for us yet.

Though we should be wary of unexpected interactions, because the value of the setting that disables this Wikibase Legacy Datatype in production will also disable the new EntitySchema Datatype...

Change 910446 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@master] Remove PHP code for entity-schema data type

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

Change 910446 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Remove PHP code for entity-schema data type

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

ItamarWMDE subscribed.

This seems to be a clean cut, code search does not produce any results for the entity-schema data type apart from within the entity schema and some exceptions such as changelogs or test fixtures in MediaInfo. Thank you! \o/