)]}'
{"nova/objects/compute_node.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"29102429bb81f23255224a8a2eeb22fb5438cea2","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        if \u0027uuid\u0027 not in db_compute and \u0027uuid\u0027 not in compute:"},{"line_number":217,"context_line":"            compute.uuid \u003d uuidutils.generate_uuid()"},{"line_number":218,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for compute node %(id)i\u0027 % ("},{"line_number":219,"context_line":"                dict(uuid\u003dcompute.uuid, id\u003dcompute.id)))"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        compute.obj_reset_changes()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_fbbe8063","line":218,"range":{"start_line":218,"start_character":72,"end_line":218,"end_character":75},"updated":"2016-02-08 20:40:57.000000000","message":"I think you want to use a comma here instead to avoid formatting the string when debug isn\u0027t enabled","commit_id":"3d78cf4ffa0f727c93b30b22ea5c716046f65952"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c963d0ad41a411f89190a1b7645b3295ed321855","unresolved":false,"context_lines":[{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        if \u0027uuid\u0027 not in db_compute and \u0027uuid\u0027 not in compute:"},{"line_number":217,"context_line":"            compute.uuid \u003d uuidutils.generate_uuid()"},{"line_number":218,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for compute node %(id)i\u0027 % ("},{"line_number":219,"context_line":"                dict(uuid\u003dcompute.uuid, id\u003dcompute.id)))"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        compute.obj_reset_changes()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_dd97f4e9","line":218,"range":{"start_line":218,"start_character":72,"end_line":218,"end_character":75},"in_reply_to":"5a5ae5dd_fbbe8063","updated":"2016-02-08 22:23:27.000000000","message":"Gosh dangit those log messages!","commit_id":"3d78cf4ffa0f727c93b30b22ea5c716046f65952"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"29102429bb81f23255224a8a2eeb22fb5438cea2","unresolved":false,"context_lines":[{"line_number":300,"context_line":""},{"line_number":301,"context_line":"        if \u0027uuid\u0027 not in self:"},{"line_number":302,"context_line":"            self.uuid \u003d uuidutils.generate_uuid()"},{"line_number":303,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for compute node %(id)i\u0027 % ("},{"line_number":304,"context_line":"                dict(uuid\u003dself.uuid, id\u003dself.id)))"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"        updates \u003d self.obj_get_changes()"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a5ae5dd_9bae6c2c","line":303,"range":{"start_line":303,"start_character":72,"end_line":303,"end_character":75},"updated":"2016-02-08 20:40:57.000000000","message":"same comment","commit_id":"3d78cf4ffa0f727c93b30b22ea5c716046f65952"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"e6be1dc574d5e0abf774c0477fae15fec11e6f27","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        # host column is present in the table or not"},{"line_number":214,"context_line":"        compute._host_from_db_object(compute, db_compute)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        if not db_compute.get(\u0027uuid\u0027) and \u0027uuid\u0027 not in compute:"},{"line_number":217,"context_line":"            compute.uuid \u003d uuidutils.generate_uuid()"},{"line_number":218,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for compute node %(id)i\u0027,"},{"line_number":219,"context_line":"                      dict(uuid\u003dcompute.uuid, id\u003dcompute.id))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_95e60b43","line":216,"range":{"start_line":216,"start_character":8,"end_line":216,"end_character":64},"updated":"2016-02-09 14:42:07.000000000","message":"Are we ok with doing this even if not all of the control plane has been upgraded? I am guessing yes since it\u0027s purely additive but","commit_id":"6aa4990237ec2a73e874fc9704f5f824590ad668"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"189cdb0197a1cc3144558911eb66a3a867f07cd5","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        # host column is present in the table or not"},{"line_number":214,"context_line":"        compute._host_from_db_object(compute, db_compute)"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        if not db_compute.get(\u0027uuid\u0027) and \u0027uuid\u0027 not in compute:"},{"line_number":217,"context_line":"            compute.uuid \u003d uuidutils.generate_uuid()"},{"line_number":218,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for compute node %(id)i\u0027,"},{"line_number":219,"context_line":"                      dict(uuid\u003dcompute.uuid, id\u003dcompute.id))"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_e6c31389","line":216,"range":{"start_line":216,"start_character":8,"end_line":216,"end_character":64},"in_reply_to":"5a5ae5dd_95e60b43","updated":"2016-02-09 14:57:04.000000000","message":"Yep. We would need to gate anything that was moving data on the upgrade, but this is safe.","commit_id":"6aa4990237ec2a73e874fc9704f5f824590ad668"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"7222f6fe530e276e8e4d36ecde553bdb707eb39a","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        if not db_compute.get(\u0027uuid\u0027) and \u0027uuid\u0027 not in compute:"},{"line_number":217,"context_line":"            compute.uuid \u003d uuidutils.generate_uuid()"},{"line_number":218,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for compute node %(id)i\u0027,"},{"line_number":219,"context_line":"                      dict(uuid\u003dcompute.uuid, id\u003dcompute.id))"},{"line_number":220,"context_line":"        else:"},{"line_number":221,"context_line":"            compute.uuid \u003d db_compute[\u0027uuid\u0027]"},{"line_number":222,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_77c02fe1","line":219,"updated":"2016-02-09 15:51:37.000000000","message":"Do we want to save this to the DB here, rather than start using it before its actually saved to the DB?","commit_id":"6aa4990237ec2a73e874fc9704f5f824590ad668"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"e6be1dc574d5e0abf774c0477fae15fec11e6f27","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        else:"},{"line_number":221,"context_line":"            compute.uuid \u003d db_compute[\u0027uuid\u0027]"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        compute.obj_reset_changes()"},{"line_number":224,"context_line":"        return compute"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    @base.remotable_classmethod"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_8bc7c863","line":223,"range":{"start_line":223,"start_character":8,"end_line":223,"end_character":35},"updated":"2016-02-09 14:42:07.000000000","message":"If we do this without checking if something was updated, we will basically never mark uuid\u0027s as dirty so no saves will likely save them as this is really the only place we would dirty them I think","commit_id":"6aa4990237ec2a73e874fc9704f5f824590ad668"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"189cdb0197a1cc3144558911eb66a3a867f07cd5","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        else:"},{"line_number":221,"context_line":"            compute.uuid \u003d db_compute[\u0027uuid\u0027]"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        compute.obj_reset_changes()"},{"line_number":224,"context_line":"        return compute"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    @base.remotable_classmethod"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_663643b6","line":223,"range":{"start_line":223,"start_character":8,"end_line":223,"end_character":35},"in_reply_to":"5a5ae5dd_8bc7c863","updated":"2016-02-09 14:57:04.000000000","message":"Ah, yep.","commit_id":"6aa4990237ec2a73e874fc9704f5f824590ad668"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"7222f6fe530e276e8e4d36ecde553bdb707eb39a","unresolved":false,"context_lines":[{"line_number":301,"context_line":"        # NOTE(belliott) ignore prune_stats param, no longer relevant"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"        if \u0027uuid\u0027 not in self:"},{"line_number":304,"context_line":"            self.uuid \u003d uuidutils.generate_uuid()"},{"line_number":305,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for compute node %(id)i\u0027,"},{"line_number":306,"context_line":"                      dict(uuid\u003dself.uuid, id\u003dself.id))"},{"line_number":307,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_37487787","line":304,"updated":"2016-02-09 15:51:37.000000000","message":"trying to work out when we need this, if create and read_from_db both generate the uuid?\n\nI guess it does no harm.","commit_id":"6aa4990237ec2a73e874fc9704f5f824590ad668"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"34445b6c741cf2925461603f56716870cf28445a","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        if not db_compute.get(\u0027uuid\u0027) and \u0027uuid\u0027 not in compute:"},{"line_number":223,"context_line":"            compute.uuid \u003d uuidutils.generate_uuid()"},{"line_number":224,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for compute node %(id)i\u0027,"},{"line_number":225,"context_line":"                      dict(uuid\u003dcompute.uuid, id\u003dcompute.id))"},{"line_number":226,"context_line":"        else:"},{"line_number":227,"context_line":"            compute.uuid \u003d db_compute[\u0027uuid\u0027]"},{"line_number":228,"context_line":"            compute.obj_reset_changes([\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_1d31d9ec","line":225,"updated":"2016-02-09 16:17:55.000000000","message":"do we need to save this to the DB, in a compare and swap way, to make sure folks don\u0027t get lots of different uuids being used before we save?","commit_id":"33ebe7eede162a0e2ccdc0655112ca548847f4f9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"141c9b575e108ec94f086081fbdb7733ba3371bc","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        if not db_compute.get(\u0027uuid\u0027) and \u0027uuid\u0027 not in compute:"},{"line_number":223,"context_line":"            compute.uuid \u003d uuidutils.generate_uuid()"},{"line_number":224,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for compute node %(id)i\u0027,"},{"line_number":225,"context_line":"                      dict(uuid\u003dcompute.uuid, id\u003dcompute.id))"},{"line_number":226,"context_line":"        else:"},{"line_number":227,"context_line":"            compute.uuid \u003d db_compute[\u0027uuid\u0027]"},{"line_number":228,"context_line":"            compute.obj_reset_changes([\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a57f1b5_e4f25a6f","line":225,"updated":"2016-02-09 17:36:35.000000000","message":"I do wonder if there are some problems from not calling save here, but on balance, I can\u0027t think of any way this can actually break with our current usage.\n\noh, wait, does this break the new code...?","commit_id":"60c661aa773ab713a92374e95206b1f5ea387dd4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"141c9b575e108ec94f086081fbdb7733ba3371bc","unresolved":false,"context_lines":[{"line_number":323,"context_line":"        # generate and save this again. This will only ever happen once,"},{"line_number":324,"context_line":"        # and only for older compute nodes calling save()."},{"line_number":325,"context_line":"        if \u0027uuid\u0027 not in self:"},{"line_number":326,"context_line":"            self.uuid \u003d uuidutils.generate_uuid()"},{"line_number":327,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for compute node %(id)i\u0027,"},{"line_number":328,"context_line":"                      dict(uuid\u003dself.uuid, id\u003dself.id))"},{"line_number":329,"context_line":"            self.save()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a57f1b5_04aa161a","line":326,"updated":"2016-02-09 17:36:35.000000000","message":"hang on, but _from_db_object on line 223 not have already generated this uuid, and made the object dirty?\n\nMaybe we just check to see if we are still dirty after _from_db_object is called, and call save again? Although feels odd.","commit_id":"60c661aa773ab713a92374e95206b1f5ea387dd4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"6dc2c09bebda36a4b6d76259db2c05b4f3056583","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        compute._host_from_db_object(compute, db_compute)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"        # NOTE(danms): This needs to come after obj_reset_changes() to make"},{"line_number":219,"context_line":"        # sure it remains dirty for a later save"},{"line_number":220,"context_line":"        if not db_compute.get(\u0027uuid\u0027) and \u0027uuid\u0027 not in compute:"},{"line_number":221,"context_line":"            compute.uuid \u003d uuidutils.generate_uuid()"},{"line_number":222,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for compute node %(id)i\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a57f1b5_4d3fd125","line":219,"updated":"2016-02-09 18:20:19.000000000","message":"this seems out of date now? although maybe its correct?","commit_id":"8e719942ec822c6c8353222ca28ec12d1f38eacc"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"6dc2c09bebda36a4b6d76259db2c05b4f3056583","unresolved":false,"context_lines":[{"line_number":221,"context_line":"            compute.uuid \u003d uuidutils.generate_uuid()"},{"line_number":222,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for compute node %(id)i\u0027,"},{"line_number":223,"context_line":"                      dict(uuid\u003dcompute.uuid, id\u003dcompute.id))"},{"line_number":224,"context_line":"            compute.save()"},{"line_number":225,"context_line":"        else:"},{"line_number":226,"context_line":"            compute.uuid \u003d db_compute[\u0027uuid\u0027]"},{"line_number":227,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a57f1b5_cd2ae1e7","line":224,"updated":"2016-02-09 18:20:19.000000000","message":"You probably should reset the change before you do save here? Else we re-save all the stuff we just loaded?","commit_id":"8e719942ec822c6c8353222ca28ec12d1f38eacc"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"b9970982eb4a519d414b06d6ac72dfe291c6830d","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            compute.uuid \u003d uuidutils.generate_uuid()"},{"line_number":232,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for compute node %(id)i\u0027,"},{"line_number":233,"context_line":"                      dict(uuid\u003dcompute.uuid, id\u003dcompute.id))"},{"line_number":234,"context_line":"            compute.save()"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        return compute"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"dae33548_b0d81df1","line":234,"range":{"start_line":234,"start_character":20,"end_line":234,"end_character":24},"updated":"2016-02-15 16:02:16.000000000","message":"I guess this is OK to do this in order to be aggressive about migrations (every load will inevitably cause a save if the UUID is missing), but this does seem a bit contrived as this will end up being a recursive call to this method as save() inevitably calls it.","commit_id":"4c05740b858a532467d6e01d5f80f0a39d0b43b8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"aebca71ffa3075159e29d8ffcc7bc1aa0148b4d9","unresolved":false,"context_lines":[{"line_number":231,"context_line":"            compute.uuid \u003d uuidutils.generate_uuid()"},{"line_number":232,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for compute node %(id)i\u0027,"},{"line_number":233,"context_line":"                      dict(uuid\u003dcompute.uuid, id\u003dcompute.id))"},{"line_number":234,"context_line":"            compute.save()"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"        return compute"},{"line_number":237,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"dae33548_71f216d4","line":234,"range":{"start_line":234,"start_character":20,"end_line":234,"end_character":24},"in_reply_to":"dae33548_b0d81df1","updated":"2016-02-15 17:15:29.000000000","message":"This isn\u0027t what I had at first, and instead did what we did with flavors and only ever dirtied this and saved it during save. However, John had a good point that we could potentially generate twice, save once (or maybe even twice). It won\u0027t matter until we start caring about the uuid later, but he preferred it this way and I don\u0027t disagree.","commit_id":"4c05740b858a532467d6e01d5f80f0a39d0b43b8"}],"nova/tests/unit/objects/test_compute_node.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"436da31948cd1e748cedc4007f45fa0fd4b1b4f7","unresolved":false,"context_lines":[{"line_number":294,"context_line":"            mock_gu.return_value \u003d uuidsentinel.fake_compute_node"},{"line_number":295,"context_line":"            obj.save()"},{"line_number":296,"context_line":"            mock_gu.assert_called_once_with()"},{"line_number":297,"context_line":"            self.assertEqual(uuidsentinel.fake_compute_node, obj.uuid)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    @mock.patch.object(db, \u0027compute_node_create\u0027,"},{"line_number":300,"context_line":"                       return_value\u003dfake_compute_node)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_08bd4702","line":297,"updated":"2016-02-08 22:48:45.000000000","message":"Sorry I didn\u0027t notice this before but shouldn\u0027t we have a test that verifies a uuid gets allocated when one isn\u0027t specified for a create too?","commit_id":"6aa4990237ec2a73e874fc9704f5f824590ad668"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a7bf1935e0ee4cb715ee6a7981f51b3f28c0f69b","unresolved":false,"context_lines":[{"line_number":294,"context_line":"            mock_gu.return_value \u003d uuidsentinel.fake_compute_node"},{"line_number":295,"context_line":"            obj.save()"},{"line_number":296,"context_line":"            mock_gu.assert_called_once_with()"},{"line_number":297,"context_line":"            self.assertEqual(uuidsentinel.fake_compute_node, obj.uuid)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    @mock.patch.object(db, \u0027compute_node_create\u0027,"},{"line_number":300,"context_line":"                       return_value\u003dfake_compute_node)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_5c9af8c6","line":297,"in_reply_to":"5a5ae5dd_08bd4702","updated":"2016-02-09 15:22:03.000000000","message":"Yep, and Nikola\u0027s issue for dirtying uuid on fetch as well.","commit_id":"6aa4990237ec2a73e874fc9704f5f824590ad668"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"7222f6fe530e276e8e4d36ecde553bdb707eb39a","unresolved":false,"context_lines":[{"line_number":294,"context_line":"            mock_gu.return_value \u003d uuidsentinel.fake_compute_node"},{"line_number":295,"context_line":"            obj.save()"},{"line_number":296,"context_line":"            mock_gu.assert_called_once_with()"},{"line_number":297,"context_line":"            self.assertEqual(uuidsentinel.fake_compute_node, obj.uuid)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    @mock.patch.object(db, \u0027compute_node_create\u0027,"},{"line_number":300,"context_line":"                       return_value\u003dfake_compute_node)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_97728aac","line":297,"in_reply_to":"5a5ae5dd_5c9af8c6","updated":"2016-02-09 15:51:37.000000000","message":"+1","commit_id":"6aa4990237ec2a73e874fc9704f5f824590ad668"}]}
