Parsoid mod: add ability to stash wt2html transforms#363
Parsoid mod: add ability to stash wt2html transforms#363d00rman merged 8 commits intowikimedia:masterfrom
Conversation
mods/parsoid.js
Outdated
There was a problem hiding this comment.
It might be worth moving this to a separate function, to avoid the stash handling obscuring the common flow too much.
There was a problem hiding this comment.
I was thinking the same thing. Will do.
|
Nice! LGTM, only small tiny things inline. |
mods/parsoid.js
Outdated
There was a problem hiding this comment.
Why don't we have a revisionRetentionPolicy for stashed wikitext too?
mods/parsoid.js
Outdated
There was a problem hiding this comment.
May be let's wait for this wikimedia/restbase-mod-table-spec#21 before it's merged?
There was a problem hiding this comment.
Yes, but until then latest 0 is the best choice ;)
|
Ready for review, @wikimedia/services Note 1: tests failing due to the page save API rate limit |
|
Could be really nice to add a couple of tests. |
|
@wikimedia/services the PR is now using the |
There was a problem hiding this comment.
Eventually we should be able to merge this with _getOriginalContent, but for now this is the only one loading wikitext.
|
LGTM overall, only one minor typo nit. |
This commit introduces the stash POST body flag in /transform/wikitext/to/html, which is used by clients to indicate they plan to reuse the result of the transformation. The commit also introduces the creation of the stash.data-parsoid, stash.wikitext and stash.html buckets used to store the stashed content.
If the user sets the stash flag when POSTing to /tranform/wikitext/to/html, the resulting data-parsoid and HTML are stashed together with the client's wikitext.
suffix is present in the If-Match header
Parsoid mod: add ability to stash wt2html transforms
|
@Pchelolo I'll add some tests in a follow-up PR |
This PR extends the wt2html transformations API to allow clients to indicate to RESTBase they plan to reuse the transformation at a later time, in which case RESTBase saves them in special buckets.
Summary:
stashbody flag toPOST /transform/wikitext/to/htmlparsoid.stash.data-parsoid,parsoid.stash.wikitextandparsoid.stash.htmlbuckets on start-upstash: truewhenPOSTing and set the ETag to<rev>/<tid>/stash/transform/html/to/wikitextand reuse the stashed wikitext, data-parsoid and html originals.Note: we should merge wikimedia/restbase-mod-table-spec#21 before merging this one.
Bug: T114548