Page MenuHomePhabricator

Disable XDEBUG by default for MediaWiki when using Skaffold
Closed, ResolvedPublic

Description

Certain wbstack/api jobs (e.g., QueueSearchIndexBatches) will fail when XDEBUG is enabled. These jobs rely on specific outputs from MediaWiki which change when XDEBUG is enabled and fails to load.

Here's an example response that QueueSearchIndexBatches relies on:

{"wbstackQueueSearchIndexBatches":{"script":"extensions/CirrusSearch/maintenance/ForceSearchIndex.php","return":1,"output":["PHP Warning:  Failed loading Zend extension 'xdebug' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20190902/xdebug (/usr/local/lib/php/extensions/no-debug-non-zts-20190902/xdebug: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20190902/xdebug.so (/usr/local/lib/php/extensions/no-debug-non-zts-20190902/xdebug.so: cannot open shared object file: No such file or directory)) in Unknown on line 0","Couldn't find any pages to index.  fromId =  =  = toId."]}}

That script ends up failing due to this check:
https://github.com/wbstack/api/blob/aea261d55fd40dd0a37285ec8dc14a5286cb623c/app/Jobs/CirrusSearch/QueueSearchIndexBatches.php#L65

In the interest of moving the Elasticsearch migration forward, I propose we simply default to XDEBUG being off for now. However, the long-term goal should be to make all MediaWiki response checks more robust for all jobs.

Patches: