Page MenuHomePhabricator

After an error, ExtensionJsonValidationTest claims everything is invalid
Closed, DeclinedPublic

Description

09:04:02 1) ExtensionJsonValidationTest::testPassesValidation with data set #17 ('/mnt/jenkins-workspace/worksp...n.json')
09:04:02 /mnt/jenkins-workspace/workspace/mediawiki-extensions-hhvm/src/extensions/UniversalLanguageSelector/extension.json did pass validation.
09:04:02 [ResourceModules.jquery.uls.compact] The property _comment is not defined and the definition does not allow additional properties
09:04:02 [ResourceModules.jquery.uls.compact] The property dependencies is not defined and the definition does not allow additional properties
09:04:02 [ResourceModules.jquery.uls.compact] The property localBasePath is not defined and the definition does not allow additional properties
09:04:02 [ResourceModules.jquery.uls.compact] The property remoteExtPath is not defined and the definition does not allow additional properties
09:04:02 [ResourceModules.jquery.uls.compact.class] The property class is required
09:04:02 [ResourceModules.jquery.uls.compact] Failed to match at least one schema

Only _comment is valid, rest are not.

Event Timeline

Krinkle triaged this task as Medium priority.Jan 12 2017, 8:33 PM
Krinkle added a subscriber: Legoktm.

It's a little more complicated than that...if you look at the JSON schema, it defines multiple acceptable schemas using "anyOf" since depending upon the type of RL module. So the first _comment failure is for the first schema. Then it'll try against the next schema (WikiModules) which doesn't have "dependencies" so it shows that error, and so on.

I think I ran into this today:
https://gerrit.wikimedia.org/r/#/c/440258/ added a new field defaultColor. It wasted a few minutes debugging for me because it seemed to suggest all of those fields were now invalid.

I don't think there's anything we can fix here with our current JSON schema validation infrastructure.