Page MenuHomePhabricator

Mitigate issues caused by the use of Semantic MediaWiki on translatewiki.net
Closed, ResolvedPublic16 Estimated Story Points

Description

Translatewiki.net uses SMW for the following:

  1. To store locations of translators in order to display maps of translators (overall or per project)
  2. Support request tracking system

Challenges to run SMW at translatewiki.net include:

  1. Unique operational issues such as bringing the site down if smw.json version does not match code version
  2. Bugs and performance issues in SMW, e.g. locking editing of categories indefinitely due to broken change propagation
  3. Frequent work needed to address deprecation warnings. SMW is hosted on GitHub, so it doesn't get the automatic changes often done for extensions in Gerrit

In terms of impact on our productivity, the last one is most severe. We have spend a lot of engineering resources to submit fixes upstream.

Cost benefit evaluation

The support tracking system got broken when LiquidThreads thread summarization feature broke many years ago. We have instead of started directing support requests directly to the upstream projects. This might not be ideal, but this means we don't need to worry about supporting this system, and in fact we have already stopped using SMW for that: https://translatewiki.net/w/i.php?title=Template:Support&diff=prev&oldid=11907856

The other use case is for maps. The Maps are displayed by the Maps extension, but we use SMW's convenient query facilities to get the list of items to display. This can be reasonably replaced with a custom implementation using page props, for example.

To mitigate the issues, we have two options (besides the status quo): get other people to improve SMW, or stop using SMW. It may be possible that SMW moves to Wikimedia Gerrit, or more likely to Wikimedia GitLab, in the future, benefiting from automatic deprecation patches like other code we use. Maybe more people will even contribute to fix the operational issues and bugs, but there is no guarantee of that.

To stop using SMW, we only need limited effort that is smaller than all the work we have contributed to upstream so far. This will certainly address all the issues listed above, which makes it favorable solution in context of translatewiki.net (not necessarily in the larger MediaWiki ecosystem).

TODO

Gotchas

  1. Local patch sha had changed, should have used title instead
  2. Missed some SMW related settings. Should have grepped for "smw" as well.
  3. Fatals from parser cache. Fixed by setting $wgCacheEpoc
  4. Canary broke when removed SemanticMediaWiki directory due to autoload still trying to load stuff from there. Had to rm vendor directory and start from scratch.
  5. We expected deployment to take 30 minutes, we reserved 60 minutes, and took 75 minutes.

Event Timeline

Change 958951 had a related patch set uploaded (by Nikerabbit; author: Nikerabbit):

[mediawiki/extensions/TwnMainPage@master] Add way to store and fetch location coordinates

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

Change 959193 had a related patch set uploaded (by Jon Harald Søby; author: Jon Harald Søby):

[translatewiki@master] Remove $smwgNamespacesWithSemanticLinks for LQT namespaces

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

Change 958951 merged by jenkins-bot:

[mediawiki/extensions/TwnMainPage@master] Add way to store and fetch location coordinates

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

Change 961386 had a related patch set uploaded (by Nikerabbit; author: Nikerabbit):

[mediawiki/extensions/TwnMainPage@master] Add possibility to filter locations by category

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

Nikerabbit changed the task status from Open to In Progress.Sep 27 2023, 2:27 PM
Nikerabbit claimed this task.
Nikerabbit updated Other Assignee, added: abi_.

Change 961386 merged by jenkins-bot:

[mediawiki/extensions/TwnMainPage@master] Add possibility to filter locations by category

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

Change 959193 merged by jenkins-bot:

[translatewiki@master] Remove $smwgNamespacesWithSemanticLinks for LQT namespaces

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

All essential features have been migrated away from SMW now.

Nikerabbit set the point value for this task to 16.Oct 10 2023, 11:27 AM

Change 966150 had a related patch set uploaded (by Nikerabbit; author: Nikerabbit):

[translatewiki@master] PermissionSettings: Also remove SMW groups

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

Change 966150 merged by jenkins-bot:

[translatewiki@master] PermissionSettings: Also remove SMW groups and rights

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

Change 966156 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[translatewiki@master] Invalidate all pages cached previously to fix SMW cache errosr

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

Change 966156 merged by jenkins-bot:

[translatewiki@master] Invalidate all pages cached previously to fix SMW cache errors

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