Flow creates a VRS client based on the $wgVirtualRestConfig. If the config sets $wg...['modules']['restbase'], then RestbaseVirtualRestService (disabled for Flow) could be used but if not, falls back to using ParsoidVirtualRestService (which is what is being used now) because using the /restbase/ module drops data-parsoid mappings after transforming the wikitext -> html.
The main reason why Flow contacts Parsoid via RESTBase is to perform transformations to/from different formats (wikitext -> html, html->wikitext etc):
$url = '/restbase/local/v1/transform/' . $from . '/to/' . $to . '/' . urlencode( $prefixedDbTitle );
Recently, we've moved this logic into MW core and based on various options ($from, $to etc) in the Flow\Conversion\Utils::convert() path, we can apply core's Parsoid logic to perform this transformation/conversion directly and cut ties with RESTBase.
Acceptance Criteria
- Put tests in place to capture different outputs after transformation is applied with RB configs in place
- Remove usage of VirtualRestService and replace with core logic
- Ensure the outputs returned by core code after transformation matches above (tests shouldn't break) - WIP: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Flow/+/927619
- Review to make sure no VRS logic is still in extension
- Test extension manually to make sure it still works as expected
- Once deployed, monitor sites for any spikes or failures reported for a week or two.