-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16311/
-----------------------------------------------------------

(Updated Dec. 23, 2013, 6:51 p.m.)


Review request for Aurora, Bill Farner and Brian Wickman.


Changes
-------

This has been a huge time drain on my side as none of the approaches with 
customizing thrift json serialization or playing with json key sorting has 
helped to sort out all 3 of the observed issues at once:
- Sets are not equal even though their reprs are identical;
- Set elements are reordered;
- TaskConfig elements are reordered.

The randomness in behavior is due to the combination of python set types being 
unhashable and the python dicts not providing a stable ordering. The proposed 
solution here is to get rid of both sets and dicts by converting 
json-serialized thrift dicts into sorted lists of tuples where every tuple's 
second element is either a simple value, list or another tuple.  


Repository: aurora


Description (updated)
-------

Hopefully fixing the thrift object diff once an for all. Instead of sorting 
__dict__ that proved to not cover all cases, converting thrift to sorted tuples 
via json serialization.


Diffs (updated)
-----

  src/main/python/twitter/aurora/client/api/updater.py 
6e8e8a9fdfcf63a8fe0558d5ac36298601fd0552 
  src/test/python/twitter/aurora/client/api/test_updater.py 
ae4de2b57be16f8daf030210abda1ba05f9f30a0 

Diff: https://reviews.apache.org/r/16311/diff/


Testing
-------

./pants src/test/python/twitter/aurora/client/api:updater


Thanks,

Maxim Khutornenko

Reply via email to