Page MenuHomePhabricator

MachineVisionEntitySaveException from line 148 of WikidataDepictsSetter.php: * Your edit was patched into the latest version.
Closed, ResolvedPublicBUG REPORT

Description

I noticed a couple of instances of this in mwlog1001:/srv/mw-log/exception.log this morning.

2019-11-18 14:46:41 [XdKuzwpAIDQAAJVttjcAAADX] mw1340 commonswiki 1.35.0-wmf.5 exception ERROR: [XdKuzwpAIDQAAJVttjcAAADX] /w/api.php   MediaWiki\Extension\MachineVision\MachineVisionEntitySaveException from line 148 of /srv/mediawiki/php-1.35.0-wmf.5/extensions/MachineVision/src/Handler/WikidataDepictsSetter.php: * Your edit was patched into the latest version.
[Exception MediaWiki\Extension\MachineVision\MachineVisionEntitySaveException] (/srv/mediawiki/php-1.35.0-wmf.5/extensions/MachineVision/src/Handler/WikidataDepictsSetter.php:148) * Your edit was patched into the latest version.
  #0 /srv/mediawiki/php-1.35.0-wmf.5/extensions/MachineVision/src/Handler/WikidataIdHandler.php(94): MediaWiki\Extension\MachineVision\Handler\WikidataDepictsSetter->addDepicts(User, LocalFile, string, string)
  #1 /srv/mediawiki/php-1.35.0-wmf.5/extensions/MachineVision/src/Handler/WikidataIdHandler.php(89): MediaWiki\Extension\MachineVision\Handler\WikidataIdHandler->handleLabelAccepted(User, LocalFile, string, string)
  #2 /srv/mediawiki/php-1.35.0-wmf.5/extensions/MachineVision/src/Api/ApiReviewImageLabels.php(194): MediaWiki\Extension\MachineVision\Handler\WikidataIdHandler->handleLabelReview(User, LocalFile, string, string, integer)
  #3 /srv/mediawiki/php-1.35.0-wmf.5/extensions/MachineVision/src/Api/ApiReviewImageLabels.php(112): MediaWiki\Extension\MachineVision\Api\ApiReviewImageLabels->propagateSetLabelSuccess(LocalFile, string, string, integer)
  #4 /srv/mediawiki/php-1.35.0-wmf.5/includes/api/ApiMain.php(1603): MediaWiki\Extension\MachineVision\Api\ApiReviewImageLabels->execute()

The error message being logged is Your edit was patched into the latest version., which comes from Wikibase and indicates a successful attempt to resolve an edit conflict. This is added to the EditEntity result Status as a warning (code), which should not cause Status::isOK() to return false. Yet Status::isOK() is returning false here, so there must be something else going on as well.

Steps to Reproduce: TBD

Event Timeline

LGoto triaged this task as High priority.Nov 20 2019, 4:47 PM

Digging into Logstash, it looks like the full message for this error is * Your edit was patched into the latest version.\n* Edit conflict, which still seems truncated — I couldn't find just Edit conflict used as a message anywhere — but at least confirms that there's more than one warning/error input affecting the Status.

Change 554884 had a related patch set uploaded (by Mholloway; owner: Michael Holloway):
[mediawiki/extensions/MachineVision@master] Stop passing in a base rev when creating a MediawikiEditEntity

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

Change 554884 merged by jenkins-bot:
[mediawiki/extensions/MachineVision@master] Stop passing in a base rev when creating a MediawikiEditEntity

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