Page MenuHomeDevCentral

Add interwiki agora: and wolfplex:
ClosedPublic

Authored by dereckson on Sat, Oct 11, 16:11.
Tags
None
Referenced Files
F12290610: D3736.id9692.diff
Sun, Oct 19, 11:00
F12288407: D3736.id9693.diff
Sun, Oct 19, 00:41
Unknown Object (File)
Sat, Oct 18, 09:59
Unknown Object (File)
Sat, Oct 18, 04:22
Unknown Object (File)
Thu, Oct 16, 22:28
Unknown Object (File)
Thu, Oct 16, 22:13
Unknown Object (File)
Thu, Oct 16, 13:55
Unknown Object (File)
Thu, Oct 16, 12:57
Subscribers
None

Details

Summary

Create a more restricted user for MediaWiki maintenance.
Privileges are limited to the affected tables.

Populate a support SQL script with the interwiki list.
The use of REPLACE allows to avoid to read tables first;
the script is safe to run each time it's modified.

Install MariaDB client on saas-mediawiki role,
so that script can be run from there.

References:

Test Plan
  • Create a link [[agora:Operations grimoire]] on Wolfplex wiki

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Passed
Unit
No Test Coverage
Branch
interwiki-wolfplex-agora
Build Status
Buildable 5991
Build 6273: arc lint + arc unit

Event Timeline

dereckson held this revision as a draft.

+ MariaDB client installation
+ MariaDB user
+ Vault privileges
+ Run support script

dereckson retitled this revision from Populate extra interwiki to Add interwiki agora: and wolfplex:.
dereckson edited the summary of this revision. (Show Details)

Blocked by T2140 for Wolfplex, but we can still run it for Agora.

Seems iw_api needs to be populated or a blank string

roles/saas-mediawiki/mediawiki/files/interwiki/interwiki.sql.jinja
23
ERROR 1048 (23000) at line 19: Column 'iw_api' cannot be null

Per https://dev.mysql.com/doc/refman/5.7/en/user-names.html it's 32 in MySQL and undocumented in MariaDB similar section

Works like a charm:

db-B-001
$ mysql nasqueron_wiki
root@localhost [nasqueron_wiki]> SELECT * FROM interwiki WHERE iw_prefix = 'wolfplex';
+-----------+----------------------------------+--------+------------+----------+----------+
| iw_prefix | iw_url                           | iw_api | iw_wikiid  | iw_local | iw_trans |
+-----------+----------------------------------+--------+------------+----------+----------+
| wolfplex  | https://www.wolfplex.org/wiki/$1 |        | wolfplexdb |        0 |        0 |
+-----------+----------------------------------+--------+------------+----------+----------+
1 row in set (0.000 sec)

Use wolfplex_wiki database per T2410

Same for MariaDB privileges

Avoid logging of database credentials as state name. Env is not logged.

By coherence, host can be in env too.

dereckson published this revision for review.Sun, Oct 12, 15:53
This revision is now accepted and ready to land.Sun, Oct 12, 15:56
This revision was automatically updated to reflect the committed changes.