Page MenuHomePhabricator

Survey RESTBase services and find which ones accesses Parsoid via RESTBase
Closed, ResolvedPublic

Description

The result of this task will be a list of services that accesses Parsoid via RESTBase in order to know which ones to begin migrating to access Parsoid via core.


  • Mobile Apps (PCS) - Page content service is already doing this and Yiannis is looking (?) into it. Cc @Jgiannelos
  • The /v1/summary/* endpoints is now a pass through to mobile apps so any service that calls these endpoints end up in mobile apps and mobile apps will do the right thing. Preferably, services that call the /v1/summary/* endpoints should just call mobile apps directly.

NOTE: For more on calling RESTBase (even if not hitting Parsoid), see: T334387: (Investigate) Places in MediaWiki extensions that still call RESTBase as a continuation of this work for other MediaWiki extensions/services.

Event Timeline

Thank you for this list Joe. It's very useful and helpful.

I'll help me narrow down the search see which ones then talk to the parsoid cluster through restbase.

@Jgiannelos, right now, I see that summary.js provides a pass through to mobile apps (when storage is disabled). I don't currently know which services call the summary endpoints but I was wondering if for this survey, since mobile apps handles these, I can ignore it? Or should I register it to the list of migration of endpoints that talk to parsoid?

The end goal is to migrate services that call parsoid via restbase to call parsoid in MediaWiki core.

The way summary works is:

  • If storage is enabled
    • Check local storage and return pregenerated content
  • If storage is disabled
    • Ask directly the backend

Then the summary handler in the mobileapps nodejs service

  • Queries information from action API
  • Gets the parsoid output
  • Generates a summary

@DAlangi_WMF the only reason I see tracking it as a different endpoint is that its heavily used on mediawiki web too (for previews) so chances are its going to need special care to handle the traffic.

The way summary works is:

  • If storage is enabled
    • Check local storage and return pregenerated content
  • If storage is disabled
    • Ask directly the backend

Then the summary handler in the mobileapps nodejs service

  • Queries information from action API
  • Gets the parsoid output
  • Generates a summary

This is useful information, thank you Yiannis. So at this point, I think MobileApps is what will have to changed to call parsoid directly (not via RESTbase), if it hasn't been already done so.

I think I have nothing to do with the summary endpoint for now since it delegates to MCS, however, code that hits the summary endpoints will have to be migrated so they go to the MobileApps service directly.

@DAlangi_WMF the only reason I see tracking it as a different endpoint is that its heavily used on mediawiki web too (for previews) so chances are its going to need special care to handle the traffic.

Okay Yiannis, I'll look into this. Thanks!

@DAlangi_WMF the only reason I see tracking it as a different endpoint is that its heavily used on mediawiki web too (for previews) so chances are its going to need special care to handle the traffic.

A quick search shows that the Popups extensions is using this heavily because the preview of an article gets triggered with an "onhover" action, which like you said, is quite a lot of traffic, yes!

daniel triaged this task as Medium priority.Jun 5 2023, 6:18 PM
daniel moved this task from Unsorted to Parsoid pile on the RESTBase Sunsetting board.
MSantos claimed this task.

All listed services here are now accessing Parsoid outside RESTBase. Closing this as resolved. Please re-open in case I'm missing anything.