Page MenuHomePhabricator

Create dual backend mode for VE API
Closed, DuplicatePublic

Description

The VisualEditor API can use two backends to access parsoid: DirectParsoidClient, or VCSParsoidClient, which talks to RESTbase.

When we switch VE on a wiki from using RESTbase to direct mode, edit sessions that started out using RESTbase as the backend need to continue using RESTbase, so they don't lose access to the stashed base state, which would cause the edit to fail.

To achieve this, the VE API needs to detect which backend the client had originally been loading data from, e.g. using a cookie or by inspeciting the etag submitted in the request body.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 841920 had a related patch set uploaded (by D3r1ck01; author: Derick Alangi):

[mediawiki/extensions/VisualEditor@master] Determine the appropriate parsoid client via a cookie

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

Change 844465 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[mediawiki/extensions/VisualEditor@master] Pick ParsoidClient implementation based on etag.

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

Change 841920 abandoned by D3r1ck01:

[mediawiki/extensions/VisualEditor@master] Determine the appropriate parsoid client via a cookie

Reason:

covered by: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/844465

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