Page MenuHomePhabricator

Wikibase Special:EntityData has 2 parameters that do the same thing
Closed, ResolvedPublic3 Story Points

Description

Currently Special:EntityData has 2 different ways to request a specific revision.

https://github.com/wikimedia/mediawiki-extensions-Wikibase/blob/master/repo/includes/LinkedData/EntityDataRequestHandler.php#L200-L201

"revision" and "oldid"
revision is used far more than oldid T220826#5182044 & T220826#5185202

I propose that we either entirely remove one, or redirect requests that use one to use the other.

The motivations behind this change would be:

  • remove the redundancy / confusions of looking at requests that have different parameters that do the same thing
  • Allow for more cache hits (currently is revision=1 is used and then oldid=1 is used, this results in an unneeded varnish miss)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 12 2019, 2:04 PM
Addshore triaged this task as Low priority.Apr 12 2019, 2:04 PM

I don't think we want to remove one completely as there are probably enough uses out there. If we can redirect one to the other that seems fine from my side though.

@WMDE-leszek @alaa_wmde can you help me get this ready for pickup?

Addshore added a comment.EditedMay 14 2019, 5:29 PM

I took a look at the usage on a current day:

revision	10710135
none	7665964
oldid	2

So oldid is barely used, and revisions is used lots.
Thus revision is probably the main one we should use / keep

Generated with P8524

Addshore updated the task description. (Show Details)May 14 2019, 5:30 PM

@Addshore that sounds like an easy choice then. Would you say it makes sense to see number for some past month or so, to be 100% sure it was not some kind of one-day anomaly? On one hand, the difference seems so huge that I could see that it is not necessary, OTOH it is this huge difference which makes me think about an anomaly in the first place. To be clear, I don't have a strong preference on doing further analysis topic.

Looking at the query in P8524, do I interpret it right that oldid use is only counted when the revision parameter is not used? Do we care about cases when both revision and oldid are part of the input?

Looking at the query in P8524, do I interpret it right that oldid use is only counted when the revision parameter is not used? Do we care about cases when both revision and oldid are part of the input?

Correct

I altered the query to take that into account and ran it for the whole of this month so far.
P8531

revisionparamoldidparamrequests
00170005141
10149359378
012

Not an anomaly, infact, the fact that I even managed to find the 2 requests that used the oldid param is quite amazing, heh...

Addshore updated the task description. (Show Details)May 15 2019, 5:13 PM

Thank you sir. So yes, it does look like oldid could go. And probably should, as what's the point of the additional complexity and source of errors, if it is not intended to be used?

Indeed, let's get rid of oldid :)

alaa_wmde set the point value for this task to 3.Jul 9 2019, 12:12 PM
alaa_wmde moved this task from Ready to estimate to Ready to pick up on the Wikidata-Campsite board.

We decided to remove the legacy redundant oldid. following the usual BC announcement process

Change 523790 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/Wikibase@master] Drop redundant oldid from Special:EntityData

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

Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptJul 16 2019, 6:48 PM

Change 523790 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Drop redundant "oldid" argument from Special:EntityData

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

alaa_wmde closed this task as Resolved.Mon, Jul 29, 11:43 AM

verified in production