Page MenuHomePhabricator

Replace php-tideways_xhprof with php-xhprof in MediaWiki-Docker
Closed, ResolvedPublic

Description

Background

  • Tideways has abandoned php-tideways_xhprof in 2023.
  • Debian has removed php-tideways from testing (it is still in stable, but won't be in the next LTS).
  • A few years ago, Wikimedia adopted tideways_xhprof because the original xhprof from Phacility lacked PHP8 support, which Tideways added to their fork. Another fork (which also supports PHP8) has been rewarded the original name and is now continuing the work.
  • Wikimedia is now switching to the latest version of the original xhprof package (for both PHP 8.1 and the upcoming PHP 8.3 upgrade, per T398245#11031778).
  • php-tideways_xhprof was added to MediaWiki-Docker in 2020. T246202: Add tideways-xhprof to PHP image
  • mw:MediaWiki-Docker/Configuration recipes/Profiling says "MediaWiki-Docker comes with php-tideways pre-installed.", but it the latest php8.3 images do not actually install this. This was apparently removed in 2023 (T338208#8992016, commit)

[…] MediaWiki core supports php-xhprof 0.9 and its fork php-tideways_xhprof. The current version of php-xhprof is 2.x, which we have not tested before. As part of the PHP 8.1 to PHP 8.3 upgrade, we will be switching from the abandoned php-tideways-xhprof package to the php-xhprof 2.x package. I wrote more details and reasons for this package choice at T398245#10965108. […]

I've updated the install instructions at https://www.mediawiki.org/wiki/Manual:Profiling to recommend XHProf instead of Tideways going forward, covering various installation methods and distributions.

Scope

Sury provides php-xhprof packages for all PHP versions, although it may be worth doing T401255: Switch PHP 8.3 image of MediaWiki-Docker from Sury to WMF at the same time and installing php8.1-xhprof from WMF instead.

  • Ensure php8.1, php8.2, and php8.3+ images have php-xhprof preinstalled.
  • Update MediaWiki core's docker-compose.yaml to use versions of the images that have php-xhprof installed.

Details

Related Changes in Gerrit:
Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
bookworm-php84: s/exicmer/excimer/repos/releng/dev-images!117brennenwork/exicmer-reduxmain
bookworm-php83: s/exicmer/excimer/repos/releng/dev-images!116brennenwork/exicmermain
Restore php-xhprof and add php-excimerrepos/releng/dev-images!111krinkleexcimer-and-xhprofmain
Customize query in GitLab

Event Timeline

Krinkle updated the task description. (Show Details)

@brennen Could use review for this one!

!(I'd use the GitLab mechanism, but it seems mere mortals can't add reviewers on GitLab.)

!(I'd use the GitLab mechanism, but it seems mere mortals can't add reviewers on GitLab.)

GitLab only allows project members to assign reviews, and even then only allows one reviewer at a time. A common pattern to work around this is to ping desired reviewer(s) in a comment on the MR itself.

Mentioned in SAL (#wikimedia-releng) [2026-08-13T19:55:04Z] <brennen> Updating development images on contint primary for https://gitlab.wikimedia.org/repos/releng/dev-images/-/merge_requests/111 (T401115) (redux for typo fix)

Change #1326350 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/core@master] Docker: Upgrade base images to have composer 2.10.2 and XHProf/Excimer, and www-data user

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

Change #1326350 merged by jenkins-bot:

[mediawiki/core@master] Docker: Upgrade base images to have composer 2.10.2 and XHProf/Excimer

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

This is now live in MW-master (and so MW REL1_47+). Is that sufficient, or do you want to back-port the switch to old branches?

pmiazga subscribed.

Moving back to in-progress, looks like this is live and no longer blocked. @Krinkle does it need more work or can we close this?