Page MenuHomePhabricator

1.28-alpha / Call to undefined method DatabasePostgres::getSchemaPath()
Closed, ResolvedPublic

Description

This used to work with 1.26+ [0], now on MW-master it just throws [1]:

CREATE DATABASE
+php maintenance/install.php --dbtype postgres --dbuser postgres --dbname its_a_mw --pass nyan TravisWiki admin --scriptpath /TravisWiki
PHP 5.5.38 is installed.
Warning: Could not find APCu, XCache or WinCache.
Object caching is not enabled.
Found ImageMagick: /usr/bin/convert.
Image thumbnailing will be enabled if you enable uploads.
Found the Git version control software: /usr/bin/git.
Using server URL "/TravisWiki".
Warning: Your default directory for uploads (/home/travis/build/SemanticMediaWiki/mw/images/) is not checked for vulnerability
to arbitrary script execution during the CLI install.
Using the intl PECL extension for Unicode normalization.
The environment has been checked.
You can install MediaWiki.
Setting up database
done
Checking for language PL/pgSQL
done
Creating schema
done
Creating tables
PHP Fatal error:  Call to undefined method DatabasePostgres::getSchemaPath() in /home/travis/build/SemanticMediaWiki/mw/includes/installer/PostgresInstaller.php on line 609
PHP Stack trace:
PHP   1. {main}() /home/travis/build/SemanticMediaWiki/mw/maintenance/install.php:0
PHP   2. require_once() /home/travis/build/SemanticMediaWiki/mw/maintenance/install.php:156
PHP   3. CommandLineInstaller->execute() /home/travis/build/SemanticMediaWiki/mw/maintenance/doMaintenance.php:110
PHP   4. CliInstaller->execute() /home/travis/build/SemanticMediaWiki/mw/maintenance/install.php:142
PHP   5. Installer->performInstallation() /home/travis/build/SemanticMediaWiki/mw/includes/installer/CliInstaller.php:136
PHP   6. call_user_func:{/home/travis/build/SemanticMediaWiki/mw/includes/installer/Installer.php:1515}() /home/travis/build/SemanticMediaWiki/mw/includes/installer/Installer.php:1515
PHP   7. PostgresInstaller->createTables() /home/travis/build/SemanticMediaWiki/mw/includes/installer/Installer.php:1515

Fatal error: Call to undefined method DatabasePostgres::getSchemaPath() in /home/travis/build/SemanticMediaWiki/mw/includes/installer/PostgresInstaller.php on line 609

Call Stack:
    0.0003     283432   1. {main}() /home/travis/build/SemanticMediaWiki/mw/maintenance/install.php:0
    0.0027     743736   2. require_once('/home/travis/build/SemanticMediaWiki/mw/maintenance/doMaintenance.php') /home/travis/build/SemanticMediaWiki/mw/maintenance/install.php:156
    0.0727   12287376   3. CommandLineInstaller->execute() /home/travis/build/SemanticMediaWiki/mw/maintenance/doMaintenance.php:110
    0.2881   24001600   4. CliInstaller->execute() /home/travis/build/SemanticMediaWiki/mw/maintenance/install.php:142
    0.2881   24002776   5. Installer->performInstallation() /home/travis/build/SemanticMediaWiki/mw/includes/installer/CliInstaller.php:136
    0.3210   24453712   6. call_user_func:{/home/travis/build/SemanticMediaWiki/mw/includes/installer/Installer.php:1515}() /home/travis/build/SemanticMediaWiki/mw/includes/installer/Installer.php:1515
    0.3210   24454048   7. PostgresInstaller->createTables() /home/travis/build/SemanticMediaWiki/mw/includes/installer/Installer.php:1515

Did anyone test this before merging? Its the third time in two weeks that a Database related issue is blocking our integration tests.

[0] https://travis-ci.org/SemanticMediaWiki/SemanticMediaWiki/jobs/168044751
[1] https://travis-ci.org/SemanticMediaWiki/SemanticMediaWiki/jobs/168056742

Event Timeline

Postgres is currently broken, even if that is fixed, see T147599

Change 316233 had a related patch set uploaded (by Paladox):
Add two missing functions to PostgresInstaller.php

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

The above patches partially fixes it, but now I get error

702PHP Fatal error: Call to a member function defaultValue() on a non-object
in /home/travis/build/paladox/mw/includes/installer/PostgresUpdater.php on line 747

703PHP Stack trace:

704PHP 1. {main}() /home/travis/build/paladox/mw/maintenance/update.php:0

705PHP 2. require_once() /home/travis/build/paladox/mw/maintenance/update.php:216

706PHP 3. UpdateMediaWiki->execute() /home/travis/build/paladox/mw/maintenance/doMaintenance.php:110

707PHP 4. DatabaseUpdater->doUpdates() /home/travis/build/paladox/mw/maintenance/update.php:171

708PHP 5. DatabaseUpdater->runUpdates() /home/travis/build/paladox/mw/includes/installer/DatabaseUpdater.php:434

709PHP 6. call_user_func_array:{/home/travis/build/paladox/mw/includes/installer/DatabaseUpdater.php:473}() /home/travis/build/paladox/mw/includes/installer/DatabaseUpdater.php:473

710PHP 7. PostgresUpdater->addSequence() /home/travis/build/paladox/mw/includes/installer/DatabaseUpdater.php:473

711PHP 8. PostgresUpdater->setDefault() /home/travis/build/paladox/mw/includes/installer/PostgresUpdater.php:615

Change 316396 had a related patch set uploaded (by Paladox):
Revert "Move updater/installer specific methods out of DatabaseBase"

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

Change 316233 abandoned by Paladox:
Add two missing functions to DatabasePostgres.php

Reason:
Fixed in I64ccab7f9b74f60309ba0c9a8ce68337c42ffb0f

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

Change 316396 abandoned by Paladox:
Revert "Move updater/installer specific methods out of DatabaseBase"

Reason:
Fixed in I64ccab7f9b74f60309ba0c9a8ce68337c42ffb0f

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

@Paladox: As I cannot understand that sentence, please avoid using a generic "this" but explicitly say what you refer to. Thanks.

Paladox assigned this task to aaron.

This https://gerrit.wikimedia.org/r/316399 fixed the problem.

Closing as resolved.