Page MenuHomePhabricator

Wikistories test env config settings
Closed, ResolvedPublic

Description

Currently wikistories content doesn't sync with the beta wikipedia article and commons, it has mix between beta cluster and live wikipedia due to the reason we hardcoded the api url in client side. This makes testing in beta difficult. One solution is to add config variables to indicate which API domains should be used according to which to the current site.


Note Info:

  1. InstantCommons - https://www.mediawiki.org/wiki/InstantCommons
  2. CX configurations: https://gerrit.wikimedia.org/g/mediawiki/extensions/ContentTranslation/+/21bd863923c9d74973c28501c251aab2ac2458d8/extension.json#305 https://codesearch.wmcloud.org/search/?q=ContentTranslationSiteTemplates&files=&excludeFiles=&repos=

Event Timeline

PWaigi-WMF triaged this task as Medium priority.Aug 28 2023, 2:12 PM

The decision to use production Commons and article text from Wikipedia production in all environments (local, beta, prod) was deliberate but it is certainly a tradeoff. While it makes development and some testing easier and more pleasant due to the abundance and quality of data, it makes testing that involves modifying external data harder or impossible.

We could easily introduce a few configs to keep the local development experience pleasant and make the QA experience on beta cluster more realistic and enable testing scenarios that include media deletion and article text modifications.

Here's an example of how that could be done:

  • wgWikistoriesCommonsUrl: defaults to production Commons but can be defined on beta to the beta Commons url
  • wgWikistoriesRestUrl: defaults to null, in which case the base url of the current site is used, or a specific value that developers can specify locally to get full article text from production

Change 955365 had a related patch set uploaded (by Eamedina; author: Eamedina):

[mediawiki/extensions/Wikistories@master] Add APIs config variables

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

I reported this over a year ago, but um sure I guess.

If you do fix it the Wikistories will actually break completely due to T344605.

I reported this over a year ago, but um sure I guess.

If you do fix it the Wikistories will actually break completely due to T344605.

Thanks for letting us know. We'll wait for a fix there before switching our config to the beta Commons.

eamedina renamed this task from [Spike] Wikistories test env settings to [Spike] Wikistories test env cofig settings.Sep 6 2023, 8:01 PM
eamedina updated the task description. (Show Details)
SBisson renamed this task from [Spike] Wikistories test env cofig settings to Wikistories test env config settings.Sep 7 2023, 5:55 PM

Change 955365 merged by jenkins-bot:

[mediawiki/extensions/Wikistories@master] Add APIs config variables

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

A few things while setting this up locally with the new config:

The following docs

https://www.mediawiki.org/wiki/Extension:Wikistories
https://www.mediawiki.org/wiki/MediaWiki-Docker/Extension/Wikistories

differ from each other in what needs cloned and in the LocalSettings - should they be the same?


Also in both docs, if it is important for local setup, can we explain the difference between beta and public in these instances for Wikistories Discovery Mode? In one doc it says to use beta and in the other doc it says to use public. I am not sure which is more correct to use for local setup, so it would be good to explain the difference in both docs.


In https://www.mediawiki.org/wiki/Extension:Wikistories, instead of saying the following :

WikistoriesDiscoveryMode can be set to 'public', this allows Wikistories discovery to be shown for all users
WikistoriesRestDomain can be set 'wikipedia.org' to allow full article text to be available locally

The doc is more clear and explicit in https://www.mediawiki.org/wiki/MediaWiki-Docker/Extension/Wikistories with the following:

$wgWikistoriesDiscoveryMode = 'beta';
$wgWikistoriesRestDomain = 'wikipedia.org';

so in https://www.mediawiki.org/wiki/Extension:Wikistories we could say something such as:

WikistoriesDiscoveryMode can be set to 'public', this allows Wikistories discovery to be shown for all users

$wgWikistoriesDiscoveryMode = 'public';

WikistoriesRestDomain can be set 'wikipedia.org' to allow full article text to be available locally

$wgWikistoriesRestDomain = 'wikipedia.org';

I think this more explicit example will allow easier onboarding and setup.


$wgUseInstantCommons = true; should be added to both docs to be added to LocalSettings.php. Without that line, it throws an error that the image cannot be found.

Screen Recording 2023-09-13 at 1.45.46 AM.gif (1×1 px, 3 MB)

I reported this over a year ago, but um sure I guess.

If you do fix it the Wikistories will actually break completely due to T344605.

Thanks for letting us know. We'll wait for a fix there before switching our config to the beta Commons.

I'm not sure anyone is actively working on that as the last comment was 3 weeks ago.

@vaughnwalters it sounds like Wikistories requires Commons. That seems like a limiting factor for the adoption on non-WMF wikis. For example, say Bulbapedia or StrategyWiki would want to use it - Commons doesn't want images of Pokémon or copyrighted video games.

A few things while setting this up locally with the new config:

The following docs

https://www.mediawiki.org/wiki/Extension:Wikistories
https://www.mediawiki.org/wiki/MediaWiki-Docker/Extension/Wikistories

differ from each other in what needs cloned and in the LocalSettings - should they be the same?


Also in both docs, if it is important for local setup, can we explain the difference between beta and public in these instances for Wikistories Discovery Mode? In one doc it says to use beta and in the other doc it says to use public. I am not sure which is more correct to use for local setup, so it would be good to explain the difference in both docs.

Thank you @vaughnwalters for reviewing and providing feedback on the docs! I have updated both docs to be more consistent with each other. Currently the MediaWiki-Docker one is more brief and directly-to-the-point, while the Extension doc provides the same content and goes more into details. I have added a section on configuration options in the Extension docs to explain all differences: https://www.mediawiki.org/wiki/Extension:Wikistories#Configuration_options. Also thanks for catching the missing wgUseInstantCommons

Hope this makes more sense now. In a true wiki-spirit, anyone should feel free to add/edit to these docs as needed. Thanks again!

Since there is no design aspect of this ticket, and docs are updated and clarified and I was able to spin up a new correctly functioning local env with the updated docs, I am moving this to product sign off. 👍🏻 👍🏻