Page MenuHomePhabricator

Fix ParsoidClient to talk to RESTBase instead of Parsoid
Closed, ResolvedPublic3 Estimated Story Points

Description

@bd808 the new hotness is to use the REST API's /transform/wikitext/to/html endpoint to do this.
http://rest.wikimedia.org/en.wikipedia.org/v1/?doc#!/Transforms/post_transform_wikitext_to_html_title_revision

eg:

curl -X POST --header "Content-Type: application/x-www-form-urlencoded" --header "Accept: text/html; profile="mediawiki.org/specs/html/1.1.0"" -d "wikitext=Hey%20'''there'''&body_only=true" "http://rest.wikimedia.org/en.wikipedia.org/v1/transform/wikitext/to/html"

Besides fixing the client, we need to update the mw-vagrant role to setup restbase as well for local testing and labs use or change the defaults to just hit RESTBase for enwiki.

Revisions and Commits

Event Timeline

bd808 raised the priority of this task from to Medium.
bd808 updated the task description. (Show Details)
bd808 added subscribers: bd808, cscott.
<subbu> does ieg use parsoid somewhere?
<bd808> subbu: yeah. it uses it to sanitize arbitrary input made by admins in the management console
<subbu> i see ... do you have a repo url? if internal deploy, can switch it to use the internal name.
<bd808> subbu: this is the current client -- https://github.com/wikimedia/wikimedia-slimapp/blob/master/src/ParsoidClient.php
<bd808> subbu: which is a mirror of https://gerrit.wikimedia.org/r/#/admin/projects/wikimedia/slimapp
<bd808> we could probably just change the prod config to point directly at a parsoid server
<bd808> if it breaks it won't be the end of the world either
<subbu> yes .. pointing it to parsoidcache.svc.eqiad.wmnet should work if it is an internal wmf install.
<bd808> yeah. it's running in a ganetti vm in prod these days I think

Change 267140 had a related patch set uploaded (by Subramanya Sastry):
T114186: Use internal LVS name for Parsoid service

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

@ssastry's patch needs an analogous change in rOPUP manifests/role/iegreview.pp as well for the actual config used in production.

Change 267140 merged by jenkins-bot:
T114186: Use internal LVS name for Parsoid service

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

Change 267269 had a related patch set uploaded (by Jforrester):
Point iegreview to internal parsoid url

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

Change 267269 merged by BBlack:
Point iegreview to internal parsoid url

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

I think the short term fix of pointing to the internal LB for Parsoid rather than the old Varnish entry point has been taken care of now. The original goal of this ticket still remains however which is to switch from talking to Parsoid to talking to RESTBase.

bd808 added a revision: Restricted Differential Revision.Aug 30 2016, 9:34 PM

Change 307653 had a related patch set uploaded (by BryanDavis):
Update ParsoidClient to talk to RESTBase

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

Niharika set the point value for this task to 3.

Change 307781 had a related patch set uploaded (by BryanDavis):
iegreview: Switch from Parsoid to RESTBase

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

Change 307781 merged by Dzahn:
iegreview: Switch from Parsoid to RESTBase

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

reviewed, merged, ran puppet on krypton.

deleted files in /var/cache/iegreview/

09:32 < mutante> !log iegreview switched from parsoid to RESTBase

09:33 < bd808> mutante: mostly fixed! One more thing while you are on krypton: delete all the files in /var/cache/iegreview please
09:33 < bd808> things that weren't cached are showing fine now, but we cached some broken stuff
09:33 < mutante> bd808: there are files ending in .parsoid and files ending in .restbase, ALL ALL or just .parsoid
09:34 < bd808> all all
09:34 < bd808> the parsoid ones won't get used anymore
09:34 < bd808> and some of the .restbase are junk
09:34 < Niharika> Awesome.
09:34 < Niharika> Works now.
09:38 < bd808> !log mutante updated puppet role and cleared cache for iegreview (T114186)

bd808 moved this task from Archive to Done on the User-bd808 board.

Change 307653 merged by jenkins-bot:
Update ParsoidClient to talk to RESTBase

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