Page MenuHomePhabricator

Wikibase Lexeme phpunit tests fail with `rev_comment` cannot be null.
Closed, ResolvedPublic

Description

https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-hhvm-docker/11155/console

1) Wikibase\Lexeme\Tests\MediaWiki\Specials\SpecialNewLexemeTest::testEntityIsBeingCreated_WhenValidInputIsGiven with data set "everything is set" (array('en', 'some lemma text', 'Q1', 'Q1'))
Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 
Query: INSERT  INTO `unittest_revision` (rev_page,rev_parent_id,rev_minor_edit,rev_timestamp,rev_deleted,rev_len,rev_sha1,rev_content_model,rev_content_format,rev_comment,rev_user,rev_user_text) VALUES ('2','0','0','20180817061906','0','234','3forpoa5f15i5sk4o9l5q1fvk25fh8e',NULL,NULL,NULL,'0','127.0.0.1')
Function: MediaWiki\Storage\RevisionStore::insertRevisionRowOn
Error: 1048 Column 'rev_comment' cannot be null (/tmp/quibble-mysql-glc9rfco/socket)


/workspace/src/includes/libs/rdbms/database/Database.php:1446
/workspace/src/includes/libs/rdbms/database/Database.php:1416
/workspace/src/includes/libs/rdbms/database/Database.php:1186
/workspace/src/includes/libs/rdbms/database/Database.php:2018
/workspace/src/includes/Storage/RevisionStore.php:744
/workspace/src/includes/Storage/RevisionStore.php:555
/workspace/src/includes/Storage/RevisionStore.php:496
/workspace/src/includes/libs/rdbms/database/Database.php:3734
/workspace/src/includes/libs/rdbms/database/DBConnRef.php:49
/workspace/src/includes/libs/rdbms/database/DBConnRef.php:533
/workspace/src/includes/Storage/RevisionStore.php:498
/workspace/src/includes/Storage/PageUpdater.php:1092
/workspace/src/includes/Storage/PageUpdater.php:730
/workspace/src/extensions/Wikibase/repo/includes/Store/Sql/WikiPageEntityStore.php:319
/workspace/src/extensions/Wikibase/repo/includes/Store/Sql/WikiPageEntityStore.php:207
/workspace/src/extensions/Wikibase/lib/includes/Store/TypeDispatchingEntityStore.php:88
/workspace/src/extensions/Wikibase/repo/includes/EditEntity.php:733
/workspace/src/extensions/Wikibase/repo/includes/Specials/SpecialWikibaseRepoPage.php:186
/workspace/src/extensions/Wikibase/repo/includes/Specials/SpecialNewEntity.php:162
/workspace/src/includes/htmlform/HTMLForm.php:662
/workspace/src/includes/htmlform/HTMLForm.php:554
/workspace/src/extensions/Wikibase/repo/includes/Specials/SpecialNewEntity.php:105
/workspace/src/tests/phpunit/includes/specials/SpecialPageExecutor.php:108
/workspace/src/tests/phpunit/includes/specials/SpecialPageExecutor.php:36
/workspace/src/tests/phpunit/includes/specials/SpecialPageTestBase.php:69
/workspace/src/extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialNewEntityTestCase.php:47
/workspace/src/tests/phpunit/MediaWikiTestCase.php:475
/workspace/src/maintenance/doMaintenance.php:94

2) Wikibase\Lexeme\Tests\MediaWiki\Specials\SpecialNewLexemeTest::testEntityIsBeingCreated_WhenValidInputIsGiven with data set "using special 'mis' lemma language" (array('mis', 'some lemma text', 'Q1', 'Q1'))
Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading? 
Query: INSERT  INTO `unittest_revision` (rev_page,rev_parent_id,rev_minor_edit,rev_timestamp,rev_deleted,rev_len,rev_sha1,rev_content_model,rev_content_format,rev_comment,rev_user,rev_user_text) VALUES ('3','0','0','20180817061906','0','236','h3el83i15slhg26nl06fm7m4kg67xx2',NULL,NULL,NULL,'0','127.0.0.1')
Function: MediaWiki\Storage\RevisionStore::insertRevisionRowOn
Error: 1048 Column 'rev_comment' cannot be null (/tmp/quibble-mysql-glc9rfco/socket)


/workspace/src/includes/libs/rdbms/database/Database.php:1446
/workspace/src/includes/libs/rdbms/database/Database.php:1416
/workspace/src/includes/libs/rdbms/database/Database.php:1186
/workspace/src/includes/libs/rdbms/database/Database.php:2018
/workspace/src/includes/Storage/RevisionStore.php:744
/workspace/src/includes/Storage/RevisionStore.php:555
/workspace/src/includes/Storage/RevisionStore.php:496
/workspace/src/includes/libs/rdbms/database/Database.php:3734
/workspace/src/includes/libs/rdbms/database/DBConnRef.php:49
/workspace/src/includes/libs/rdbms/database/DBConnRef.php:533
/workspace/src/includes/Storage/RevisionStore.php:498
/workspace/src/includes/Storage/PageUpdater.php:1092
/workspace/src/includes/Storage/PageUpdater.php:730
/workspace/src/extensions/Wikibase/repo/includes/Store/Sql/WikiPageEntityStore.php:319
/workspace/src/extensions/Wikibase/repo/includes/Store/Sql/WikiPageEntityStore.php:207
/workspace/src/extensions/Wikibase/lib/includes/Store/TypeDispatchingEntityStore.php:88
/workspace/src/extensions/Wikibase/repo/includes/EditEntity.php:733
/workspace/src/extensions/Wikibase/repo/includes/Specials/SpecialWikibaseRepoPage.php:186
/workspace/src/extensions/Wikibase/repo/includes/Specials/SpecialNewEntity.php:162
/workspace/src/includes/htmlform/HTMLForm.php:662
/workspace/src/includes/htmlform/HTMLForm.php:554
/workspace/src/extensions/Wikibase/repo/includes/Specials/SpecialNewEntity.php:105
/workspace/src/tests/phpunit/includes/specials/SpecialPageExecutor.php:108
/workspace/src/tests/phpunit/includes/specials/SpecialPageExecutor.php:36
/workspace/src/tests/phpunit/includes/specials/SpecialPageTestBase.php:69
/workspace/src/extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialNewEntityTestCase.php:47
/workspace/src/tests/phpunit/MediaWikiTestCase.php:475
/workspace/src/maintenance/doMaintenance.php:94

FAILURES!
Tests: 3809, Assertions: 13787, Errors: 2, Skipped: 25.

Warning: Destructor threw an object exception: exception 'Wikimedia\Rdbms\DBConnectionError' with message 'Cannot access the database: Unknown error (/tmp/quibble-mysql-glc9rfco/socket)' in /workspace/src/includes/libs/rdbms/loadbalancer/LoadBalancer.php:1179
Stack trace:
#0 /workspace/src/includes/libs/rdbms/loadbalancer/LoadBalancer.php(768): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
#1 /workspace/src/includes/GlobalFunctions.php(2798): Wikimedia\Rdbms\LoadBalancer->getConnection()
#2 /workspace/src/extensions/CentralAuth/includes/CentralAuthHooks.php(1528): wfGetDB()
#3 /workspace/src/includes/Hooks.php(174): CentralAuthHooks::onUnitTestsBeforeDatabaseTeardown()
#4 /workspace/src/includes/Hooks.php(202): Hooks::callHook()
#5 /workspace/src/tests/phpunit/MediaWikiTestCase.php(1279): Hooks::run()
#6 /workspace/src/tests/phpunit/bootstrap.php(20): MediaWikiTestCase::teardownTestDB()
#7 (): MediaWikiPHPUnitBootstrap->__destruct()

Event Timeline

Restricted Application added a project: Wikidata. · View Herald TranscriptAug 17 2018, 6:29 AM
Nikerabbit triaged this task as Unbreak Now! priority.Aug 17 2018, 6:58 AM

I confirmed with recheck that this was not one-off :(

Restricted Application added subscribers: Liuxinyu970226, TerraCodes. · View Herald TranscriptAug 17 2018, 6:58 AM

Reproduced failures even without ContentTranslation. Be the looks of the error I suspect https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Wikibase/+/450541/ having something to do with it.

Addshore claimed this task.Aug 17 2018, 7:30 AM
Restricted Application added a project: User-Addshore. · View Herald TranscriptAug 17 2018, 7:30 AM
Addshore added a subscriber: daniel.

Can (involuntarily) reproduce this locally.

Can (involuntarily) reproduce this locally.

Yup, local reproduction running this 1 test case seems pretty easy:

$ mw-docker-dev phpunit-file default extensions/WikibaseLexeme/tests/phpunit/mediawiki/Specials/SpecialNewLexemeTest.php
Using PHP 7.1.20
PHPUnit 6.5.11 by Sebastian Bergmann and contributors.

...EE..........                                                   15 / 15 (100%)

Time: 12.43 seconds, Memory: 48.00MB

There were 2 errors:

1) Wikibase\Lexeme\Tests\MediaWiki\Specials\SpecialNewLexemeTest::testEntityIsBeingCreated_WhenValidInputIsGiven with data set "everything is set" (array('en', 'some lemma text', 'Q1', 'Q1'))
Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: INSERT  INTO `unittest_revision` (rev_page,rev_parent_id,rev_minor_edit,rev_timestamp,rev_deleted,rev_len,rev_sha1,rev_content_model,rev_content_format,rev_comment,rev_user,rev_user_text) VALUES ('2','0','0','20180817074514','0','253','hifukji6srd1qa4km3t4dan911tyw1r',NULL,NULL,NULL,'0','127.0.0.1')
Function: MediaWiki\Storage\RevisionStore::insertRevisionRowOn
Error: 1048 Column 'rev_comment' cannot be null (db-master)


/var/www/mediawiki/includes/libs/rdbms/database/Database.php:1446
/var/www/mediawiki/includes/libs/rdbms/database/Database.php:1416
/var/www/mediawiki/includes/libs/rdbms/database/Database.php:1186
/var/www/mediawiki/includes/libs/rdbms/database/Database.php:2018
/var/www/mediawiki/includes/Storage/RevisionStore.php:744
/var/www/mediawiki/includes/Storage/RevisionStore.php:554
/var/www/mediawiki/includes/Storage/RevisionStore.php:495
/var/www/mediawiki/includes/libs/rdbms/database/Database.php:3734
/var/www/mediawiki/includes/libs/rdbms/database/DBConnRef.php:49
/var/www/mediawiki/includes/libs/rdbms/database/DBConnRef.php:533
/var/www/mediawiki/includes/Storage/RevisionStore.php:497
/var/www/mediawiki/includes/Storage/PageUpdater.php:1092
/var/www/mediawiki/includes/Storage/PageUpdater.php:730
/var/www/mediawiki/extensions/Wikibase/repo/includes/Store/Sql/WikiPageEntityStore.php:318
/var/www/mediawiki/extensions/Wikibase/repo/includes/Store/Sql/WikiPageEntityStore.php:207
/var/www/mediawiki/extensions/Wikibase/lib/includes/Store/TypeDispatchingEntityStore.php:87
/var/www/mediawiki/extensions/Wikibase/repo/includes/EditEntity.php:732
/var/www/mediawiki/extensions/Wikibase/repo/includes/Specials/SpecialWikibaseRepoPage.php:185
/var/www/mediawiki/extensions/Wikibase/repo/includes/Specials/SpecialNewEntity.php:161
/var/www/mediawiki/includes/htmlform/HTMLForm.php:662
/var/www/mediawiki/includes/htmlform/HTMLForm.php:554
/var/www/mediawiki/extensions/Wikibase/repo/includes/Specials/SpecialNewEntity.php:105
/var/www/mediawiki/tests/phpunit/includes/specials/SpecialPageExecutor.php:108
/var/www/mediawiki/tests/phpunit/includes/specials/SpecialPageExecutor.php:36
/var/www/mediawiki/tests/phpunit/includes/specials/SpecialPageTestBase.php:68
/var/www/mediawiki/extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialNewEntityTestCase.php:47
/var/www/mediawiki/tests/phpunit/MediaWikiTestCase.php:475
/var/www/mediawiki/maintenance/doMaintenance.php:94

2) Wikibase\Lexeme\Tests\MediaWiki\Specials\SpecialNewLexemeTest::testEntityIsBeingCreated_WhenValidInputIsGiven with data set "using special 'mis' lemma language" (array('mis', 'some lemma text', 'Q1', 'Q1'))
Wikimedia\Rdbms\DBQueryError: A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: INSERT  INTO `unittest_revision` (rev_page,rev_parent_id,rev_minor_edit,rev_timestamp,rev_deleted,rev_len,rev_sha1,rev_content_model,rev_content_format,rev_comment,rev_user,rev_user_text) VALUES ('3','0','0','20180817074515','0','255','pmu4wnsyc0e3fh9m4thgd2iyldwktbn',NULL,NULL,NULL,'0','127.0.0.1')
Function: MediaWiki\Storage\RevisionStore::insertRevisionRowOn
Error: 1048 Column 'rev_comment' cannot be null (db-master)


/var/www/mediawiki/includes/libs/rdbms/database/Database.php:1446
/var/www/mediawiki/includes/libs/rdbms/database/Database.php:1416
/var/www/mediawiki/includes/libs/rdbms/database/Database.php:1186
/var/www/mediawiki/includes/libs/rdbms/database/Database.php:2018
/var/www/mediawiki/includes/Storage/RevisionStore.php:744
/var/www/mediawiki/includes/Storage/RevisionStore.php:554
/var/www/mediawiki/includes/Storage/RevisionStore.php:495
/var/www/mediawiki/includes/libs/rdbms/database/Database.php:3734
/var/www/mediawiki/includes/libs/rdbms/database/DBConnRef.php:49
/var/www/mediawiki/includes/libs/rdbms/database/DBConnRef.php:533
/var/www/mediawiki/includes/Storage/RevisionStore.php:497
/var/www/mediawiki/includes/Storage/PageUpdater.php:1092
/var/www/mediawiki/includes/Storage/PageUpdater.php:730
/var/www/mediawiki/extensions/Wikibase/repo/includes/Store/Sql/WikiPageEntityStore.php:318
/var/www/mediawiki/extensions/Wikibase/repo/includes/Store/Sql/WikiPageEntityStore.php:207
/var/www/mediawiki/extensions/Wikibase/lib/includes/Store/TypeDispatchingEntityStore.php:87
/var/www/mediawiki/extensions/Wikibase/repo/includes/EditEntity.php:732
/var/www/mediawiki/extensions/Wikibase/repo/includes/Specials/SpecialWikibaseRepoPage.php:185
/var/www/mediawiki/extensions/Wikibase/repo/includes/Specials/SpecialNewEntity.php:161
/var/www/mediawiki/includes/htmlform/HTMLForm.php:662
/var/www/mediawiki/includes/htmlform/HTMLForm.php:554
/var/www/mediawiki/extensions/Wikibase/repo/includes/Specials/SpecialNewEntity.php:105
/var/www/mediawiki/tests/phpunit/includes/specials/SpecialPageExecutor.php:108
/var/www/mediawiki/tests/phpunit/includes/specials/SpecialPageExecutor.php:36
/var/www/mediawiki/tests/phpunit/includes/specials/SpecialPageTestBase.php:68
/var/www/mediawiki/extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialNewEntityTestCase.php:47
/var/www/mediawiki/tests/phpunit/MediaWikiTestCase.php:475
/var/www/mediawiki/maintenance/doMaintenance.php:94

ERRORS!
Tests: 15, Assertions: 18, Errors: 2.

Change 453361 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/WikibaseLexeme@master] Actually format a summary in SpecialNewLexemeTest

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

Addshore moved this task from incoming to other stuff on the Wikidata Lexicographical data board.
Addshore moved this task from incoming to in progress on the Wikidata board.

Change 453361 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Actually format a summary in SpecialNewLexemeTest

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

Addshore closed this task as Resolved.Aug 17 2018, 12:00 PM