Page MenuHomePhabricator

Deprecate Graph namespace on mediawiki.org and collab.wikimedia.org
Open, MediumPublic

Description

Currently, three wikis are still configured to use Graph extension with the capability to store graph informations in specialized namespaces pages:

  • collab
  • mediawiki.org
  • zero

We should check if collab and zero use it, and consider a maintenance task on mediawiki.org to move the last namespace pages in templates or linline in graph tag.

Previous discussion for some context:

... No need to wait, but please don't use Graph namespace
(might want to disable it in config for new wikis)

...
@Yurik and me discussed the feature on the Gerrit change and on IRC. In a nutshell, we disabled the possibility for new wikis to use namespaces, and also, following @Krenair suggestion, for wikis still not using them.]

Event Timeline

Dereckson raised the priority of this task from to Needs Triage.
Dereckson updated the task description. (Show Details)
Dereckson added subscribers: Krenair, Yurik, Aklapper, Dereckson.

There isn't a Graph namespace any longer right ?
mediawiki.org at least only uses Data: namespace now as far as I can tell..

If someone can check the other wikis, we can get this closed off.

Aklapper renamed this task from Deprecate Graph namespace to Deprecate Graph namespace on mediawiki.org and collab.wikimedia.org.Aug 4 2022, 4:58 AM

From https://noc.wikimedia.org/conf/InitialiseSettings.php.txt :

'wmgUseGraphWithJsonNamespace' => [
	'default' => false,

	// Legacy Graph deployments, with a Graph: namespace.
	// Yurik would like new wikis only use <graph>...</graph>.
	// See T97027 discussion for context.
	'collabwiki' => true,
	'mediawikiwiki' => true,
],

https://www.mediawiki.org/w/api.php?action=query&meta=siteinfo&siprop=namespaces lists no Graph.

Cannot access https://collab.wikimedia.org/w/api.php?action=query&meta=siteinfo&siprop=namespaces

Change 888708 had a related patch set uploaded (by Aklapper; author: Aklapper):

[operations/mediawiki-config@master] Set wmgUseGraphWithJsonNamespace = false for mediawikiwiki

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

Change 888708 merged by jenkins-bot:

[operations/mediawiki-config@master] Set wmgUseGraphWithJsonNamespace = false for mediawikiwiki

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

Mentioned in SAL (#wikimedia-operations) [2023-04-20T12:04:11Z] <ladsgroup@deploy2002> Started scap: Backport for [[gerrit:888708|Set wmgUseGraphWithJsonNamespace = false for mediawikiwiki (T124748)]]

Mentioned in SAL (#wikimedia-operations) [2023-04-20T12:05:30Z] <ladsgroup@deploy2002> aklapper and ladsgroup: Backport for [[gerrit:888708|Set wmgUseGraphWithJsonNamespace = false for mediawikiwiki (T124748)]] synced to the testservers: mwdebug2001.codfw.wmnet, mwdebug1001.eqiad.wmnet, mwdebug2002.codfw.wmnet, mwdebug1002.eqiad.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-04-20T12:11:59Z] <ladsgroup@deploy2002> Finished scap: Backport for [[gerrit:888708|Set wmgUseGraphWithJsonNamespace = false for mediawikiwiki (T124748)]] (duration: 07m 48s)

Change 888708 merged by jenkins-bot:

[operations/mediawiki-config@master] Set wmgUseGraphWithJsonNamespace = false for mediawikiwiki

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

I think this needs to be reverted. As far as I can tell, in addition to (or instead of? idk) removing the Graph: namespace, it removed the Data: namespace (namespace 486), which is not empty – there are five pages in it:

mysql:research@dbstore1007.eqiad.wmnet [mediawikiwiki]> SELECT page_id, page_latest, page_title FROM page WHERE page_namespace = 486;
+---------+-------------+-------------------------------------------+
| page_id | page_latest | page_title                                |
+---------+-------------+-------------------------------------------+
| 1117504 |     3850362 | Data_demo.tab                             |
|  445024 |     3805669 | Json:Graph_demo                           |
|  445023 |     3805713 | Json:Graph_demo.json                      |
|  377536 |     3805714 | Json:Wikicon                              |
|  957051 |     3321193 | Sandbox/Sylvain_Boissel_WMFr/TestFnac.tab |
+---------+-------------+-------------------------------------------+
5 rows in set (0.001 sec)

Those five pages are now unreachable, and they also have a content model that no longer exists, which causes problems e.g. when dumping them (similar to T335130):

lucaswerkmeister-wmde@mwdebug2002:~$ mwscript dumpBackup mediawikiwiki --current --start 377536 --end 377537
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.10/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/ http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10" xml:lang="en">
  <siteinfo>
    <sitename>MediaWiki</sitename>
    <dbname>mediawikiwiki</dbname>
    <base>https://www.mediawiki.org/wiki/MediaWiki</base>
    <generator>MediaWiki 1.41.0-wmf.5</generator>
    <case>first-letter</case>
    <namespaces>
      <namespace key="-2" case="first-letter">Media</namespace>
      <namespace key="-1" case="first-letter">Special</namespace>
      <namespace key="0" case="first-letter" />
      <namespace key="1" case="first-letter">Talk</namespace>
      <namespace key="2" case="first-letter">User</namespace>
      <namespace key="3" case="first-letter">User talk</namespace>
      <namespace key="4" case="first-letter">Project</namespace>
      <namespace key="5" case="first-letter">Project talk</namespace>
      <namespace key="6" case="first-letter">File</namespace>
      <namespace key="7" case="first-letter">File talk</namespace>
      <namespace key="8" case="first-letter">MediaWiki</namespace>
      <namespace key="9" case="first-letter">MediaWiki talk</namespace>
      <namespace key="10" case="first-letter">Template</namespace>
      <namespace key="11" case="first-letter">Template talk</namespace>
      <namespace key="12" case="first-letter">Help</namespace>
      <namespace key="13" case="first-letter">Help talk</namespace>
      <namespace key="14" case="first-letter">Category</namespace>
      <namespace key="15" case="first-letter">Category talk</namespace>
      <namespace key="90" case="first-letter">Thread</namespace>
      <namespace key="91" case="first-letter">Thread talk</namespace>
      <namespace key="92" case="first-letter">Summary</namespace>
      <namespace key="93" case="first-letter">Summary talk</namespace>
      <namespace key="100" case="first-letter">Manual</namespace>
      <namespace key="101" case="first-letter">Manual talk</namespace>
      <namespace key="102" case="first-letter">Extension</namespace>
      <namespace key="103" case="first-letter">Extension talk</namespace>
      <namespace key="104" case="first-letter">API</namespace>
      <namespace key="105" case="first-letter">API talk</namespace>
      <namespace key="106" case="first-letter">Skin</namespace>
      <namespace key="107" case="first-letter">Skin talk</namespace>
      <namespace key="710" case="first-letter">TimedText</namespace>
      <namespace key="711" case="first-letter">TimedText talk</namespace>
      <namespace key="828" case="first-letter">Module</namespace>
      <namespace key="829" case="first-letter">Module talk</namespace>
      <namespace key="1198" case="first-letter">Translations</namespace>
      <namespace key="1199" case="first-letter">Translations talk</namespace>
      <namespace key="2300" case="case-sensitive">Gadget</namespace>
      <namespace key="2301" case="case-sensitive">Gadget talk</namespace>
      <namespace key="2302" case="case-sensitive">Gadget definition</namespace>
      <namespace key="2303" case="case-sensitive">Gadget definition talk</namespace>
      <namespace key="2600" case="first-letter">Topic</namespace>
      <namespace key="5500" case="first-letter">Newsletter</namespace>
      <namespace key="5501" case="first-letter">Newsletter talk</namespace>
    </namespaces>
  </siteinfo>
  <page>
    <title>Json:Wikicon</title>
    <ns>486</ns>
    <id>377536</id>
MWUnknownContentModelException from line 203 of /srv/mediawiki/php-1.41.0-wmf.5/includes/content/ContentHandlerFactory.php: The content model 'Json.JsonConfig' is not registered on this wiki.
See https://www.mediawiki.org/wiki/Content_handlers to find out which extensions handle this content model.
#0 /srv/mediawiki/php-1.41.0-wmf.5/includes/content/ContentHandlerFactory.php(273): MediaWiki\Content\ContentHandlerFactory->validateContentHandler('Json.JsonConfig', NULL)
#1 /srv/mediawiki/php-1.41.0-wmf.5/includes/content/ContentHandlerFactory.php(191): MediaWiki\Content\ContentHandlerFactory->createContentHandlerFromHook('Json.JsonConfig')
#2 /srv/mediawiki/php-1.41.0-wmf.5/includes/content/ContentHandlerFactory.php(97): MediaWiki\Content\ContentHandlerFactory->createForModelID('Json.JsonConfig')
#3 /srv/mediawiki/php-1.41.0-wmf.5/includes/export/XmlDumpWriter.php(474): MediaWiki\Content\ContentHandlerFactory->getContentHandler('Json.JsonConfig')
#4 /srv/mediawiki/php-1.41.0-wmf.5/includes/export/XmlDumpWriter.php(402): XmlDumpWriter->writeSlot(Object(MediaWiki\Revision\SlotRecord), 0)
#5 /srv/mediawiki/php-1.41.0-wmf.5/includes/export/WikiExporter.php(563): XmlDumpWriter->writeRevision(Object(stdClass), Array)
#6 /srv/mediawiki/php-1.41.0-wmf.5/includes/export/WikiExporter.php(501): WikiExporter->outputPageStreamBatch(Object(Wikimedia\Rdbms\MysqliResultWrapper), NULL)
#7 /srv/mediawiki/php-1.41.0-wmf.5/includes/export/WikiExporter.php(325): WikiExporter->dumpPages('page_id >= 3775...', false)
#8 /srv/mediawiki/php-1.41.0-wmf.5/includes/export/WikiExporter.php(208): WikiExporter->dumpFrom('page_id >= 3775...', false)
#9 /srv/mediawiki/php-1.41.0-wmf.5/maintenance/includes/BackupDumper.php(360): WikiExporter->pagesByRange(377536, 377537, false)
#10 /srv/mediawiki/php-1.41.0-wmf.5/maintenance/dumpBackup.php(84): BackupDumper->dump(2, 0)
#11 /srv/mediawiki/php-1.41.0-wmf.5/maintenance/includes/MaintenanceRunner.php(681): DumpBackup->execute()
#12 /srv/mediawiki/php-1.41.0-wmf.5/maintenance/run.php(51): MediaWiki\Maintenance\MaintenanceRunner->run()
#13 /srv/mediawiki/multiversion/MWScript.php(140): require_once('/srv/mediawiki/...')
#14 {main}

If the pages aren’t needed anymore, they should be deleted so they don’t disturb dumps and other stuff, but for that they first need to become reachable again.

Turns out it’s not just the dumps, and the pages aren’t as unreachable as I thought – you also get an MWUnknownContentModelException if you load them by page ID: https://www.mediawiki.org/w/index.php?curid=1117504

Change 910780 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[operations/mediawiki-config@master] Set wmgUseGraphWithJsonNamespace = true for mediawikiwiki

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

Change 910780 merged by jenkins-bot:

[operations/mediawiki-config@master] Set wmgUseGraphWithJsonNamespace = true for mediawikiwiki

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

Mentioned in SAL (#wikimedia-operations) [2023-04-21T15:47:13Z] <lucaswerkmeister-wmde@deploy2002> Started scap: Backport for [[gerrit:910780|Set wmgUseGraphWithJsonNamespace = true for mediawikiwiki (T124748 T335130)]]

Mentioned in SAL (#wikimedia-operations) [2023-04-21T15:48:48Z] <lucaswerkmeister-wmde@deploy2002> lucaswerkmeister-wmde: Backport for [[gerrit:910780|Set wmgUseGraphWithJsonNamespace = true for mediawikiwiki (T124748 T335130)]] synced to the testservers: mwdebug1002.eqiad.wmnet, mwdebug2001.codfw.wmnet, mwdebug1001.eqiad.wmnet, mwdebug2002.codfw.wmnet

I didn't see that coming. :-/ Thanks for the quick revert!

Mentioned in SAL (#wikimedia-operations) [2023-04-21T15:57:15Z] <lucaswerkmeister-wmde@deploy2002> Finished scap: Backport for [[gerrit:910780|Set wmgUseGraphWithJsonNamespace = true for mediawikiwiki (T124748 T335130)]] (duration: 10m 01s)

Okay, the Data: pages are properly reachable again:

Leaving it to someone else to decide whether we should delete them or do something else with them in the longer term :) courtesy ping @Ash_Crow, since that one file name looks more personal than the others ^^

As a MediaWiki.org admin, I'd be inclined to delete them all; the first one is a failed test related to T252711, the next 2 are tests by the same former WMF employee; the fourth one is an attempt to resolve a phab task that was later resolved in a different way, and the last one has no useful content. In the unlikely event there's something worth preserving it can presumably have its content model changed to JSON and be moved to a different namespace.

As a MediaWiki.org admin, I'd be inclined to delete them all; the first one is a failed test related to T252711, the next 2 are tests by the same former WMF employee; the fourth one is an attempt to resolve a phab task that was later resolved in a different way, and the last one has no useful content. In the unlikely event there's something worth preserving it can presumably have its content model changed to JSON and be moved to a different namespace.

Agreed, It is better off being deleted in my opinion. Or maybe.. just change the content model to text and then deleted ? Makes looking at the history easier later on I suspect.

I am not sure if it's relevant here, but in case it's useful: The is a way to keep page histories and diffs workign after a content model has been removed from a wiki. That's the job of FallbackContentHandler. Just register it for the relevant content model, e.g.:

$wgContentHandlers['Json.JsonConfig'] = FallbackContentHandler::class;
Jdlrobson triaged this task as Medium priority.Apr 25 2023, 10:08 PM
Jdlrobson subscribed.

@TheDJ do you have any idea about what is left to do here?

Since graphs is broken I'd like to get the deployed version into a more predictable state across projects.

do you have any idea about what is left to do here?

In my understanding, per last comments, change the content model of the five mediawiki.org pages to text, then delete these five pages , then reapply wmgUseGraphWithJsonNamespace = false for mediawikiwiki. After that, check the situation on collabwiki which I cannot access.