Page MenuHomePhabricator

Deprecate scrubWikitext in favour of scrub_wikitext
Closed, ResolvedPublic0 Estimated Story Points

Description

We have decided to use snake_case for configuration and API parameters. Consequently, we need to replace the scrubWikitext parameter with scrub_wikitext, similarly to what we have done to bodyOnly in T114185: bodyOnly is now body_only.

Event Timeline

mobrovac raised the priority of this task from to Medium.
mobrovac updated the task description. (Show Details)
mobrovac subscribed.

CX uses scrubWikitext param. Please let us know when we need to change this in our code. VE also uses the same parameter

CX uses scrubWikitext param. Please let us know when we need to change this in our code. VE also uses the same parameter

You can rename it right away, RESTBase in production already accepts scrub_wikitext. The plan is to remove support for scrubWikitext in November.

Change 245612 had a related patch set uploaded (by Catrope):
Adapt to Parsoid/RESTbase renaming scrubWikitext to scrub_wikitext

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

Change 245612 merged by jenkins-bot:
Adapt to Parsoid/RESTbase renaming scrubWikitext to scrub_wikitext

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

Does scrub_wikitext work when ParsoidVirtualRESTService is used? I don't see any references to it in the Parsoid repo.

We still require scrubWikitext -- we don't have the alias in place yet. @mobrovac, does RESTBase pass scrubWikitext or scrub_wikitext (if you get scrub_wikitext from clients)?

does RESTBase pass scrubWikitext or scrub_wikitext (if you get scrub_wikitext from clients)?

We're passing scrubWikitext to Parsoid. To stay compatible, we can go two ways:

  • Parsoid starts accepting scrub_wikitext as well; or
  • we add the translation logic into the VRS, so that if Parsoid is used scrub_wikitext is turned into scrubWikitext

I'd prefer to go the former as it entails less (VRS) magic.

Yes, we'll accept scrub_wikitext soon, but in the interim, I wanted to make sure that scrubWikitext is passed along no matter what clients hit RESTBase with.

Change 252665 had a related patch set uploaded (by Amire80):
Send both scrubWikitext and scrub_wikitext

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

Change 252665 abandoned by Amire80:
Send both scrubWikitext and scrub_wikitext

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

Change 252766 had a related patch set uploaded (by Arlolra):
T114620: RESTBase renamed scrubWikitext to scrub_wikitext

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

Change 252766 abandoned by Arlolra:
T114620: RESTBase renamed scrubWikitext to scrub_wikitext

Reason:
Grrrr ... it helps if you'ved git pulled before patching. This is redundant.

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

RESTBase does not accept scrubWikitext as of the deployment on 2016-02-04. Resolving.

@mobrovac: Quick question: This has been marked with user-notice but I'm not really familiar with how RESTBase is used. To which degree are volunteer developers affected by this?

@Johan most developers will be using Parsoid for reading HTML, but if you were trying to write HTML back to the database as wikitext, scrub_wikitext applies some cleanups like removing empty headings and trailing whitespace.