Closed Bug 1607806 Opened 5 years ago Closed 5 years ago

add rule to convert ModuleSignatureInfo value to string

Categories

(Socorro :: Processor, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: willkg)

Details

Attachments

(2 files)

Bug #1607804 covers stringifying the ModuleSignatureInfo value. Socorro should rely on that value being a JSON-encoded string. But because Socorro has to process crash reports for many different versions of Firefox, Fenix, and other products, we should add a rule at the beginning of the processor rule chain to convert ModuleSignatureInfo into a string if it's not one already.

This bug covers doing that. After doing that, we can remove some of the "if it's not a string, then do this" bits we've added to other parts of the pipeline.

For some reason, ModuleSignatureInfo can sometimes be a DotDict.

Sentry: https://sentry.prod.mozaws.net/operations/socorro-new-prod/issues/7045883/?query=is:unresolved

TypeError: Object of type DotDict is not JSON serializable
  File "socorro/processor/processor_pipeline.py", line 268, in process_crash
    rule.act(raw_crash, raw_dumps, processed_crash, processor_meta_data)
  File "socorro/processor/rules/base.py", line 65, in act
    self.action(raw_crash, raw_dumps, processed_crash, processor_meta_data)
  File "socorro/processor/rules/mozilla.py", line 49, in action
    info = json.dumps(info)
  File "__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '

I'll fix that now.

I deployed the fix in bug #1608295. It looks ok now. Marking as FIXED.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: