Page MenuHomePhabricator

TimedMediaHandler jenkins PHPUnit tests fail: depends on MwEmbedSupport extension
Closed, ResolvedPublic


relevant bits:

17:12:22 + php /srv/ssd/jenkins-slave/workspace/mwext-TimedMediaHandler-testextension-zend/src/maintenance/update.php --quick
17:12:22 TimedMediaHandler requires the MwEmbedSupport extension.
17:12:22 Build step 'Execute shell' marked build as failure

The integration repo seems to list the dependency as I expect, so I'm not sure what's wrong.

Event Timeline

brion raised the priority of this task from to Needs Triage.
brion updated the task description. (Show Details)
brion added projects: Jenkins, TimedMediaHandler.
brion added subscribers: brion, Dbrant, hashar.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
hashar renamed this task from TimedMediaHandler jenkins tests fail to TimedMediaHandler jenkins PHPUnit tests fail: depends on MwEmbedSupport extension.Feb 6 2015, 12:24 AM
hashar set Security to None.

integration/config.git jjb/mediawiki-extensions.yaml has:

- TimedMediaHandler:
   dependencies: 'MwEmbedSupport'

Looking at the console log Zuul cloner does clone both repositories:

17:12:17 INFO:zuul.CloneMapper:  mediawiki/extensions/TimedMediaHandler -> src/extensions/TimedMediaHandler
17:12:17 INFO:zuul.CloneMapper:  mediawiki/extensions/MwEmbedSupport -> src/extensions/MwEmbedSupport

The job started failing between Jan 28 and Jan 31 according to the build history. Looking at TimedMediaHandler, the die() / error is triggered when it can't find the class MwEmbedResourceManager. The class is still in that extension so I am not sure what is happening :-(

Good news I can reproduce the issue on my local setup:

$ ls extensions/
MwEmbedSupport     TimedMediaHandler

$ cd tests/phpunit
$ php phpunit.php --testsuite extensions
TimedMediaHandler requires the MwEmbedSupport extension.

I use an autoloader that uses PHP scandir() that presumably yields entries in their order of creation. In extensions/ I created a symlink for TimedMediaHandler first then MwEmbedSupport. The Jenkins job uses scandir() as well and probably suffers from the same issue.

ZeroPortal suffers from a similar issue, it depends on ZeroBanner which might end up being loaded AFTER and thus cause ZeroPortal to die() :-( There is some discussion ongoing on , the idea is to delay the die() after all extensions have been loaded from LocalSettings.php. See also T88015: Jenkins must not load ZeroPortal before ZeroBanner.

shouldn't we simply move to extension.json per @Legoktm?

Gilles triaged this task as High priority.Feb 13 2015, 12:19 PM
Gilles moved this task from Untriaged to Next up on the Multimedia board.

Making this high priority since all TMH changesets are blocked on this.

Krinkle added a subscriber: Krinkle.

Removing Jenkins association as it isn't related to the Jenkins service.

@hashar should we be doing the same as,unified for TMH for now?

Yup similar thing. The requirements should be checked after all extensions have been loaded. Requirement failure and setup depending on another extensions should be done either via wgExtensionFunctions or the setupAfterCache hook (not sure what is the difference between the two).

Legoktm commented on the Gerrit cover message at and in the inline diff at,unified

Change 191997 had a related patch set uploaded (by TheDJ):
Check MwEmbed dependency only before it is needed


Change 191997 merged by jenkins-bot:
Check MwEmbed dependency only before it is needed

TheDJ claimed this task.