Michael created this task. Michael added projects: Wikimedia-production-error, Wikidata. Restricted Application added a subscriber: Aklapper. Restricted Application added a project: wdwb-tech.
TASK DESCRIPTION When trying to merge Items that are too big, the EntityContentTooBigException is not caught, but shown to the user. We should show a meaningful error message instead. Dashboard for these errors: https://logstash.wikimedia.org/goto/7e9dcccb2761199879c6ed6fb922ab93 Error ----- - mwversion: `1.40.0-wmf.1` - reqId: `4cbe2973-0552-4be1-8ad9-03444ab59ae3` - Find reqId in Logstash <https://logstash.wikimedia.org/app/dashboards#/view/AXFV7JE83bOlOASGccsT?_g=(time:(from:'2022-09-19T13:18:39.000Z',to:'2022-09-21T13:18:39.000Z'))&_a=(query:(query_string:(query:'reqId:%224cbe2973-0552-4be1-8ad9-03444ab59ae3%22')))> name=normalized_message [{reqId}] {exception_url} Wikibase\Lib\Store\EntityContentTooBigException: name=exception.trace from /srv/mediawiki/php-1.40.0-wmf.1/extensions/Wikibase/lib/includes/Store/EntityContentDataCodec.php(160) #0 /srv/mediawiki/php-1.40.0-wmf.1/extensions/Wikibase/repo/includes/Content/EntityHandler.php(372): Wikibase\Lib\Store\EntityContentDataCodec->encodeEntity(Wikibase\DataModel\Entity\Item, string) #1 /srv/mediawiki/php-1.40.0-wmf.1/includes/content/AbstractContent.php(174): Wikibase\Repo\Content\EntityHandler->serializeContent(Wikibase\Repo\Content\ItemContent, string) #2 /srv/mediawiki/php-1.40.0-wmf.1/includes/Storage/PageEditStash.php(438): AbstractContent->serialize(string) #3 /srv/mediawiki/php-1.40.0-wmf.1/includes/Storage/PageEditStash.php(263): MediaWiki\Storage\PageEditStash->getContentHash(Wikibase\Repo\Content\ItemContent) #4 /srv/mediawiki/php-1.40.0-wmf.1/includes/Storage/DerivedPageDataUpdater.php(883): MediaWiki\Storage\PageEditStash->checkCache(Title, Wikibase\Repo\Content\ItemContent, User) #5 /srv/mediawiki/php-1.40.0-wmf.1/includes/Storage/PageUpdater.php(335): MediaWiki\Storage\DerivedPageDataUpdater->prepareContent(User, MediaWiki\Storage\RevisionSlotsUpdate, boolean) #6 /srv/mediawiki/php-1.40.0-wmf.1/includes/Storage/PageUpdater.php(890): MediaWiki\Storage\PageUpdater->prepareUpdate() #7 /srv/mediawiki/php-1.40.0-wmf.1/extensions/Wikibase/repo/includes/Store/Sql/WikiPageEntityStore.php(410): MediaWiki\Storage\PageUpdater->saveRevision(CommentStoreComment, integer) #8 /srv/mediawiki/php-1.40.0-wmf.1/extensions/Wikibase/repo/includes/Store/Sql/WikiPageEntityStore.php(269): Wikibase\Repo\Store\Sql\WikiPageEntityStore->saveEntityContent(Wikibase\Repo\Content\ItemContent, User, string, integer, boolean, array) #9 /srv/mediawiki/php-1.40.0-wmf.1/extensions/Wikibase/lib/includes/Store/TypeDispatchingEntityStore.php(90): Wikibase\Repo\Store\Sql\WikiPageEntityStore->saveEntity(Wikibase\DataModel\Entity\Item, string, User, integer, boolean, array) #10 /srv/mediawiki/php-1.40.0-wmf.1/extensions/Wikibase/repo/includes/Interactors/ItemMergeInteractor.php(297): Wikibase\Lib\Store\TypeDispatchingEntityStore->saveEntity(Wikibase\DataModel\Entity\Item, string, User, integer, boolean, array) #11 /srv/mediawiki/php-1.40.0-wmf.1/extensions/Wikibase/repo/includes/Interactors/ItemMergeInteractor.php(275): Wikibase\Repo\Interactors\ItemMergeInteractor->saveItem(Wikibase\DataModel\Entity\Item, Wikibase\Lib\Summary, User, boolean, array) #12 /srv/mediawiki/php-1.40.0-wmf.1/extensions/Wikibase/repo/includes/Interactors/ItemMergeInteractor.php(177): Wikibase\Repo\Interactors\ItemMergeInteractor->attemptSaveMerge(Wikibase\DataModel\Entity\Item, Wikibase\DataModel\Entity\Item, string, User, boolean, array) #13 /srv/mediawiki/php-1.40.0-wmf.1/extensions/Wikibase/repo/includes/Api/MergeItems.php(157): Wikibase\Repo\Interactors\ItemMergeInteractor->mergeItems(Wikibase\DataModel\Entity\ItemId, Wikibase\DataModel\Entity\ItemId, DerivativeContext, array, string, boolean, array) #14 /srv/mediawiki/php-1.40.0-wmf.1/extensions/Wikibase/repo/includes/Api/MergeItems.php(137): Wikibase\Repo\Api\MergeItems->mergeItems(Wikibase\DataModel\Entity\ItemId, Wikibase\DataModel\Entity\ItemId, array, string, boolean, array) #15 /srv/mediawiki/php-1.40.0-wmf.1/includes/api/ApiMain.php(1900): Wikibase\Repo\Api\MergeItems->execute() #16 /srv/mediawiki/php-1.40.0-wmf.1/includes/api/ApiMain.php(875): ApiMain->executeAction() #17 /srv/mediawiki/php-1.40.0-wmf.1/includes/api/ApiMain.php(846): ApiMain->executeActionWithErrorHandling() #18 /srv/mediawiki/php-1.40.0-wmf.1/api.php(90): ApiMain->execute() #19 /srv/mediawiki/php-1.40.0-wmf.1/api.php(45): wfApiMain() #20 /srv/mediawiki/w/api.php(3): require(string) #21 {main} Impact ------ - merging is rather uncommon and requires special rights, so this does not happen too often, not a DDOS vector - it does add some very minor logspam - The first occurance seems to have been on 2022-08-08 - All of these errors seem to originate from api.php, though the special page is also not reacting great Acceptance criteria ------------------- [ ] Verify that no changes are done if a merge fails with an EntityTooBigException (IIRC, merging requires multiple edits to different Items - Is it possible to put all of them into some sort of "transaction"?) [ ] The API responds with a proper Error instead of an unmitigated Exception [ ] If we have any user interface that use this API: they react meaningful to that error [ ] We have some tracking in place to record how often an operation is denied due to the Entity being too big Notes ----- - This task is about an uncaught exception bubbling up instead of presenting the user with a meaningful error message. For the underlying issue of our entities getting too large, see T320940: Wikidata Entities are getting too big <https://phabricator.wikimedia.org/T320940> - other reports about this: T314763: Merging Wikidata items triggers EntityContentTooBigException <https://phabricator.wikimedia.org/T314763> TASK DETAIL https://phabricator.wikimedia.org/T320945 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Michael Cc: Aklapper, Michael, Astuthiodit_1, karapayneWMDE, Invadibot, maantietaja, ItamarWMDE, Akuckartz, darthmon_wmde, Rosalie_WMDE, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Verdy_p, Wikidata-bugs, aude, Jdforrester-WMF, Mbch331, Jay8g
_______________________________________________ Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org