Page MenuHomePhabricator

Flow: browser test got 'failed insert' exception adding a topic
Closed, ResolvedPublic

Description

Similar to bug 58996, a browser test failed at line 498 of includes/Data/ObjectManager.php: with failed insert.

The difference is this is adding a new topic (in $storage->put( $firstPost )), not editing an existing post. Again there were overlapping tests hitting the same Flow QA page at the time, maybe another browser test was trying to edit this post just as the API call was returning; or could two browsers hitting the same Flow_QA page cause problems even if they're adding unrelated topics?

If you look at the Sauce Labs report (scroll down and click the camera), you can see the [Add topic] quickly resulted in a pink errorbox with "Exception Caught: failed insert". Yet, you can find the topic in RecentChanges (search for its random string "0.6552491559"), and you can view it and its first post, seemingly no worse for wear, at https://test2.wikipedia.org/w/index.php?title=Talk:Flow_QA&workflow=050d6fd80a11168d809390b11c279739 . So if storing the post failed, why is it there? It was only two hours ago, am I seeing cached success hiding a DB failure?

It's unfortunate there isn't more information about what went wrong; the insert() only returns true/false, but maybe lower levels could log something.
Here's the output in fluorine:/a/mw-log/archive/exception.log-20140104.gz , I couldn't find anything related in the compressed (huge) api.log, dberror.log, external.log, or anything at exactly that time in test2wiki.log. Maybe DB failures on flowdb are written somewhere else, see https://wikitech.wikimedia.org/wiki/Logs

2014-01-04 06:34:46 mw1202 test2wiki: [e4273fd5] /w/api.php   Exception from line 498 of /usr/local/apache/common-local/php-1.23wmf9/extensions/Flow/includes/Data/ObjectManager.php: failed insert

#0 /usr/local/apache/common-local/php-1.23wmf9/extensions/Flow/includes/Data/ObjectManager.php(470): Flow\Data\ObjectManager->insert(Object(Flow\Model\PostRevision))
#1 /usr/local/apache/common-local/php-1.23wmf9/extensions/Flow/includes/Data/ObjectManager.php(167): Flow\Data\ObjectManageBr->put(Object(Flow\Model\PostRevision))
#2 /usr/local/apache/common-local/php-1.23wmf9/extensions/Flow/includes/Block/TopicList.php(101): Flow\Data\ManagerGroup->put(Object(Flow\Model\PostRevision))
#3 /usr/local/apache/common-local/php-1.23wmf9/extensions/Flow/includes/WorkflowLoader.php(204): Flow\Block\TopicListBlock->commit()
#4 /usr/local/apache/common-local/php-1.23wmf9/extensions/Flow/includes/api/ApiFlow.php(59): Flow\WorkflowLoader->commit(Object(Flow\Model\Workflow), Array)
#5 /usr/local/apache/common-local/php-1.23wmf9/includes/api/ApiMain.php(862): ApiFlow->execute()
#6 /usr/local/apache/common-local/php-1.23wmf9/includes/api/ApiMain.php(387): ApiMain->executeAction()
#7 /usr/local/apache/common-local/php-1.23wmf9/includes/api/ApiMain.php(358): ApiMain->executeActionWithErrorHandling()
#8 /usr/local/apache/common-local/php-1.23wmf9/api.php(76): ApiMain->execute()
#9 /usr/local/apache/common-local/w/api.php(3): require('/usr/local/apac...')
#10 {main}


Version: master
Severity: normal

Details

Reference
bz59642

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:17 AM
bzimport set Reference to bz59642.
bzimport added a subscriber: Unknown Object (MLST).

bingle-admin wrote:

The WMF core features team tracks this bug on Mingle card https://mingle.corp.wikimedia.org/projects/flow/cards/688, but people from the community are welcome to contribute here and in Gerrit.

Change 106165 had a related patch set uploaded by EBernhardson:
Dont try and do sane things, like generalizing specific exceptions

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

Change 106165 merged by jenkins-bot:
Dont try and do sane things, like generalizing specific exceptions

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

Change 106449 had a related patch set uploaded by EBernhardson:
Track the root of a post tree explicitly

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

Change 106449 merged by jenkins-bot:
Track the root of a post tree explicitly

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