Page MenuHomePhabricator

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

Description

https://integration.wikimedia.org/ci/job/mwext-TimedMediaHandler-testextension-zend/32/console

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

brooke raised the priority of this task from to Needs Triage.
brooke updated the task description. (Show Details)
brooke added subscribers: brooke, 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 https://gerrit.wikimedia.org/r/#/c/188115/ , 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 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 subscribed.

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

@hashar should we be doing the same as https://gerrit.wikimedia.org/r/#/c/188115/1/ZeroPortal.php,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 https://gerrit.wikimedia.org/r/#/c/188115/1 and in the inline diff at https://gerrit.wikimedia.org/r/#/c/188115/1/ZeroPortal.php,unified

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

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

Patch-For-Review

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

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

TheDJ claimed this task.