Page MenuHomePhabricator

Fix "DatabaseSqlite::replace/single-row NOT NULL constraint failed" for md_module table
Closed, ResolvedPublic

Description

For example in https://integration.wikimedia.org/ci/job/mediawiki-phpunit-hhvm/3669/artifact/log/mw-dberror.log/*view*/

Wed Mar 4 20:46:58 UTC 2015	integration-slave1008	my_wiki-unittest_	DatabaseSqlite::replace/single-row		19
NOT NULL constraint failed: unittest_module_deps.md_module
REPLACE INTO unittest_module_deps (md_module,md_skin,md_deps)
VALUES (NULL,'vector','["/mnt/jenkins-workspace/workspace/mediawiki-phpunit-hhvm/src/tests/phpunit/data/less/module/styles.less","/mnt/jenkins-workspace/workspace/mediawiki-phpunit-hhvm/src/tests/phpunit/data/less/module/dependency.less","/mnt/jenkins-workspace/workspace/mediawiki-phpunit-hhvm/src/tests/phpunit/data/less/common/test.common.mixins.less"]')

Edited stack trace from https://integration.wikimedia.org/ci/job/mediawiki-phpunit-hhvm/3669/artifact/log/mw-debug-cli.log/*view*/

Function: DatabaseSqlite::replace/single-row
Error: 19 NOT NULL constraint failed: unittest_module_deps.md_module
' in includes/db/Database.php:1249
Stack trace:
#0 includes/db/Database.php(1205): DatabaseBase->reportQueryError()
#1 includes/db/Database.php(2914): DatabaseBase->query()
#2 includes/db/DatabaseSqlite.php(611): DatabaseBase->nativeReplace()
#3 includes/resourceloader/ResourceLoaderFileModule.php(420): DatabaseSqlite->replace()
#4 tests/phpunit/includes/resourceloader/ResourceLoaderTest.php(88): ResourceLoaderFileModule->getStyles()
#5 (): ResourceLoaderTest->testLessFileCompilation()
#6 PHPUnit/Framework/TestCase.php(988): ReflectionMethod->invokeArgs()
#7 PHPUnit/Framework/TestCase.php(838): PHPUnit_Framework_TestCase->runTest()
#8 PHPUnit/Framework/TestResult.php(648): PHPUnit_Framework_TestCase->runBare()
#9 PHPUnit/Framework/TestCase.php(783): PHPUnit_Framework_TestResult->run()
#10 tests/phpunit/MediaWikiTestCase.php(132): PHPUnit_Framework_TestCase->run()
#11 PHPUnit/Framework/TestSuite.php(779): MediaWikiTestCase->run()
#12 PHPUnit/Framework/TestSuite.php(749): PHPUnit_Framework_TestSuite->runTest()
#13 PHPUnit/Framework/TestSuite.php(709): PHPUnit_Framework_TestSuite->run()
#14 PHPUnit/Framework/TestSuite.php(709): PHPUnit_Framework_TestSuite->run()
#15 PHPUnit/TextUI/TestRunner.php(350): PHPUnit_Framework_TestSuite->run()
#16 PHPUnit/TextUI/Command.php(176): PHPUnit_TextUI_TestRunner->doRun()
#17 PHPUnit/TextUI/Command.php(129): PHPUnit_TextUI_Command->run()
#18 tests/phpunit/phpunit.php(239): PHPUnit_TextUI_Command::main()
#19 {main}

Wondering why ResourceLoaderTest->testLessFileCompilation() does fail though.

And https://integration.wikimedia.org/ci/job/mediawiki-phpunit-zend/3692/artifact/log/mw-dberror.log/*view*/

Wed Mar 4 20:49:49 UTC 2015	lanthanum	my_wiki-unittest_	DatabaseSqlite::replace/single-row		19
unittest_module_deps.md_module may not be NULL
REPLACE INTO unittest_module_deps (md_module,md_skin,md_deps)
VALUES (NULL,'vector','["/srv/ssd/jenkins-slave/workspace/mediawiki-phpunit-zend/src/tests/phpunit/data/less/module/styles.less","/srv/ssd/jenkins-slave/workspace/mediawiki-phpunit-zend/src/tests/phpunit/data/less/module/dependency.less","/srv/ssd/jenkins-slave/workspace/mediawiki-phpunit-zend/src/tests/phpunit/data/less/common/test.common.mixins.less"]')

Event Timeline

Krinkle created this task.Mar 4 2015, 9:08 PM
Krinkle claimed this task.
Krinkle raised the priority of this task from to Normal.
Krinkle updated the task description. (Show Details)
Krinkle added subscribers: Krinkle, hashar.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 4 2015, 9:08 PM
Krinkle updated the task description. (Show Details)Mar 4 2015, 9:19 PM
Krinkle set Security to None.
hashar updated the task description. (Show Details)Mar 5 2015, 8:40 AM
hashar updated the task description. (Show Details)Mar 5 2015, 8:45 AM

Change 194794 had a related patch set uploaded (by Krinkle):
resourceloader: Call setName() in test suite before calling getStyles()

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

Change 194794 merged by jenkins-bot:
resourceloader: Call setName() in test suite before calling getStyles()

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

Krinkle closed this task as Resolved.Mar 6 2015, 4:14 PM

Change 194887 had a related patch set uploaded (by Krinkle):
resourceloader: Call setName() in test suite before calling getStyles()

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

Change 194888 had a related patch set uploaded (by Krinkle):
resourceloader: Call setName() in test suite before calling getStyles()

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

Change 194889 had a related patch set uploaded (by Krinkle):
resourceloader: Call setName() in test suite before calling getStyles()

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

Change 194890 had a related patch set uploaded (by Krinkle):
resourceloader: Call setName() in test suite before calling getStyles()

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

Change 194890 merged by jenkins-bot:
resourceloader: Call setName() in test suite before calling getStyles()

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

Change 194889 merged by jenkins-bot:
resourceloader: Call setName() in test suite before calling getStyles()

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

Change 194887 merged by jenkins-bot:
resourceloader: Call setName() in test suite before calling getStyles()

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

Change 194888 merged by jenkins-bot:
resourceloader: Call setName() in test suite before calling getStyles()

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