Validation comparator throws errors on certain inputs

RESOLVED FIXED in 2015-07

Status

addons.mozilla.org Graveyard
Add-on Validation
--
critical
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: kmag, Assigned: kmag)

Tracking

unspecified
2015-07

Details

The following inputs cause errors in the current code:

* Messages with list values in the "file" field.

Multi-package add-ons, and extensions with JAR files, emit messages with lists, rather than strings, in the file field. Since lists aren't hashable, those don't work in message keys, and the comparator throws.

* Messages with "context" keys with a value of None in the old set of validation results.

Messages without a "context" value can't be compared, so the message key function returns None when compiling a dict of old messages. The code that creates that dict checks whether "context" is present before adding, but "message_key" checks if it's present and truthy.

Any comparison where both the new and old results contain messages with a null context therefore generate a bad match.
https://github.com/mozilla/olympia/commit/5edadd4a83d48d51a0bae27f23c4484c700039b0
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Summary: Validation comparator does not throws errors on certain inputs → Validation comparator throws errors on certain inputs
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.