fix telemetry_socorro_crash.json schema re: json-dump changes
Categories
(Socorro :: Processor, defect, P2)
Tracking
(Not tracked)
People
(Reporter: willkg, Assigned: willkg)
Details
Attachments
(1 file)
After we changed the stackwalker, json_dump
can contain nulls in fields that were previously either a string or omitted.
Running:
python socorro/schemas/validate_telemetry_socorro_crash.py
fails with things like this:
Traceback (most recent call last):
File "/app/socorro/schemas/validate_telemetry_socorro_crash.py", line 161, in <module>
validate_and_test()
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/app/socorro/schemas/validate_telemetry_socorro_crash.py", line 145, in validate_and_test
jsonschema.validate(crash_report, schema)
File "/usr/local/lib/python3.9/site-packages/jsonschema/validators.py", line 1019, in validate
raise error
jsonschema.exceptions.ValidationError: None is not of type 'string'
Failed validating 'type' in schema['properties']['json_dump']['properties']['modules']['items']['properties']['version']:
{'description': 'Version of the module.', 'type': 'string'}
On instance['json_dump']['modules'][89]['version']:
None
We could change the schema. I don't know how hard that is. I'll have to talk to DE about that.
Maybe an easier route is to add a cleanup pass for removing nulls in json_dump.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Comment 2•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
|
||
I rewrote the json schema reducer (bug #1762271) and then reworked TelemetryBotoS3CrashStorage to base crash data it sends to telemetry ingestion on the processed crash instead of an antediluvian horror made up of sinews and chunks of rotten flesh from the raw and processed crashes gruesomely stitched together using super search fields (bug #1755095). One of the fixes I did in those was to make json_dump.modules.N.version
a ["string", "null"].
I re-ran:
python socorro/schemas/validate_telemetry_socorro_crash.py
and everything looks ok now.
Description
•