Page MenuHomePhabricator

RESTBase: enwiki /v1/page/html/Main_Page/ returns revision 1 of a different page
Closed, ResolvedPublic

Description

While figuring out tid I requested http://rest.wikimedia.org/en.wikipedia.org/v1/page/html/Main_Page/

RESTBase responded with two revisions,

{
  "revision": 647785249,
  "tid": "cc5a4b3a-c3b3-11e4-9234-37469f95c2c5"
},
{
  "revision": 1,
  "tid": "4c93eef6-c39f-11e4-9234-e13880af43d2"
}

The first is a recent revision of enwiki's Main_Page as expected. But RESTBase /page/html/{title}/{revision}{/tid} and https://en.wikipedia.org/wiki/Special:Redirect/revision/1 agree that revision 1 is actually a revision of Wikipedia:Wikipedians, not Main_Page. T87393: Figure out long-term page rename handling and page history strategy, especially for old revisions might be relevant.

You can't reach oldid=1 by stepping through ?action=history of either page. the history ends around a few months later in 2002. Maybe early enwiki database history is corrupt, leading to this result. Or it's an Easter Egg :)

Event Timeline

Spage raised the priority of this task from to Low.
Spage updated the task description. (Show Details)
Spage added a project: RESTBase.
Spage subscribed.
GWicke claimed this task.
GWicke subscribed.

S, thanks for the thorough investigation!

There was indeed an issue in RESTBase that caused revisions to be saved under an incorrect requested name, even if it didn't match the revision information. I fixed that just before the prod release, but this test revision still stuck around in the DB. I now manually dropped it and verified that a request to http://rest.wikimedia.org/en.wikipedia.org/v1/page/html/Main_Page/1 won't re-create it. Instead, http://rest.wikimedia.org/en.wikipedia.org/v1/page/revision/1 lists "Wikipedia:Wikipedians" as the proper title, and http://rest.wikimedia.org/en.wikipedia.org/v1/page/html/Wikipedia:Wikipedians/ lists revision 1 as expected.

So, I think the direct issue was actually already fixed (if only fairly recently). The bigger issue of renames is tracked in T87393: Figure out long-term page rename handling and page history strategy, especially for old revisions.

Closing this task as resolved.