Page MenuHomePhabricator

Fix ParsoidClient to talk to RESTBase instead of Parsoid
Closed, ResolvedPublic3 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.

Details

Event Timeline

bd808 created this task.Sep 29 2015, 10:16 PM
bd808 raised the priority of this task from to Normal.
bd808 updated the task description. (Show Details)
bd808 added subscribers: bd808, cscott.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 29 2015, 10:16 PM
<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

bd808 added a comment.Feb 2 2016, 9:27 PM

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.

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

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

Niharika assigned this task to bd808.Aug 31 2016, 9:04 AM
Niharika set the point value for this task to 3.
Restricted Application added a project: User-bd808. · View Herald TranscriptAug 31 2016, 9:04 AM

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

Dzahn added a subscriber: Dzahn.EditedAug 31 2016, 4:43 PM

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)

kaldari closed this task as Resolved.Aug 31 2016, 6:54 PM
kaldari moved this task from Needs Review/Feedback to Q1 2018-19 on the Community-Tech-Sprint board.
bd808 moved this task from To Do to Archive on the User-bd808 board.Sep 1 2016, 5:13 PM
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

DannyH moved this task from Untriaged to Archive on the Community-Tech board.Sep 13 2016, 11:40 PM
bd808 moved this task from Done to Archive on the User-bd808 board.Oct 17 2016, 3:25 PM