Page MenuHomePhabricator

Wikibase client ApiListEntityUsage and ApiPropsEntityUsage share the same prefix 'wbeu'
Closed, DuplicatePublic

Description

While running MediaWiki core tests with Wikibase, I eventually got a failure:

1) PrefixUniquenessTest::testPrefixes
Module prefix 'wbeu' is shared between Wikibase\Client\Api\ApiListEntityUsage and Wikibase\Client\Api\ApiPropsEntityUsage

tests/phpunit/includes/api/PrefixUniquenessTest.php:24
tests/phpunit/MediaWikiTestCase.php:469
maintenance/doMaintenance.php:94

PrefixUniquenessTest::testPrefixes is described as:

Checks that all API query modules, core and extensions, have unique prefixes.

It is part of mediawiki/core, since the test is not a structure test, it is never run for extension, only for mediawiki/core patches. Which explains why it has never been noticed yet.

Related code:

client/includes/Api/ApiListEntityUsage.php:34:          parent::__construct( $query, $moduleName, 'wbeu' );
client/includes/Api/ApiPropsEntityUsage.php:32:         parent::__construct( $query, $moduleName, 'wbeu' );

Module references:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 440881 had a related patch set uploaded (by Hashar; owner: Hashar):
[mediawiki/core@master] api: PrefixUniquenessTest is a structure test

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

I should have searched in Phabricator first! Thank you

Change 440881 abandoned by Hashar:
api: PrefixUniquenessTest is a structure test

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

Vvjjkkii renamed this task from Wikibase client ApiListEntityUsage and ApiPropsEntityUsage share the same prefix 'wbeu' to 1qaaaaaaaa.Jul 1 2018, 1:03 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
CommunityTechBot renamed this task from 1qaaaaaaaa to Wikibase client ApiListEntityUsage and ApiPropsEntityUsage share the same prefix 'wbeu'.Jul 2 2018, 4:41 AM
CommunityTechBot closed this task as a duplicate.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added subscribers: gerritbot, Aklapper.