Page MenuHomePhabricator

Replace usage of VirtualRESTServiceClient in Collection extension
Closed, ResolvedPublic

Description

Once again, Collection extension hits us :)


There are several things to do in Collection as part of this work. Collection makes use of 2 VirtualRESTServiceClient classes, i.e. ElectronVirtualRestService and RestbaseVirtualRestService. Both are mounted using different module names (electron and restbase respectively).

Electron is broken/disabled in production, should we fix it for third-parties? Should we just delete the VRS class completely?

RESTBase is also an issue to deal with and we can move this to HTTP if its still worth it.

As a result of the extension broken in so many places, there is a lot of dead code that can just be removed.

NOTE: Special:RenderBook is not working and the code says it should redirect to Special:Book but it doesn't. Should we just delete the special page?

Sub-tasks for tackling these issues one at a time will be created.

Acceptance Criteria

  • Identify various portions of the extension that are broken and make a decision whether to delete the code or fix it.
  • Delete code that mounts restbase module (RestbaseVirtualRestService) as this is broken.
  • Delete completely the electron module (ElectronVirtualRestService).
  • Delete the code around Special:RenderBook
  • Ensure nothing around VirtualRestService is in this extension
  • Confirm that Special:Book is still working correctly locally.
  • Monitor sites that have Collection on production to ensure everything still runs as expected after the train.

Event Timeline

DAlangi_WMF updated the task description. (Show Details)
DAlangi_WMF updated the task description. (Show Details)

While investigating to see which sections of the extension is not working, I'll just do a brain dump in this comment in point form:

  • Special:RenderBook is not working and we need to determine whether to just delete the code entirely or fix it.
    • It says it's supposed to accept various sub-pages and do several things but it's doing doing so.
    • It also says it's supposed to redirect to Special:Book in the default base but it doesn't do so. It still shows an empty page.
  • The extension uses 2 VRS clients - Electron and Restbase. We can attempt to migrate RB to HTTP but what about Electron?
  • This extension also has code for the /page/html endpoint inside the parsoid cluster (/restbase/local/v1/page/html/) through RB

The extension uses 2 VRS clients - Electron and Restbase. We can attempt to migrate RB to HTTP but what about Electron?

The Electron service doesn't exist anymore. The code can be deleted.
The VRS code for Restbase seems to be used only from Special:RenderBook

...so perhaps it can all just be deleted?

The Electron service doesn't exist anymore. The code can be deleted.

Yes!

The VRS code for Restbase seems to be used only from Special:RenderBook

And Special:RenderBook is really broken, so yes we can also just delete it.

...so perhaps it can all just be deleted?

Agreed!

Change 921033 had a related patch set uploaded (by Richika Rana; author: Richika Rana):

[mediawiki/extensions/Collection@master] Remove ElectronVRS as it is no longer supported.

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

Change 921038 had a related patch set uploaded (by Richika Rana; author: Richika Rana):

[mediawiki/extensions/Collection@master] Drop support for extension which uses VirtualRestService

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

Change 921033 merged by jenkins-bot:

[mediawiki/extensions/Collection@master] Remove ElectronVRS as it is no longer supported.

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

Change 921038 merged by jenkins-bot:

[mediawiki/extensions/Collection@master] Drop support for RestbaseVirtualRestService

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

DAlangi_WMF changed the task status from Open to In Progress.May 19 2023, 12:05 PM
DAlangi_WMF assigned this task to R_Rana.
DAlangi_WMF triaged this task as Medium priority.
DAlangi_WMF updated the task description. (Show Details)

I'll give this week for the extension with code removed to ride the train to at least g1 wikis. But testing on beta shows everything works fine.

DAlangi_WMF updated the task description. (Show Details)

Everything looks good. This can be resolved now, train has gone out and no issues reported yet.