Page MenuHomePhabricator

XDebug should be disabled in composer-package-php70-docker jobs
Open, Needs TriagePublic

Description

I noticed when looking at the performance slowdown comparing https://integration.wikimedia.org/ci/job/composer-package-php55-docker/444/console and https://integration.wikimedia.org/ci/job/composer-package-php70-docker/404/console

And noticed that the PHP 7 doesn't have the phpunit warning saying xdebug isn't available...and that would explain the performance slowdown.

Event Timeline

Krinkle renamed this task from composer-package-php70-docker jobs have xdebug enabled by default to Don't enable XDebug by default in composer-package-php70-docker jobs.Oct 1 2018, 4:05 AM
Krinkle renamed this task from Don't enable XDebug by default in composer-package-php70-docker jobs to XDebug should be disabled in composer-package-php70-docker jobs.
JobImageXdebug?
composer-package-php55-dockerdocker-registry.wikimedia.org/releng/composer-package-php55No
composer-package-php70-dockerdocker-registry.wikimedia.org/releng/composer-packageYes

Indeed:

$ sudo docker run --rm -it --entrypoint=php docker-registry.discovery.wmnet/releng/composer-package-php55 -m|grep -i xdebug

$ sudo docker run --rm -it --entrypoint=php docker-registry.discovery.wmnet/releng/composer-package -m|grep -i xdebug
xdebug
Xdebug
$

The composer-package-php55 container inherits from composer-php55 and php55. They are based on Jessie and PHP packages I have recompiled, but there is no xdebug package available.

composer-package explicitly enables the xdebug module:

dockerfiles/composer-package/Dockerfile.template
FROM {{ "composer" | image_tag }}

USER root
# Enable xdebug for PHPUnit coverage reports
RUN phpenmod xdebug

USER nobody
COPY run.sh /run.sh
ENTRYPOINT ["/run.sh"]

Done by efed77aedccf57b57005502f307aabe252fc034c

For the mediawiki-phpunit-coverage-patch-docker job (which runs coverage report per patch), I have used Quibble to setup MediaWiki then override the command being run in order to enable the xdebug module from the command line. That is roughly:

quibble --commands "phpunit-patch-coverage check --command "php7.0 -d zend_extension=xdebug.so" tests/phpunit/phpunit.php"

The composer-package run.sh invokes composer, there is no good way right now to enable/disable the Xdebug extension :\ Maybe we need the containers to never have Xdebug then refactor the coverage job using those containers and have them explicitly enable the module.