)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ae8b05a0c4925d1b216d226d84efd34cff4c8f32","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add state sharing and persistence mechanism"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For some Redfish resources, emulator needs to keep a state"},{"line_number":10,"context_line":"internally. Given that dynamic emulator is a potentially multi-process"},{"line_number":11,"context_line":"app, states need to be shared across running emulator instances."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This change introduces persistent Python dict backed by sqlite DB."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7faddb67_1718a21b","line":11,"range":{"start_line":10,"start_character":12,"end_line":11,"end_character":64},"updated":"2019-08-21 08:44:53.000000000","message":"FYI sqlite does not really work across instances.","commit_id":"b4cba952abf933fee9ecbb7b8782c42bf349d2e4"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"c52556ee16823e1552de0cf5594b94d80f0b93ac","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add state sharing and persistence mechanism"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"For some Redfish resources, emulator needs to keep a state"},{"line_number":10,"context_line":"internally. Given that dynamic emulator is a potentially multi-process"},{"line_number":11,"context_line":"app, states need to be shared across running emulator instances."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This change introduces persistent Python dict backed by sqlite DB."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7faddb67_d4441ebb","line":11,"range":{"start_line":10,"start_character":12,"end_line":11,"end_character":64},"in_reply_to":"7faddb67_1718a21b","updated":"2019-08-22 21:39:00.000000000","message":"I am reading sqlite FAQ [1] which says \"Multiple processes can have the same database open at the same time. Multiple processes can be doing a SELECT at the same time. But only one process can be making changes to the database at any moment in time, however\"\n\n1. https://www.sqlite.org/faq.html#q5","commit_id":"b4cba952abf933fee9ecbb7b8782c42bf349d2e4"}],"sushy_tools/emulator/memoize.py":[{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"bd96cb45b7d75bc6f1f7e790812e23cc3642559a","unresolved":false,"context_lines":[{"line_number":20,"context_line":"import tempfile"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# Python 3.8"},{"line_number":23,"context_line":"MutableMapping \u003d getattr(collections, \u0027abc\u0027, collections).MutableMapping"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def memoize(permanent_cache\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_4a5cfa4a","line":23,"updated":"2019-07-05 09:16:38.000000000","message":"mmm good idea, maybe not as explicit and clear as a simple try/except","commit_id":"b4cba952abf933fee9ecbb7b8782c42bf349d2e4"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"d0c2b3fa020736775a59cb8016b2c15535da6c4a","unresolved":false,"context_lines":[{"line_number":20,"context_line":"import tempfile"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# Python 3.8"},{"line_number":23,"context_line":"MutableMapping \u003d getattr(collections, \u0027abc\u0027, collections).MutableMapping"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def memoize(permanent_cache\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_a7696725","line":23,"in_reply_to":"7faddb67_06936fa5","updated":"2019-08-05 15:02:10.000000000","message":"It seems to work, no?\n\n    $ python2.6\n    Python 2.6.9 (unknown, Dec 15 2016, 22:31:28) \n    [GCC 5.3.1 20160406 (Red Hat 5.3.1-6)] on linux4\n    Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n    \u003e\u003e\u003e import collections\n    \u003e\u003e\u003e \n    \u003e\u003e\u003e getattr(collections, \u0027abc\u0027, collections).MutableMapping\n    \u003cclass \u0027_abcoll.MutableMapping\u0027\u003e","commit_id":"b4cba952abf933fee9ecbb7b8782c42bf349d2e4"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"e775e0bad702d956219344bbbf579f26fe5ab329","unresolved":false,"context_lines":[{"line_number":20,"context_line":"import tempfile"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# Python 3.8"},{"line_number":23,"context_line":"MutableMapping \u003d getattr(collections, \u0027abc\u0027, collections).MutableMapping"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def memoize(permanent_cache\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_06936fa5","line":23,"in_reply_to":"7faddb67_4a5cfa4a","updated":"2019-07-22 14:04:16.000000000","message":"For 3.8, but should work on older versions of python riiightt? :)","commit_id":"b4cba952abf933fee9ecbb7b8782c42bf349d2e4"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"2e427c26d1c83722bc609811e92bdc4eb81584e3","unresolved":false,"context_lines":[{"line_number":20,"context_line":"import tempfile"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"# Python 3.8"},{"line_number":23,"context_line":"MutableMapping \u003d getattr(collections, \u0027abc\u0027, collections).MutableMapping"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def memoize(permanent_cache\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_c53818a1","line":23,"in_reply_to":"7faddb67_a7696725","updated":"2019-08-05 18:51:25.000000000","message":"\\o/","commit_id":"b4cba952abf933fee9ecbb7b8782c42bf349d2e4"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"bd96cb45b7d75bc6f1f7e790812e23cc3642559a","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        self.update(dict(self))"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def encode(self, obj):"},{"line_number":86,"context_line":"        return pickle.dumps(obj)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def decode(self, blob):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_ca1eaa6f","line":85,"updated":"2019-07-05 09:16:38.000000000","message":"isn\u0027t this a static method?","commit_id":"b4cba952abf933fee9ecbb7b8782c42bf349d2e4"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"d0c2b3fa020736775a59cb8016b2c15535da6c4a","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        self.update(dict(self))"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def encode(self, obj):"},{"line_number":86,"context_line":"        return pickle.dumps(obj)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def decode(self, blob):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_e270ada6","line":85,"in_reply_to":"7faddb67_ca1eaa6f","updated":"2019-08-05 15:02:10.000000000","message":"Done in https://review.opendev.org/674627","commit_id":"b4cba952abf933fee9ecbb7b8782c42bf349d2e4"},{"author":{"_account_id":23851,"name":"Riccardo Pittau","email":"elfosardo@gmail.com","username":"elfosardo"},"change_message_id":"bd96cb45b7d75bc6f1f7e790812e23cc3642559a","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    def encode(self, obj):"},{"line_number":86,"context_line":"        return pickle.dumps(obj)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def decode(self, blob):"},{"line_number":89,"context_line":"        return pickle.loads(blob)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def get_connection(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_6a13f667","line":88,"updated":"2019-07-05 09:16:38.000000000","message":"ditto","commit_id":"b4cba952abf933fee9ecbb7b8782c42bf349d2e4"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"d0c2b3fa020736775a59cb8016b2c15535da6c4a","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    def encode(self, obj):"},{"line_number":86,"context_line":"        return pickle.dumps(obj)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def decode(self, blob):"},{"line_number":89,"context_line":"        return pickle.loads(blob)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def get_connection(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_a26635ec","line":88,"in_reply_to":"7faddb67_6a13f667","updated":"2019-08-05 15:02:10.000000000","message":"Done in https://review.opendev.org/674627","commit_id":"b4cba952abf933fee9ecbb7b8782c42bf349d2e4"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"c2fd0c2601c5e91f3270769c82377136f1c755d0","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        return pickle.loads(blob)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def get_connection(self):"},{"line_number":92,"context_line":"        return sqlite3.connect(self.dbpath)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def __getitem__(self, key):"},{"line_number":95,"context_line":"        key \u003d self.encode(key)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_9743326c","line":92,"range":{"start_line":92,"start_character":15,"end_line":92,"end_character":43},"updated":"2019-08-06 06:13:13.000000000","message":"Each access will create a new instance here, we could save the connection as an instance attribute.","commit_id":"b4cba952abf933fee9ecbb7b8782c42bf349d2e4"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"bc62237c14935a099e8866e83c7c3e95b0407e0f","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        return pickle.loads(blob)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def get_connection(self):"},{"line_number":92,"context_line":"        return sqlite3.connect(self.dbpath)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def __getitem__(self, key):"},{"line_number":95,"context_line":"        key \u003d self.encode(key)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_f8e53ddd","line":92,"range":{"start_line":92,"start_character":15,"end_line":92,"end_character":43},"in_reply_to":"7faddb67_9743326c","updated":"2019-08-13 08:56:40.000000000","message":"Done in https://review.opendev.org/674627","commit_id":"b4cba952abf933fee9ecbb7b8782c42bf349d2e4"}],"sushy_tools/tests/unit/emulator/test_memoize.py":[{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"c2fd0c2601c5e91f3270769c82377136f1c755d0","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        del pd[1]"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        mock_cursor.execute.assert_called_with("},{"line_number":162,"context_line":"            \u0027delete from cache where key\u003d?\u0027, (\u0027pickled-key\u0027,))"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_775c764a","line":162,"updated":"2019-08-06 06:13:13.000000000","message":"missing coverage for iter and len :)","commit_id":"b4cba952abf933fee9ecbb7b8782c42bf349d2e4"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"bc62237c14935a099e8866e83c7c3e95b0407e0f","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        del pd[1]"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"        mock_cursor.execute.assert_called_with("},{"line_number":162,"context_line":"            \u0027delete from cache where key\u003d?\u0027, (\u0027pickled-key\u0027,))"}],"source_content_type":"text/x-python","patch_set":4,"id":"7faddb67_78d94d20","line":162,"in_reply_to":"7faddb67_775c764a","updated":"2019-08-13 08:56:40.000000000","message":"Done in https://review.opendev.org/674627","commit_id":"b4cba952abf933fee9ecbb7b8782c42bf349d2e4"}]}
