Page MenuHomePhabricator

Content Translation should load data-mw from a separate API call alongside the body content
Open, NormalPublic0 Story Points

Description

CX should be updated to fetch data-mw in a separate API call from RESTBase. Whether CX wants to inline the data-mw into the HTML or handle data-mw separately would be something for CX to resolve. But, processing the data-mw by inlining it into the HTML would be a straightforward way to handle this change. Parsoid (and RESTBase) will accept inlined data-mw or a separate data-mw blob in the html -> wt API end points.

In order to minimize the performance impact in the Parsoid production cluster from having to return the old version, RESTBase and Parsoid won't bump the HTML version number in production till CX and other Parsoid HTML clients are ready to consume this newer version. So, it is good to start work on this sooner than later.

At the time of deploying this change to production, CX would also have to update the version string in the Accept: header based on the updates T130638: Add data-mw as a separate JSON blob in the pagebundle output of Parsoid's API.

Event Timeline

ssastry created this task.Mar 22 2016, 5:25 PM

Note that we are at least 3-4 weeks away before both Parsoid and RESTBase are ready with code, storage, and API changes. At that point, we will also have to evaluate which of the clients are ready to switch over, and if not, what the performance impacts are on the Parsoid cluster (to convert from the new to the old version), and whether any of the clients have any blockers on this deployment. But, I am creating new tasks for all Parsoid HTML clients to start surfacing any issues that need to resolved for T78676: Store & load data-mw separately to be enabled in production.

https://en.wikipedia.org/api/rest_v1/?doc#!/Page_content/getFormatRevision does not seem allow to try out the new Accept header version yet.

And whether to load data-mw in CX frontend or in cxserver...

  1. cxserver doesn't really need it, but...
  2. Special:CX is already heavy on client side, so doing the extra load and merge in there could make it even slower
  3. To make sure we have the matching versions, I would do it in cxserver
  4. We need to store the merged things in the corpora table anyway with current design, so we need to merge them instead of storing separately.

https://en.wikipedia.org/api/rest_v1/?doc#!/Page_content/getFormatRevision does not seem allow to try out the new Accept header version yet.

We haven't yet enabled this in RESTBase and production. There are still a couple things that we need to work through on the Parsoid & RB end. This will take another couple weeks at least.

Restricted Application added a project: ContentTranslation. · View Herald TranscriptOct 12 2016, 11:19 PM
Amire80 moved this task from Needs Triage to Bugs on the ContentTranslation board.Oct 31 2016, 1:49 PM
Amire80 moved this task from Bugs to Upstream on the ContentTranslation board.
GWicke moved this task from Backlog to watching on the Services board.Jul 11 2017, 7:55 PM
GWicke edited projects, added Services (watching); removed Services.
ssastry edited projects, added Parsoid (Section-Editing-Support); removed Parsoid.