Page MenuHomePhabricator

Fix parser tests runner to use wfGetDB correctly
Closed, ResolvedPublic

Description

Parsoid's PHP parser tests jenkins job started failing after https://gerrit.wikimedia.org/r/c/mediawiki/core/+/501984 got merged. See stack trace below.
For now, @Krinkle reverted that patch but we need to figure out the problem in the test runner and fix it.

Wikimedia\Rdbms\DBUnexpectedError from line 113 of /workspace/src/includes/libs/rdbms/database/DBConnRef.php: Database selection is disallowed to enable reuse.
#0 /workspace/src/includes/db/CloneDatabase.php(88): Wikimedia\Rdbms\DBConnRef->tablePrefix()
#1 /workspace/src/tests/parser/ParserTestRunner.php(1331): CloneDatabase->cloneTableStructure()
#2 /workspace/src/tests/parser/ParserTestRunner.php(692): ParserTestRunner->setupDatabase()
#3 /workspace/src/tests/parser/parserTests.php(189): ParserTestRunner->runTestsFromFiles()
#4 /workspace/src/maintenance/doMaintenance.php(99): ParserTestsMaintenance->execute()
#5 /workspace/src/tests/parser/parserTests.php(200): include()
#6 {main}
INFO:backend.DevWebServer:Terminating DevWebServer
Traceback (most recent call last):
  File "/usr/local/bin/quibble", line 11, in <module> 
    load_entry_point('quibble==0.0.0', 'console_scripts', 'quibble')()
  File "/usr/local/lib/python3.5/dist-packages/quibble/cmd.py", line 435, in main
    cmd.execute(plan)
  File "/usr/local/lib/python3.5/dist-packages/quibble/cmd.py", line 410, in execute
    command.execute()
  File "/usr/local/lib/python3.5/dist-packages/quibble/commands.py", line 551, in execute
    cmd, shell=True, cwd=self.mw_install_path)
  File "/usr/lib/python3.5/subprocess.py", line 271, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'mediawiki/services/parsoid/tools/ci-mw-parsertests.sh' returned non-zero exit status 1

Event Timeline

ssastry created this task.Jul 24 2019, 7:19 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 24 2019, 7:19 PM
ssastry triaged this task as High priority.Jul 24 2019, 7:20 PM
ssastry edited projects, added Parsoid-Tests; removed MediaWiki-Parser.

Change 525433 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/core@master] Replace wfGetDB in ParserTestRunner

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

Tgr added a subscriber: Tgr.Jul 24 2019, 10:03 PM

Codesearch suggests SMW is the only other thing affected, made #4166.

Change 525433 merged by jenkins-bot:
[mediawiki/core@master] Replace wfGetDB in ParserTestRunner

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

ssastry lowered the priority of this task from High to Medium.Mar 8 2020, 10:08 PM
cscott closed this task as Resolved.Mar 27 2020, 4:13 PM
cscott assigned this task to Tgr.
cscott added a subscriber: cscott.

I believe this was fixed by @Tgr in the patch above.