Page MenuHomePhabricator

Deprecate and remove Parsoid's "v1" API (and also the "v2" API while we're at it)
Closed, ResolvedPublic

Description

There are too many different variants of the Parsoid API url scheme:

  • Parsoid's "v1" API.
  • Parsoid's "v2" API.
  • Parsoid's "v3" API
  • RESTbase's API, which is a hybrid of Parsoid's v1 and v2 API with some unique features of its own (ie POST parameters named "wikitext" and "bodyOnly" instead of "wt" and "body").
  • The API exposed by the ParsoidVirtualRESTService in mediawiki core, which claims to be a mirror of Parsoid's "v1" API, but in fact contains features of the RESTbase API (ie, the /transform/X/to/Y/ route, and the use of a POST parameter named "wikitext").

The latter API is the one used by the Visual Editor code base, and mediawiki-core contains code to munge it into both Parsoid's *actual* v1 API and the RESTbase API.

In this task I plan to (a) update ParsoidVirtualRESTService to always issue v3 API requests, then (b) update VisualEditor to use the RESTBase v1 API/Parsoid v3 API via VRS instead of it's crazy hybrid, (c) update RESTBase to issue v3 API requests, and (d) update Flow to use the RESTBase v1/Parsoid v3 API via VRS. We can then (e) remove "v1" and "v2" API support from Parsoid.

This will take us from 4 similar-but-crazily-different APIs to only one(ish): RESTBase v1 (and Parsoid v3, which was explicitly designed to be as similar to RESTBase v1 as possible; see T100680).

This will remove a bunch of hairy URL translation code from Parsoid, RESTbase, and mediawiki-core, as well as concentrating our efforts on documenting a single API (and single way to configure Parsoid/RESTBase in mediawiki).

Event Timeline

cscott raised the priority of this task from to Medium.
cscott updated the task description. (Show Details)
cscott added a project: Parsoid.
cscott added subscribers: cscott, Aklapper.

Change 217995 had a related patch set uploaded (by Cscott):
Use Parsoid v2 API

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

Change 214351 had a related patch set uploaded (by Cscott):
Use Parsoid v2 API

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

Change 214351 merged by jenkins-bot:
Use Parsoid v3 API; emulate the RESTBase v1 API

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

Ok, now we just need to fix Flow (T110721).

cscott renamed this task from Deprecate and remove Parsoid's "v1" API to Deprecate and remove Parsoid's "v1" API (and also the "v2" API while we're at it).Aug 29 2015, 2:19 AM
cscott updated the task description. (Show Details)

In this task I plan to (a) update ParsoidVirtualRESTService to always issue v3 API requests, then (b) update VisualEditor to use the RESTBase v1 API/Parsoid v3 API via VRS instead of it's crazy hybrid, (c) update RESTBase to issue v3 API requests, and (d) update Flow to use the RESTBase v1/Parsoid v3 API via VRS. We can then (e) remove "v1" and "v2" API support from Parsoid.

CX uses parsoid, so please don't miss to notify us with phab tickets about this kind of changes in future. CX was down for hours today(T111490).

Change 242570 had a related patch set uploaded (by Cscott):
Use Parsoid v3 API (which is identical to RESTBase v1 API).

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

Change 242570 merged by jenkins-bot:
Use Parsoid v3 API (which is identical to RESTBase v1 API).

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

Change 283593 had a related patch set uploaded (by Arlolra):
T100681: Deprecate and remove Parsoid's v1/v2 APIs

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

Change 283593 merged by jenkins-bot:
T100681: Remove deprecated v1/v2 HTTP APIs

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

Arlolra claimed this task.

Mentioned in SAL [2016-05-19T18:38:24Z] <cscott> updated Parsoid to version 67816adf (T100681, T130638)

Change 445725 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/core@master] Hard deprecate support for Parsoid v1 API

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

Change 445725 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate support for Parsoid v1 API

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