Extension:WikimediaEditorTasks/Testing environment setup
This page is obsolete. It is being retained for archival purposes. It may document extensions or features that are obsolete and/or no longer supported. Do not rely on any information on this page. |
A testing environment is set up on the edit-counts
instance in the mobile project in Cloud VPS.
The environment consists of a Wikidata instance (wikidata-edit-counts.wmflabs.org) and six client Wikipedias ({en,es,fr,he,ru,zh}-edit-counts.wmflabs.org). You can create new global user accounts there, create and edit new Wikidata items and Wikipedia pages and link them together freely. A working version of the production in-app description edit counter is enabled, so per-language counts of in-app description edits by logged-in users will be maintained. (Whether the request is in-app is determined by whether the User-Agent header begins with the string "WikipediaApp/
").
An unfortunate limitation of this testing environment is that provisioning any of the mobilefrontend
or restbase
or mobilecontentservice
roles breaks the proxy setup that maps prefixed subdomains to the hosted MW-Vagrant instance's various internal wikis. As a result, pages from the client Wikipedias can't be loaded directly in the app. I recommend instead using the excellent Postman app to interact directly with the Action API on wikidata-edit-counts.wmflabs.org for making description edits.
Example testing flow edit
Create a new user on any wiki, and ensure the account is linked to and logged in on all wikis
- See table at https://<wiki>-edit-counts.wmflabs.org/wiki/Special:CentralAuth/<username> for reference
- Create a new Wikidata item via Special:NewItem
- Create pages on one or more client Wikipedias, and link them to the newly created item through the sitelinks box on its page
- Add description(s) for the newly created item(s) in the language(s) of the linked wiki page(s) via the wikidata-edit-counts.wmflabs.org Action API, using a
WikipediaApp/...
User-Agent header- Make sure you are also logged in to the wikis (specifically
wikidata-
) on whatever client application you are using for this!
- Make sure you are also logged in to the wikis (specifically
- Retrieve current in-app description edit counts from the Action API via the new
action=query&meta=wikimediaeditortasks
module- Results will be for the user currently logged in, or an API error will be returned if no user is logged in
Testing environment setup edit
- Set up MW-Vagrant in Cloud VPS as instructed on wikitech
- Enable roles:
wikidata
,centralauth
, optionallycirrussearch
for app search- If you see a "choose a wiki..." error screen with a broken link to devwiki after provisining a role, try restarting apache to resolve the issue:
vagrant ssh -- sudo service apache2 restart
(T216278)
- If you see a "choose a wiki..." error screen with a broken link to devwiki after provisining a role, try restarting apache to resolve the issue:
- Create a new file
/srv/mediawiki-vagrant/puppet/hieradata/local.yaml
containing the linemediawiki::multiwiki::base_domain: "-<instancename>.wmflabs.org"
, and runvagrant provision
to incorporate the change - Set up web proxies to client wikis, using the
<wiki prefix>-<instancename>.wmflabs.org
pattern, e.g.,:en-edit-counts.wmflabs.org
forenwiki
onedit-counts.mobile.eqiad.wmflabs
- Add entries to sites table for wikidatawiki, if needed
- This should be done for you by the wikidata role, but sometimes is not for some reason
- See Manual:Sites table
- Basically, make it look like this: https://phabricator.wikimedia.org/P8088
- Install WikimediaEditorTasks
- Run
maintenance/update.php
for all wikis to create the required db tables
- Create user and ensure linked to all content wikis (this is fiddly)