Skip to content

Instantly share code, notes, and snippets.

@jasonthomas
Created October 19, 2016 15:51
Show Gist options
  • Save jasonthomas/c52c658b424d3c67d795bb430dfff1fa to your computer and use it in GitHub Desktop.
Save jasonthomas/c52c658b424d3c67d795bb430dfff1fa to your computer and use it in GitHub Desktop.
u'os' is a required property Failed validating u'required' in schema: {u'additionalProperties': False, u'default': {u'devices': [], u'driverVersion': u'', u'driverVersionComparator': u'', u'driverVersionMax': u'', u'feature': u'', u'featureStatus': u'', u'hardware': u'', u'os': u'', u'vendor': u''}, u'definitions': {u'maxVersion': {u'description': u'The maximum version.', u'title': u'Max version', u'type': u'string'}, u'minVersion': {u'description': u'The mininum version.', u'title': u'Min version', u'type': u'string'}}, u'description': u'A graphic driver blocklist entry.', u'properties': {u'blockID': {u'description': u'Original block id, eg. g28', u'pattern': u'^g[0-9]+$', u'title': u'Internal blocklist id', u'type': u'string'}, u'details': {u'properties': {u'bug': {u'type': u'string'}, u'created': {u'format': u'date-time', u'type': u'string'}, u'name': {u'type': u'string'}, u'who': {u'type': u'string'}, u'why': {u'type': u'string'}}, u'title': u'Details', u'type': u'object'}, u'devices': {u'description': u'The list of impacted devices.', u'items': {u'description': u'A device identifier, eg. 0x9803', u'minLength': 1, u'title': u'Device', u'type': u'string'}, u'title': u'Devices', u'type': u'array'}, u'driverVersion': {u'description': u'The driver version.', u'title': u'Driver version', u'type': u'string'}, u'driverVersionComparator': {u'description': u'The driver version comparator', u'enum': [u'', u'EQUAL', u'NOT_EQUAL', u'BETWEEN_EXCLUSIVE', u'BETWEEN_INCLUSIVE', u'BETWEEN_INCLUSIVE_START', u'LESS_THAN', u'LESS_THAN_OR_EQUAL', u'GREATER_THAN', u'GREATER_THAN_OR_EQUAL'], u'title': u'Driver version comparator', u'type': u'string'}, u'driverVersionMax': {u'description': u'The driver version.', u'title': u'Driver version max', u'type': u'string'}, u'enabled': {u'default': False, u'description': u'blocking rule is enabled.', u'title': u'Enabled', u'type': u'boolean'}, u'feature': {u'description': u'The type of feature impacted.', u'enum': [u'', u'CANVAS2D_ACCELERATION', u'DIRECT2D', u'DIRECT3D_9_LAYERS', u'DIRECT3D_10_LAYERS', u'DIRECT3D_10_1_LAYERS', u'DIRECT3D_11_LAYERS', u'DIRECT3D_11_ANGLE', u'HARDWARE_VIDEO_DECODING', u'OPENGL_LAYERS', u'STAGEFRIGHT', u'WEBGL_OPENGL', u'WEBGL_ANGLE', u'WEBGL_MSAA', u'WEBRTC_HW_ACCELERATION_ENCODE', u'WEBRTC_HW_ACCELERATION_DECODE', u'WEBRTC_HW_ACCELERATION'], u'title': u'Feature', u'type': u'string'}, u'featureStatus': {u'description': u'The feature status.', u'enum': [u'', u'BLOCKED_DEVICE', u'BLOCKED_DRIVER_VERSION', u'BLOCKED_OS_VERSION', u'DISCOURAGED', u'STATUS_OK'], u'title': u'Feature status', u'type': u'string'}, u'hardware': {u'description': u'The graphic hardware name, eg. antares', u'title': u'Hardware', u'type': u'string'}, u'id': {u'description': u'Record id.', u'title': u'Id', u'type': u'string'}, u'os': {u'description': u'The operating system identifier.', u'enum': [u'', u'All', u'Android', u'Darwin 9', u'Darwin 10', u'Darwin 11', u'Darwin 12', u'Darwin 13', u'Darwin 14', u'Darwin 15', u'Linux', u'WINNT 5.1', u'WINNT 5.2', u'WINNT 6.0', u'WINNT 6.1', u'WINNT 6.2', u'WINNT 6.3', u'WINNT 8.1', u'WINNT 10.0', u'Other'], u'title': u'OS', u'type': u'string'}, u'schema': {u'description': u'Schema version.', u'title': u'Schema version', u'type': u'integer'}, u'vendor': {u'description': u'A vendor identifier, eg. 0x1002', u'title': u'Vendor', u'type': u'string'}, u'versionRange': {u'additionalProperties': False, u'default': {u'maxVersion': u'', u'minVersion': u'', u'severity': 0, u'vulnerabilityStatus': 0}, u'description': u'Version range', u'properties': {u'maxVersion': {u'$ref': u'#/definitions/maxVersion'}, u'minVersion': {u'$ref': u'#/definitions/minVersion'}}, u'title': u'Version range', u'type': u'object'}}, u'required': [u'os', u'vendor', u'featureStatus'], u'title': u'Gfx', u'type': u'object'} On instance: {u'blockID': u'g1239', u'details': {u'bug': u'https://bugzilla.mozilla.org/show_bug.cgi?id=838845', u'created': u'2016-10-18T09:29:16Z', u'name': u'GFX1-Val', u'who': u'test', u'why': u'test'}, u'devices': [u'0x4396'], u'driverVersion': u'6.1.7601.18328', u'driverVersionComparator': u'LESS_THAN_OR_EQUAL', u'feature': u'DIRECT3D', u'featureStatus': u'BLOCKED_DRIVER_VERSION', 'id': u'cf217981-2c42-76bf-df19-4324a194a075', u'vendor': u'0x1002'}: ValidationError Traceback (most recent call last): File "/var/task/lambda.py", line 41, in json2kinto importer_main(args) File "/var/task/amo2kinto/importer.py", line 167, in main permissions=constants.COLLECTION_PERMISSIONS) File "/var/task/amo2kinto/importer.py", line 40, in sync_records jsonschema.validate(record, config['schema']) File "/var/task/jsonschema/validators.py", line 478, in validate cls(schema, *args, **kwargs).validate(instance) File "/var/task/jsonschema/validators.py", line 123, in validate raise error ValidationError: u'os' is a required property Failed validating u'required' in schema: {u'additionalProperties': False, u'default': {u'devices': [], u'driverVersion': u'', u'driverVersionComparator': u'', u'driverVersionMax': u'', u'feature': u'', u'featureStatus': u'', u'hardware': u'', u'os': u'', u'vendor': u''}, u'definitions': {u'maxVersion': {u'description': u'The maximum version.', u'title': u'Max version', u'type': u'string'}, u'minVersion': {u'description': u'The mininum version.', u'title': u'Min version', u'type': u'string'}}, u'description': u'A graphic driver blocklist entry.', u'properties': {u'blockID': {u'description': u'Original block id, eg. g28', u'pattern': u'^g[0-9]+$', u'title': u'Internal blocklist id', u'type': u'string'}, u'details': {u'properties': {u'bug': {u'type': u'string'}, u'created': {u'format': u'date-time', u'type': u'string'}, u'name': {u'type': u'string'}, u'who': {u'type': u'string'}, u'why': {u'type': u'string'}}, u'title': u'Details', u'type': u'object'}, u'devices': {u'description': u'The list of impacted devices.', u'items': {u'description': u'A device identifier, eg. 0x9803', u'minLength': 1, u'title': u'Device', u'type': u'string'}, u'title': u'Devices', u'type': u'array'}, u'driverVersion': {u'description': u'The driver version.', u'title': u'Driver version', u'type': u'string'}, u'driverVersionComparator': {u'description': u'The driver version comparator', u'enum': [u'', u'EQUAL', u'NOT_EQUAL', u'BETWEEN_EXCLUSIVE', u'BETWEEN_INCLUSIVE', u'BETWEEN_INCLUSIVE_START', u'LESS_THAN', u'LESS_THAN_OR_EQUAL', u'GREATER_THAN', u'GREATER_THAN_OR_EQUAL'], u'title': u'Driver version comparator', u'type': u'string'}, u'driverVersionMax': {u'description': u'The driver version.', u'title': u'Driver version max', u'type': u'string'}, u'enabled': {u'default': False, u'description': u'blocking rule is enabled.', u'title': u'Enabled', u'type': u'boolean'}, u'feature': {u'description': u'The type of feature impacted.', u'enum': [u'', u'CANVAS2D_ACCELERATION', u'DIRECT2D', u'DIRECT3D_9_LAYERS', u'DIRECT3D_10_LAYERS', u'DIRECT3D_10_1_LAYERS', u'DIRECT3D_11_LAYERS', u'DIRECT3D_11_ANGLE', u'HARDWARE_VIDEO_DECODING', u'OPENGL_LAYERS', u'STAGEFRIGHT', u'WEBGL_OPENGL', u'WEBGL_ANGLE', u'WEBGL_MSAA', u'WEBRTC_HW_ACCELERATION_ENCODE', u'WEBRTC_HW_ACCELERATION_DECODE', u'WEBRTC_HW_ACCELERATION'], u'title': u'Feature', u'type': u'string'}, u'featureStatus': {u'description': u'The feature status.', u'enum': [u'', u'BLOCKED_DEVICE', u'BLOCKED_DRIVER_VERSION', u'BLOCKED_OS_VERSION', u'DISCOURAGED', u'STATUS_OK'], u'title': u'Feature status', u'type': u'string'}, u'hardware': {u'description': u'The graphic hardware name, eg. antares', u'title': u'Hardware', u'type': u'string'}, u'id': {u'description': u'Record id.', u'title': u'Id', u'type': u'string'}, u'os': {u'description': u'The operating system identifier.', u'enum': [u'', u'All', u'Android', u'Darwin 9', u'Darwin 10', u'Darwin 11', u'Darwin 12', u'Darwin 13', u'Darwin 14', u'Darwin 15', u'Linux', u'WINNT 5.1', u'WINNT 5.2', u'WINNT 6.0', u'WINNT 6.1', u'WINNT 6.2', u'WINNT 6.3', u'WINNT 8.1', u'WINNT 10.0', u'Other'], u'title': u'OS', u'type': u'string'}, u'schema': {u'description': u'Schema version.', u'title': u'Schema version', u'type': u'integer'}, u'vendor': {u'description': u'A vendor identifier, eg. 0x1002', u'title': u'Vendor', u'type': u'string'}, u'versionRange': {u'additionalProperties': False, u'default': {u'maxVersion': u'', u'minVersion': u'', u'severity': 0, u'vulnerabilityStatus': 0}, u'description': u'Version range', u'properties': {u'maxVersion': {u'$ref': u'#/definitions/maxVersion'}, u'minVersion': {u'$ref': u'#/definitions/minVersion'}}, u'title': u'Version range', u'type': u'object'}}, u'required': [u'os', u'vendor', u'featureStatus'], u'title': u'Gfx', u'type': u'object'} On instance: {u'blockID': u'g1239', u'details': {u'bug': u'https://bugzilla.mozilla.org/show_bug.cgi?id=838845', u'created': u'2016-10-18T09:29:16Z', u'name': u'GFX1-Val', u'who': u'test', u'why': u'test'}, u'devices': [u'0x4396'], u'driverVersion': u'6.1.7601.18328', u'driverVersionComparator': u'LESS_THAN_OR_EQUAL', u'feature': u'DIRECT3D', u'featureStatus': u'BLOCKED_DRIVER_VERSION', 'id': u'cf217981-2c42-76bf-df19-4324a194a075', u'vendor': u'0x1002'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment