[Findit] Centralize the JSON conversion stuff |
||||
Issue descriptionThroughout the code many places pass around anonymous dicts rather than using objects; but we should prefer objects because they make the code more self-documenting, can help to catch type errors earlier, and because the help insulate the JSON layer from our choice of internal representations. One key example is: Where: infra/appengine/findit/crash/findit_for_fracas.py Towards the end of FindCulpritForChromeCrash we convert everything from objects to dicts, but this is premature. This function should leave things as objects; it's the caller/client's responsibility to perform that conversion if they want it. All our different classes should have methods for conversion to JSON, and the client will call them once they actually need it. (That way we can also encapsulate the __bool__ conversion stuff in the return statement as part of that object's JSON serialization method; rather than repeating it anywhere or needing the client to know anything about the innards of the object.)
,
Sep 29 2016
The following revision refers to this bug: https://chromium.googlesource.com/infra/infra.git/+/9191cc8075241cd6f90bb5382c01999d8cbe0ed9 commit 9191cc8075241cd6f90bb5382c01999d8cbe0ed9 Author: katesonia <katesonia@chromium.org> Date: Thu Sep 29 20:04:43 2016 [Findit] Update found_project and found_components. BUG= 644411 Review-Url: https://codereview.chromium.org/2373133002 [modify] https://crrev.com/9191cc8075241cd6f90bb5382c01999d8cbe0ed9/appengine/findit/crash/findit_for_chromecrash.py [modify] https://crrev.com/9191cc8075241cd6f90bb5382c01999d8cbe0ed9/appengine/findit/crash/test/findit_for_chromecrash_test.py
,
Oct 4 2016
,
Apr 24 2017
,
May 15 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by bugdroid1@chromium.org
, Sep 29 2016