)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"6734728e6098d2aec7bf1354ac442935f2ada795","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Caching of PDU autodiscovery"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The caching is implemented on the get method retrieving the OID."},{"line_number":10,"context_line":"The actual architecture did not allow to easily have a caching on the"},{"line_number":11,"context_line":"PDU driver instance creation since an instance of the driver is created"},{"line_number":12,"context_line":"for *every outlet* of a given PDU"},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5f7c97a3_97daf11a","line":10,"range":{"start_line":10,"start_character":4,"end_line":10,"end_character":62},"updated":"2018-06-19 13:53:59.000000000","message":"Can we use some class-level object (which would be common for all instances) to maintain single cache across all instances?","commit_id":"5719d5c3132ed9fb2763ec691079fbfc39751b4a"}],"ironic/drivers/modules/snmp.py":[{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"6734728e6098d2aec7bf1354ac442935f2ada795","unresolved":false,"context_lines":[{"line_number":486,"context_line":""},{"line_number":487,"context_line":"_memoized \u003d {}"},{"line_number":488,"context_line":"def memoize(f):"},{"line_number":489,"context_line":"    def memoized(self, node_info):"},{"line_number":490,"context_line":"        hashable_node_info \u003d frozenset((key, val)"},{"line_number":491,"context_line":"                                       for key, val in node_info.items()"},{"line_number":492,"context_line":"                                       if key is not \u0027outlet\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_f7e805e0","line":489,"range":{"start_line":489,"start_character":23,"end_line":489,"end_character":32},"updated":"2018-06-19 13:53:59.000000000","message":"This is confusing that the signature of the decorator differs from the signature of the decorated method.","commit_id":"5719d5c3132ed9fb2763ec691079fbfc39751b4a"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"6734728e6098d2aec7bf1354ac442935f2ada795","unresolved":false,"context_lines":[{"line_number":487,"context_line":"_memoized \u003d {}"},{"line_number":488,"context_line":"def memoize(f):"},{"line_number":489,"context_line":"    def memoized(self, node_info):"},{"line_number":490,"context_line":"        hashable_node_info \u003d frozenset((key, val)"},{"line_number":491,"context_line":"                                       for key, val in node_info.items()"},{"line_number":492,"context_line":"                                       if key is not \u0027outlet\u0027)"},{"line_number":493,"context_line":"        if hashable_node_info not in _memoized:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_d75149db","line":490,"range":{"start_line":490,"start_character":45,"end_line":490,"end_character":48},"updated":"2018-06-19 13:53:59.000000000","message":"Would this still get hashed if `val` eventually becomes non-hashable e.g. another dict or list?","commit_id":"5719d5c3132ed9fb2763ec691079fbfc39751b4a"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"6734728e6098d2aec7bf1354ac442935f2ada795","unresolved":false,"context_lines":[{"line_number":496,"context_line":"    return memoized"},{"line_number":497,"context_line":""},{"line_number":498,"context_line":""},{"line_number":499,"context_line":"def retry_on_outdated_cache(f):"},{"line_number":500,"context_line":"    def wrapper(self):"},{"line_number":501,"context_line":"        try:"},{"line_number":502,"context_line":"            return f(self)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_97875113","line":499,"range":{"start_line":499,"start_character":4,"end_line":499,"end_character":27},"updated":"2018-06-19 13:53:59.000000000","message":"It may be worth explaining why we consider the cache being obsolete on SNMP errors? How these two events are relevant?","commit_id":"5719d5c3132ed9fb2763ec691079fbfc39751b4a"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"6734728e6098d2aec7bf1354ac442935f2ada795","unresolved":false,"context_lines":[{"line_number":501,"context_line":"        try:"},{"line_number":502,"context_line":"            return f(self)"},{"line_number":503,"context_line":"        except exception.SNMPFailure:"},{"line_number":504,"context_line":"            hashable_node_info \u003d \\"},{"line_number":505,"context_line":"                frozenset((key, val)"},{"line_number":506,"context_line":"                          for key, val in self.snmp_info.items()"},{"line_number":507,"context_line":"                          if key is not \u0027outlet\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_d78e2978","line":504,"updated":"2018-06-19 13:53:59.000000000","message":"May be using parenthesis would look better?\n\n    hashable_node_info \u003d (\n        frozenset(...)\n    )","commit_id":"5719d5c3132ed9fb2763ec691079fbfc39751b4a"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"6734728e6098d2aec7bf1354ac442935f2ada795","unresolved":false,"context_lines":[{"line_number":502,"context_line":"            return f(self)"},{"line_number":503,"context_line":"        except exception.SNMPFailure:"},{"line_number":504,"context_line":"            hashable_node_info \u003d \\"},{"line_number":505,"context_line":"                frozenset((key, val)"},{"line_number":506,"context_line":"                          for key, val in self.snmp_info.items()"},{"line_number":507,"context_line":"                          if key is not \u0027outlet\u0027)"},{"line_number":508,"context_line":"            del _memoized[hashable_node_info]"},{"line_number":509,"context_line":"            self.driver \u003d self._get_pdu_driver(self.snmp_info)"},{"line_number":510,"context_line":"            return f(self)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_d774e938","line":507,"range":{"start_line":505,"start_character":16,"end_line":507,"end_character":49},"updated":"2018-06-19 13:53:59.000000000","message":"This seems as a duplicate code. May be move it into a function?","commit_id":"5719d5c3132ed9fb2763ec691079fbfc39751b4a"}]}
