Page MenuHomePhabricator

Add `ext-mysqli` to the composer-test CI container
Open, Needs TriagePublic

Description

At https://gerrit.wikimedia.org/r/#/c/labs/tools/stewardbots/+/519087/ Jenkins complains that it misses the ext-mysqli composer dependency. @Legoktm and @hashar suggested me to file a task to evaluate if it could be added. Thank you!

Event Timeline

Hmm. mysqli seems a bit heavy to add to the composer-{flavour}-docker images.

We currently have php(7.\d)?-mysql in the quibble-stretch-php7* images and the custom civicrm and mediawiki-phan images.

Not sure random tools should be using quibble's images as a base, however…

Thanks for creating this task! I guess we don't truly need it to run the tests in this case, but it's good to require it in composer.json for wherever the application is meant to live (be it Toolforge or your local environment).

In such case you'd want to run composer install with --ignore-platform-reqs. However, setting that for all composer jobs in general would likely also be undesirable as for prod repos we'd probably want to catch something like this. Perhaps something we can offer as a variant for tools that are okay with the requirement for their tests to not have a running database and web server in CI.

Also, it should be possible to install the php-mysql (client) package from Debian without installing the mysql (server) package. Adding only the bindings should be fairly light and might be feasible. Would go along some of other extensions we install in CI already for PHP libraries.

Thanks, I don't know the CI system very well so I'll defer to others. I will say that the most recent build suggests we're using an image that doesn't have PHP 7.2. We will definitely need that! How can we change it?

Thanks, I don't know the CI system very well so I'll defer to others. I will say that the most recent build suggests we're using an image that doesn't have PHP 7.2. We will definitely need that! How can we change it?

Correct, the composer-hhvm-docker image has HHVM and the composer-php72-docker image has PHP 7.2. :-) I'm switching you over now.

Change 519162 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[integration/config@master] layout: [labs/tools/stewardbots] Bump composer test to php72+

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

Change 519162 merged by jenkins-bot:
[integration/config@master] layout: [labs/tools/stewardbots] Bump composer test to php72+

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

Mentioned in SAL (#wikimedia-releng) [2019-06-26T01:29:05Z] <James_F> Moving labs/tools/stewardbots's composer test to php72+ T226585

Hmm. mysqli seems a bit heavy to add to the composer-{flavour}-docker images.

What do you mean by heavy? Just to clarify, the php-mysqli package is just the PHP extension, it doesn't actually set up mysql-server, etc.

Hmm. mysqli seems a bit heavy to add to the composer-{flavour}-docker images.

What do you mean by heavy? Just to clarify, the php-mysqli package is just the PHP extension, it doesn't actually set up mysql-server, etc.

Oh, yes, I know; I meant that it's not trivial (like adding gzip would be). https://packages.debian.org/buster/php7.3-mysql says it's about half a meg, which is pretty small, but where would we stop? If the composer image starts to get half the PHP extensions we need for MW, really that's a sign that people should be using a MW-target image and not something intended for lightweight linting and CLI processing.

Well, given you just added php-ast to those images, I guess this is fine.

OK, here are the list of debian packages we're currently installing in production and in CI images, I think:

packageProdCI php72CI quibble-stretch-php72
php7.2-apcuNNY
php7.2-astNYY
php7.2-bcmathNYY
php7.2-cliYYY
php7.2-commonYNN
php7.2-curlYYY
php7.2-dbaNYY
php7.2-devYNN
php7.2-fpmYNN
php7.2-gdYNY
php7.2-gmpYYY
php7.2-intlYNY
php7.2-jsonYNN
php7.2-ldapYNY
php7.2-mbstringYYY
php7.2-mysqlYNY
php7.2-opcacheYNN
php7.2-pgsqlNNY
php7.2-phpdbgYNN
php7.2-readlineYNN
php7.2-redisNYN
php7.2-sqlite3NYY
php7.2-tidyNNY
php7.2-xdebugNYN
php7.2-xmlYYY
php7.2-zipNYY
Krinkle renamed this task from Add `ext-mysqli` to the CI container to Add `ext-mysqli` to the composer-test CI container.Oct 3 2019, 10:14 PM

Can automated tests read extension.json's requires.platform section and add to the testing environment whatever is missing?