)]}'
{"nova/compute/resource_tracker.py":[{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"8d2d22c8137000d91e7093235cbc77d43f9aa06d","unresolved":false,"context_lines":[{"line_number":1190,"context_line":"                                                         instance,"},{"line_number":1191,"context_line":"                                                         sign\u003dsign)"},{"line_number":1192,"context_line":"            # new instance, update compute node resource usage:"},{"line_number":1193,"context_line":"            self._update_usage(self._get_usage_dict(instance, instance),"},{"line_number":1194,"context_line":"                               nodename, sign\u003dsign)"},{"line_number":1195,"context_line":""},{"line_number":1196,"context_line":"        # Stop tracking removed instances in the is_bfv cache. This needs to"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_ed4b625b","line":1193,"range":{"start_line":1193,"start_character":61,"end_line":1193,"end_character":71},"updated":"2018-10-09 07:11:15.000000000","message":"this seems wierd? why not make the instance param optional?","commit_id":"a99722bb854d2ba99c3abc2d2738ba281148fde4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"102575e04b14112ccb68dee98831695d784235d7","unresolved":false,"context_lines":[{"line_number":1190,"context_line":"                                                         instance,"},{"line_number":1191,"context_line":"                                                         sign\u003dsign)"},{"line_number":1192,"context_line":"            # new instance, update compute node resource usage:"},{"line_number":1193,"context_line":"            self._update_usage(self._get_usage_dict(instance, instance),"},{"line_number":1194,"context_line":"                               nodename, sign\u003dsign)"},{"line_number":1195,"context_line":""},{"line_number":1196,"context_line":"        # Stop tracking removed instances in the is_bfv cache. This needs to"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_c863edaa","line":1193,"range":{"start_line":1193,"start_character":61,"end_line":1193,"end_character":71},"in_reply_to":"3f79a3b5_685bb9f8","updated":"2018-10-09 13:22:25.000000000","message":"\u003e why not make the instance param optional?\n\nAlso, because it\u0027s not optional.","commit_id":"a99722bb854d2ba99c3abc2d2738ba281148fde4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0c0ae16c03bba75121e4866261a873a9aee694ee","unresolved":false,"context_lines":[{"line_number":1190,"context_line":"                                                         instance,"},{"line_number":1191,"context_line":"                                                         sign\u003dsign)"},{"line_number":1192,"context_line":"            # new instance, update compute node resource usage:"},{"line_number":1193,"context_line":"            self._update_usage(self._get_usage_dict(instance, instance),"},{"line_number":1194,"context_line":"                               nodename, sign\u003dsign)"},{"line_number":1195,"context_line":""},{"line_number":1196,"context_line":"        # Stop tracking removed instances in the is_bfv cache. This needs to"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_685bb9f8","line":1193,"range":{"start_line":1193,"start_character":61,"end_line":1193,"end_character":71},"in_reply_to":"3f79a3b5_ed4b625b","updated":"2018-10-09 13:21:59.000000000","message":"Because if you\u0027re passing in a flavor the instance is required. I assume you mean if you know you have an instance from the first arg, you don\u0027t need the second? I could do that, but then the _get_usage_dict method will also be ugly because it has to determine if (1) the instance arg is passed or (2) if it can use the first arg. This was less clunky than the alternative.","commit_id":"a99722bb854d2ba99c3abc2d2738ba281148fde4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cf3689ee5f3eb8cdba483841f29e2b79c323d066","unresolved":false,"context_lines":[{"line_number":1444,"context_line":"            # them. In that case - just get the instance flavor."},{"line_number":1445,"context_line":"            return instance.flavor"},{"line_number":1446,"context_line":""},{"line_number":1447,"context_line":"    def _get_usage_dict(self, object_or_dict, instance, **updates):"},{"line_number":1448,"context_line":"        \"\"\"Make a usage dict _update methods expect."},{"line_number":1449,"context_line":""},{"line_number":1450,"context_line":"        Accepts a dict or an Instance or Flavor object, and a set of updates."}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_08b642dd","line":1447,"range":{"start_line":1447,"start_character":30,"end_line":1447,"end_character":54},"updated":"2018-10-15 18:58:39.000000000","message":"Another alternative here is make this method take an instance *and* a flavor explicitly, because we can always just pass instance.flavor.","commit_id":"a99722bb854d2ba99c3abc2d2738ba281148fde4"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"ed75b18e31e2c3ab1b25690e63243667c3b3adbc","unresolved":false,"context_lines":[{"line_number":1444,"context_line":"            # them. In that case - just get the instance flavor."},{"line_number":1445,"context_line":"            return instance.flavor"},{"line_number":1446,"context_line":""},{"line_number":1447,"context_line":"    def _get_usage_dict(self, object_or_dict, instance, **updates):"},{"line_number":1448,"context_line":"        \"\"\"Make a usage dict _update methods expect."},{"line_number":1449,"context_line":""},{"line_number":1450,"context_line":"        Accepts a dict or an Instance or Flavor object, and a set of updates."}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_b170bc42","line":1447,"range":{"start_line":1447,"start_character":30,"end_line":1447,"end_character":54},"in_reply_to":"3f79a3b5_08b642dd","updated":"2018-10-16 18:33:11.000000000","message":"I think maybe the best way to go is remove \u0027object_or_dict\u0027 and \u0027**updates\" from this method and just have every caller pass only the instance object instead. Looking briefly at the rest of the code, it looks like callers of _get_usage_dict will actually pull the flavor and numa_topology from the instance to pass them separately to this method. The only key supported in \u0027**updates\u0027 is \u0027numa_topology\u0027. We could avoid all that by just passing only the instance.","commit_id":"a99722bb854d2ba99c3abc2d2738ba281148fde4"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0c20f3438443b78478e81d1887aebf4363154e04","unresolved":false,"context_lines":[{"line_number":1444,"context_line":"            # them. In that case - just get the instance flavor."},{"line_number":1445,"context_line":"            return instance.flavor"},{"line_number":1446,"context_line":""},{"line_number":1447,"context_line":"    def _get_usage_dict(self, object_or_dict, instance, **updates):"},{"line_number":1448,"context_line":"        \"\"\"Make a usage dict _update methods expect."},{"line_number":1449,"context_line":""},{"line_number":1450,"context_line":"        Accepts a dict or an Instance or Flavor object, and a set of updates."}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_d548a4b5","line":1447,"range":{"start_line":1447,"start_character":30,"end_line":1447,"end_character":54},"in_reply_to":"3f79a3b5_9fdd86df","updated":"2018-10-17 20:48:02.000000000","message":"I hadn\u0027t considered the backportability, so I see your point there.\n\nAlso, looking again at what it would take to refactor, it will be more complex than I initially thought because the _get_instance_type method is doing more like considering the flavor prefix (old_, new_) and the migration, so a bigger change than I realized. So refactoring will take more care.","commit_id":"a99722bb854d2ba99c3abc2d2738ba281148fde4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a3e43079612a3a16f08219b1a671e915ec0f8ffb","unresolved":false,"context_lines":[{"line_number":1444,"context_line":"            # them. In that case - just get the instance flavor."},{"line_number":1445,"context_line":"            return instance.flavor"},{"line_number":1446,"context_line":""},{"line_number":1447,"context_line":"    def _get_usage_dict(self, object_or_dict, instance, **updates):"},{"line_number":1448,"context_line":"        \"\"\"Make a usage dict _update methods expect."},{"line_number":1449,"context_line":""},{"line_number":1450,"context_line":"        Accepts a dict or an Instance or Flavor object, and a set of updates."}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_9fdd86df","line":1447,"range":{"start_line":1447,"start_character":30,"end_line":1447,"end_character":54},"in_reply_to":"3f79a3b5_b170bc42","updated":"2018-10-16 21:54:34.000000000","message":"Note that I\u0027m also going to be backporting the fix, so is a semi-large(ish) refactor going to be cool for everyone with the backports?","commit_id":"a99722bb854d2ba99c3abc2d2738ba281148fde4"}]}
