Page MenuHomePhabricator

[LEX] Move WikibaseLexeme services to MediaWiki service container
Closed, ResolvedPublic

Description

The WikibaseLexeme extension adds some services to the MediaWiki container, in WikibaseLexeme.mediawiki-services.php, but also has its own service container, WikibaseLexemeServices. We should get rid of the latter and move all services into the MediaWiki service container.

Acceptance Criteria

  • All services in WikibaseLexemeServices have been migrated to WikibaseLexeme.mediawiki-services.php

Event Timeline

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

[mediawiki/extensions/WikibaseLexeme@master] Standardize WikibaseLexemeServices::getTermLanguages()

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

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

[mediawiki/extensions/WikibaseLexeme@master] Standardize WikibaseLexemeServices::getLanguageNameLookupFactory()

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

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

[mediawiki/extensions/WikibaseLexeme@master] Standardize WikibaseLexemeServices::getEditFormChangeOpDeserializer()

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

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

[mediawiki/extensions/WikibaseLexeme@master] Standardize WikibaseLexemeServices::getGrammaticalFeaturesOrderProvider()

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

Change 910475 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Standardize WikibaseLexemeServices::getTermLanguages()

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

Change 910476 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Standardize WikibaseLexemeServices::getLanguageNameLookupFactory()

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

Change 910477 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Standardize WikibaseLexemeServices::getEditFormChangeOpDeserializer()

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

Change 910478 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Standardize WikibaseLexemeServices::getGrammaticalFeaturesOrderProvider()

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

(Note done yet, there are still a few custom services in WikibaseLexemeServices. The task isn’t done until we’ve completely removed its getSharedService() method.)

ItamarWMDE renamed this task from Move WikibaseLexeme services to MediaWiki service container to [LEX] Move WikibaseLexeme services to MediaWiki service container.Sep 20 2023, 3:02 PM
ItamarWMDE moved this task from Incoming to [DOT] By Project on the wmde-wikidata-tech board.

Prio Notes:

  • It seems that all that remains is to convert newMergeLexemesInteractor() and stop using getSharedService() in getLexemeRepositoryFactory() and getLexemeAuthorizer(), right @Lucas_Werkmeister_WMDE? Otherwise, if we want to also convert all the private methods one by one this might be more of an epic than a task.
Impact AreaAffected
production / end usersno
monitoringno
development effortsyes
onboarding effortsyes
additional stakeholdersno
ItamarWMDE renamed this task from [LEX] Move WikibaseLexeme services to MediaWiki service container to [SW] [LEX] Move WikibaseLexeme services to MediaWiki service container.Nov 21 2023, 3:05 PM
ItamarWMDE moved this task from [DOT] By Project to [DOT] Prioritized on the wmde-wikidata-tech board.

newMergeLexemesInteractor() should be converted; getLexemeRepositoryFactory(), newLexemeMerger(), newNoCrossReferencingLexemeStatements(), getLexemeAuthorizer() and newLexemeRedirectorFactory() are all only used there (and only once), so arguably they could just be inlined into the MergeLexemesInteractor service wiring. Either way, they shouldn’t be in WikibaseLexemeServices anymore.

ItamarWMDE renamed this task from [SW] [LEX] Move WikibaseLexeme services to MediaWiki service container to [LEX] Move WikibaseLexeme services to MediaWiki service container.Nov 22 2023, 10:10 AM
ItamarWMDE updated the task description. (Show Details)

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

[mediawiki/extensions/WikibaseLexeme@master] Standardize WikibaseLexemeServices::getMergeLexemesInteractor()

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

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

[mediawiki/extensions/WikibaseLexeme@master] Remove LexemeAuthorizer, directly use EntityPermissionChecker

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

Hi @Lucas_Werkmeister_WMDE ,

It seems that you've prepared a patch for this ticket while it's in the Prioritised backlog column. Do you mean for the ticket to be on our board? Should it now be in the Peer Review column?

It seems that you've prepared a patch for this ticket while it's in the Prioritised backlog column. Do you mean for the ticket to be on our board?

In general, no, because I was just working on it during some spare time; I don’t think it should’ve been on the board for two weeks already. That said, it’s now close enough to the top of the unified backlog, and the patch is close enough to ready, that it makes sense to move it to our board now.

Should it now be in the Peer Review column?

No, because I’m still working on it.

So it's... err.... "In Development"? :)

Yes, now it is. (Forgot to move it there after adding it to the board, sorry.) But I don’t want to have something on our board for ages just because I occasionally work on it. By that measure, T312510 would’ve been on the board for a whole year.

Actually, it can go into review now, CI is finally green and I don’t have any TODOs either.

Change 993733 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Remove LexemeAuthorizer, directly use EntityPermissionChecker

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

Change 991030 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Standardize WikibaseLexemeServices::getMergeLexemesInteractor()

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

By that measure, T312510 would’ve been on the board for a whole year.

I think from my point of view that is exactly the point of the board - to see what you're working on. If you're working on a task for a year, it's on the board for a year, and then I have questions about why it's not broken into smaller pieces / made into an Epic. But at least everyone would have visibility that it's something that's eating up time and attention.

ArthurTaylor claimed this task.

The patches address the issue, and they have been merged without any problems. Resolving this ticket.

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

[mediawiki/extensions/WikibaseLexeme@REL1_41] Remove LexemeAuthorizer, directly use EntityPermissionChecker

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

Change 1002961 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@REL1_41] Remove LexemeAuthorizer, directly use EntityPermissionChecker

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

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

[mediawiki/extensions/WikibaseLexeme@REL1_40] Remove LexemeAuthorizer, directly use EntityPermissionChecker

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

Change 1002963 merged by Lucas Werkmeister (WMDE):

[mediawiki/extensions/WikibaseLexeme@REL1_40] Remove LexemeAuthorizer, directly use EntityPermissionChecker

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

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

[mediawiki/extensions/WikibaseLexeme@REL1_39] Remove LexemeAuthorizer, directly use EntityPermissionChecker

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

Change 1003479 merged by Lucas Werkmeister (WMDE):

[mediawiki/extensions/WikibaseLexeme@REL1_39] Remove LexemeAuthorizer, directly use EntityPermissionChecker

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