Closed Bug 1426257 Opened 5 years ago Closed 4 years ago

cleanup ProcessorApp._transform()


(Socorro :: General, task)

Not set


(Not tracked)



(Reporter: willkg, Assigned: willkg)




(1 file)

ProcessorApp._transform() does a bunch of things: fetches the raw crash and dumps, saves the dumps to disk to use later, fetch an existing processed crash if there is one, process the crash, and then save the raw and processed crashes to all the crash storage systems.

Various points in that have different error handling requirements and resource allocation requirements.

Maybe ._transform() should get broken up into separate methods--one for each proper phase? That might simplify the tests since it'd be easier to test individual phases than the whole thing.

This bug covers refactoring this method so that it's:

1. more unified (we've got a lot of redundant error handling code)
2. handles allocating and unallocating resources more responsibly with fewer edge cases (we're pretty sure we're not cleaning up dumps in all cases)
3. easier to read and reason about
Lonnen is currently working on cleaning up the processor. Before anyone works on this, they should check in with him to make sure work on this doesn't block, interfere with, or duplicate his work.
When working on this, we should also fix this exception clause that doesn't send errors to sentry:

That will finish up the last bits for bug #1362434.
Assignee: nobody → willkg
Commits pushed to master at
fix bug 1426257: clean up _transform

This is mostly cosmetic cleanup. The method was already doing most of
what we need it to do in regards to structure and exception handling.
Merge pull request #4739 from willkg/1426257-transform

fix bug 1426257: clean up _transform
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.