Page MenuHomePhabricator

CI fails for WikibaseLexemeCirrusSearch unit tests due to missing class exported by WikibaseLexeme
Closed, ResolvedPublic

Description

WikibaseLexemeCirrusSearch quibble-vendor-mysql-hhvm-docker started to fail for no particular reason.
The failure is :

Fatal error: Class undefined: Wikibase\Lexeme\Tests\DataModel\NewForm in /workspace/src/extensions/WikibaseLexemeCirrusSearch/tests/phpunit/LexemeFieldTest.php on line 29

This class should be exported by WikibaseLexeme composer.json autoload:

"autoload": {
     "psr-4": {
        "Wikibase\\Lexeme\\": "src/",
        "Wikibase\\Lexeme\\Tests\\": "tests/phpunit/composer/"
     }
 },

but it was moved to tests/phpunit/unit

Event Timeline

dcausse created this task.Jul 29 2019, 10:47 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 29 2019, 10:47 AM
dcausse updated the task description. (Show Details)Jul 29 2019, 10:50 AM
dcausse added a project: CirrusSearch.
Restricted Application edited projects, added Discovery-Search; removed Discovery-Search (Current work). · View Herald TranscriptJul 29 2019, 10:51 AM

Change 526127 had a related patch set uploaded (by DCausse; owner: DCausse):
[mediawiki/extensions/WikibaseLexeme@master] Move NewForm.php back to tests/phpunit/composer

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

dcausse claimed this task.Jul 29 2019, 10:55 AM
dcausse triaged this task as Normal priority.
dcausse updated the task description. (Show Details)

Why not fixing WikibaseLexemeCirrusSearch instead of reverting the change? (We searched in codesearch, is WikibaseLexemeCirrusSearch missing there?)

Change 526145 had a related patch set uploaded (by DCausse; owner: DCausse):
[mediawiki/extensions/WikibaseLexemeCirrusSearch@master] Fix namespace for NewForm and NewLexeme

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

Why not fixing WikibaseLexemeCirrusSearch instead of reverting the change? (We searched in codesearch, is WikibaseLexemeCirrusSearch missing there?)

Because I assumed that the Unit namespace was not exported making this classes invisible to WikibaseLexemeCirrusSearch, I've sent a patch there to use the new namespace.

Change 526127 abandoned by DCausse:
Move NewForm.php back to tests/phpunit/composer

Reason:
not needed, simply using the new namespace in WikibaseLexemeCirrusSearch worked

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

Thanks, this worked!
As for codesearch and WikibaseLexemeCirrusSearch I double checked and this project is available.

Change 526145 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexemeCirrusSearch@master] Fix namespace for NewForm and NewLexeme

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

debt closed this task as Resolved.Jul 30 2019, 5:44 PM