Page MenuHomePhabricator

Wikibase/WikibaseLexeme CI broken: PHP Fatal error: An alias (traitDumpSeedForReproducing) was defined for method dumpSeedForReproducing(), but this method does not exist
Closed, ResolvedPublic

Description

Seen e.g. in this job:

........................................PHP Fatal error:  An alias (traitDumpSeedForReproducing) was defined for method dumpSeedForReproducing(), but this method does not exist in /workspace/src/extensions/WikibaseLexeme/tests/phpunit/composer/ErisGenerators/PHPUnitTestCaseWrapper.php on line 11
Script phpunit handling the phpunit event returned with error code 255
Script @phpunit was called via phpunit:entrypoint
Worker exited with status 255

Event Timeline

Upstream removed dumpSeedForReproducing() in version 1.0.0; @Zabe upgraded MediaWiki core’s version of this dependency from 0.14.0/0.14.1 to 1.0.0, even though this breaks WikibaseLexeme and WikibaseLexeme still declares a dependency on ^0.14.0. And apparently this means CI will disregard WikibaseLexeme’s dependency version (I seem to recall this is why MediaWiki core declares the dependency to begin with? it’s not actually used in core itself) and install version 1.0.0.

Change #1193803 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/WikibaseLexeme@master] Stop making TestTrait::dumpSeedForReproducing() public

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

Change #1193804 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/WikibaseLexeme@master] Update giorgiosironi/eris from ^0.14.0 to ^1.0.0

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

Change #1193806 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/core@master] Revert "Upgraded giorgiosironi/eris to 1.0"

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

Change #1193803 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/WikibaseLexeme@master] Stop making TestTrait::dumpSeedForReproducing() public

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

This fails in CI; I can’t find any error in the log other than “Killed” (i.e. received SIGKILL, if I’m not mistaken). But locally I get a bunch of errors like this:

There were 48 errors:                                                                                                                                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                                                                                                                              
1) Wikibase\Lexeme\Tests\DataModel\Serialization\StorageLexemeSerializerTest::testSerializedLexemeIsDeserializedToTheSameLexeme                                                                                                                                                                                                                                                               
Error: Call to undefined method Wikibase\Lexeme\Tests\DataModel\Serialization\StorageLexemeSerializerTest::name()                                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                                                                                                                                              
/srv/http/wiki1/extensions/WikibaseLexeme/tests/phpunit/composer/ErisGenerators/PHPUnitTestCaseWrapper.php:32                                                                                                                                                                                                                                                                                 
/srv/http/wiki1/vendor/giorgiosironi/eris/src/TestTrait.php:61                                                                                                                                                                                                                                                                                                                                
/srv/http/wiki1/vendor/giorgiosironi/eris/src/TestTrait.php:89                                                                                                                                                                                                                                                                                                                                
/srv/http/wiki1/extensions/WikibaseLexeme/tests/phpunit/composer/ErisGenerators/ErisTest.php:38                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                                                              
2) Wikibase\Lexeme\Tests\DataModel\Serialization\StorageLexemeSerializerTest::testSerializedLexemeIsDeserializedToTheSameLexeme_FullRoundTrip                                                                                                                                                                                                                                                 
Error: Call to undefined method Wikibase\Lexeme\Tests\DataModel\Serialization\StorageLexemeSerializerTest::name()                                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                                                                                                                                              
/srv/http/wiki1/extensions/WikibaseLexeme/tests/phpunit/composer/ErisGenerators/PHPUnitTestCaseWrapper.php:32                                                                                                                                                                                                                                                                                 
/srv/http/wiki1/vendor/giorgiosironi/eris/src/TestTrait.php:61                                                                                                                                                                                                                                                                                                                                
/srv/http/wiki1/vendor/giorgiosironi/eris/src/TestTrait.php:89                                                                                                                                                                                                                                                                                                                                
/srv/http/wiki1/extensions/WikibaseLexeme/tests/phpunit/composer/ErisGenerators/ErisTest.php:38                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                                                              
3) Wikibase\Lexeme\Tests\DataModel\Serialization\StorageLexemeSerializerTest::testSerializationIsStable                                                                                                                                                                                                                                                                                       
Error: Call to undefined method Wikibase\Lexeme\Tests\DataModel\Serialization\StorageLexemeSerializerTest::name()

Which I expect is simply because Eris 1.0.0 is only compatible with PHPUnit 10, which we’re not using yet (T328919).

Change #1193801 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Arthur taylor):

[mediawiki/extensions/Wikibase@master] [DNM] Test CI

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

Which I expect is simply because Eris 1.0.0 is only compatible with PHPUnit 10, which we’re not using yet (T328919).

Yup, PHPUnit renamed TestCase::getName() to name() (and getName( withDataSet: true ) to nameWithDataSet()) in the (very descriptively titled) commit Refactor.

If we really want to use Eris 1.0.0, we could probably try to work around this in WikibaseLexeme (add a name() method to PHPUnitTestCaseWrapper). But for now it seems simpler to revert the upgrade.

Change #1193804 abandoned by Lucas Werkmeister (WMDE):

[mediawiki/extensions/WikibaseLexeme@master] Update giorgiosironi/eris from ^0.14.0 to ^1.0.0

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

Change #1193806 merged by jenkins-bot:

[mediawiki/core@master] Revert "Upgraded giorgiosironi/eris to 1.0"

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

Change #1193803 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Partially prepare for Eris 1.0.0 upgrade

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

Lucas_Werkmeister_WMDE claimed this task.

Change #1193803 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Partially prepare for Eris 1.0.0 upgrade

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

I think this sufficiently demonstratres that CI is working again – closing.

Change #1193801 abandoned by Lucas Werkmeister (WMDE):

[mediawiki/extensions/Wikibase@master] [DNM] Test CI

Reason:

no longer needed

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