Page MenuHomePhabricator

Have CI set `$wgScribuntoDefaultEngine = 'luasandbox` to speed up parser tests
Closed, ResolvedPublic

Description

It also wouldn't hurt to have the CI infrastructure is configured to use $wgScribuntoDefaultEngine = 'luasandbox'; if it's not already, to speed up any tests (e.g. parser tests) that use Scribunto without explicitly specifying an engine.

That needs to be done in integration/jenkins.git under mediawiki/conf.d/.

Related Objects

Event Timeline

hashar raised the priority of this task from to Needs Triage.
hashar updated the task description. (Show Details)
hashar updated the task description. (Show Details)
hashar set Security to None.
hashar added subscribers: Anomie, JanZerebecki, greg and 6 others.

How would it be set in there and do we create a new php file for that config.

BTW, if you don't already have the php-luasandbox or hhvm-luasandbox packages installed (matching whichever PHP you're running) on the CI hosts, you'll need to do that too.

The CI slaves are provisioned via the Puppet classes mediawiki::packages which also provision the Wikimedia production application servers.

I have verified, we have:

hhvm-luasandbox2.0.11
php-luasandbox2.0.11

@Anomie isn't Scribunto smart enough to detect whether luasandbox is available? I am just wondering :-}

It'll throw an exception with the message "The luasandbox extension is not present, this engine cannot be used." if you try to use that engine without the extension being present. There's no auto-detection in the default for $wgScribuntoDefaultEngine.

Sounds like we want to change it to do autodetection instead of adding special configuration to our CI.

Change 273405 had a related patch set uploaded (by Jforrester):
mediawiki.conf: Set $wgScribuntoDefaultEngine for speed

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

Sounds like we want to change it to do autodetection instead of adding special configuration to our CI.

No, let's not wait for T128144: Auto-detection the default for $wgScribuntoDefaultEngine to get fixed when it's so disruptive right now.

Change 273405 merged by jenkins-bot:
mediawiki.conf: Set $wgScribuntoDefaultEngine for speed

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

Change 273405 merged by jenkins-bot:
mediawiki.conf: Set $wgScribuntoDefaultEngine for speed

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

For clarity, this patch was reverted because it broke some WikiBase tests.

It is now applied again. Did it work and speed up the parser tests?

I have noticed that since we added https://gerrit.wikimedia.org/r/#/c/273405/ the php test extension has been taking longer and hvvm has gotten quicker.

It is applied for every job started since 2016-02-27T00:53 UTC ( https://phabricator.wikimedia.org/T128191#2068439 ).

If it did not work was there another way to speed it up? Or do we need T87781?

Krinkle subscribed.

Change 273405 merged by jenkins-bot:
mediawiki.conf: Set $wgScribuntoDefaultEngine for speed

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

For clarity, this patch was reverted because it broke some Wikibase tests.

Meanwhile the wikibase tests were updated to support this.
rEWBA56122b4a98ed: Use Scribunto_LuaEngineTestBase::getEngine instead of Scribunto…

Since then, the Jenkins mediawiki config patch has been re-applied.
rCIJEf3516f7e51fa: Revert "Revert "mediawiki.conf: Set $wgScribuntoDefaultEngine for speed""