Page MenuHomePhabricator

All extension should link to the deployed Git revision from Special:Version
Open, Needs TriagePublic


If you go to Special:Version in the English Wikipedia (or in any Wikimedia project), the version column for extension is very inconsistent. Some extensions point to nothing at all and some have a version number, some have a date, etc. I strongly suspect that a lot of these version numbers are not actually updated manually and consistently and some may be outdated and thus useless.

It would be best to show a link to the Git commit that is deployed there. It's the most precise definition, which shows what is actually deployed. I'm not sure that all MediaWiki sites can do this, but sites that sync their deployment with a Git repo surely can, and this includes Wikimedia.

See Also:
T37649: Special:Version doesn't list hashes of extensions checked out from git
T37728: Git Revision should be linked on Special:Version
T108226: Special:Version should show the versions of services that a wiki uses

Event Timeline

Works on wmflabs: - but that is synced to git.
I am not sure, if production is synced the same as labs.

See also T155624

There's also a few other bugs where we get weird edge cases, gitinfo not properly updated etc... IIRC, a full scap syncs it, sync-dir/sync-file doesn't, so hence, we get things out of skew

In my understanding, there are at least two different cases about why some extensions don’t have a Git hashes:

  1. Some are registered as Composer library (e.g. DataValues* extensions installed with Semantic MediaWiki through Composer) and as such don’t appear because their code is in /vendor/X/Y instead of /extensions/Z; imho this is not a bug in MediaWiki core but either the extensions should be installed in /extensions either it should not be registered as a MediaWiki extension in Special:Version but as a Composer library (section above).
  2. In some Git setup, particularly if a git gc ran in some directory, the class GitInfo class doesn’t read the file /.git/packed-refs and hence cannot retrieve the hash for this Git-versioned directory.

I prepare a patch for the second case.

Change 378223 had a related patch set uploaded (by Seb35; owner: Seb35):
[mediawiki/core@master] Improve GitInfo for reading packed refs

Change 378223 merged by jenkins-bot:
[mediawiki/core@master] Improve GitInfo for reading packed refs