Page MenuHomePhabricator

Error message says just about PostgreSQL if no database is available
Closed, InvalidPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  1. mw dev mediawiki create
  2. mw dev mysql create
  3. mw dev mediawiki install --dbtype mysql

Then try either:
4-1. mw dev mysql destroy and access http://default.mediawiki.mwdd.localhost:8080/
4-2. or just access http://RANDOM-STRING.mediawiki.mwdd.localhost:8080/

What happens?:

A page with the next error is shown:

Warning: Uncaught Wikimedia\Rdbms\DBConnectionError: Cannot access the database: Unable to connect to PostgreSQL server: could not translate host name "postgres" to address: Name or service not known (postgres)

What should have happened instead?:

A message should appear that says there is no database available, without mentioning specific DB type.

Software version:

mw version:
GitCommit: 1f910e3
GitBranch: master
GitState: dirty
GitSummary: 1f910e3
BuildDate: 2021-07-14T23:35:23Z
Version: v0.1.0

Event Timeline

Lens0021 closed this task as Invalid.EditedOct 3 2021, 1:05 PM

Already fixed in https://gitlab.wikimedia.org/releng/cli/-/commit/5a01d850043d098d14524c5fd90faf5ac89e3d09. Just my "$(mw dev where)/mediawiki/MwddSettings.php" was older somehow.

Already fixed in https://gitlab.wikimedia.org/releng/cli/-/commit/5a01d850043d098d14524c5fd90faf5ac89e3d09. Just my "$(mw dev where)/mediawiki/MwddSettings.php" was older somehow.

This file should be checked, and updated every time a mwdd command is run
This happens in ensureInMemoryFilesAreOnDisk which you can find in files.disk.go
It could be that it has a bug though, it has quite a few TODOs

TODO This is way to complex, and should be more clever.. checking a hash or something? and be more lightweight*/