Lucas_Werkmeister_WMDE added a comment.

  I just tested the following diffs on mwdebug1002:
  
  name=Wikibase.git
    diff --git a/client/WikibaseClient.entitytypes.php 
b/client/WikibaseClient.entitytypes.php
    index d3f5ddc8d5..f4705c2287 100644
    --- a/client/WikibaseClient.entitytypes.php
    +++ b/client/WikibaseClient.entitytypes.php
    @@ -40,8 +40,6 @@
        'property' => [
                Def::PREFETCHING_TERM_LOOKUP_CALLBACK => function ( 
DatabaseEntitySource $entitySource ) {
                        $mwServices = MediaWikiServices::getInstance();
    -                   $entitySourceServices = 
WikibaseClient::getSingleEntitySourceServicesFactory( $mwServices )
    -                           ->getServicesForSource( $entitySource );
     
                        $cacheSecret = hash( 'sha256', 
$mwServices->getMainConfig()->get( 'SecretKey' ) );
                        $bagOStuff = $mwServices->getLocalServerObjectCache();
    @@ -69,7 +67,7 @@
                                ]
                        );
                        $redirectResolvingRevisionLookup = new 
RedirectResolvingLatestRevisionLookup(
    -                           $entitySourceServices->getEntityRevisionLookup()
    +                           WikibaseClient::getStore( $mwServices 
)->getEntityRevisionLookup()
                        );
     
                        return new CachingPrefetchingTermLookup(
    diff --git a/repo/WikibaseRepo.entitytypes.php 
b/repo/WikibaseRepo.entitytypes.php
    index c8c2d11bf2..6480726d4c 100644
    --- a/repo/WikibaseRepo.entitytypes.php
    +++ b/repo/WikibaseRepo.entitytypes.php
    @@ -464,8 +464,6 @@
                },
                Def::PREFETCHING_TERM_LOOKUP_CALLBACK => function ( 
DatabaseEntitySource $entitySource ) {
                        $mwServices = MediaWikiServices::getInstance();
    -                   $entitySourceServices = 
WikibaseRepo::getSingleEntitySourceServicesFactory( $mwServices )
    -                           ->getServicesForSource( $entitySource );
     
                        $cacheSecret = hash( 'sha256', 
$mwServices->getMainConfig()->get( 'SecretKey' ) );
                        $bagOStuff = $mwServices->getLocalServerObjectCache();
    @@ -493,7 +491,7 @@
                                ]
                        );
                        $redirectResolvingRevisionLookup = new 
RedirectResolvingLatestRevisionLookup(
    -                           $entitySourceServices->getEntityRevisionLookup()
    +                           WikibaseRepo::getEntityRevisionLookup( 
$mwServices )
                        );
     
                        return new CachingPrefetchingTermLookup(
  
  
  
  name=WikibaseMediaInfo.git
    diff --git a/WikibaseMediaInfo.entitytypes.php 
b/WikibaseMediaInfo.entitytypes.php
    index 4b8e98e96f..779a90468b 100644
    --- a/WikibaseMediaInfo.entitytypes.php
    +++ b/WikibaseMediaInfo.entitytypes.php
    @@ -320,10 +320,7 @@
                        );
                },
                Def::PREFETCHING_TERM_LOOKUP_CALLBACK => static function ( 
EntitySource $entitySource ) {
    -                   $services = 
WikibaseRepo::getSingleEntitySourceServicesFactory()
    -                                   ->getServicesForSource( $entitySource );
    -
    -                   return new MediaInfoPrefetchingTermLookup( 
$services->getEntityRevisionLookup() );
    +                   return new MediaInfoPrefetchingTermLookup( 
WikibaseRepo::getEntityRevisionLookup() );
                },
                Def::ENTITY_ID_LOOKUP_CALLBACK => static function () {
                        return MediaInfoServices::getMediaInfoIdLookup();
  
  And as far as I can tell, everything worked fine; there aren’t any unusual 
messages in the mwdebug logstash either. I think we can really just add the 
`EntityRevisionLookup` to the client service container (just like the repo one: 
get it from the Store service), use that instead of the one from the 
`$entitySourceServices`, then see how much of the 
`SingleEntitySourceServicesFactory` that lets us remove.

TASK DETAIL
  https://phabricator.wikimedia.org/T281342

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Lucas_Werkmeister_WMDE
Cc: Lucas_Werkmeister_WMDE, Aklapper, ItamarWMDE, Astuthiodit_1, karapayneWMDE, 
Invadibot, maantietaja, Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, 
QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, 
Mbch331
_______________________________________________
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org

Reply via email to