)]}'
{"nova/objects/compute_node.py":[{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"22c9cea4296786103cec93f78ecc67cb86fdc855","unresolved":false,"context_lines":[{"line_number":228,"context_line":"                # not been changed"},{"line_number":229,"context_line":"                r \u003d getattr(CONF, key)"},{"line_number":230,"context_line":"                init_x_ratio \u003d getattr(CONF, \u0027initial_%s\u0027 % key)"},{"line_number":231,"context_line":"                conf_alloc_ratio \u003d r if r else init_x_ratio"},{"line_number":232,"context_line":"                value \u003d conf_alloc_ratio"},{"line_number":233,"context_line":"                online_updates[key] \u003d value"},{"line_number":234,"context_line":"            elif key \u003d\u003d \u0027mapped\u0027:"},{"line_number":235,"context_line":"                value \u003d 0 if value is None else value"},{"line_number":236,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_a1f5fccd","line":233,"range":{"start_line":231,"start_character":16,"end_line":233,"end_character":43},"updated":"2018-10-26 07:03:02.000000000","message":"seems these lines can be combined, you have just assinged lots of values here...","commit_id":"e65f25b1c8f4e8edb2720aa509969b2b268abf1a"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"79349f2d4b59b92cd0f307f2c7325fb097673d00","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                # not been changed"},{"line_number":196,"context_line":"                r \u003d getattr(CONF, key)"},{"line_number":197,"context_line":"                init_x_ratio \u003d getattr(CONF, \u0027initial_%s\u0027 % key)"},{"line_number":198,"context_line":"                conf_alloc_ratio \u003d r if r else init_x_ratio"},{"line_number":199,"context_line":"                value \u003d conf_alloc_ratio"},{"line_number":200,"context_line":"                online_updates[key] \u003d value"},{"line_number":201,"context_line":"            elif key \u003d\u003d \u0027mapped\u0027:"},{"line_number":202,"context_line":"                value \u003d 0 if value is None else value"},{"line_number":203,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_e1ae949f","line":200,"range":{"start_line":198,"start_character":16,"end_line":200,"end_character":43},"updated":"2018-10-26 07:03:53.000000000","message":"you can combine these lines, you just assigned a series of variables here.","commit_id":"985307f562ec2143b21c210cfa65c7ab0f422e7e"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"5b7218132c60eac337641894aba350ab16b26730","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                # not been changed"},{"line_number":196,"context_line":"                r \u003d getattr(CONF, key)"},{"line_number":197,"context_line":"                init_x_ratio \u003d getattr(CONF, \u0027initial_%s\u0027 % key)"},{"line_number":198,"context_line":"                conf_alloc_ratio \u003d r if r else init_x_ratio"},{"line_number":199,"context_line":"                value \u003d conf_alloc_ratio"},{"line_number":200,"context_line":"                online_updates[key] \u003d value"},{"line_number":201,"context_line":"            elif key \u003d\u003d \u0027mapped\u0027:"},{"line_number":202,"context_line":"                value \u003d 0 if value is None else value"},{"line_number":203,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_accdf05e","line":200,"range":{"start_line":198,"start_character":16,"end_line":200,"end_character":43},"in_reply_to":"3f79a3b5_e1ae949f","updated":"2018-10-26 11:03:28.000000000","message":"Done","commit_id":"985307f562ec2143b21c210cfa65c7ab0f422e7e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"38c3cea64ea3d58c97bf1dbb6815ce8530c11e43","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            # the next release (Newton) where the opt default values will be"},{"line_number":186,"context_line":"            # restored for both cpu (16.0), ram (1.5) and disk (1.0)"},{"line_number":187,"context_line":"            # allocation ratios."},{"line_number":188,"context_line":"            # TODO(yikun): Remove that when all ratio values are NOT 0.0 or"},{"line_number":189,"context_line":"            # NULL"},{"line_number":190,"context_line":"            ratio_keys \u003d [\u0027cpu_allocation_ratio\u0027, \u0027ram_allocation_ratio\u0027,"},{"line_number":191,"context_line":"                          \u0027disk_allocation_ratio\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_a9c25e87","line":188,"range":{"start_line":188,"start_character":34,"end_line":188,"end_character":38},"updated":"2018-11-30 21:48:17.000000000","message":"\"this online migration code\"","commit_id":"67fed7cc2d42e611e278b4a09fb0887ae8314aa4"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"46e46312926317d1536e4aec3828e7cf0702ea5d","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            # the next release (Newton) where the opt default values will be"},{"line_number":186,"context_line":"            # restored for both cpu (16.0), ram (1.5) and disk (1.0)"},{"line_number":187,"context_line":"            # allocation ratios."},{"line_number":188,"context_line":"            # TODO(yikun): Remove that when all ratio values are NOT 0.0 or"},{"line_number":189,"context_line":"            # NULL"},{"line_number":190,"context_line":"            ratio_keys \u003d [\u0027cpu_allocation_ratio\u0027, \u0027ram_allocation_ratio\u0027,"},{"line_number":191,"context_line":"                          \u0027disk_allocation_ratio\u0027]"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_9ba55605","line":188,"range":{"start_line":188,"start_character":34,"end_line":188,"end_character":38},"in_reply_to":"3f79a3b5_a9c25e87","updated":"2018-12-03 04:06:42.000000000","message":"Done","commit_id":"67fed7cc2d42e611e278b4a09fb0887ae8314aa4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"38c3cea64ea3d58c97bf1dbb6815ce8530c11e43","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                # or the compute node is updated but the default value has"},{"line_number":195,"context_line":"                # not been changed"},{"line_number":196,"context_line":"                r \u003d getattr(CONF, key)"},{"line_number":197,"context_line":"                init_x_ratio \u003d getattr(CONF, \u0027initial_%s\u0027 % key)"},{"line_number":198,"context_line":"                value \u003d r if r else init_x_ratio"},{"line_number":199,"context_line":"                online_updates[key] \u003d value"},{"line_number":200,"context_line":"            elif key \u003d\u003d \u0027mapped\u0027:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_29b64e28","line":197,"updated":"2018-11-30 21:48:17.000000000","message":"Should probably add a comment about the logic here.","commit_id":"67fed7cc2d42e611e278b4a09fb0887ae8314aa4"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"46e46312926317d1536e4aec3828e7cf0702ea5d","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                # or the compute node is updated but the default value has"},{"line_number":195,"context_line":"                # not been changed"},{"line_number":196,"context_line":"                r \u003d getattr(CONF, key)"},{"line_number":197,"context_line":"                init_x_ratio \u003d getattr(CONF, \u0027initial_%s\u0027 % key)"},{"line_number":198,"context_line":"                value \u003d r if r else init_x_ratio"},{"line_number":199,"context_line":"                online_updates[key] \u003d value"},{"line_number":200,"context_line":"            elif key \u003d\u003d \u0027mapped\u0027:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_5bafbee0","line":197,"in_reply_to":"3f79a3b5_29b64e28","updated":"2018-12-03 04:06:42.000000000","message":"Done","commit_id":"67fed7cc2d42e611e278b4a09fb0887ae8314aa4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"38c3cea64ea3d58c97bf1dbb6815ce8530c11e43","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            setattr(compute, key, value)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        if online_updates:"},{"line_number":206,"context_line":"            db.compute_node_update(context, compute.id, online_updates)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        stats \u003d db_compute[\u0027stats\u0027]"},{"line_number":209,"context_line":"        if stats:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_095cb2ed","line":206,"updated":"2018-11-30 21:48:17.000000000","message":"Hmm, this would also change the updated_at value but it wouldn\u0027t be reflected back in \u0027compute\u0027...we should probably set the updated_at value as a result:\n\nif online_updates:\n    db_compute \u003d db.compute_node_update(context, compute.id, online_updates)\n    compute.updated_at \u003d db_compute[\u0027updated_at\u0027]","commit_id":"67fed7cc2d42e611e278b4a09fb0887ae8314aa4"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"46e46312926317d1536e4aec3828e7cf0702ea5d","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            setattr(compute, key, value)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        if online_updates:"},{"line_number":206,"context_line":"            db.compute_node_update(context, compute.id, online_updates)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        stats \u003d db_compute[\u0027stats\u0027]"},{"line_number":209,"context_line":"        if stats:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_dbac2eaa","line":206,"in_reply_to":"3f79a3b5_095cb2ed","updated":"2018-12-03 04:06:42.000000000","message":"Done","commit_id":"67fed7cc2d42e611e278b4a09fb0887ae8314aa4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"47e58e73202c94f7cac3922134d0d77ab2bad13e","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            setattr(compute, key, value)"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        if online_updates:"},{"line_number":211,"context_line":"            db.compute_node_update(context, compute.id, online_updates)"},{"line_number":212,"context_line":"            compute.updated_at \u003d db_compute[\u0027updated_at\u0027]"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        stats \u003d db_compute[\u0027stats\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_06148341","line":211,"updated":"2018-12-03 15:20:35.000000000","message":"Just a note, but I think the pattern I\u0027ve seen most for online data migrations within an object is to call save() on the object itself, which will run it back through _from_db_object, like when uuid was added to compute node:\n\nhttps://review.openstack.org/#/c/277554/10/nova/objects/compute_node.py@234\n\nHaving said that I\u0027m not entirely sure how much it matters if we do it that way or this way, but I can ask Dan Smith since he\u0027s kind of set the pattern on how we do online data migrations within objects.","commit_id":"36c992f72d988ff20e3e286c1065aa76db5aec03"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"61d215961901086eb21e16df50a1f7c3523f27cf","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            setattr(compute, key, value)"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        if online_updates:"},{"line_number":211,"context_line":"            db.compute_node_update(context, compute.id, online_updates)"},{"line_number":212,"context_line":"            compute.updated_at \u003d db_compute[\u0027updated_at\u0027]"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        stats \u003d db_compute[\u0027stats\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_99e1d4d1","line":211,"in_reply_to":"3f79a3b5_06148341","updated":"2018-12-03 16:12:10.000000000","message":"It\u0027s not terrible to do it this way and is likely more efficient. It also avoids the potential infinite loop you could get by re-running _from_db_compute if you happened to not migrate the data in such a way that would satisfy the condition or something. I don\u0027t think the \"how\" is as important as the higher-level approach.","commit_id":"36c992f72d988ff20e3e286c1065aa76db5aec03"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc0df68cfacafed64087b68fca26906954783889","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        if online_updates:"},{"line_number":211,"context_line":"            db.compute_node_update(context, compute.id, online_updates)"},{"line_number":212,"context_line":"            compute.updated_at \u003d db_compute[\u0027updated_at\u0027]"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        stats \u003d db_compute[\u0027stats\u0027]"},{"line_number":215,"context_line":"        if stats:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_c322fd0e","line":212,"range":{"start_line":212,"start_character":33,"end_line":212,"end_character":43},"updated":"2018-12-03 15:00:39.000000000","message":"This is the old value, not what is returned from compute_node_update above, so it wouldn\u0027t make a difference.","commit_id":"36c992f72d988ff20e3e286c1065aa76db5aec03"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"68e2e07bd7e8245cfdb47a7d1128372c5a54d5d9","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        if online_updates:"},{"line_number":211,"context_line":"            db.compute_node_update(context, compute.id, online_updates)"},{"line_number":212,"context_line":"            compute.updated_at \u003d db_compute[\u0027updated_at\u0027]"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        stats \u003d db_compute[\u0027stats\u0027]"},{"line_number":215,"context_line":"        if stats:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_bd46f11e","line":212,"range":{"start_line":212,"start_character":33,"end_line":212,"end_character":43},"in_reply_to":"3f79a3b5_59c33c32","updated":"2018-12-04 03:17:56.000000000","message":"Done","commit_id":"36c992f72d988ff20e3e286c1065aa76db5aec03"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"61d215961901086eb21e16df50a1f7c3523f27cf","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"        if online_updates:"},{"line_number":211,"context_line":"            db.compute_node_update(context, compute.id, online_updates)"},{"line_number":212,"context_line":"            compute.updated_at \u003d db_compute[\u0027updated_at\u0027]"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        stats \u003d db_compute[\u0027stats\u0027]"},{"line_number":215,"context_line":"        if stats:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_59c33c32","line":212,"range":{"start_line":212,"start_character":33,"end_line":212,"end_character":43},"in_reply_to":"3f79a3b5_c322fd0e","updated":"2018-12-03 16:12:10.000000000","message":"Yeah, you could get the new value from the result of compute_node_update I believe and then use that. However, I\u0027m not sure why this matters really. I can\u0027t imagine the caller of this needing to know that updated_at was changed just now for this migration, as opposed to the last time it was really modified by other means.","commit_id":"36c992f72d988ff20e3e286c1065aa76db5aec03"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4477dd5a3c286cf0a43eaaa11bf5f96fdb04bf74","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        if online_updates:"},{"line_number":211,"context_line":"            cpu_ref \u003d db.compute_node_update(context, compute.id,"},{"line_number":212,"context_line":"                                             online_updates)"},{"line_number":213,"context_line":"            compute.updated_at \u003d cpu_ref.updated_at"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        stats \u003d db_compute[\u0027stats\u0027]"},{"line_number":216,"context_line":"        if stats:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_dac72166","line":213,"range":{"start_line":213,"start_character":33,"end_line":213,"end_character":51},"updated":"2018-12-04 14:59:35.000000000","message":"Hmm, I thought this would need to be treated like a dict, like db_compute is a result from db.compute_node_update on L336.","commit_id":"7e1378773495b90b94bea91ad4bd5cf7d7a08c6c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6a32546b8b893f4e10382ca61ab6d1109e18554a","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        if online_updates:"},{"line_number":211,"context_line":"            cpu_ref \u003d db.compute_node_update(context, compute.id,"},{"line_number":212,"context_line":"                                             online_updates)"},{"line_number":213,"context_line":"            compute.updated_at \u003d cpu_ref.updated_at"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        stats \u003d db_compute[\u0027stats\u0027]"},{"line_number":216,"context_line":"        if stats:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_fbea1c0b","line":213,"range":{"start_line":213,"start_character":33,"end_line":213,"end_character":51},"in_reply_to":"3f79a3b5_5ad551eb","updated":"2018-12-04 17:49:53.000000000","message":"So it is a sqla models object which apparently has attribute access on columns:\n\nnova.tests.functional.db.test_compute_node.ComputeNodeTestCase.test_ratio_online_migration_when_load\n----------------------------------------------------------------------------------------------------\n\nCaptured traceback:\n~~~~~~~~~~~~~~~~~~~\n    b\u0027Traceback (most recent call last):\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/tests/functional/db/test_compute_node.py\", line 178, in test_ratio_online_migration_when_load\u0027\n    b\u0027    objects.ComputeNodeList.get_all(self.context)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/.tox/py35/lib/python3.5/site-packages/oslo_versionedobjects/base.py\", line 184, in wrapper\u0027\n    b\u0027    result \u003d fn(cls, context, *args, **kwargs)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/objects/compute_node.py\", line 399, in get_all\u0027\n    b\u0027    db_computes)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/.tox/py35/lib/python3.5/site-packages/oslo_versionedobjects/base.py\", line 1133, in obj_make_list\u0027\n    b\u0027    **extra_args)\u0027\n    b\u0027  File \"/home/osboxes/git/nova/nova/objects/compute_node.py\", line 213, in _from_db_object\u0027\n    b\u0027    raise Exception(cpu_ref)\u0027\n    b\u0027Exception: \u003cnova.db.sqlalchemy.models.ComputeNode object at 0x7fb12dd74d68\u003e\u0027\n    b\u0027\u0027\n\n\nBut the unit tests are still wrong, and we can easily change this to use dict access.","commit_id":"7e1378773495b90b94bea91ad4bd5cf7d7a08c6c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fd5a73c0bbdd048f10cc0f2e4544ef4d263d60ad","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        if online_updates:"},{"line_number":211,"context_line":"            cpu_ref \u003d db.compute_node_update(context, compute.id,"},{"line_number":212,"context_line":"                                             online_updates)"},{"line_number":213,"context_line":"            compute.updated_at \u003d cpu_ref.updated_at"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        stats \u003d db_compute[\u0027stats\u0027]"},{"line_number":216,"context_line":"        if stats:"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_5ad551eb","line":213,"range":{"start_line":213,"start_character":33,"end_line":213,"end_character":51},"in_reply_to":"3f79a3b5_dac72166","updated":"2018-12-04 15:01:18.000000000","message":"Although then I wonder how https://review.openstack.org/#/c/613499/14/nova/tests/functional/db/test_compute_node.py is passing? The sqlalchemy objects might allow attribute access on dict entries, I\u0027m not sure.","commit_id":"7e1378773495b90b94bea91ad4bd5cf7d7a08c6c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5800ad27e0a2fbc8212db3d20010c00312227a1d","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        if online_updates:"},{"line_number":211,"context_line":"            cpu_ref \u003d db.compute_node_update(context, compute.id,"},{"line_number":212,"context_line":"                                             online_updates)"},{"line_number":213,"context_line":"            compute.updated_at \u003d cpu_ref[\u0027updated_at\u0027]"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        stats \u003d db_compute[\u0027stats\u0027]"},{"line_number":216,"context_line":"        if stats:"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_6bdf0239","line":213,"updated":"2018-12-05 15:28:10.000000000","message":"I thought you were going to remove this?\n\nThinking about this more now, let\u0027s say we fetch the compute node from the db prior to calling this, call that version 1. Then while were processing the keys, something else updates it, call that version 2. Then we get to L211 and decide that we need to do the update of the ratio values, so we do, call that version 3. Now here on L213, we take our compute objects, which is version 1, and give it the updated_at from version 3. That doesn\u0027t make any sense to me.\n\nSo I would say you should either:\n\n 1. Not change updated_at at all\n 2. Do this fixup and save as the first thing in _from_db_compute, and then load all the fields from the one object you get back from the update.\n\nI would recommend #1 because it\u0027s easier, but what you have here just seems confusing and inconsistent.","commit_id":"a53ccfb4fecd84941e7883ef7ce509cd016931fd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1e0c3e0240360d96f69a5229414964564a6b2f6e","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        if online_updates:"},{"line_number":211,"context_line":"            cpu_ref \u003d db.compute_node_update(context, compute.id,"},{"line_number":212,"context_line":"                                             online_updates)"},{"line_number":213,"context_line":"            compute.updated_at \u003d cpu_ref[\u0027updated_at\u0027]"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        stats \u003d db_compute[\u0027stats\u0027]"},{"line_number":216,"context_line":"        if stats:"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_8bc61e41","line":213,"in_reply_to":"3f79a3b5_6bdf0239","updated":"2018-12-05 15:33:27.000000000","message":"Doesn\u0027t matter much to me. I had initially asked that we update compute, which is otherwise populated from db_compute, with the updated_at from the 2nd update call here since, well, we updated the object again and if we weren\u0027t going to go through a full save() recursion then we could just update inline. But if it\u0027s not really needed and it\u0027s more trouble than it\u0027s worth, then let\u0027s just remove it.","commit_id":"a53ccfb4fecd84941e7883ef7ce509cd016931fd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0e641c49ed65a7be5be886a1c624487428c81523","unresolved":false,"context_lines":[{"line_number":210,"context_line":"        if online_updates:"},{"line_number":211,"context_line":"            cpu_ref \u003d db.compute_node_update(context, compute.id,"},{"line_number":212,"context_line":"                                             online_updates)"},{"line_number":213,"context_line":"            compute.updated_at \u003d cpu_ref[\u0027updated_at\u0027]"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        stats \u003d db_compute[\u0027stats\u0027]"},{"line_number":216,"context_line":"        if stats:"}],"source_content_type":"text/x-python","patch_set":15,"id":"3f79a3b5_6e62b0dc","line":213,"in_reply_to":"3f79a3b5_8bc61e41","updated":"2018-12-05 16:25:44.000000000","message":"Done","commit_id":"a53ccfb4fecd84941e7883ef7ce509cd016931fd"}],"nova/tests/functional/db/test_compute_node.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"38c3cea64ea3d58c97bf1dbb6815ce8530c11e43","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        self.assertEqual(1, len(cns))"},{"line_number":141,"context_line":"        self.assertEqual(cn1.uuid, cns[0].uuid)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def _create_zero_and_none_cn(self):"},{"line_number":144,"context_line":"        cn1 \u003d fake_compute_obj.obj_clone()"},{"line_number":145,"context_line":"        cn1._context \u003d self.context"},{"line_number":146,"context_line":"        cn1.create()"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_c90a3acf","line":143,"range":{"start_line":143,"start_character":8,"end_line":143,"end_character":32},"updated":"2018-11-30 21:48:17.000000000","message":"nit: since there is only one test calling this, I\u0027d just merge it into the test itself.","commit_id":"67fed7cc2d42e611e278b4a09fb0887ae8314aa4"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"d214db8399af59c6580daf36c37d59fa17faf697","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        self.assertEqual(1, len(cns))"},{"line_number":141,"context_line":"        self.assertEqual(cn1.uuid, cns[0].uuid)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def _create_zero_and_none_cn(self):"},{"line_number":144,"context_line":"        cn1 \u003d fake_compute_obj.obj_clone()"},{"line_number":145,"context_line":"        cn1._context \u003d self.context"},{"line_number":146,"context_line":"        cn1.create()"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_bfccbbbd","line":143,"range":{"start_line":143,"start_character":8,"end_line":143,"end_character":32},"in_reply_to":"3f79a3b5_bbd05258","updated":"2018-12-03 08:59:40.000000000","message":"oops, I forgot it would be used in next patch [1]....\n\n[1] https://review.openstack.org/#/c/609995/11/nova/tests/functional/db/test_compute_node.py@199","commit_id":"67fed7cc2d42e611e278b4a09fb0887ae8314aa4"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"46e46312926317d1536e4aec3828e7cf0702ea5d","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        self.assertEqual(1, len(cns))"},{"line_number":141,"context_line":"        self.assertEqual(cn1.uuid, cns[0].uuid)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def _create_zero_and_none_cn(self):"},{"line_number":144,"context_line":"        cn1 \u003d fake_compute_obj.obj_clone()"},{"line_number":145,"context_line":"        cn1._context \u003d self.context"},{"line_number":146,"context_line":"        cn1.create()"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_bbd05258","line":143,"range":{"start_line":143,"start_character":8,"end_line":143,"end_character":32},"in_reply_to":"3f79a3b5_c90a3acf","updated":"2018-12-03 04:06:42.000000000","message":"Done","commit_id":"67fed7cc2d42e611e278b4a09fb0887ae8314aa4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"38c3cea64ea3d58c97bf1dbb6815ce8530c11e43","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            self.assertIsNone(None, cn2_db[\u0027%s_allocation_ratio\u0027 % x])"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def test_ratio_online_migration_when_load(self):"},{"line_number":171,"context_line":"        self.flags(cpu_allocation_ratio\u003d32.0)"},{"line_number":172,"context_line":"        self.flags(ram_allocation_ratio\u003d3.0)"},{"line_number":173,"context_line":"        self.flags(disk_allocation_ratio\u003d2.0)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        self._create_zero_and_none_cn()"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_49f62ad8","line":173,"range":{"start_line":171,"start_character":8,"end_line":173,"end_character":45},"updated":"2018-11-30 21:48:17.000000000","message":"This doesn\u0027t test the initial_*_allocation_ratio case, so a good wrinkle is probably doing something like setting cpu_allocation_ratio\u003d1.0, leave ram_allocation_ratio unset (None) and that would mean that initial_ram_allocation_ratio gets used on the compute node object.","commit_id":"67fed7cc2d42e611e278b4a09fb0887ae8314aa4"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"46e46312926317d1536e4aec3828e7cf0702ea5d","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            self.assertIsNone(None, cn2_db[\u0027%s_allocation_ratio\u0027 % x])"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def test_ratio_online_migration_when_load(self):"},{"line_number":171,"context_line":"        self.flags(cpu_allocation_ratio\u003d32.0)"},{"line_number":172,"context_line":"        self.flags(ram_allocation_ratio\u003d3.0)"},{"line_number":173,"context_line":"        self.flags(disk_allocation_ratio\u003d2.0)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        self._create_zero_and_none_cn()"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_1b2e265b","line":173,"range":{"start_line":171,"start_character":8,"end_line":173,"end_character":45},"in_reply_to":"3f79a3b5_49f62ad8","updated":"2018-12-03 04:06:42.000000000","message":"Done","commit_id":"67fed7cc2d42e611e278b4a09fb0887ae8314aa4"}],"nova/tests/unit/cmd/test_status.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"38c3cea64ea3d58c97bf1dbb6815ce8530c11e43","unresolved":false,"context_lines":[{"line_number":628,"context_line":"        self.assertIn(\u0027There are 1 compute resource providers and 2 compute \u0027"},{"line_number":629,"context_line":"                      \u0027nodes in the deployment.\u0027, result.details)"},{"line_number":630,"context_line":""},{"line_number":631,"context_line":"    @mock.patch(\u0027nova.db.api.compute_node_update\u0027)"},{"line_number":632,"context_line":"    def test_check_resource_providers_equal_rps_to_computes(self, mock_update):"},{"line_number":633,"context_line":"        \"\"\"This tests the happy path scenario where we have an equal number"},{"line_number":634,"context_line":"        of compute resource providers to compute nodes."}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_6918c61f","line":631,"updated":"2018-11-30 21:48:17.000000000","message":"I\u0027m not sure why we need this? This test is backed by a database so the update-on-read should be OK.","commit_id":"67fed7cc2d42e611e278b4a09fb0887ae8314aa4"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"46e46312926317d1536e4aec3828e7cf0702ea5d","unresolved":false,"context_lines":[{"line_number":628,"context_line":"        self.assertIn(\u0027There are 1 compute resource providers and 2 compute \u0027"},{"line_number":629,"context_line":"                      \u0027nodes in the deployment.\u0027, result.details)"},{"line_number":630,"context_line":""},{"line_number":631,"context_line":"    @mock.patch(\u0027nova.db.api.compute_node_update\u0027)"},{"line_number":632,"context_line":"    def test_check_resource_providers_equal_rps_to_computes(self, mock_update):"},{"line_number":633,"context_line":"        \"\"\"This tests the happy path scenario where we have an equal number"},{"line_number":634,"context_line":"        of compute resource providers to compute nodes."}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_bb15b2e9","line":631,"in_reply_to":"3f79a3b5_6918c61f","updated":"2018-12-03 04:06:42.000000000","message":"Yes, I think we need remove this compute_node_update mock, and I added it to avoid L658 which raised a 404 from db [1].\n\n[1] http://paste.openstack.org/show/736558/\n\nBut I think the right way is \n\ncn2.create()\ncn2.destroy()","commit_id":"67fed7cc2d42e611e278b4a09fb0887ae8314aa4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"47e58e73202c94f7cac3922134d0d77ab2bad13e","unresolved":false,"context_lines":[{"line_number":628,"context_line":"        self.assertIn(\u0027There are 1 compute resource providers and 2 compute \u0027"},{"line_number":629,"context_line":"                      \u0027nodes in the deployment.\u0027, result.details)"},{"line_number":630,"context_line":""},{"line_number":631,"context_line":"    @mock.patch(\u0027nova.db.api.compute_node_update\u0027)"},{"line_number":632,"context_line":"    def test_check_resource_providers_equal_rps_to_computes(self, mock_update):"},{"line_number":633,"context_line":"        \"\"\"This tests the happy path scenario where we have an equal number"},{"line_number":634,"context_line":"        of compute resource providers to compute nodes."}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_46d4bb4c","line":631,"in_reply_to":"3f79a3b5_bb15b2e9","updated":"2018-12-03 15:20:35.000000000","message":"Yes that would work, or just set allocation ratio override values on cn2. Either way we shouldn\u0027t use the mock here.","commit_id":"67fed7cc2d42e611e278b4a09fb0887ae8314aa4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"47e58e73202c94f7cac3922134d0d77ab2bad13e","unresolved":false,"context_lines":[{"line_number":628,"context_line":"        self.assertIn(\u0027There are 1 compute resource providers and 2 compute \u0027"},{"line_number":629,"context_line":"                      \u0027nodes in the deployment.\u0027, result.details)"},{"line_number":630,"context_line":""},{"line_number":631,"context_line":"    @mock.patch(\u0027nova.db.api.compute_node_update\u0027)"},{"line_number":632,"context_line":"    def test_check_resource_providers_equal_rps_to_computes(self, mock_update):"},{"line_number":633,"context_line":"        \"\"\"This tests the happy path scenario where we have an equal number"},{"line_number":634,"context_line":"        of compute resource providers to compute nodes."}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_a6c6ef9a","line":631,"updated":"2018-12-03 15:20:35.000000000","message":"We shouldn\u0027t be doing this mock here since we have a db backing this test, it looks like we should just call cn2.destroy() after creating it as you suggested, or just set allocation_ratios on it like I suggested:\n\nhttps://review.openstack.org/#/c/613499/9/nova/tests/unit/cmd/test_status.py","commit_id":"36c992f72d988ff20e3e286c1065aa76db5aec03"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"68e2e07bd7e8245cfdb47a7d1128372c5a54d5d9","unresolved":false,"context_lines":[{"line_number":628,"context_line":"        self.assertIn(\u0027There are 1 compute resource providers and 2 compute \u0027"},{"line_number":629,"context_line":"                      \u0027nodes in the deployment.\u0027, result.details)"},{"line_number":630,"context_line":""},{"line_number":631,"context_line":"    @mock.patch(\u0027nova.db.api.compute_node_update\u0027)"},{"line_number":632,"context_line":"    def test_check_resource_providers_equal_rps_to_computes(self, mock_update):"},{"line_number":633,"context_line":"        \"\"\"This tests the happy path scenario where we have an equal number"},{"line_number":634,"context_line":"        of compute resource providers to compute nodes."}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_ddbc0d0a","line":631,"in_reply_to":"3f79a3b5_a6c6ef9a","updated":"2018-12-04 03:17:56.000000000","message":"Done, missed it in this PS","commit_id":"36c992f72d988ff20e3e286c1065aa76db5aec03"}],"nova/tests/unit/objects/test_compute_node.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"38c3cea64ea3d58c97bf1dbb6815ce8530c11e43","unresolved":false,"context_lines":[{"line_number":613,"context_line":"                                \u0027disk_allocation_ratio\u0027: 1.0})"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    @mock.patch(\u0027nova.db.api.compute_node_update\u0027)"},{"line_number":616,"context_line":"    def test_compat_allocation_ratios_with_initial_ratio(self, mock_update):"},{"line_number":617,"context_line":"        self.flags(initial_cpu_allocation_ratio\u003d2.0,"},{"line_number":618,"context_line":"                   initial_ram_allocation_ratio\u003d3.0,"},{"line_number":619,"context_line":"                   initial_disk_allocation_ratio\u003d0.9)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_09cfd28a","line":616,"updated":"2018-11-30 21:48:17.000000000","message":"If you did what I suggested in the functional test, then you don\u0027t really need this (it becomes redundant).","commit_id":"67fed7cc2d42e611e278b4a09fb0887ae8314aa4"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"46e46312926317d1536e4aec3828e7cf0702ea5d","unresolved":false,"context_lines":[{"line_number":613,"context_line":"                                \u0027disk_allocation_ratio\u0027: 1.0})"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    @mock.patch(\u0027nova.db.api.compute_node_update\u0027)"},{"line_number":616,"context_line":"    def test_compat_allocation_ratios_with_initial_ratio(self, mock_update):"},{"line_number":617,"context_line":"        self.flags(initial_cpu_allocation_ratio\u003d2.0,"},{"line_number":618,"context_line":"                   initial_ram_allocation_ratio\u003d3.0,"},{"line_number":619,"context_line":"                   initial_disk_allocation_ratio\u003d0.9)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_7b487a2a","line":616,"in_reply_to":"3f79a3b5_09cfd28a","updated":"2018-12-03 04:06:42.000000000","message":"Done","commit_id":"67fed7cc2d42e611e278b4a09fb0887ae8314aa4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dc0df68cfacafed64087b68fca26906954783889","unresolved":false,"context_lines":[{"line_number":613,"context_line":"                                \u0027disk_allocation_ratio\u0027: 1.0})"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    @mock.patch(\u0027nova.db.api.compute_node_update\u0027)"},{"line_number":616,"context_line":"    def test_allocation_updated_at_return(self, mock_update):"},{"line_number":617,"context_line":"        compute_dict \u003d fake_compute_node.copy()"},{"line_number":618,"context_line":"        compute_dict[\u0027updated_at\u0027] \u003d timeutils.utcnow(with_timezone\u003dTrue)"},{"line_number":619,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_23141199","line":616,"range":{"start_line":616,"start_character":8,"end_line":616,"end_character":41},"updated":"2018-12-03 15:00:39.000000000","message":"This passes because the thing you passed in is the same thing you\u0027re checking against. mock_update should actually return a value with a different updated_at time and assert that the 2nd updated_at time is the one that\u0027s on the object after _from_db_object returns.","commit_id":"36c992f72d988ff20e3e286c1065aa76db5aec03"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"47e58e73202c94f7cac3922134d0d77ab2bad13e","unresolved":false,"context_lines":[{"line_number":613,"context_line":"                                \u0027disk_allocation_ratio\u0027: 1.0})"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    @mock.patch(\u0027nova.db.api.compute_node_update\u0027)"},{"line_number":616,"context_line":"    def test_allocation_updated_at_return(self, mock_update):"},{"line_number":617,"context_line":"        compute_dict \u003d fake_compute_node.copy()"},{"line_number":618,"context_line":"        compute_dict[\u0027updated_at\u0027] \u003d timeutils.utcnow(with_timezone\u003dTrue)"},{"line_number":619,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_e63147bc","line":616,"range":{"start_line":616,"start_character":8,"end_line":616,"end_character":41},"in_reply_to":"3f79a3b5_23141199","updated":"2018-12-03 15:20:35.000000000","message":"Seems we could just work this into one of the tests above.","commit_id":"36c992f72d988ff20e3e286c1065aa76db5aec03"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"68e2e07bd7e8245cfdb47a7d1128372c5a54d5d9","unresolved":false,"context_lines":[{"line_number":613,"context_line":"                                \u0027disk_allocation_ratio\u0027: 1.0})"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    @mock.patch(\u0027nova.db.api.compute_node_update\u0027)"},{"line_number":616,"context_line":"    def test_allocation_updated_at_return(self, mock_update):"},{"line_number":617,"context_line":"        compute_dict \u003d fake_compute_node.copy()"},{"line_number":618,"context_line":"        compute_dict[\u0027updated_at\u0027] \u003d timeutils.utcnow(with_timezone\u003dTrue)"},{"line_number":619,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_9dfe9505","line":616,"range":{"start_line":616,"start_character":8,"end_line":616,"end_character":41},"in_reply_to":"3f79a3b5_e63147bc","updated":"2018-12-04 03:17:56.000000000","message":"Done","commit_id":"36c992f72d988ff20e3e286c1065aa76db5aec03"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4477dd5a3c286cf0a43eaaa11bf5f96fdb04bf74","unresolved":false,"context_lines":[{"line_number":561,"context_line":"        compute_dict[\u0027disk_allocation_ratio\u0027] \u003d None"},{"line_number":562,"context_line":"        cls \u003d objects.ComputeNode"},{"line_number":563,"context_line":"        fake_updated \u003d timeutils.utcnow(with_timezone\u003dTrue)"},{"line_number":564,"context_line":"        mock_update.return_value \u003d compute_node.ComputeNode("},{"line_number":565,"context_line":"            updated_at\u003dfake_updated, cpu_allocation_ratio\u003d2.0,"},{"line_number":566,"context_line":"            ram_allocation_ratio\u003d3.0, disk_allocation_ratio\u003d0.9)"},{"line_number":567,"context_line":"        compute \u003d cls._from_db_object(self.context, cls(), compute_dict)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_1a911946","line":564,"range":{"start_line":564,"start_character":35,"end_line":564,"end_character":60},"updated":"2018-12-04 14:59:35.000000000","message":"This is the wrong type of object, the DB API won\u0027t return a versioned object, it will return a dict-like structure, which is why I was wondering how your code was working with attribute access on the object. I think that would blow up in real code.","commit_id":"7e1378773495b90b94bea91ad4bd5cf7d7a08c6c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4477dd5a3c286cf0a43eaaa11bf5f96fdb04bf74","unresolved":false,"context_lines":[{"line_number":562,"context_line":"        cls \u003d objects.ComputeNode"},{"line_number":563,"context_line":"        fake_updated \u003d timeutils.utcnow(with_timezone\u003dTrue)"},{"line_number":564,"context_line":"        mock_update.return_value \u003d compute_node.ComputeNode("},{"line_number":565,"context_line":"            updated_at\u003dfake_updated, cpu_allocation_ratio\u003d2.0,"},{"line_number":566,"context_line":"            ram_allocation_ratio\u003d3.0, disk_allocation_ratio\u003d0.9)"},{"line_number":567,"context_line":"        compute \u003d cls._from_db_object(self.context, cls(), compute_dict)"},{"line_number":568,"context_line":""},{"line_number":569,"context_line":"        self.assertEqual(2.0, compute.cpu_allocation_ratio)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_7ab36dec","line":566,"range":{"start_line":565,"start_character":37,"end_line":566,"end_character":63},"updated":"2018-12-04 14:59:35.000000000","message":"Do we really need these in the return object? Same below.","commit_id":"7e1378773495b90b94bea91ad4bd5cf7d7a08c6c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4477dd5a3c286cf0a43eaaa11bf5f96fdb04bf74","unresolved":false,"context_lines":[{"line_number":586,"context_line":"        compute_dict[\u0027ram_allocation_ratio\u0027] \u003d None"},{"line_number":587,"context_line":"        compute_dict[\u0027disk_allocation_ratio\u0027] \u003d None"},{"line_number":588,"context_line":"        fake_updated \u003d timeutils.utcnow(with_timezone\u003dTrue)"},{"line_number":589,"context_line":"        mock_update.return_value \u003d compute_node.ComputeNode("},{"line_number":590,"context_line":"            updated_at\u003dfake_updated, cpu_allocation_ratio\u003d16.0,"},{"line_number":591,"context_line":"            ram_allocation_ratio\u003d1.5, disk_allocation_ratio\u003d1.0)"},{"line_number":592,"context_line":"        cls \u003d objects.ComputeNode"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_3a941535","line":589,"range":{"start_line":589,"start_character":48,"end_line":589,"end_character":59},"updated":"2018-12-04 14:59:35.000000000","message":"same","commit_id":"7e1378773495b90b94bea91ad4bd5cf7d7a08c6c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9d9a3596c9b3fce624d67959c42d1c3f77dad098","unresolved":false,"context_lines":[{"line_number":592,"context_line":"        cls \u003d objects.ComputeNode"},{"line_number":593,"context_line":"        compute \u003d cls._from_db_object(self.context, cls(), compute_dict)"},{"line_number":594,"context_line":""},{"line_number":595,"context_line":"        self.assertEqual(16.0, compute.cpu_allocation_ratio)"},{"line_number":596,"context_line":"        self.assertEqual(1.5, compute.ram_allocation_ratio)"},{"line_number":597,"context_line":"        self.assertEqual(1.0, compute.disk_allocation_ratio)"},{"line_number":598,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_366e69cb","line":595,"range":{"start_line":595,"start_character":25,"end_line":595,"end_character":29},"updated":"2018-12-04 18:15:00.000000000","message":"We get these values from the initial config options right? If so, let\u0027s use those here instead to make it clear.\n\nIn general, a lot of these tests look very similar so it would be nice to have a docstring per each test being modified to explain what it does - which will also explain how they are all slightly different.","commit_id":"7e1378773495b90b94bea91ad4bd5cf7d7a08c6c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4477dd5a3c286cf0a43eaaa11bf5f96fdb04bf74","unresolved":false,"context_lines":[{"line_number":612,"context_line":"        compute_dict[\u0027disk_allocation_ratio\u0027] \u003d 0.0"},{"line_number":613,"context_line":"        cls \u003d objects.ComputeNode"},{"line_number":614,"context_line":"        fake_updated \u003d timeutils.utcnow(with_timezone\u003dTrue)"},{"line_number":615,"context_line":"        mock_update.return_value \u003d compute_node.ComputeNode("},{"line_number":616,"context_line":"            updated_at\u003dfake_updated, cpu_allocation_ratio\u003d16.0,"},{"line_number":617,"context_line":"            ram_allocation_ratio\u003d1.5, disk_allocation_ratio\u003d1.0)"},{"line_number":618,"context_line":"        compute \u003d cls._from_db_object(self.context, cls(), compute_dict)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_da9ac15f","line":615,"range":{"start_line":615,"start_character":48,"end_line":615,"end_character":59},"updated":"2018-12-04 14:59:35.000000000","message":"same","commit_id":"7e1378773495b90b94bea91ad4bd5cf7d7a08c6c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4477dd5a3c286cf0a43eaaa11bf5f96fdb04bf74","unresolved":false,"context_lines":[{"line_number":637,"context_line":"        compute_dict[\u0027disk_allocation_ratio\u0027] \u003d None"},{"line_number":638,"context_line":"        cls \u003d objects.ComputeNode"},{"line_number":639,"context_line":"        fake_updated \u003d timeutils.utcnow(with_timezone\u003dTrue)"},{"line_number":640,"context_line":"        mock_update.return_value \u003d compute_node.ComputeNode("},{"line_number":641,"context_line":"            updated_at\u003dfake_updated, cpu_allocation_ratio\u003d16.0,"},{"line_number":642,"context_line":"            ram_allocation_ratio\u003d1.5, disk_allocation_ratio\u003d1.0)"},{"line_number":643,"context_line":"        compute \u003d cls._from_db_object(self.context, cls(), compute_dict)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_ba9fc54c","line":640,"range":{"start_line":640,"start_character":48,"end_line":640,"end_character":59},"updated":"2018-12-04 14:59:35.000000000","message":"same","commit_id":"7e1378773495b90b94bea91ad4bd5cf7d7a08c6c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9d9a3596c9b3fce624d67959c42d1c3f77dad098","unresolved":false,"context_lines":[{"line_number":642,"context_line":"            ram_allocation_ratio\u003d1.5, disk_allocation_ratio\u003d1.0)"},{"line_number":643,"context_line":"        compute \u003d cls._from_db_object(self.context, cls(), compute_dict)"},{"line_number":644,"context_line":""},{"line_number":645,"context_line":"        self.assertEqual(16.0, compute.cpu_allocation_ratio)"},{"line_number":646,"context_line":"        self.assertEqual(1.5, compute.ram_allocation_ratio)"},{"line_number":647,"context_line":"        self.assertEqual(1.0, compute.disk_allocation_ratio)"},{"line_number":648,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3f79a3b5_16a00df2","line":645,"range":{"start_line":645,"start_character":25,"end_line":645,"end_character":29},"updated":"2018-12-04 18:15:00.000000000","message":"use the initial config options here again for clarity","commit_id":"7e1378773495b90b94bea91ad4bd5cf7d7a08c6c"}]}
