Page MenuHomePhabricator

Parsoid: hard-coded things that should be configurable
Closed, ResolvedPublic

Description

Parsoid hard-codes many things that should be configurable or automatically mirrored from MediaWiki configuration. Some need tuning depending on hardware and cluster details. Some could possibly be constants defined at the top of a file or class, but just using literals scattered all over the codebase is not really appropriate.

Here are some literals which I think are not appropriate:

  • HTTP agent connectTimeout
  • HTTP agent maxSockets
  • ApiRequest setMaxListeners
  • ApiRequest.retries
  • TemplateRequest timeout
  • PreprocessorRequest timeout
  • PHPParseRequest timeout
  • ParsoidCacheRequest timeouts
  • ConfigRequest timeout
  • ImageInfoRequest timeout
  • ParsoidService POST size limits
  • WikiLinkHandler.prototype.renderFile() defaultWidth: this is configurable in MW and non-default on WMF. Parsoid has a literal setting it to the WMF value, so this is broken on non-WMF installations.
  • WikiLinkHandler.prototype.renderFile() upright factor: should match $wgThumbUpright in MW

Event Timeline

tstarling raised the priority of this task from to Needs Triage.
tstarling updated the task description. (Show Details)
tstarling added a project: Parsoid.
tstarling added a subscriber: tstarling.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 15 2015, 7:05 AM

Yes, most of these could be moved to ParsoidConfig. These can then be tuned / controlled via localsettings.js in the wmf conf directory in the deploy repo.

The last two could be moved to WikiConfig.

ssastry triaged this task as Medium priority.Jan 15 2015, 3:10 PM
ssastry set Security to None.
ssastry moved this task from Backlog to Maintenance / Tech-Debt on the Parsoid board.
cscott added a subscriber: cscott.Apr 2 2015, 5:34 PM

The image size limits need to be exposed in the siteinfo, they are not currently -- at least partly because the thumbnail size preferences are *per-user* (sigh). I think there's a phab task for the image-related issues already filed somewhere.

ssastry raised the priority of this task from Medium to High.Apr 25 2015, 4:14 PM
ssastry claimed this task.Apr 28 2015, 6:52 PM
ssastry closed this task as Resolved.May 22 2015, 3:49 PM

Couple parameters (# retries, http connection timeout) are still not configurable via parsoid-config yet because of ordering issues, but they have been extracted out to file-level constants.

ssastry reopened this task as Open.May 22 2015, 3:51 PM
ssastry removed ssastry as the assignee of this task.

Reopened because these two from the description aren't yet fixed:

  • WikiLinkHandler.prototype.renderFile() defaultWidth: this is configurable in MW and non-default on WMF. Parsoid has a literal setting it to the WMF value, so this is broken on non-WMF installations.
  • WikiLinkHandler.prototype.renderFile() upright factor: should match $wgThumbUpright in MW
ssastry lowered the priority of this task from High to Medium.May 22 2015, 3:53 PM
ssastry moved this task from In Progress to Backlog on the Parsoid board.
Arlolra closed this task as Resolved.Mar 31 2017, 8:45 PM
Arlolra claimed this task.
Arlolra added a subscriber: Arlolra.

Reopened because these two from the description aren't yet fixed:

Closing because these are covered elsewhere.

  • WikiLinkHandler.prototype.renderFile() defaultWidth: this is configurable in MW and non-default on WMF. Parsoid has a literal setting it to the WMF value, so this is broken on non-WMF installations.

There's a task open for this already, T89262
And a patch in https://gerrit.wikimedia.org/r/#/c/341023/

  • WikiLinkHandler.prototype.renderFile() upright factor: should match $wgThumbUpright in MW

Presumably this would be part of T64666 if we ever choose to do that.