Page MenuHomePhabricator

Jenkins is using php-luasandbox 1.9-1 for zend unit tests; precise should be upgraded to 2.0-8 or equivalent
Closed, ResolvedPublic

Description

Gerrit change 188848 takes advantage of the feature added to luasandbox in Gerrit change 84985, however the unit tests are failing because Jenkins is using an outdated version of php-luasandbox. Jenkins must use precise when running the zend unit tests as long as MediaWiki still supports PHP 5.3, since trusty comes with PHP 5.5.

Please upgrade php-luasandbox in the Wikimedia precise repo to a newer version. Thanks.

Details

Related Gerrit Patches:
mediawiki/php/luasandbox : masterBump version

Event Timeline

Anomie created this task.Feb 6 2015, 2:52 PM
Anomie raised the priority of this task from to Needs Triage.
Anomie updated the task description. (Show Details)
Anomie added subscribers: Anomie, hashar.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 6 2015, 2:52 PM
greg triaged this task as Medium priority.Feb 8 2015, 5:43 AM
greg added a project: Blocked-on-Operations.
greg set Security to None.

Hello, this is taking a little bit more than expected, I 'll be looking into this in the next couple of days.

A note: the CI instances have Debian unattended upgrade to magically upgrade package:

$ cat /etc/apt/apt.conf.d/51unattended-upgrades-wikimedia
Unattended-Upgrade::Allowed-Origins "Wikimedia:${distro_codename}-wikimedia";

Which is run hourly:

/etc/cron.hourly/apt -> /etc/cron.daily/apt

So the should be upgraded on all CI instances in the hour after the package has been made available on apt.wikimedia.org.

Anomie renamed this task from Jenkins is using php-luasandbox 1.9-1 for zend unit tests; precise should be upgraded to 2.0-7+wmf2.1 or equivalent to Jenkins is using php-luasandbox 1.9-1 for zend unit tests; precise should be upgraded to 2.0-8 or equivalent.Mar 26 2015, 4:46 PM

(updating bug title since I see a newer version in http://apt.wikimedia.org/wikimedia/pool/main/p/php-luasandbox/)

A preliminary update on this. php-luasandbox > 2.0 requires hhvm to build successfully. Which.. does not exist for precise right now making this an interesting problem to solve. I am reluctant to mess with HHVM on precise at this point, gonna try to figure a way to bypass this restriction.

The code itself doesn't require HHVM at all to build the Zend PHP version of the extension, but the Debianization wants to build both Zend and HHVM packages.

In some quick local testing with no hhvm installed, I was able to get dpkg-buildpackage -b to generate a php-luasandbox package by

  • Commenting out the HHVM-related lines (13–23, 27, 33, 38) in debian/rules
  • Removing the hhvm-dev and cmake bit in Build-Depends in debian/control
  • Removing the stanza for hhvm-luasandbox in debian/control

On a side note, the mediawiki/php/luasandbox repo has version 2.0-7 in debian/changelog, not 2.0-8. But the only difference between http://apt.wikimedia.org/wikimedia/pool/main/p/php-luasandbox/php-luasandbox_2.0-8.tar.gz and the git repo seems to be that version number.

The code itself doesn't require HHVM at all to build the Zend PHP version of the extension, but the Debianization wants to build both Zend and HHVM packages.

Yup. Actually it builds the package twice

In some quick local testing with no hhvm installed, I was able to get dpkg-buildpackage -b to generate a php-luasandbox package by

  • Commenting out the HHVM-related lines (13–23, 27, 33, 38) in debian/rules
  • Removing the hhvm-dev and cmake bit in Build-Depends in debian/control
  • Removing the stanza for hhvm-luasandbox in debian/control

Yup. I did that too, obviously works. Question is how to do it more elegantly.

On a side note, the mediawiki/php/luasandbox repo has version 2.0-7 in debian/changelog, not 2.0-8. But the only difference between http://apt.wikimedia.org/wikimedia/pool/main/p/php-luasandbox/php-luasandbox_2.0-8.tar.gz and the git repo seems to be that version number.

Yup. Seems like 2.0-8 should be 2.0-7. In debian/changelog on the repo, 2.0-7 is missing. So probably an unintented version bump. That being said, php-luasandbox is a debian native package so the revision there is anyway wrong. I am thinking about 2.1 for the next version and sticking to a X.Y(.Z?) versioning scheme from now on as is the norm for debian native packages.

Andrew added a subscriber: Andrew.Apr 21 2015, 4:40 PM

https://gerrit.wikimedia.org/r/#/c/210920/ has a more elegant way of doing it and compiles cleanly on both trusty (with wikimedia repo enabled) and precise (without wikimedia-repo enabled). Once reviewed/merged, I 'll bump the version in the changelog and upload the debs on apt.wikimedia.org

Change 212510 had a related patch set uploaded (by Alexandros Kosiaris):
Bump version

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

Change 212510 merged by Alexandros Kosiaris:
Bump version

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

akosiaris closed this task as Resolved.May 21 2015, 8:20 AM

With the two above changes merged, I built and uploaded php-luasandbox 2.0.9 on both precise and trusty. Note that the package has also been transformed to a native Debian package. I think we can finally close this task successfully.

Anomie reopened this task as Open.May 21 2015, 10:23 AM

Unit tests on https://gerrit.wikimedia.org/r/#/c/188848/ still fail. Does something need to be done still to get the Jenkins boxes to pick up the upgrade?

akosiaris closed this task as Resolved.May 21 2015, 8:00 PM

That's because the integration projects hosts needed to actually perform the update. Which is not what is requested in this ticket. I anyway did it on the various integration slaves and gallium/lanthanum and from what I see in

https://integration.wikimedia.org/ci/job/mwext-testextension-zend/1966/consoleFull (before the uprade)

and

https://integration.wikimedia.org/ci/job/mwext-testextension-zend/1967/consoleFull (after the upgrade)

the tests still fail, for different however reasons. Re-resolving this since the package has been uploaded on apt.wikimedia.org as requested and hosts upgraded, you probably want to track the actual failures in a different ticket

Apparently all the Precise slaves have been upgraded:

apt-cache policy php-luasandbox
php-luasandbox:
  Installed: 2.0.9
  Candidate: 2.0.9
  Version table:
 *** 2.0.9 0
       1001 http://apt.wikimedia.org/wikimedia/ precise-wikimedia/universe amd64 Packages
        100 /var/lib/dpkg/status

Thank you @akosiaris for the Debian package works. I am really looking forward to kill Precise :-/

The other failures are T95813, apparently the upgraded package makes it happen on Zend now too.