Page MenuHomePhabricator

mwext-php70-phan-docker should've php-curl extension installed
Closed, ResolvedPublic

Description

During implementation of T166355: Detect when CirrusSearch is used without curl and fail gracefully our GCI student found, that at least CI host integration-slave-docker-1005 obviously lacks he curl php extension, as mwext-php70-phan-docker fails with this message currently (once ext-curl was added to the list of required extensions in composer.json) during the composer validate step:

19:19:54 [7.0MB/0.08s] > ComposerHookHandler::onPreUpdate
19:19:54 [7.0MB/0.08s] Loading composer repositories with package information
19:19:54 [7.4MB/0.21s] Updating dependencies
19:19:58 [232.9MB/3.62s] Your requirements could not be resolved to an installable set of packages.
19:19:58 [232.9MB/3.62s] 
19:19:58   Problem 1
19:19:58     - The requested PHP extension ext-curl * is missing from your system. Install or enable PHP's curl extension.
19:19:58 
19:19:58 [152.0MB/3.69s] Memory usage: 152.04MB (peak: 232.96MB), time: 3.69s

(Source: https://integration.wikimedia.org/ci/job/mwext-php70-phan-docker/1795/console)

The integration-* hosts should either include the curl extension or the composer-validate step should be part of the docker script in this case (which will not work for other jobs, that probably run composer validate, too).

Event Timeline

Florian created this task.Dec 20 2017, 12:48 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 20 2017, 12:48 AM

Change 399318 had a related patch set uploaded (by Florianschmidtwelzow; owner: Florianschmidtwelzow):
[integration/config@master] Add php-curl to ci-src-setup

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

The problem is ci-src-setup is a very basic container. It is used to checkout the code and run composer install. The test run is done in a different Container.

Eventually I will get rid of ci-src-setup entirely so we get the Jenkins job happening in a single container.

Change 399318 merged by jenkins-bot:
[integration/config@master] Add php7.0-curl to ci-src-setup

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

hashar closed this task as Resolved.Dec 22 2017, 1:39 PM

I did a rebuild of the CirrusSearch patch and it passed fine. https://integration.wikimedia.org/ci/job/mwext-php70-phan-docker/1879/console

The related Elastica change ( https://gerrit.wikimedia.org/r/#/c/399339/ ) is not affected since phan is not running there.

Thank you @Florian !

@hashar You can simply add --ignore-platform-reqs to the composer update / install and avoid adding anything unused like this to the image.

This is what is recommended in the official composer image @ https://hub.docker.com/_/composer/

and makes sense here, especially as none of the extensions will be used in the setup image.