Page MenuHomePhabricator

Vagrant instances should be automatically setup with interwiki language support
Open, MediumPublic

Description

Either as a role.. or by default.

Mobilefrontend for instance has various pieces of language code that cannot be tested without this and we have to manually run this to get an instance up and running with browser tests.

use wiki; INSERT INTO interwiki (iw_prefix, iw_url, iw_local, iw_trans) VALUES ("es", "http://wikifoo.org/es/index.php/$1", 0, 0);

Event Timeline

Jdlrobson assigned this task to rmoen.
Jdlrobson raised the priority of this task from to High.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added subscribers: bmansurov, phuedx, Jdlrobson and 3 others.

Basically a dup of T93375. This is harder than it seems.

bd808 added a comment.Jul 23 2015, 1:46 AM

I did some work at https://gerrit.wikimedia.org/r/#/c/224553/ to make managing an interwiki CDB cache file from Puppet possible. This has the nice property that multiple wikis in a mw-vagrant managed farm could all point at the same cache file. Otherwise managing the individual interwiki tables from Puppet gets pretty tricky.

KLans_WMF set Security to None.Jul 23 2015, 5:06 PM

Should we merge the two cards @bd808 - will the other card setup some inter language wiki links?

bd808 added a comment.Jul 24 2015, 9:22 PM

Should we merge the two cards @bd808 - will the other card setup some inter language wiki links?

Well... I might. What is the desired outcome for this particular use case? "interwiki links" is kind of nebulous. The specific example that is in the description here is a special sort of iwlink that the WMF wikis setup to link to language variants of the same project. I'm guessing this is what you are missing for your Mobilefrontend testing. Probably for an "article in other languages" feature test or something similar.

MediaWiki-Vagrant's wiki farm support is pretty basic at the moment. There are several roles that have taken a shot at setting up a few language variant wikis but they are all incompatible (meaning if you enable 2 of them Puppet will barf). I wonder if we shouldn't make a role that sets up 4 or 5 language variant wikis (with some RTLs thrown in) that other roles can require to get this basic setup.

Basically the outcome we need is this:
Given I go to a page "Foo"
When I edit the text with "[[es:Random page]]"
Then I add an interwiki link to the corresponding Spanish version.

(I guess more generically we might cover more languages then just spanish)

Basically the outcome we need is this:
Given I go to a page "Foo"
When I edit the text with "[[es:Random page]]"
Then I add an interwiki link to the corresponding Spanish version.

(I guess more generically we might cover more languages then just spanish)

How do you test the Then? Are you expecting to do some transform on the current URL/host and validate that in the anchor's href?

rmoen removed rmoen as the assignee of this task.Jul 28 2015, 6:51 PM
Jdlrobson added a comment.EditedJul 28 2015, 10:40 PM

@bd808 we test by the existence of the white languages button e.g. http://en.m.wikipedia.beta.wmflabs.org/wiki/Selenium_language_test_page or in desktop we would do this via an interwiki link.

bd808 claimed this task.Jul 30 2015, 9:40 PM

I talked this over with @Jdlrobson on irc and I think I follow now. It seems that the minimum viable support for the tests should be to populate the interwiki table with some language prefix links. These don't really need to point anywhere useful; they just need to exist to trigger the skin system to include language links. They also only need to be present on mobile.wiki.local.wmftest.net/mobilewiki within the VM.

Change 228202 had a related patch set uploaded (by BryanDavis):
Add mediawiki::iwlink define and use it with role::mobilefrontend

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

@phuedx I had some issues with caching - https://www.mediawiki.org/wiki/Interwiki_cache - you make need to vagrant reload. Can you confirm?

Jdlrobson added a comment.EditedAug 26 2015, 8:50 PM

I wonder if MobileFrontend's browser test needs could simply be achieved by running an sql query in the browser test specific LocalSettings.php...?

I've moved this back into Code Review while I test out @Jdlrobson's comment (read: provision yet another MediaWiki-Vagrant machine).

bd808 removed bd808 as the assignee of this task.Sep 9 2015, 12:21 AM

Unlicking this cookie

bd808 lowered the priority of this task from High to Medium.Oct 14 2015, 10:27 PM

Change 228202 abandoned by BryanDavis:
Add mediawiki::iwlink define and use it with role::mobilefrontend

Reason:
No time or energy to work on this. If anyone wants to pick it up feel free to reinstate or just barrow any of the ideas here if they are useful.

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

Jhernandez removed a subscriber: Jhernandez.Apr 2 2020, 6:46 PM