Page MenuHomePhabricator

GitInfo never creates JSON files for caching
Open, Needs TriagePublic

Description

In https://gerrit.wikimedia.org/r/#/c/130498/, @bd808 added support for caching GitInfo in JSON files. The actual method, that dumps the cache into a file - GitInfo::precomputeValues(), is never called, though, thus making a part of GitInfo actually useless.

I unfortunately lack experience with GitInfo, so it would be cool if someone else could fix this small bug.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 26 2016, 7:07 PM
bd808 added a comment.Mar 27 2016, 5:06 AM

The json files are for data pre-computed at deploy time. On the WMF production cluster they are generated by scap. The PHP method is provided as a convenience for other MediaWiki deployments.

Aha, understood. Is there any documentation for using the PHP method?

bd808 added a comment.Mar 27 2016, 3:19 PM

It probably wouldn't be too hard to write a maintenance script that would automate creating the cache files by walking over $wgExtensionCredits, creating a new GitInfo object for core and each extension, and calling precomputeValues() on each instance to create the json cache file.

Zoglun added a subscriber: Zoglun.

Hi guys,

Is the gitinfo caching function still under developing?

Is the gitinfo caching function still under developing?

The code exists in MediaWiki core and is used in the production Wikimedia wikis. Your bug report at T215722 seems likely to be a real bug in the implementation. Because we pre-compute the cache files as a step in each Scap deployment of MediaWiki to the Wikimedia production wiki farm the path you are seeing an error in is largely untested at least by Foundation staff.