Handle page content data being for a different revision compared to the API-added data
Closed, ResolvedPublic8 Story Points

Description

Currently, we get the revid and timestamp information from the API, which gets them from the DB right before or after issuing the Parsoid request, assuming they'll be the same. That's fragile but also silly, because we should be getting this information from the Parsoid HTML's <head> instead.

Catrope created this task.Mar 17 2015, 7:23 PM
Catrope updated the task description. (Show Details)
Catrope raised the priority of this task from to Needs Triage.
Catrope added a subscriber: Catrope.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 17 2015, 7:23 PM
Catrope set Security to None.
Catrope edited a custom field.
Jdforrester-WMF triaged this task as High priority.Mar 17 2015, 7:24 PM

The revision's timestamp should be in the parsoid HTML so it can be edited without having to get more data from the API. (The API requires it for conflict detection.)
Roan was speaking earlier about trying to move the 'editingold' message to the client (which is messy because that has to be parsed server-side), but a lot more than that would break if/when they return different IDs... Page existence, protection, etc. So we should error or retry (with the higher ID) when we get different IDs from RESTBase and VE-MW.

Krenair renamed this task from Move oldid/timestamp inference from API module to client-side JS to Handle page content data being for a different revision compared to the API-added data.Mar 19 2015, 3:12 AM
Krenair added a comment.EditedMar 19 2015, 3:16 AM

Me and Roan talked and agreed that we should take the revision IDs from both pieces of data and retry the older one if it's for a different revision. It should probably be kept in mind for T90374: Retrieve page HTML directly from RESTbase

The revision's timestamp should be in the parsoid HTML so it can be edited without having to get more data from the API. (The API requires it for conflict detection.)

It turns out we already have this:

<meta property="dc:modified" content="2015-03-19T23:26:34.000Z"/>

Which, based on the Parsoid source, is the rev_timestamp.

(But this is probably irrelevant now.)

Change 198393 had a related patch set uploaded (by Alex Monk):
Check for the two revision IDs returned by the server being different

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

Jdforrester-WMF closed this task as Resolved.Mar 25 2015, 8:51 PM
Jdforrester-WMF moved this task from Accepted to Done on the VisualEditor 2014/15 Q3 blockers board.

Change 198393 merged by jenkins-bot:
Check for the two revision IDs returned by the server being different

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