Page MenuHomePhabricator

FederatedProperties and WikibaseCirrusSearch are incompatible
Closed, ResolvedPublic

Description

Currently both FederatedProperties and WikibaseCirrusSearch use the WikibaseRepoEntityTypes hook to alter the entity type definitions.

Specifically they both alter Def::ENTITY_SEARCH_CALLBACK

Given that we have no control over when the extension registration code runs these hooks we can't control which takes precidence.

The proposed solution to this is to no-longer make the changes that federated properties requires as a hook but instead call it after the hook has fired so that it will always be the last thing and therefore take precedence.

This highlights the need to be more careful about our entity type definitions.

Event Timeline

Change 677561 had a related patch set uploaded (by Tarrow; author: Tarrow):

[mediawiki/extensions/Wikibase@master] FedProps: ensure FedProps EntityTypeDefinitions are loaded last

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

Is this ready for review or was there another patch somewhere?

17:24:13 Time: 3.93 minutes, Memory: 1.47 GB
17:24:13 
17:24:13 There were 3 failures:
17:24:13 
17:24:13 1) Wikibase\Repo\Tests\Unit\ServiceWiring\EntityTypeDefinitionsTest::testConstruction
17:24:13 Service WikibaseRepo.Settings must be mocked
17:24:13 Failed asserting that an array has the key 'WikibaseRepo.Settings'.
17:24:13 
17:24:13 /workspace/src/extensions/Wikibase/repo/tests/phpunit/unit/ServiceWiringTestCase.php:52
17:24:13 /workspace/src/extensions/Wikibase/repo/includes/WikibaseRepo.php:752
17:24:13 /workspace/src/extensions/Wikibase/repo/WikibaseRepo.ServiceWiring.php:603
17:24:13 /workspace/src/extensions/Wikibase/repo/tests/phpunit/unit/ServiceWiringTestCase.php:84
17:24:13 /workspace/src/extensions/Wikibase/repo/tests/phpunit/unit/ServiceWiring/EntityTypeDefinitionsTest.php:21
17:24:13 
17:24:13 2) Wikibase\Repo\Tests\Unit\ServiceWiring\EntityTypeDefinitionsTest::testRunsHook
17:24:13 Service WikibaseRepo.Settings must be mocked
17:24:13 Failed asserting that an array has the key 'WikibaseRepo.Settings'.
17:24:13 
17:24:13 /workspace/src/extensions/Wikibase/repo/tests/phpunit/unit/ServiceWiringTestCase.php:52
17:24:13 /workspace/src/extensions/Wikibase/repo/includes/WikibaseRepo.php:752
17:24:13 /workspace/src/extensions/Wikibase/repo/WikibaseRepo.ServiceWiring.php:603
17:24:13 /workspace/src/extensions/Wikibase/repo/tests/phpunit/unit/ServiceWiringTestCase.php:84
17:24:13 /workspace/src/extensions/Wikibase/repo/tests/phpunit/unit/ServiceWiring/EntityTypeDefinitionsTest.php:33
17:24:13 
17:24:13 3) Wikibase\Lib\Tests\PHPUnitTestsHaveGroupWikibaseTest::testTestsHaveGroup with data set #3 ('repo')
17:24:13 All Wikibase repo PHPUnit tests should have "@group Wikibase" on them.
17:24:13 Failed asserting that two arrays are identical.
17:24:13 --- Expected
17:24:13 +++ Actual
17:24:13 @@ @@
17:24:13 -Array &0 ()
17:24:13 +Array &0 (
17:24:13 +    0 => '/workspace/src/extensions/Wikibase/lib/tests/phpunit/../../../repo/tests/phpunit/includes/EntityTypeDefinitionsIntegrationTest.php'
17:24:13 +)
17:24:13 
17:24:13 /workspace/src/extensions/Wikibase/lib/tests/phpunit/PHPUnitTestsHaveGroupWikibaseTest.php:32
17:24:13 
17:24:13 FAILURES!
17:24:13 Tests: 20762, Assertions: 70482, Failures: 3, Skipped: 95.

Change 677561 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] FedProps: ensure FedProps EntityTypeDefinitions are loaded last

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

Change 682103 had a related patch set uploaded (by Tobias Andersson; author: Tarrow):

[mediawiki/extensions/Wikibase@REL1_36] FedProps: ensure FedProps EntityTypeDefinitions are loaded last

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

Change 682103 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@REL1_36] FedProps: ensure FedProps EntityTypeDefinitions are loaded last

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