(Go: >> BACK << -|- >> HOME <<)

Page MenuHomePhabricator

Support stashing in page/html and revision/html endpoints in MW core
Closed, ResolvedPublic

Description

Task description unfinished.

In order for VE and transformations to work correctly, we need to stash original HTML which the transform is based on. The requirement for the stash is fixed TTL (8 hours in RESTBase currently), simple key-value access. Loosing a stash will result in either a lost or a dirty edit, so we need some rather durable backend for this store. The size of the store is anticipated to be TBD (TODO: check how large it is in RESTBase)

Stashing should be exposed via ether ?stash=true parameter, or we could expose it as a separate /page/{title}/html_for_edit endpoint??

Related Objects

Event Timeline

Adding Platform Engineering as Platform Team Workboards (Green) was archived and as open tasks should have an active project tag

Change 779144 had a related patch set uploaded (by Daniel Kinzler; author: Nikki Nikkhoui):

[mediawiki/core@master] PageHTMLHandler: add stashing option

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

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

[mediawiki/core@master] Rest: Add support for annotated HTML for editing

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

Change 791416 had a related patch set uploaded (by Daniel Kinzler; author: Derick Alangi):

[mediawiki/core@master] [WIP] Rest: Add support for annotated HTML for editing

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

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

[mediawiki/core@master] Rest: Migrate stashing logic from RESTBase to core

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

Krinkle subscribed.

Tagging Perf team for awareness as original author and defacto maintainer of Edit stash in core, specifically the PageEditStash backend service and the ApiStashEdit (Action API). These predate the RESTBase version of this, and it might make sense to re-use or combine this in some way.

It would also make sense I think to verify at this point that the RESTBase port indeed satisfies the requirements and expectations of the PageEditStash/ApiStashEdit model, as in the past for VE/RESTBase we've often taken shortcuts or experimented with something that doesn't account for the rest of the ecosystem.

Change 779144 abandoned by Daniel Kinzler:

[mediawiki/core@master] PageHTMLHandler: add stashing option

Reason:

Superceded by Id35f1423a69e3ff63e4f9883b3f7e3f9521d81d5

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

Change 792264 merged by jenkins-bot:

[mediawiki/core@master] Rest: Migrate parsoid stashing logic from RESTbase

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

daniel triaged this task as High priority.May 24 2022, 8:03 AM

Blocked on subtasks, in particular storage backend for deployment on wmf cluster.

Tagging Perf team for awareness as original author and defacto maintainer of Edit stash in core, specifically the PageEditStash backend service and the ApiStashEdit (Action API). These predate the RESTBase version of this, and it might make sense to re-use or combine this in some way.

The two do fundamentally different things: PageEditStash stashes the HTML for the page's content after the edit, while the parsoid stash stores the HTML of the page before the edit. They serve different purposes as well: PageEditStash speeds up saving by optimistically parsing before the user hits save, while the parsoid stash keeps part of the state on the server side to optimize load time when opening the editor.

The persistence requirements are different as well: losing an entry from PageEditStash just means the edit is a little slower, while losing data from the parsoid stash means the edit will fail.

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

[mediawiki/core@master] ParsoidOutputStash: make storage backend configurable.

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

Change 802584 merged by jenkins-bot:

[mediawiki/core@master] ParsoidOutputStash: make storage backend configurable.

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

Change 789686 abandoned by D3r1ck01:

[mediawiki/core@master] [WIP] Rest: Add support for annotated HTML for editing

Reason:

Edit flavor already added. No longer needed.

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