Page MenuHomePhabricator

get list of users of API module wbeditentity with clear flag
Closed, ResolvedPublic

Description

We have an API module wbeditentity. It has a clear flag that is used to remove all content from a given item or property. This flag has caused a number of issues recently and we are considering getting rid of it. In order to make an informed decision about it we need to know how much it is currently used and who is using it we'd like to have the following information extracted from the HTTP logs:

  • a list of the top 10 user agents or user names using the clear flag
  • the total number of calls to wbeditentity that use the flag vs those that don't, over time

Note: this is complementary to T171609: Track usage of the "clear" feature of wbeditentity in statds, which asks for statsd based tracking.

Event Timeline

daniel renamed this task from get list of users of API module wb_editentity with clear flag to get list of users of API module wbeditentity with clear flag.Jul 31 2017, 11:04 AM

Hi all!

I took a quick look at this today and got you some numbers for the whole of July 2017.

For future the hive query can be seen below:

1SELECT
2 count(*) as count, userAgent
3FROM wmf_raw.apiaction
4WHERE wiki = "wikidatawiki"
5AND array_contains(map_keys(params),'action')
6AND params["action"] = "wbeditentity"
7AND array_contains(map_keys(params),'clear')
8AND year = 2017
9AND month = 7
10GROUP BY userAgent
11ORDER BY count
12LIMIT 999999;

and the result (for those with an NDA) can also be seen below (If you can't see it you need to get added to the NDA phabricator group):

{P5835}

Preliminary analysis:

According to the analysis of P5835 (see comments), it seems that the "clear" lag is used primarily to completely empty out an entity in preparation of turning it into a redirect. We could continue supporting this used case by keeping the "clear" flag, but disallowing any data to be re-added to the entity in the same request. That would avoid the need for determining the "effective" edit for checking permissions, etc.

If we want to remove the clear flag or change semantics, the following tools will be the ones most heavily affected:

  • User:PLbot
  • User:XXN-bot
  • MediaWiki:Gadget-Merge.js
  • MediaWiki:Guidedtour-lib.js

@daniel shall I do a query to see how many uses there are with empty data compared to those with data?

For July

count   emptydata
950     false
56686   true
daniel claimed this task.