Page MenuHomePhabricator

Status/StatusValue errors/warnings should be unique
Closed, ResolvedPublic

Description

Currently if you add the same message to Status/StatusValue errors/warnings, the message will be recorded twice. There seem to be no use-case for this, so the messages should be deduplicated on insertions.

The error/warning message is considered the same if the message keys are equal and all the parameters are equal. (this is questionable, perhaps we should just compare the keys. Not clear yet, so let's start with comparing parameters as well)

The following logic should apply:

  1. If there's no errors/warnings with the same message, a new one is added.
  2. If there is a warning with the same message, and the new message is added as 'fatal', it becomes an error
  3. Errors can not be downgraded to warnings.

Merge method has to respect the same semantics. Tests should be added for the new behavior.

Event Timeline

Change 661205 had a related patch set uploaded (by Cicalese; owner: Cicalese):
[mediawiki/core@master] Status/StatusValue errors/warnings should be unique

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

Change 661981 had a related patch set uploaded (by Cicalese; owner: Cicalese):
[mediawiki/extensions/Wikibase@master] Enable test to succeed when errors are de-duplicted

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

Change 661981 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Enable test to succeed when errors are de-duplicted

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

Change 661205 merged by jenkins-bot:
[mediawiki/core@master] Status/StatusValue errors/warnings should be unique

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