Page MenuHomePhabricator

outreachdashboard.wmflabs.org does not count gorwiki's statistics
Closed, ResolvedPublic

Description

Recently I use outreachdashboard.wmflabs.org to count the edits of 6 Indonesian volunteers. One of them edited the Gorontalo Wikipedia. However, his edits do not seem to be counted in the outreachdashboard.wmflabs.org. Despite the person edited a lot in the Gorontalo Wikipedia, his edits appear only a few in the outreachdashboard.wmflabs.org. Can anyone help fixing this? Thank you in advance.

See here, my project where the Gorontalo Wikipedia's statistics do not seem to be counted.

The person edited the Gorontalo Wikipedia is User:Marwan_Mohamad. You can see his contribution on the Gorontalo Wikipedia on April 2020 and compare his statistics on here.

Event Timeline

RhinosF1 added a subscriber: RhinosF1.

Hi @cahyo.ramadhani, thanks for taking the time to report this and welcome to Wikimedia Phabricator!
(If you have any questions about Phabricator itself, please see mw:Phabricator/Help.)

I've looked at this report and I can't tell whether they track issues on Phabricator. The report an issue link seems to point to https://meta.wikimedia.org/w/index.php?title=Talk:Programs_%26_Events_Dashboard&action=edit&section=new

Hi @cahyo.ramadhani, thanks for taking the time to report this and welcome to Wikimedia Phabricator!
(If you have any questions about Phabricator itself, please see mw:Phabricator/Help.)

I've looked at this report and I can't tell whether they track issues on Phabricator. The report an issue link seems to point to https://meta.wikimedia.org/w/index.php?title=Talk:Programs_%26_Events_Dashboard&action=edit&section=new

Ah my bad. Thank you for telling me. I've commented on the Meta page. This task can be closed.

Restricted Application added a subscriber: Base. · View Herald TranscriptMay 4 2020, 9:20 AM

Hmm.... It looks like the query service we use to import revisions from the labs replica database isn't working for gor.wikipedia like it does for other wikis.

When searching for revisions for a user from a particular wiki, the Dashboard makes a request like this: https://tools.wmflabs.org/wikiedudashboard/revisions.php?lang=gor&project=wikipedia&usernames%5B%5D=Marwan+Mohamad&oauth_tags%5B%5D=OAuth+CID%3A+252&oauth_tags%5B%5D=OAuth+CID%3A+212&start=20200410&end=20200515

Unlike with other languages, for gor.wikipedia it returns the "Cannot connect to database" error message: https://github.com/WikiEducationFoundation/WikiEduDashboardTools/blob/master/public_html/common.php#L14

In this case, it's failing to make a connection to hostname gorwiki.labsdb, database name gorwiki_p. I'm not sure what's different here, as that pattern for connection to a labs database works for other languages.

@MusikAnimal any quick ideas about why connecting to the gorwiki database isn't working like others?

I didn't think the *.labsdb hostnames worked anymore. That's surely the problem. You'll want to connect to gorwiki.web.db.svc.eqiad.wmflabs (or gorwiki.analytics.db.svc.eqiad.wmflabs for super slow queries). See https://wikitech.wikimedia.org/wiki/Help:Toolforge/Database#Connecting_to_the_database_replicas

@MusikAnimal thank you! It looks like the old hostnames have continued to work, as we never updated that PHP endpoint on labs until now. I guess the old names were left in place, they just aren't being created for new wikis.

I've just made that change, using the web option, and now gorwiki data comes through as expected (and enwiki still works). That seems to work nicely. Is there documentation on when to use web vs. analytics?

Ragesoss claimed this task.

@cahyo.ramadhani it's counting Gorontalo edits now!

Is there documentation on when to use web vs. analytics?

It's mentioned briefly at https://wikitech.wikimedia.org/wiki/Help:Toolforge/Database#Naming_conventions:

The choice of "analytics" or "web" is up to you. The analytics service name connects to Wiki Replica servers where SQL queries will be allowed to run for a longer duration, but at the cost of all queries being potentially slower. Use of the web service name should be reserved for webservices which are running queries that display to users.

At T177570#3664529 one of the DBAs said analytics was for 1+ hour long queries, so surely web is the most appropriate in this case. Note also analytics seems to have more replication lag -- all the more reason to use web since for the Dashboard you'll want more immediate and up-to-date results, while being perfectly up-to-date probably isn't critical if your query already takes 1+ hours to run.

@cahyo.ramadhani it's counting Gorontalo edits now!

Thank you so much! It's working now!