Page MenuHomePhabricator

Move CentralIdLookupFactory to MW core
Closed, ResolvedPublic

Description

Wikibase has a Wikibase\Lib\Changes\CentralIdLookupFactory class, which returns a CentralIdLookup, but only if it’s not a LocalIdLookup, because a LocalIdLookup isn’t safe to use for cross-wiki propagation. (Both CentralIdLookup and LocalIdLookup are MediaWiki core classes.)

As part of the larger Wikibase decoupling effort, we would like to extract the Wikibase\Lib\Changes namespace as a separate, independent library (T256058). This means that the library should not use MediaWiki core classes (though it may use MediaWiki-related libraries like assert). As CentralIdLookupFactory only uses MediaWiki core classes (and no Wikibase classes), moving it into MediaWiki core seems like the best solution.

Consider asking @Legoktm for review since Matt Flaschen, who originally implemented the class, isn't at the WMF any more.

Also note: T163277 and subtask T170996

Event Timeline

Tarrow created this task.Jul 20 2020, 12:47 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 20 2020, 12:47 PM

+1 to moving to core, though I think fixing T163277 eliminates the need for this.

True – if I understand correctly, CentralIdLookupFactory is a workaround for the fact that T163277 isn’t resolved yet. I think that issue is too large to tackle in the Wikibase team, so I hope moving the workaround from Wikibase to core is acceptable. I’ll upload a patch.

Change 615235 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/core@master] Add CentralIdLookup::factoryNonLocal()

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

Change 615236 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Remove CentralIdLookupFactory

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

Change 615235 merged by jenkins-bot:
[mediawiki/core@master] Add CentralIdLookup::factoryNonLocal()

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

Change 615236 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Remove CentralIdLookupFactory

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

Change 623881 had a related patch set uploaded (by Reedy; owner: Lucas Werkmeister (WMDE)):
[mediawiki/core@REL1_35] Add CentralIdLookup::factoryNonLocal()

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

Change 623881 merged by jenkins-bot:
[mediawiki/core@REL1_35] Add CentralIdLookup::factoryNonLocal()

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

Change 624072 had a related patch set uploaded (by Reedy; owner: Lucas Werkmeister (WMDE)):
[mediawiki/core@REL1_34] Add CentralIdLookup::factoryNonLocal()

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

Change 624081 had a related patch set uploaded (by Reedy; owner: Lucas Werkmeister (WMDE)):
[mediawiki/core@REL1_31] Add CentralIdLookup::factoryNonLocal()

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

Change 624072 merged by jenkins-bot:
[mediawiki/core@REL1_34] Add CentralIdLookup::factoryNonLocal()

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

Change 624081 merged by jenkins-bot:
[mediawiki/core@REL1_31] Add CentralIdLookup::factoryNonLocal()

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