Page MenuHomePhabricator

Upgrade etsy phan 0.7..0.8 (was mediawiki-core-php70-phan-jessie requested PHP extension sqlite3 has the wrong version)
Closed, ResolvedPublic

Description

00:00:44.238   Problem 1
00:00:44.239     - Installation request for etsy/phan 0.7 -> satisfiable by etsy/phan[0.7].
00:00:44.239     - etsy/phan 0.7 requires ext-sqlite3 0.7-dev -> the requested PHP extension sqlite3 has the wrong version (7.0.21-1+0~20170706092253.2+jessie~1.gbp57c738) installed.

Solved in phan 0.8+ which removes the ext-sqlite3 0.7-dev dependency. Gotta update/recheck the following extensions:


The issue is apparently that the php7.0-sqlite package from sury.org causes the extension to report a version that is not matching 0.7-dev.

$ php -i|grep -i sqlite
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/20-xhprof.ini on line 2 in Unknown on line 0
/etc/php5/cli/conf.d/20-pdo_sqlite.ini,
/etc/php5/cli/conf.d/20-sqlite3.ini,
PDO drivers => mysql, pgsql, sqlite
pdo_sqlite
PDO Driver for SQLite 3.x => enabled
SQLite Library => 3.8.7.1
sqlite3
SQLite3 support => enabled
SQLite3 module version => 0.7-dev
SQLite Library => 3.8.7.1
sqlite3.extension_dir => no value => no value
$ apt-cache policy php7.0-sqlite
php7.0-sqlite3:
  Installed: 7.0.21-1+0~20170706092253.2+jessie~1.gbp57c738
  Candidate: 7.0.21-1+0~20170706092253.2+jessie~1.gbp57c738
  Version table:
 *** 7.0.21-1+0~20170706092253.2+jessie~1.gbp57c738 0
        500 https://packages.sury.org/php/ jessie/main amd64 Packages
zcat changelog.Debian.gz
php7.0 (7.0.21-1+0~20170706092253.2+jessie~1.gbp57c738) unstable; urgency=medium

  ** SNAPSHOT build @57c738a72fd43c9428cf8f952b410cfbb5ba2c96 **

  * UNRELEASED

 -- Ondřej Surý <ondrej@sury.org>  Thu, 06 Jul 2017 11:22:55 +0200

php7.0 (7.0.21-1) unstable; urgency=medium

  * New upstream version 7.0.21
  * Rebase patches on top of PHP 7.0.21

 -- Ondřej Surý <ondrej@debian.org>  Thu, 06 Jul 2017 11:01:45 +0200

php7.0 (7.0.20-2) unstable; urgency=medium

  * Add Ferenc Kovacs signing key to upstream GPG keyring
  * Add upstream patch to fix broken support for HOST/PATH ini sections

 -- Ondřej Surý <ondrej@debian.org>  Wed, 14 Jun 2017 07:30:04 +0200

Event Timeline

Mentioned in SAL (#wikimedia-releng) [2017-07-06T16:20:57Z] <hashar> Deleting Nodepool snapshot snapshot-ci-jessie-1499350442 - faulty php7.0-sqlite package that breaks phan jobs - T169904

That is probably a fault in the sury.org package :-( I have deleted the Nodepool reference image that got generated today, but that will be generated again tomorrow and break again :-(

Might be worth filling an issue on sury https://github.com/oerdnj/deb.sury.org/issues

one can copy paste P5691

composer show -p shows the extensions available and their version.

On a proper instance:

$ composer show -p|grep sqlite
ext-pdo_sqlite      1.0.1    The pdo_sqlite PHP extension
ext-sqlite3         0.7-dev  The sqlite3 PHP extension

Will have to try that with the faulty 7.0.21-1+0~20170706092253.2+jessie~1.gbp57c738.

Over night I filled https://github.com/oerdnj/deb.sury.org/issues/642 Upstream and

I don't think the PHP packages are at fault. Seems like composer or just the etsy/phan dependency definition to me. Perhaps composer has some internal mappings that needs to be updated?

Nothing has changed in the packages apart from the upstream version number, do either this is composer or upstream bug. I strongly suspect composer, try taking it there.

On a Nodepool Jessie instance using an image from Wednesday July 5:

$ export PHP_BIN=/usr/bin/php7.0

$ php --version
PHP 7.0.20-2+0~20170614060657.1+jessie~1.gbp37279a (cli) (built: Jun 14 2017 06:28:15) ( NTS )

$ composer show -p|grep sqlite3
ext-sqlite3         0.7-dev  The sqlite3 PHP extension

$ php7.0 --ri sqlite3

sqlite3

SQLite3 support => enabled
SQLite3 module version => 0.7-dev
SQLite Library => 3.8.7.1

Directive => Local Value => Master Value
sqlite3.extension_dir => no value => no value

On integration-slave-jessie-1001 which is upgraded to latest package versions:

$ export PHP_BIN=/usr/bin/php7.0

$ php --version
PHP 7.0.21-1+0~20170706092253.2+jessie~1.gbp57c738 (cli) (built: Jul  6 2017 09:45:30) ( NTS )

$ composer show -p|grep sqlite3
ext-sqlite3         7.0.21   The sqlite3 PHP extension (actual version: 7.0.21-1+0~20170706092253.2+jessie~1.gbp57c738)

$ php7.0 --ri sqlite3

sqlite3

SQLite3 support => enabled
SQLite3 module version => 7.0.21-1+0~20170706092253.2+jessie~1.gbp57c738
SQLite Library => 3.8.7.1

Directive => Local Value => Master Value
sqlite3.extension_dir => no value => no value

Thus the sqlite3 extension version got changed from 0.7-dev to 7.0.21-1+0~20170706092253.2+jessie~1.gbp57c738 and thus composer cant match them.

We found out the issue to be a change in php-src between 7.0.20 and 7.0.21:

$ git grep -e 'PHP_SQLITE3_VERSION\s' php-7.0.20
php-7.0.20:ext/sqlite3/php_sqlite3.h:#define PHP_SQLITE3_VERSION         "0.7-dev"
$ git grep -e 'PHP_SQLITE3_VERSION\s' php-7.0.21
php-7.0.21:ext/sqlite3/php_sqlite3.h:#define PHP_SQLITE3_VERSION        PHP_VERSION

https://github.com/php/php-src/commit/c3b910370c5c92007c3e3579024490345cb7f9a7

I am not sure what to do from there. Fill a bug to PHP or get phan updated?

The fix is to upgrade Phan to 0.8.0 or later.

Change 363807 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] Bump Phan 0.7..0.8 for mediawiki/core

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

Change 363807 merged by jenkins-bot:
[integration/config@master] Bump Phan 0.7..0.8 for mediawiki/core

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

Change 363809 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] Bump Phan 0.7..0.8 for mediawiki extensions

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

The Jenkins jobs running Phan have been updated to use Phan 0.8.

mediawiki/core pass fine.

Gotta test affected extensions.

Change 363809 merged by jenkins-bot:
[integration/config@master] Bump Phan 0.7..0.8 for mediawiki extensions

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

hashar renamed this task from mediawiki-core-php70-phan-jessie requested PHP extension sqlite3 has the wrong version to Upgrade etsy phan 0.7..0.8 (was mediawiki-core-php70-phan-jessie requested PHP extension sqlite3 has the wrong version).Jul 7 2017, 12:55 PM
hashar updated the task description. (Show Details)
hashar updated the task description. (Show Details)

Follow up of the phan update:

CirrusSearch has some breakage https://gerrit.wikimedia.org/r/#/c/363816/

Wikibase has bunch of errors https://integration.wikimedia.org/ci/job/mwext-php70-phan-jessie/2639/console

hashar claimed this task.
hashar updated the task description. (Show Details)

Phan has been upgraded from 0.7 to 0.8 and all repositories have been adjusted.