Page MenuHomePhabricator

Configure VE backend to use Parsoid directly, instead of calling RESTbase
Closed, ResolvedPublic

Assigned To
Authored By
daniel
Oct 11 2022, 3:47 PM
Referenced Files
F37104900: Screenshot 2023-06-15 160146.png
Jun 15 2023, 2:10 PM
F37104898: Screenshot 2023-06-15 160120.png
Jun 15 2023, 2:10 PM
F37104896: Screenshot 2023-06-15 160036.png
Jun 15 2023, 2:10 PM
Restricted File
Jun 12 2023, 2:59 PM
Restricted File
Jun 12 2023, 2:59 PM
Tokens
"Party Time" token, awarded by DAlangi_WMF."Like" token, awarded by Lens0021.

Description

The VisualEditor backend on WMF production sites should no longer use RESTbase.

Rationale: This will remove one of the primary consumers of the parsoid endpoints on RESTbase, and one of two reason we need to store pre-generated parsoid output on restbase (the other reason being PCS, for now).

  • beta (some) T320531
  • testwiki and labtestwiki T320531
  • officewiki
  • labswiki (aka wikitech)
  • mediawikiwiki
  • hewiki
  • small wikis
  • medium wikis
  • enwiki
  • all wikis

Relevant configuration:

$wmgUseRestbaseVRS= false;
NOTE: Notify the community via TechNews when this is happening!

Related Objects

StatusSubtypeAssignedTask
StalledNone
In ProgressNone
OpenNone
OpenNone
In ProgressNone
Resolveddaniel
ResolvedNone
ResolvedNone
Resolvedmatmarex
ResolvedPRODUCTION ERRORdaniel
Resolveddaniel
DuplicatexSavitar
Resolveddaniel
Resolveddaniel
Resolveddaniel
ResolvedKCVelaga_WMF
Resolveddaniel
Resolveddaniel
Resolveddaniel
Resolveddaniel
Resolveddaniel
ResolvedNone
Resolvedovasileva
Declined nray
ResolvedDAlangi_WMF
Resolvedssastry
Resolveddaniel
Resolveddaniel
ResolvedClement_Goubert
Resolveddaniel
ResolvedKrinkle

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 896104 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[operations/mediawiki-config@master] Make VE on officewiki use Parsoid directly

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

Change 896104 merged by jenkins-bot:

[operations/mediawiki-config@master] Make VE on officewiki use Parsoid directly

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

Mentioned in SAL (#wikimedia-operations) [2023-04-12T13:29:31Z] <lucaswerkmeister-wmde@deploy2002> Started scap: Backport for [[gerrit:896104|Make VE on officewiki use Parsoid directly (T320529 T333402)]]

Mentioned in SAL (#wikimedia-operations) [2023-04-12T13:30:54Z] <lucaswerkmeister-wmde@deploy2002> lucaswerkmeister-wmde and daniel: Backport for [[gerrit:896104|Make VE on officewiki use Parsoid directly (T320529 T333402)]] synced to the testservers: mwdebug1002.eqiad.wmnet, mwdebug2001.codfw.wmnet, mwdebug1001.eqiad.wmnet, mwdebug2002.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-04-12T13:39:20Z] <lucaswerkmeister-wmde@deploy2002> Finished scap: Backport for [[gerrit:896104|Make VE on officewiki use Parsoid directly (T320529 T333402)]] (duration: 09m 48s)

Change 923650 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[operations/mediawiki-config@master] Switch VisualEditor to not use RESTbase on small and medium wikis

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

Quiddity added a project: User-notice.
Quiddity moved this task from To Triage to In current Tech/News draft on the User-notice board.
Quiddity subscribed.

Change 923650 merged by jenkins-bot:

[operations/mediawiki-config@master] Switch VisualEditor to not use RESTbase on small and medium wikis

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

I reverted this ^

For the record, the config change is good and was deployed, the reson for the revert was purely technical.
We now have VE using direct mode on all small and medium wikis.

Change 928590 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[operations/mediawiki-config@master] Switch VisualEditor to not use RESTbase on English Wikipedia.

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

Change 928590 merged by jenkins-bot:

[operations/mediawiki-config@master] Switch VisualEditor to not use RESTbase on English Wikipedia.

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

Mentioned in SAL (#wikimedia-operations) [2023-06-12T13:04:08Z] <lucaswerkmeister-wmde@deploy1002> Started scap: Backport for [[gerrit:928590|Switch VisualEditor to not use RESTbase on English Wikipedia. (T320529)]]

Mentioned in SAL (#wikimedia-operations) [2023-06-12T13:05:28Z] <lucaswerkmeister-wmde@deploy1002> lucaswerkmeister-wmde and daniel: Backport for [[gerrit:928590|Switch VisualEditor to not use RESTbase on English Wikipedia. (T320529)]] synced to the testservers: mwdebug2001.codfw.wmnet, mwdebug2002.codfw.wmnet, mwdebug1002.eqiad.wmnet, mwdebug1001.eqiad.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-06-12T13:14:59Z] <lucaswerkmeister-wmde@deploy1002> Finished scap: Backport for [[gerrit:928590|Switch VisualEditor to not use RESTbase on English Wikipedia. (T320529)]] (duration: 10m 51s)

Deployment to enwiki is looking good. Client side latency didn't change, server side performance got a good boost:

{F37101528}

{F37101529}

Change 929364 had a related patch set uploaded (by Daniel Kinzler; author: Daniel Kinzler):

[operations/mediawiki-config@master] Switch VisualEditor to bypass RESTbase on all wikis.

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

Change 929364 merged by jenkins-bot:

[operations/mediawiki-config@master] Switch VisualEditor to bypass RESTbase on all wikis.

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

Mentioned in SAL (#wikimedia-operations) [2023-06-15T13:09:17Z] <daniel@deploy1002> Started scap: Backport for [[gerrit:929364|Switch VisualEditor to bypass RESTbase on all wikis. (T320529)]]

Mentioned in SAL (#wikimedia-operations) [2023-06-15T13:10:41Z] <daniel@deploy1002> daniel: Backport for [[gerrit:929364|Switch VisualEditor to bypass RESTbase on all wikis. (T320529)]] synced to the testservers: mwdebug1002.eqiad.wmnet, mwdebug2002.codfw.wmnet, mwdebug1001.eqiad.wmnet, mwdebug2001.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-06-15T13:21:06Z] <daniel@deploy1002> Finished scap: Backport for [[gerrit:929364|Switch VisualEditor to bypass RESTbase on all wikis. (T320529)]] (duration: 11m 48s)

VE has been switched to direct mode on all wikis as of 13:20 UTC. So far, all metrics look good.

Screenshot 2023-06-15 160036.png (953×1 px, 199 KB)

Client side activation latency was unaffected. Utilization of the RESTbase API dropped to nearly zero, as expected. The remaining calls are from ongoing eiting sessions and should be gone within 24 hours.

Screenshot 2023-06-15 160120.png (951×1 px, 188 KB)

Server side latency of the VE API modules went down as expected, since direct mode removes the overhead of connecting to RESTbase. getPageHTML didn't benefit much got a bit slower (from 88ms up to around 100ms) since it now needs to load data from ParserCache, but HTML-to-wikitext fransformation became significantly faster, going from 270ms down to 110ms. This would benefit switchoing from visual to source mode, and should also improve save times.

Screenshot 2023-06-15 160146.png (903×1 px, 162 KB)

Stash write rates more than doubled, as expected based on the number of edits on the wikis where direct mode was previously disabled. The write rate went from about 60 to roughly 150 writes per minute. This change however barely registers on the database cluster that backs the stash: write operations on the x2 cluster remained stable at about 1500 per minute, replication lag was unaffected.

daniel claimed this task.
daniel updated the task description. (Show Details)

VE has been switched to direct mode on all wikis as of 13:20 UTC. So far, all metrics look good.

I am curious if the phab metrics are affected by the Country protection list - there is ruwiki (one of top-10 of projects) - thus silently disregarded.

Because ever since the event - a mass problem reported at the local techforum, see (in Russian) Википедия:Форум/Технический#Визред - with VE stopped to load completely.

It look like besides other changes ve.init.Target.actionGroups stopped to work.

Or your metrics are fine and it is just a fraction of ruwiki VE users (represented at the techforum) who are affected.

Because ever since the event - a mass problem reported at the local techforum, see (in Russian) Википедия:Форум/Технический#Визред - with VE stopped to load completely.

My metrics only show that loading VE dodn't get slower - it would not show VE failing to load.

Thank you for the report!

@Neolexx I have just successfully made a couple of edits on Russion wikipedia using Visual Editor: https://ru.wikipedia.org/w/index.php?title=%D0%A3%D1%87%D0%B0%D1%81%D1%82%D0%BD%D0%B8%D0%BA:DKinzler_(WMF)/Sandbox&action=history

If VE is failing, please file a separate bug report. You can tag me on the report, and also link to this task if you think it is related. Please include as much information as possible in the report.

@Neolexx That seems like an unrelated problem. I think this might be caused by change https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/928049, which slightly changed how the VE toolbar is defined.

edit: Filed T339292

I have just successfully made a couple of edits on Russion wikipedia using Visual Editor

Sorry for troubles, it seems to be fixed even prior to my post - https://ru.wikipedia.org/w/index.php?title=MediaWiki:Gadget-registerTool.js&action=history

Sorry for troubles, it seems to be fixed even prior to my post - https://ru.wikipedia.org/w/index.php?title=MediaWiki:Gadget-registerTool.js&action=history

No problem, thanks for reporting!