Page MenuHomePhabricator

Scribunto should expose a version and Lua version on Special:Version
Closed, ResolvedPublic

Description

I have a suspicion that http://scribunto.wmflabs.org/ is using an old version of Scribunto (or a different version generally), which is causing me a lot of confusion. For example, uscript seems to somewhat exist as a module on scribunto.wmflabs.org.

People are moving modules between test2.wikipedia.org and scribunto.wmflabs.org and mediawiki.org. If scribunto.wmflabs.org is using a different version of Scribunto (particularly an older version), it's crucial that this be noted prominently in the site notice or somewhere similarly prominent.


Version: unspecified
Severity: enhancement
URL: http://scribunto.wmflabs.org/

Details

Reference
bz39655

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:10 AM
bzimport set Reference to bz39655.
bzimport added a subscriber: Unknown Object (MLST).

Sorry, I don't really want to file a new bug, but Scribunto seems to have no exposed versioning, which can make debugging very annoying. Can we output Lua version, Scribunto version, PHP version, and some other info somewhere, please?

I guess Scribunto extension can use a version number. I have no idea whether it can expose LUA version on Special:Version but that should be possible. Slightly adjusted bug summary.

Gerrit change 54872 will make Scribunto add the relevant version numbers to the "Installed software" section of Special:Version.

I don't know what's involved in adding and correctly updating version numbers for an extension, so I didn't do anything about that.

(In reply to comment #4)

Gerrit change #54872 will add version numbers to "Installed software" section

This was merged today, and will be deployed next week.

I don't know what's involved in adding and correctly updating version numbers
for an extension, so I didn't do anything about that.

Brad: Is http://www.mediawiki.org/wiki/Manual:Developing_extensions#Registering_features_with_MediaWiki sufficient or does that documentation needs to be extended?

(In reply to comment #5)

This was merged today, and will be deployed next week.

Well, it will start being deployed next week. But it will take two weeks for it to be deployed everywhere.

(In reply to comment #5)

(In reply to comment #4)

I don't know what's involved in adding and correctly updating version numbers
for an extension, so I didn't do anything about that.

Brad: Is
http://www.mediawiki.org/wiki/Manual:
Developing_extensions#Registering_features_with_MediaWiki
sufficient or does that documentation needs to be extended?

It's more of a process issue: When should the extension's version number get updated? And how do we deal with the fact that we're probably going to forget to do so most of the time?

Look at the version number embedded in the LuaSandbox PHP extension: it was still at "0.1", until in Gerrit change 54867 I made the build process pull the version from debian/changelog (which has to be updated each time a new version is deployed). But I know of nothing so simple that can be done with a MediaWiki extension.

Ah, thanks for clarifying. CC'ing Greg for comments 4 to 6 (when to bump a version number of an ext), though something to discuss somewhere else.

(In reply to comment #6)

It's more of a process issue: When should the extension's version number get
updated? And how do we deal with the fact that we're probably going to forget
to do so most of the time?

Yeah, if it is hard to force via code (eg the debian pkg you mentioned) then yes, this just needs to be done by the developers as they modify the extensions. Determining when to increment the number is harder...

For less modified extensions, probably each time it is modified update the minor number.

For more often modified ones, incrementing "every so often" is probably better and should be done around the time of completed new features/fixed bugs/etc.

Do we need something official?

Greg

As Lua/Scribunto become more widespread, I'm trying to avoid a situation where slight environment differences delay (or actively harm) debugging modules. The Lua version is a good addition, but I'm wondering if there's any way to expose specific flags or options that were used when Lua was compiled.

If not, this bug is probably resolved. Scribunto already exposes its Git hash at [[Special:Version]] (like any other MediaWiki extension). A manual version number (e.g., 1.0.4 or whatever) probably won't really be helpful to anyone.

(In reply to comment #9)

As Lua/Scribunto become more widespread, I'm trying to avoid a situation
where slight environment differences delay (or actively harm) debugging
modules. The Lua version is a good addition, but I'm wondering if there's any
way to expose specific flags or options that were used when Lua was compiled.

There aren't going to be any slight environment differences due to compilation options on WMF wikis, not least because the nature of the LuaSandbox extension is such that we can't have different versions of LuaSandbox running on different wikis.[1] And the process of deploying a new version of LuaSandbox necessarily involves adjusting the version number, as mentioned in comment 6.

As for non-WMF wikis, it's probably more likely that there would be differences involved in some using LuaStandalone rather than LuaSandbox. Hopefully that will be at a minimum, though, as things are well sandboxed and Scribunto's unit tests are run against both engines.

[1]: It would be possible for different *servers* to have different versions, but aside from transient situations during an actual deploy such a situation would be a sign of a more major problem.

mwalker wrote:

This should be at least slightly fixed by https://gerrit.wikimedia.org/r/#/c/65409/1 because then we will at least get the deployed git treeish information in Special:Version

(In reply to comment #12)

Isn't this fixed now?

Yes, I think so.

More or less. We have the Lua and luasandbox versions on Special:Version now, but Scribunto still doesn't display a "version number" for itself. OTOH, many of the other deployed extensions don't either, and I imagine many of the ones that do are only sporadically updated without real ties to actual updates of the extension. As for displaying git revision numbers for extensions in general, that can probably be tracked elsewhere.

Change 95395 had a related patch set uploaded by MarkAHershberger:
(bug 39655) Add Lua version info to Special:Version

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

Change 95395 merged by MarkAHershberger:
(bug 39655) Add Lua version info to Special:Version

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

No open patches to review here (backport patch to REL_1_21 got merged), hence resetting status to RESOLVED FIXED. Backport_to_Stable flag might be set to "+" by hexmode.