Page MenuHomePhabricator

Create first exemplary services in WikibaseRepo
Closed, ResolvedPublic

Description

To break this technological barrier and make further migrations just a matter of effort, not adventurousness.

Original idea was: Inject a shared service (ObjectCache) into FormatterCacheFactory from MW service. Could only be done once there is a patch for T265983: Make shared caching service (ObjectCache) injectable into FormatterCacheFactory

Details

ProjectBranchLines +/-Subject
mediawiki/extensions/WikibaseLexemeCirrusSearchmaster+4 -2
mediawiki/extensions/WikibaseLexemeCirrusSearchmaster+7 -5
mediawiki/extensions/WikibaseMediaInfomaster+4 -2
mediawiki/extensions/WikibaseCirrusSearchmaster+7 -6
mediawiki/extensions/Wikibasemaster+49 -3
mediawiki/extensions/Wikibasemaster+326 -0
mediawiki/extensions/Wikibasemaster+125 -169
mediawiki/extensions/Wikibasemaster+73 -57
mediawiki/extensions/Wikibasemaster+41 -39
mediawiki/extensions/Wikibasemaster+75 -46
mediawiki/extensions/Wikibasemaster+27 -48
mediawiki/extensions/Wikibasemaster+30 -8
mediawiki/extensions/Wikibasemaster+46 -27
mediawiki/extensions/WikibaseLexememaster+5 -7
mediawiki/extensions/Wikibasemaster+4 -1
mediawiki/extensions/Wikibasemaster+13 -4
mediawiki/extensions/WikibaseCirrusSearchmaster+8 -20
mediawiki/extensions/WikibaseLexemeCirrusSearchmaster+8 -10
mediawiki/extensions/Wikibasemaster+32 -0
Show related patches Customize query in gerrit

Event Timeline

Had a chat with @Lucas_Werkmeister_WMDE, @Tarrow & @toan.
We found out that there is no (popular, at least) scenario in which both the wikibase repo and client code would run at the same time - as such, it is not of highest priority to prevent this part of the application from instantiating the service(s) redundantly (as it does not happen in practice).
However, we see the desire for a less verbose way of maintaining our service definitions, wiring & align it with the way MediaWiki does it to reduce the barrier to entry for future wikibase devs and non-team members.

Steps in mind

  • write an ADR which commits us to using the MediaWiki service container in wikibase
  • implement an existing trivial wikibase service using the MediaWiki service container

Change 636675 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/Wikibase@master] ADR: use PSR11 MediaWiki service container

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

Change 636675 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] ADR: use PSR11 MediaWiki service container

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

With the ADR merged, let's look into how we can get the first services actually implemented this way (in the least invasive fashion).

Pablo-WMDE renamed this task from Inject shared service (ObjectCache) into FormatterCacheFactory from MW service to Create first exemplary services in WikibaseRepo.Nov 12 2020, 11:50 AM
Pablo-WMDE updated the task description. (Show Details)

Change 640182 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Move data+entity type definitions to service wiring

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

Since the above change doesn’t really expose the data + entity type definitions as services (they’re still stored as members of the WikibaseRepo instance), I wouldn’t consider this task done with only that change merged – we should also have some (simple) service that’s completely migrated to the service container (WikibaseRepo could still have a getter but it would get it from the MediaWikiServices). @Pablo-WMDE volunteered to attempt that, but in the meantime, let’s move this to Review for the first change.

Change 640825 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/Wikibase@master] repo: turn DataTypeDefinitions into a used service

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

Change 640833 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/Wikibase@master] repo: turn EntityTypeDefinitions into a used service

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

Change 640834 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] repo: directly inject DataTypeDefinitions where possible

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

Change 640941 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] repo: turn ValueParserFactory into service

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

Change 640949 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseMediaInfo@master] Update getDataTypeDefinitions() call

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

Change 640950 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseCirrusSearch@master] Update getDataTypeDefinitions() call

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

Change 640951 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseLexemeCirrusSearch@master] Update getDataTypeDefinitions() call

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

Change 640952 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/Wikibase@master] EntityHandlerTestCase: allow inherting EntityTypeDefinitions config

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

Change 640953 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/WikibaseLexeme@master] LexemeHandlerTest: extend wikibase EntityTypeDefinitions

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

Change 640957 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] repo: turn DataTypeFactory into service

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

Change 640983 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/WikibaseCirrusSearch@master] EntityHandlerTestCases: use inheritable EntityTypeDefinitions

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

Change 640997 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/WikibaseLexemeCirrusSearch@master] LexemeHandlerTest: use inheritable EntityTypeDefinitions

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

Change 640998 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/Wikibase@master] EntityHandlerTestCase: private getEntityTypeDefinitions()

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

Change 640952 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] EntityHandlerTestCase: allow inherting EntityTypeDefinitions config

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

Change 640953 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] LexemeHandlerTest: extend wikibase EntityTypeDefinitions

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

Change 640997 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexemeCirrusSearch@master] LexemeHandlerTest: use inheritable EntityTypeDefinitions

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

Change 640983 merged by jenkins-bot:
[mediawiki/extensions/WikibaseCirrusSearch@master] EntityHandlerTestCases: use inheritable EntityTypeDefinitions

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

Change 640998 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] EntityHandlerTestCase: final getEntityTypeDefinitions()

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

Change 641196 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/Wikibase@master] WikibaseRepoTest: refactor for clarity

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

Change 641389 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/Wikibase@master] repo: add testing for ServiceWiring

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

Change 640182 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] repo: move data+entity type definitions to service wiring

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

Change 640825 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] repo: turn DataTypeDefinitions into a used service

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

Change 640834 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] repo: directly inject DataTypeDefinitions where possible

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

Change 640941 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] repo: turn ValueParserFactory into service

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

Change 640957 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] repo: turn DataTypeFactory into service

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

Change 641196 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] WikibaseRepoTest: refactor for clarity

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

Change 640833 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] repo: turn EntityTypeDefinitions into a used service

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

Change 641389 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] repo: add testing for ServiceWiring

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

Change 641738 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[mediawiki/extensions/Wikibase@master] repo: make PropertyValueExpertsModule a service

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

Change 641738 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] repo: make PropertyValueExpertsModule a service

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

Change 641956 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseLexemeCirrusSearch@master] Fix LexemeHandlerTest::getEntityTypeDefinitionsConfiguration()

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

Change 640949 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Update getDataTypeDefinitions() call

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

Change 640950 merged by jenkins-bot:
[mediawiki/extensions/WikibaseCirrusSearch@master] Update getDataTypeDefinitions() call

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

Change 641956 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexemeCirrusSearch@master] Fix LexemeHandlerTest::getEntityTypeDefinitionsConfiguration()

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

Change 640951 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexemeCirrusSearch@master] Update getDataTypeDefinitions() call

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