Page MenuHomePhabricator

Update usage of deprecated wgUseTidy
Closed, ResolvedPublic2 Estimated Story Points

Description

Ronseal.

$wgUseTidy used in Extension:TextExtracts and MobileFrontend is deprecated. Use $wgTidyConfig instead.

This was extracted from T166272: HTML version of text extracts is not balanced/well formed and naive.

Event Timeline

Jdlrobson set the point value for this task to 2.Jun 28 2017, 5:24 PM

There seems to be a move away from Tidy in the organization [1]. Do we still want to do this?

[1] https://lists.wikimedia.org/pipermail/wikitech-l/2017-July/088428.html

@bmansurov the change is pretty trivial, Parser team wants to switch to RemexHTML by June 2018, so it might take a year. I vote to do it.

Per today stand-up discussion - RemexHTML instrumentation should be backward compatible. If we do it right now it should work properly after RemexHTML replaces current Tidy.

Change 363860 had a related patch set uploaded (by Pmiazga; owner: Pmiazga):
[mediawiki/extensions/TextExtracts@master] Remove deprected $wgUseTidy in favour of TidyConfig

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

Change 363863 had a related patch set uploaded (by Pmiazga; owner: Pmiazga):
[mediawiki/extensions/MobileFrontend@master] Remove deprected $wgUseTidy in favour of $wgTidyConfig

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

There seems to be a move away from Tidy in the organization [1]. Do we still want to do this?

[1] https://lists.wikimedia.org/pipermail/wikitech-l/2017-July/088428.html

Note that the Tidy naming is not to be confused with the specific library/tool -- the tidier itself will be different tools (nothing, Remex, "Tidy" (html4), tidy-htm5), etc.

While merging this I noticed that $wgMFTidyMobileViewSections is set to false in production and true in MobileFrontend. I found this interesting and wondered if we might want to look into the history of that as part of this task. It appears to only impact the mobile view API. Do we really need this global or can we remove more tech debt?

(if we don't want to fix this now we can move this to sign off, creating a new task if necessary so we revisit this later.. but now seems like a good time!)

Change 363860 merged by jenkins-bot:
[mediawiki/extensions/TextExtracts@master] Remove deprecated $wgUseTidy in favour of $wgTidyConfig

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

Change 363863 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Remove deprecated $wgUseTidy in favour of $wgTidyConfig

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

While merging this I noticed that $wgMFTidyMobileViewSections is set to false in production and true in MobileFrontend. I found this interesting and wondered if we might want to look into the history of that as part of this task. It appears to only impact the mobile view API. Do we really need this global or can we remove more tech debt?

Since it's unconditionally set to false in production, I don't see the harm in briefly investigating it here (it is related, after all).

rOMWC373f59332533: Experiment: disable mobileview tidying added the $wgMFTidyMobileViewSections = false line to the config. There's no why in the commit message but there's a little discussion around how the apps might behave. Given that this change has been in production for over three years with no recent complaint, I don't see why we can't tidy – get it?! – it up.

Change 364230 had a related patch set uploaded (by Phuedx; owner: Phuedx):
[mediawiki/extensions/MobileFrontend@master] Hygiene: Remove wgMFTidyMobileViewSections

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

Change 364264 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[operations/mediawiki-config@master] Stop disabling MFTidyMobileViewSections

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

Change 364264 merged by jenkins-bot:
[operations/mediawiki-config@master] Stop disabling MFTidyMobileViewSections

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

Mentioned in SAL (#wikimedia-operations) [2017-07-10T19:09:39Z] <niharika29@tin> Synchronized wmf-config/: Stop disabling MFTidyMobileViewSections (T168671) and Logo changes for various wiki projects (T165896) (duration: 00m 21s)

Change 364230 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Hygiene: Remove wgMFTidyMobileViewSections

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

This is a technical task. Signing off.