Fix "InvalidDataException from NotificationListener.php: Invalid metadata for revision"
Closed, ResolvedPublic

Description

Strangely enough, it doesn't cause the build to fail. But the exception is, however, being logged.

It is consistently happening on every build of mediawiki-extensions-hhvm and mediawiki-extensions-zend, including those for MediaWiki core and other extensions.

https://integration.wikimedia.org/ci/job/mediawiki-extensions-zend/5422/artifact/log/mw-exception.log/*view*/

2015-03-04 18:46:33 lanthanum my_wiki-unittest_: [988f8226] [no req]   Flow\Exception\InvalidDataException from line 36 of /srv/ssd/jenkins-slave/workspace/mediawiki-extensions-zend@2/src/extensions/Flow/includes/Data/Listener/NotificationListener.php: Invalid metadata for revision scx0gbh8r2a4iw9e
#0 /srv/ssd/jenkins-slave/workspace/mediawiki-extensions-zend@2/src/extensions/Flow/includes/Data/Listener/DeferredInsertLifecycleHandler.php(36): Flow\Data\Listener\NotificationListener->onAfterInsert(Object(Flow\Model\PostRevision), Array, Array)
#1 [internal function]: Flow\Data\Listener\{closure}()
#2 /srv/ssd/jenkins-slave/workspace/mediawiki-extensions-zend@2/src/includes/deferred/CallableUpdate.php(27): call_user_func(Object(Closure))
#3 /srv/ssd/jenkins-slave/workspace/mediawiki-extensions-zend@2/src/includes/deferred/DeferredUpdates.php(105): MWCallableUpdate->doUpdate()
#4 /srv/ssd/jenkins-slave/workspace/mediawiki-extensions-zend@2/src/extensions/Flow/tests/phpunit/PostRevisionTestCase.php(200): DeferredUpdates::doUpdates()
#5 /srv/ssd/jenkins-slave/workspace/mediawiki-extensions-zend@2/src/extensions/Flow/tests/phpunit/Collection/RevisionCollectionPermissionsTest.php(286): Flow\Tests\PostRevisionTestCase->store(Object(Flow\Model\PostRevision))
#6 /srv/ssd/jenkins-slave/workspace/mediawiki-extensions-zend@2/src/extensions/Flow/tests/phpunit/Collection/RevisionCollectionPermissionsTest.php(164): Flow\Tests\Collection\RevisionCollectionPermissionsTest->generateRevision('new-post', NULL)
#7 [internal function]: Flow\Tests\Collection\RevisionCollectionPermissionsTest->testPermissions(Object(User), 'history', Array)
#8 /srv/deployment/integration/phpunit/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php(988): ReflectionMethod->invokeArgs(Object(Flow\Tests\Collection\RevisionCollectionPermissionsTest), Array)
#9 /srv/deployment/integration/phpunit/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php(838): PHPUnit_Framework_TestCase->runTest()
#10 /srv/deployment/integration/phpunit/vendor/phpunit/phpunit/PHPUnit/Framework/TestResult.php(648): PHPUnit_Framework_TestCase->runBare()
#11 /srv/deployment/integration/phpunit/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php(783): PHPUnit_Framework_TestResult->run(Object(Flow\Tests\Collection\RevisionCollectionPermissionsTest))
#12 /srv/ssd/jenkins-slave/workspace/mediawiki-extensions-zend@2/src/tests/phpunit/MediaWikiTestCase.php(132): PHPUnit_Framework_TestCase->run(Object(PHPUnit_Framework_TestResult))
#13 /srv/deployment/integration/phpunit/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(779): MediaWikiTestCase->run(Object(PHPUnit_Framework_TestResult))
#14 /srv/deployment/integration/phpunit/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(749): PHPUnit_Framework_TestSuite->runTest(Object(Flow\Tests\Collection\RevisionCollectionPermissionsTest), Object(PHPUnit_Framework_TestResult))
#15 /srv/deployment/integration/phpunit/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(709): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
#16 /srv/deployment/integration/phpunit/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(709): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
#17 /srv/deployment/integration/phpunit/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(709): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
#18 /srv/deployment/integration/phpunit/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php(709): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
#19 /srv/deployment/integration/phpunit/vendor/phpunit/phpunit/PHPUnit/TextUI/TestRunner.php(350): PHPUnit_Framework_TestSuite->run(Object(PHPUnit_Framework_TestResult), false, Array, Array, false)
#20 /srv/deployment/integration/phpunit/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php(176): PHPUnit_TextUI_TestRunner->doRun(Object(PHPUnit_Framework_TestSuite), Array)
#21 /srv/deployment/integration/phpunit/vendor/phpunit/phpunit/PHPUnit/TextUI/Command.php(129): PHPUnit_TextUI_Command->run(Array, true)
#22 /srv/ssd/jenkins-slave/workspace/mediawiki-extensions-zend@2/src/tests/phpunit/phpunit.php(239): PHPUnit_TextUI_Command::main()
#23 {main}
Krinkle created this task.Feb 17 2015, 2:22 AM
Krinkle updated the task description. (Show Details)
Krinkle raised the priority of this task from to Needs Triage.
Krinkle added a project: StructuredDiscussions.
Krinkle added a subscriber: Krinkle.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 17 2015, 2:22 AM
Krinkle set Security to None.
EBernhardson triaged this task as Normal priority.Feb 17 2015, 6:47 PM
EBernhardson added a subscriber: EBernhardson.
Krinkle updated the task description. (Show Details)Mar 4 2015, 8:55 PM

This is currently blocking T50002. The main mediawiki-extensions-zend build is passing error-free except for 36 instances of this exception from Flow.

Mattflaschen-WMF raised the priority of this task from Normal to High.Mar 4 2015, 8:58 PM
Mattflaschen-WMF added a subscriber: Mattflaschen-WMF.

this just needs to filter out the listeners, perhaps from container-test.php

Krinkle added a comment.EditedMar 11 2015, 3:24 PM

Ping. This is blocking T50002 and with that the catching of regressions and new errors.

Change 195933 had a related patch set uploaded (by Matthias Mullie):
Get rid of some lifecyclehandlers in container-test.php

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

Bump. Still producing 134KB of exceptions every mediawiki-extensions-zend build. This is blocking our ability to catch more important exceptions and regressions (T50002).

If this is not resolved soon, we may have to consider removing Flow from the test group, or help Flow team temporarily disable the relevant tests (if it's isolated enough to do that).

Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptApr 16 2015, 3:16 AM
EBernhardson raised the priority of this task from High to Unbreak Now!.Apr 16 2015, 4:18 PM

This should be relatively trivial to fix, its just gotten lost among the other high priority tickets. Bumping priority for visibility.

Change 195933 merged by jenkins-bot:
Fix clearExtraLifecycleHandlers

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

Krinkle reopened this task as Open.EditedMar 2 2016, 8:04 PM

Still happening (or again) in process for MediaWiki installs on Jenkins. For example, https://integration.wikimedia.org/ci/job/mediawiki-extensions-php55/1356/artifact/log/mw-exception.log/*view*/

2016-03-02 19:22:18 integration-slave-trusty-1005 jenkins_u2_mw-unittest_: [45386697] [no req]
Flow\Exception\InvalidDataException from line 44 of ./src/extensions/Flow/includes/Data/Listener/NotificationListener.php: Invalid metadata for revision szfx67xj1ubftnrt

#0 ./src/extensions/Flow/includes/Data/Listener/DeferredInsertLifecycleHandler.php(36): Flow\Data\Listener\NotificationListener->onAfterInsert(Flow\Model\PostRevision, array, array)
#1 [internal function]: Flow\Data\Listener\DeferredInsertLifecycleHandler->Flow\Data\Listener\{closure}()
#2 ./src/includes/deferred/CallableUpdate.php(22): call_user_func(Closure)
#3 ./src/includes/deferred/DeferredUpdates.php(151): MWCallableUpdate->doUpdate()
#4 ./src/includes/deferred/DeferredUpdates.php(88): DeferredUpdates::execute(array, string)
#5 ./src/includes/deferred/DeferredUpdates.php(123): DeferredUpdates::doUpdates()
#6 ./src/includes/deferred/DeferredUpdates.php(59): DeferredUpdates::push(array, MWCallableUpdate)
#7 ./src/includes/deferred/DeferredUpdates.php(73): DeferredUpdates::addUpdate(MWCallableUpdate, integer)
#8 ./src/extensions/Flow/tests/phpunit/PostRevisionTestCase.php(251): DeferredUpdates::addCallableUpdate(Closure)
#9 ./src/extensions/Flow/tests/phpunit/Formatter/RevisionFormatterTest.php(295): Flow\Tests\PostRevisionTestCase->store(Flow\Model\PostRevision)
#10 ./src/extensions/Flow/tests/phpunit/Formatter/RevisionFormatterTest.php(232): Flow\Tests\Formatter\RevisionFormatterTest->generateFormatterRow()
#11 [internal function]: Flow\Tests\Formatter\RevisionFormatterTest->testFormattingEditedTitle()
#12 ./src/vendor/phpunit/phpunit/src/Framework/TestCase.php(909): ReflectionMethod->invokeArgs(Flow\Tests\Formatter\RevisionFormatterTest, array)
#13 ./src/vendor/phpunit/phpunit/src/Framework/TestCase.php(768): PHPUnit_Framework_TestCase->runTest()
#14 ./src/vendor/phpunit/phpunit/src/Framework/TestResult.php(612): PHPUnit_Framework_TestCase->runBare()
#15 ./src/vendor/phpunit/phpunit/src/Framework/TestCase.php(724): PHPUnit_Framework_TestResult->run(Flow\Tests\Formatter\RevisionFormatterTest)
#16 ./src/tests/phpunit/MediaWikiTestCase.php(147): PHPUnit_Framework_TestCase->run(PHPUnit_Framework_TestResult)
#17 ./src/vendor/phpunit/phpunit/src/Framework/TestSuite.php(747): MediaWikiTestCase->run(PHPUnit_Framework_TestResult)
#18 ./src/vendor/phpunit/phpunit/src/Framework/TestSuite.php(747): PHPUnit_Framework_TestSuite->run(PHPUnit_Framework_TestResult)
#19 ./src/vendor/phpunit/phpunit/src/Framework/TestSuite.php(747): PHPUnit_Framework_TestSuite->run(PHPUnit_Framework_TestResult)
#20 ./src/vendor/phpunit/phpunit/src/Framework/TestSuite.php(747): PHPUnit_Framework_TestSuite->run(PHPUnit_Framework_TestResult)
#21 ./src/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(440): PHPUnit_Framework_TestSuite->run(PHPUnit_Framework_TestResult)
#22 ./src/vendor/phpunit/phpunit/src/TextUI/Command.php(149): PHPUnit_TextUI_TestRunner->doRun(PHPUnit_Framework_TestSuite, array)
#23 ./src/vendor/phpunit/phpunit/src/TextUI/Command.php(100): PHPUnit_TextUI_Command->run(array, boolean)
#24 ./src/tests/phpunit/phpunit.php(288): PHPUnit_TextUI_Command::main()
#25 {main}
2016-03-02 19:22:13 integration-slave-trusty-1005 jenkins_u2_mw-unittest_: [7735b670] [no req]
Flow\Exception\InvalidDataException from line 97 of ./src/extensions/Flow/includes/Data/Listener/NotificationListener.php: Invalid metadata for topic|post revision szfx6205yvvlaqkh

#0 ./src/extensions/Flow/includes/Data/Listener/NotificationListener.php(60): Flow\Data\Listener\NotificationListener->notifyPostChange(string, Flow\Model\PostRevision, array)
#1 ./src/extensions/Flow/includes/Data/Listener/DeferredInsertLifecycleHandler.php(36): Flow\Data\Listener\NotificationListener->onAfterInsert(Flow\Model\PostRevision, array, array)
#2 [internal function]: Flow\Data\Listener\DeferredInsertLifecycleHandler->Flow\Data\Listener\{closure}()
#3 ./src/includes/deferred/CallableUpdate.php(22): call_user_func(Closure)
#4 ./src/includes/deferred/DeferredUpdates.php(151): MWCallableUpdate->doUpdate()
#5 ./src/includes/deferred/DeferredUpdates.php(88): DeferredUpdates::execute(array, string)
#6 ./src/includes/deferred/DeferredUpdates.php(123): DeferredUpdates::doUpdates()
#7 ./src/includes/deferred/DeferredUpdates.php(59): DeferredUpdates::push(array, MWCallableUpdate)
#8 ./src/includes/deferred/DeferredUpdates.php(73): DeferredUpdates::addUpdate(MWCallableUpdate, integer)
#9 ./src/extensions/Flow/tests/phpunit/PostRevisionTestCase.php(251): DeferredUpdates::addCallableUpdate(Closure)
#10 ./src/extensions/Flow/tests/phpunit/Notifications/NotifiedUsersTest.php(158): Flow\Tests\PostRevisionTestCase->store(Flow\Model\PostRevision)
#11 ./src/extensions/Flow/tests/phpunit/Notifications/NotifiedUsersTest.php(42): Flow\Tests\NotifiedUsersTest->getTestData()
#12 [internal function]: Flow\Tests\NotifiedUsersTest->testWatchingTopic()
#13 ./src/vendor/phpunit/phpunit/src/Framework/TestCase.php(909): ReflectionMethod->invokeArgs(Flow\Tests\NotifiedUsersTest, array)
#14 ./src/vendor/phpunit/phpunit/src/Framework/TestCase.php(768): PHPUnit_Framework_TestCase->runTest()
#15 ./src/vendor/phpunit/phpunit/src/Framework/TestResult.php(612): PHPUnit_Framework_TestCase->runBare()
#16 ./src/vendor/phpunit/phpunit/src/Framework/TestCase.php(724): PHPUnit_Framework_TestResult->run(Flow\Tests\NotifiedUsersTest)
#17 ./src/tests/phpunit/MediaWikiTestCase.php(147): PHPUnit_Framework_TestCase->run(PHPUnit_Framework_TestResult)
#18 ./src/vendor/phpunit/phpunit/src/Framework/TestSuite.php(747): MediaWikiTestCase->run(PHPUnit_Framework_TestResult)
#19 ./src/vendor/phpunit/phpunit/src/Framework/TestSuite.php(747): PHPUnit_Framework_TestSuite->run(PHPUnit_Framework_TestResult)
#20 ./src/vendor/phpunit/phpunit/src/Framework/TestSuite.php(747): PHPUnit_Framework_TestSuite->run(PHPUnit_Framework_TestResult)
#21 ./src/vendor/phpunit/phpunit/src/Framework/TestSuite.php(747): PHPUnit_Framework_TestSuite->run(PHPUnit_Framework_TestResult)
#22 ./src/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(440): PHPUnit_Framework_TestSuite->run(PHPUnit_Framework_TestResult)
#23 ./src/vendor/phpunit/phpunit/src/TextUI/Command.php(149): PHPUnit_TextUI_TestRunner->doRun(PHPUnit_Framework_TestSuite, array)
#24 ./src/vendor/phpunit/phpunit/src/TextUI/Command.php(100): PHPUnit_TextUI_Command->run(array, boolean)
#25 ./src/tests/phpunit/phpunit.php(288): PHPUnit_TextUI_Command::main()
#26 {main}
2016-03-02 19:22:14 integration-slave-trusty-1005 jenkins_u2_mw-unittest_: [ae525dde] [no req]   Flow\Exception\InvalidDataException from line 97 of ./src/extensions/Flow/includes/Data/Listener/NotificationListener.php: Invalid metadata for topic|post revision szfx62g243eij7cx
Krinkle renamed this task from Fix "InvalidDataException from line 36 of NotificationListener.php: Invalid metadata for revision" to Fix "InvalidDataException from NotificationListener.php: Invalid metadata for revision".Mar 2 2016, 8:07 PM

Change 274647 had a related patch set uploaded (by Matthias Mullie):
Clear failing listeners from tests where we don't provide sufficient metadata

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

Change 274647 merged by jenkins-bot:
Clear failing listeners from tests where we don't provide sufficient metadata

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

Catrope closed this task as Resolved.Mar 4 2016, 3:34 AM