Page MenuHomePhabricator

parsoidsvc-hhvm-parsertests-jessie fails with RevisionStore for jenkins_u0_mw cannot be used with a DB connection for jenkins_u0_mw-parsertest_
Closed, ResolvedPublic


The parsoidsvc-hhvm-parsertests-jessie job fails to run tests/parser/parserTests.php with:

+ php tests/parser/parserTests.php --color=no --quiet --file=/home/jenkins/workspace/parsoidsvc-hhvm-parsertests-jessie/parsoidsvc/tests/parserTests.txt
This is MediaWiki version 1.32.0-alpha (cf1880a).

Running parser tests from "/home/jenkins/workspace/parsoidsvc-hhvm-parsertests-jessie/parsoidsvc/tests/parserTests.txt"...
[4e2a306f77bd57cf0fc90e16] [no req]   MWException from line 1934 of mediawiki/core/includes/Storage/RevisionStore.php: RevisionStore for jenkins_u0_mw cannot be used with a DB connection for jenkins_u0_mw-parsertest_
#0 mediawiki/core/includes/Storage/RevisionStore.php(364): MediaWiki\Storage\RevisionStore->checkDatabaseWikiId(Wikimedia\Rdbms\DBConnRef)
#1 mediawiki/core/includes/Storage/PageUpdater.php(1089): MediaWiki\Storage\RevisionStore->insertRevisionOn(MediaWiki\Storage\MutableRevisionRecord, Wikimedia\Rdbms\DBConnRef)
#2 mediawiki/core/includes/Storage/PageUpdater.php(727): MediaWiki\Storage\PageUpdater->doCreate(CommentStoreComment, User, integer)
#3 mediawiki/core/includes/page/WikiPage.php(1845): MediaWiki\Storage\PageUpdater->saveRevision(CommentStoreComment, integer)
#4 mediawiki/core/tests/parser/ParserTestRunner.php(1663): WikiPage->doEditContent(WikitextContent, CommentStoreComment, integer)
#5 mediawiki/core/tests/parser/ParserTestRunner.php(1606): ParserTestRunner->addArticle(string, string, string, integer)
#6 mediawiki/core/tests/parser/ParserTestRunner.php(757): ParserTestRunner->addArticles(array)
#7 mediawiki/core/tests/parser/ParserTestRunner.php(689): ParserTestRunner->runTests(array)
#8 mediawiki/core/tests/parser/parserTests.php(188): ParserTestRunner->runTestsFromFiles(array)
#9 mediawiki/core/maintenance/doMaintenance.php(94): ParserTestsMaintenance->execute()
#10 mediawiki/core/tests/parser/parserTests.php(199): include(string)
#11 {main}

The job runs on Nodepool instance with HHVM 3.18 and the SQLite database backend. It installs mediawiki mediawiki just fine.

Event Timeline

hashar created this task.Jul 6 2018, 9:29 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 6 2018, 9:29 AM

git bisect points at mediawiki/core change 6cfdbdf60e69cce31d2f28f0a0e7e478785fe886 by @aaron and @daniel:

commit 6cfdbdf60e69cce31d2f28f0a0e7e478785fe886
Author: daniel <>
Date:   Wed Jul 4 17:20:31 2018 +0200

    Add support for extra database connections in unit tests.
    This adds a way to take any connection to the wiki database and
    allow it to be used for unit tests.
    This is needed to test code that requires two independent DB
    connections, to the same database or to a different wiki's database.
    Change-Id: I0b84a0c4d174cbde830786028ee7568c4ea9fb5d

Notes (review):
    Code-Review+2: Aaron Schulz <>
    Verified+2: jenkins-bot
    Submitted-by: jenkins-bot
    Submitted-at: Thu, 05 Jul 2018 11:05:12 +0000
    Project: mediawiki/core
    Branch: refs/heads/master

 includes/db/CloneDatabase.php       |   8 +--
 tests/phpunit/MediaWikiTestCase.php | 143 +++++++++++++++++++++++++++++++++++--------
 2 files changed, 121 insertions(+), 30 deletions(-)
hashar updated the task description. (Show Details)Jul 6 2018, 10:57 AM
ssastry triaged this task as High priority.Jul 7 2018, 1:54 AM

@aaron, @daniel This is blocking Parsoid code merges. I am right now force merging patches on review, but this is very non-ideal since I may miss changes on the core side that might break tests and which Parsoid has to account for. An early fix (or a revert of the offending commit) appreciated.

Change 444338 had a related patch set uploaded (by Aaron Schulz; owner: Aaron Schulz):
[mediawiki/core@master] Fix ParserTestRunner DB table test prefix logic

Change 444360 had a related patch set uploaded (by Hashar; owner: Hashar):
[mediawiki/services/parsoid@master] (do not submit) Is mediawiki fixed?

hashar closed this task as Resolved.Jul 7 2018, 2:15 PM
hashar assigned this task to aaron.

Change 444338 merged by jenkins-bot:
[mediawiki/core@master] Fix ParserTestRunner DB table test prefix logic

Change 444360 abandoned by Hashar:
(do not submit) Is mediawiki fixed?

Change 445989 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/core@master] Fix test database prefix in MediaWikiTestCase

Change 445989 merged by jenkins-bot:
[mediawiki/core@master] Fix test database prefix in ParserTestTopLevelSuite