Page MenuHomePhabricator

Do not duplicate database credentials
Closed, ResolvedPublic

Description

Problem

At production, config.yaml looks like this:

SECRET_KEY: redacted
MESSAGES_DIR: ../messages
SQLALCHEMY_DATABASE_URI: mysql://s54184:redacted@tools.db.svc.eqiad.wmflabs/s54184__watch_translations
STATIC_URL: https://tools-static.wmflabs.org/watch-translations/
APPLICATION_ROOT: /
CONSUMER_KEY: d3f5e7b53b7987b073e07b927d81ecb5
CONSUMER_SECRET: redacted
OAUTH_MWURI: https://meta.wikimedia.org/w
DEBUG: True
FROM_EMAIL: tools.watch-translations@tools.wmflabs.org

It would be cool if the tool could just fetch the credentials from the replica.my.cnf file, which is a MariaDB option file generated by the system.

Proposed solution

Make changes resolving the problem described above.

Student is expected to upload a patch against labs/tools/watch-translations repository at Wikimedia Gerrit. Student should claim Phabricator task while claiming task at the GCI site.

Materials

Event Timeline

Change 558223 had a related patch set uploaded (by Arcayn; owner: Arcayn):
[labs/tools/watch-translations@master] Pull DB credentials from production mariadb config file

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

Change 558223 merged by jenkins-bot:
[labs/tools/watch-translations@master] Pull DB credentials from production mariadb config file

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

Closing as patch was merged