Page MenuHomePhabricator

Deprecate scrubWikitext in favour of scrub_wikitext
Closed, ResolvedPublic0 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.

Details

Related Gerrit Patches:
mediawiki/extensions/ContentTranslation : masterSend both scrubWikitext and scrub_wikitext
mediawiki/extensions/Flow : masterAdapt to Parsoid/RESTbase renaming scrubWikitext to scrub_wikitext

Event Timeline

mobrovac created this task.Oct 4 2015, 10:50 PM
mobrovac raised the priority of this task from to Normal.
mobrovac updated the task description. (Show Details)
mobrovac added a subscriber: mobrovac.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 4 2015, 10:50 PM
mobrovac claimed this task.Oct 4 2015, 11:08 PM

Rename made in PR 364.

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

ccing projects that may get affected.

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.

ssastry set Security to None.

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

Arlolra moved this task from Backlog to Non-Parsoid Tasks on the Parsoid board.Feb 5 2016, 7:36 AM
mobrovac closed this task as Resolved.Feb 5 2016, 7:46 AM

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

Trizek-WMF added a subscriber: Trizek-WMF.
Trizek-WMF removed a subscriber: Trizek-WMF.
Johan added a subscriber: Johan.Feb 5 2016, 10:23 AM

@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.

Johan added a comment.Feb 5 2016, 10:58 AM

OK, thanks!

Jdforrester-WMF set the point value for this task to 0.Jul 8 2016, 6:38 PM
Restricted Application added projects: Growth-Team, User-Ryasmeen. · View Herald TranscriptOct 24 2018, 12:36 PM