)]}'
{"cinder/cmd/manage.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1a42c7da4f44bd3aad0efcf57cf8715af0779960","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    @args(\u0027--max_count\u0027, metavar\u003d\u0027\u003cnumber\u003e\u0027, dest\u003d\u0027max_count\u0027, type\u003dint,"},{"line_number":285,"context_line":"          help\u003d\u0027Maximum number of objects to consider.\u0027)"},{"line_number":286,"context_line":"    @args(\u0027--ignore_state\u0027, action\u003d\u0027store_true\u0027, dest\u003d\u0027ignore_state\u0027,"},{"line_number":287,"context_line":"          help\u003d\u0027Force records to migrate even if another operation is \u0027"},{"line_number":288,"context_line":"               \u0027performed on them. This may be dangerous, please refer to \u0027"},{"line_number":289,"context_line":"               \u0027release notes for more information.\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_409e9d63","side":"PARENT","line":286,"updated":"2017-10-07 01:15:07.000000000","message":"Seems like an unrelated change...but also totally unused since this CLI never did anything before so meh.","commit_id":"313f76ecfe23a30c297f0cdabf04467fed3e51c0"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"b8dffd6d395c82a7b2273dfab03439a710390614","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    @args(\u0027--max_count\u0027, metavar\u003d\u0027\u003cnumber\u003e\u0027, dest\u003d\u0027max_count\u0027, type\u003dint,"},{"line_number":285,"context_line":"          help\u003d\u0027Maximum number of objects to consider.\u0027)"},{"line_number":286,"context_line":"    @args(\u0027--ignore_state\u0027, action\u003d\u0027store_true\u0027, dest\u003d\u0027ignore_state\u0027,"},{"line_number":287,"context_line":"          help\u003d\u0027Force records to migrate even if another operation is \u0027"},{"line_number":288,"context_line":"               \u0027performed on them. This may be dangerous, please refer to \u0027"},{"line_number":289,"context_line":"               \u0027release notes for more information.\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_7925d3c1","side":"PARENT","line":286,"in_reply_to":"7f515b1d_409e9d63","updated":"2017-10-07 14:16:13.000000000","message":"Guilty as charged, but yes; my opinion was that this was added over a year ago at this point and yet to be used so I took the liberty to make it consistent with Nova and ditch the override here.","commit_id":"313f76ecfe23a30c297f0cdabf04467fed3e51c0"}],"cinder/db/sqlalchemy/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1a42c7da4f44bd3aad0efcf57cf8715af0779960","unresolved":false,"context_lines":[{"line_number":637,"context_line":""},{"line_number":638,"context_line":"###################"},{"line_number":639,"context_line":""},{"line_number":640,"context_line":""},{"line_number":641,"context_line":"def _cluster_query(context, is_up\u003dNone, get_services\u003dFalse,"},{"line_number":642,"context_line":"                   services_summary\u003dFalse, read_deleted\u003d\u0027no\u0027,"},{"line_number":643,"context_line":"                   name_match_level\u003dNone, name\u003dNone, session\u003dNone, **filters):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_6078792a","line":640,"updated":"2017-10-07 01:15:07.000000000","message":"unrelated whitespace disaster","commit_id":"5191bd5e67855185d3e08359baaa9d48779ba609"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"b8dffd6d395c82a7b2273dfab03439a710390614","unresolved":false,"context_lines":[{"line_number":637,"context_line":""},{"line_number":638,"context_line":"###################"},{"line_number":639,"context_line":""},{"line_number":640,"context_line":""},{"line_number":641,"context_line":"def _cluster_query(context, is_up\u003dNone, get_services\u003dFalse,"},{"line_number":642,"context_line":"                   services_summary\u003dFalse, read_deleted\u003d\u0027no\u0027,"},{"line_number":643,"context_line":"                   name_match_level\u003dNone, name\u003dNone, session\u003dNone, **filters):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_592217bb","line":640,"in_reply_to":"7f515b1d_6078792a","updated":"2017-10-07 14:16:13.000000000","message":"Done","commit_id":"5191bd5e67855185d3e08359baaa9d48779ba609"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9085465ab18e94bd4542fc6e596427dab1450b67","unresolved":false,"context_lines":[{"line_number":597,"context_line":""},{"line_number":598,"context_line":""},{"line_number":599,"context_line":"@enginefacade.writer"},{"line_number":600,"context_line":"def service_uuids_online_data_migration(context, max_count):"},{"line_number":601,"context_line":"    from cinder.objects import service"},{"line_number":602,"context_line":""},{"line_number":603,"context_line":"    total \u003d 0"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f4b6375_7a614105","line":600,"updated":"2017-10-23 20:09:07.000000000","message":"You don\u0027t have a test for this anywhere.","commit_id":"e88d3b2c8205a4865d64419623de10d9159eeea2"}],"cinder/db/sqlalchemy/migrate_repo/versions/112_add_uuid_to_services_table.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1a42c7da4f44bd3aad0efcf57cf8715af0779960","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        services \u003d Table(\u0027services\u0027, meta, autoload\u003dTrue)"},{"line_number":35,"context_line":"        Index(uuid_index_name, services.c.uuid, unique\u003dTrue).create()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    service_list \u003d list(services.select().execute())"},{"line_number":38,"context_line":"    for s in service_list:"},{"line_number":39,"context_line":"        if not s.uuid:"},{"line_number":40,"context_line":"            services.update().where(services.c.id \u003d\u003d s.id).\\"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_4077bd3b","side":"PARENT","line":37,"updated":"2017-10-07 01:15:07.000000000","message":"Normally it\u0027s a no-no to change a data migration after the fact because someone could have already deployed this, however, even if they did, they\u0027ve taken the offline data migration pain and the stuff in the object code is now a no-op for them, so it\u0027s more or less OK(ish).","commit_id":"313f76ecfe23a30c297f0cdabf04467fed3e51c0"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"b8dffd6d395c82a7b2273dfab03439a710390614","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        services \u003d Table(\u0027services\u0027, meta, autoload\u003dTrue)"},{"line_number":35,"context_line":"        Index(uuid_index_name, services.c.uuid, unique\u003dTrue).create()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    service_list \u003d list(services.select().execute())"},{"line_number":38,"context_line":"    for s in service_list:"},{"line_number":39,"context_line":"        if not s.uuid:"},{"line_number":40,"context_line":"            services.update().where(services.c.id \u003d\u003d s.id).\\"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_99152f4c","side":"PARENT","line":37,"in_reply_to":"7f515b1d_4077bd3b","updated":"2017-10-07 14:16:13.000000000","message":"Understood, and this was raised by Sean but I countered that the first version was in tree for only a few days and that even if that one person that runs Cinder in a CD model pulled this already they we\u0027re going to be *harmed* by it\u0027s effects.  Now, changing the column to Nullable\u003dFalse changes that argument slightly but I still think we\u0027re probably \"ok\".","commit_id":"313f76ecfe23a30c297f0cdabf04467fed3e51c0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f63de42f1ee2fc68f6c0284651eba5701a346945","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        services \u003d Table(\u0027services\u0027, meta, autoload\u003dTrue)"},{"line_number":35,"context_line":"        Index(uuid_index_name, services.c.uuid, unique\u003dTrue).create()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    service_list \u003d list(services.select().execute())"},{"line_number":38,"context_line":"    for s in service_list:"},{"line_number":39,"context_line":"        if not s.uuid:"},{"line_number":40,"context_line":"            services.update().where(services.c.id \u003d\u003d s.id).\\"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_dad13cfd","side":"PARENT","line":37,"in_reply_to":"7f515b1d_99152f4c","updated":"2017-10-09 12:40:19.000000000","message":"To be clear, nullable\u003dTrue on the DB column is what you want, but nullable\u003dTrue is not what you want on the object, since the object should always have a uuid, either set at creation time or when read from the DB and you set it.","commit_id":"313f76ecfe23a30c297f0cdabf04467fed3e51c0"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"e36ace9f964d827b286c97470d99bbc130531d3c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        services \u003d Table(\u0027services\u0027, meta, autoload\u003dTrue)"},{"line_number":35,"context_line":"        Index(uuid_index_name, services.c.uuid, unique\u003dTrue).create()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    service_list \u003d list(services.select().execute())"},{"line_number":38,"context_line":"    for s in service_list:"},{"line_number":39,"context_line":"        if not s.uuid:"},{"line_number":40,"context_line":"            services.update().where(services.c.id \u003d\u003d s.id).\\"},{"line_number":41,"context_line":"                values(uuid\u003dsix.text_type(uuid.uuid4())).execute()"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_8fd7f94b","side":"PARENT","line":41,"range":{"start_line":37,"start_character":2,"end_line":41,"end_character":66},"updated":"2017-10-09 17:13:59.000000000","message":"Is it ok to do this to a migration given that it isn\u0027t something that was released?  Generally we say no to touching migrations at all.","commit_id":"313f76ecfe23a30c297f0cdabf04467fed3e51c0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9d9236be8faf964c73a69d9751b046cbe064f1dd","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        services \u003d Table(\u0027services\u0027, meta, autoload\u003dTrue)"},{"line_number":35,"context_line":"        Index(uuid_index_name, services.c.uuid, unique\u003dTrue).create()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    service_list \u003d list(services.select().execute())"},{"line_number":38,"context_line":"    for s in service_list:"},{"line_number":39,"context_line":"        if not s.uuid:"},{"line_number":40,"context_line":"            services.update().where(services.c.id \u003d\u003d s.id).\\"},{"line_number":41,"context_line":"                values(uuid\u003dsix.text_type(uuid.uuid4())).execute()"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_a9ec158f","side":"PARENT","line":41,"range":{"start_line":37,"start_character":2,"end_line":41,"end_character":66},"in_reply_to":"7f515b1d_8fd7f94b","updated":"2017-10-13 15:10:05.000000000","message":"\u003e Is it ok to do this to a migration given that it isn\u0027t something\n \u003e that was released?  Generally we say no to touching migrations at\n \u003e all.\n\nhttps://review.openstack.org/#/c/510201/1/cinder/db/sqlalchemy/migrate_repo/versions/112_add_uuid_to_services_table.py@a37","commit_id":"313f76ecfe23a30c297f0cdabf04467fed3e51c0"}],"cinder/objects/service.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1a42c7da4f44bd3aad0efcf57cf8715af0779960","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        \u0027frozen\u0027: fields.BooleanField(default\u003dFalse),"},{"line_number":67,"context_line":"        \u0027active_backend_id\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        \u0027uuid\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":70,"context_line":"    }"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def obj_make_compatible(self, primitive, target_version):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_008f8523","line":69,"range":{"start_line":69,"start_character":35,"end_line":69,"end_character":48},"updated":"2017-10-07 01:15:07.000000000","message":"This shouldn\u0027t be nullable\u003dTrue probably, you\u0027d always want this to be set.","commit_id":"5191bd5e67855185d3e08359baaa9d48779ba609"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"b8dffd6d395c82a7b2273dfab03439a710390614","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        \u0027frozen\u0027: fields.BooleanField(default\u003dFalse),"},{"line_number":67,"context_line":"        \u0027active_backend_id\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        \u0027uuid\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":70,"context_line":"    }"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def obj_make_compatible(self, primitive, target_version):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_b937cbfe","line":69,"range":{"start_line":69,"start_character":35,"end_line":69,"end_character":48},"in_reply_to":"7f515b1d_008f8523","updated":"2017-10-07 14:16:13.000000000","message":"Done","commit_id":"5191bd5e67855185d3e08359baaa9d48779ba609"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1a42c7da4f44bd3aad0efcf57cf8715af0779960","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        service.obj_reset_changes()"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        # TODO(jdg): Remove in S when we\u0027re sure all Services have UUID in db"},{"line_number":113,"context_line":"        if \u0027uuid\u0027 not in service:"},{"line_number":114,"context_line":"            service.uuid \u003d uuidutils.generate_uuid()"},{"line_number":115,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for service %(id)i\u0027,"},{"line_number":116,"context_line":"                      dict(uuid\u003dservice.uuid, id\u003dservice.id))"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_c0984d6b","line":113,"range":{"start_line":113,"start_character":8,"end_line":113,"end_character":33},"updated":"2017-10-07 01:15:07.000000000","message":"Because of your nullable\u003dTrue, some code could set service_obj.nullable\u003dTrue and this condition would be False, and you wouldn\u0027t end up setting a generated uuid value on it, which would be bad. So either don\u0027t add nullable\u003dFalse, or check for None here too.","commit_id":"5191bd5e67855185d3e08359baaa9d48779ba609"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"b8dffd6d395c82a7b2273dfab03439a710390614","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        service.obj_reset_changes()"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        # TODO(jdg): Remove in S when we\u0027re sure all Services have UUID in db"},{"line_number":113,"context_line":"        if \u0027uuid\u0027 not in service:"},{"line_number":114,"context_line":"            service.uuid \u003d uuidutils.generate_uuid()"},{"line_number":115,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for service %(id)i\u0027,"},{"line_number":116,"context_line":"                      dict(uuid\u003dservice.uuid, id\u003dservice.id))"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_d9360704","line":113,"range":{"start_line":113,"start_character":8,"end_line":113,"end_character":33},"in_reply_to":"7f515b1d_c0984d6b","updated":"2017-10-07 14:16:13.000000000","message":"Done","commit_id":"5191bd5e67855185d3e08359baaa9d48779ba609"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1a42c7da4f44bd3aad0efcf57cf8715af0779960","unresolved":false,"context_lines":[{"line_number":149,"context_line":"        db_service \u003d db.service_get(context, host\u003dhost, binary\u003dbinary_key)"},{"line_number":150,"context_line":"        return cls._from_db_object(context, cls(context), db_service)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    @classmethod"},{"line_number":153,"context_line":"    def get_by_uuid(cls, context, service_uuid):"},{"line_number":154,"context_line":"        db_service \u003d db.service_get_by_uuid(context, service_uuid)"},{"line_number":155,"context_line":"        return cls._from_db_object(context, cls(), db_service)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_80a25599","line":152,"range":{"start_line":152,"start_character":5,"end_line":152,"end_character":16},"updated":"2017-10-07 01:15:07.000000000","message":"Hmm, you guys don\u0027t have remotable classmethods? Clearly not from everything else in here, so OK.","commit_id":"5191bd5e67855185d3e08359baaa9d48779ba609"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1a42c7da4f44bd3aad0efcf57cf8715af0779960","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        if \u0027cluster\u0027 in updates:"},{"line_number":163,"context_line":"            raise exception.ObjectActionError("},{"line_number":164,"context_line":"                action\u003d\u0027create\u0027, reason\u003d_(\u0027cluster assigned\u0027))"},{"line_number":165,"context_line":"        if \u0027uuid\u0027 not in updates:"},{"line_number":166,"context_line":"            updates[\u0027uuid\u0027] \u003d uuidutils.generate_uuid()"},{"line_number":167,"context_line":"            self.uuid \u003d updates[\u0027uuid\u0027]"},{"line_number":168,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_e0ba29be","line":165,"range":{"start_line":165,"start_character":8,"end_line":165,"end_character":33},"updated":"2017-10-07 01:15:07.000000000","message":"same as above for save - you could have uuid being None here and not catch it here.","commit_id":"5191bd5e67855185d3e08359baaa9d48779ba609"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c8e90cce1460c91f929c744d536498edd0189d9a","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                value \u003d value or 0"},{"line_number":94,"context_line":"            elif isinstance(field, fields.DateTimeField):"},{"line_number":95,"context_line":"                value \u003d value or None"},{"line_number":96,"context_line":"            service[name] \u003d value"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        service._context \u003d context"},{"line_number":99,"context_line":"        if \u0027cluster\u0027 in expected_attrs:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_9af06169","line":96,"range":{"start_line":96,"start_character":12,"end_line":96,"end_character":33},"updated":"2017-10-09 14:03:59.000000000","message":"You\u0027re blowing up here, because uuid is not nullable but the default in the db is nullable\u003dTrue.\n\nSo you need to ignore \u0027uuid\u0027 here if the value is None and handle it special below.","commit_id":"302970ab5a2155c7897a1193389e0bc89bd61f19"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"09aec3d938eff1bca31d32e246655a92356e98db","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            service.uuid \u003d uuidutils.generate_uuid()"},{"line_number":118,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for service %(id)i\u0027,"},{"line_number":119,"context_line":"                      dict(uuid\u003dservice.uuid, id\u003dservice.id))"},{"line_number":120,"context_line":"            service.save()"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        return service"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f4e5783_8c16f4f0","line":120,"range":{"start_line":120,"start_character":0,"end_line":120,"end_character":26},"updated":"2017-10-14 18:29:05.000000000","message":"This save call leads to a db.services_get call; we have that call mocked in a large number of tests and we\u0027ll need to adjust each of those mocks to also return the UUID field now.  In addition, there are quite a few places where this will introduce a \"new\" services_get call to the db indirectly via manager.py calls and objects; so those would also need mocks/fakes added to them as well.\n\nAnother option I\u0027ve been considering is mocking the save method here in tests, but that of course breaks all of the tests that are explicitly testing the save method.","commit_id":"cb4be930485daf644a17e113470208f545a89e28"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"6a2a0b1d3bdbb3d4182769ad1921bf7cd5f6245e","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            service.uuid \u003d uuidutils.generate_uuid()"},{"line_number":118,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for service %(id)i\u0027,"},{"line_number":119,"context_line":"                      dict(uuid\u003dservice.uuid, id\u003dservice.id))"},{"line_number":120,"context_line":"            service.save()"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        return service"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f4e5783_22fee96a","line":120,"range":{"start_line":120,"start_character":0,"end_line":120,"end_character":26},"in_reply_to":"5f4e5783_8c16f4f0","updated":"2017-10-15 00:39:59.000000000","message":"Sadness... :(\n\nI guess it might be more consistent to fix up the mocks rather than doing sort of both? But well, I will not blame you to move to the direction of less resistance, which ever that might be... :)","commit_id":"cb4be930485daf644a17e113470208f545a89e28"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"420df2cea450e162c538711c00be64e2b4d2c449","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        \u0027frozen\u0027: fields.BooleanField(default\u003dFalse),"},{"line_number":67,"context_line":"        \u0027active_backend_id\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        \u0027uuid\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":70,"context_line":"    }"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def obj_make_compatible(self, primitive, target_version):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f4b6375_1a8dadd2","line":69,"range":{"start_line":69,"start_character":35,"end_line":69,"end_character":48},"updated":"2017-10-23 20:07:17.000000000","message":"I thought you were going to get rid of this? uuid shouldn\u0027t be nullable.","commit_id":"e88d3b2c8205a4865d64419623de10d9159eeea2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6ef25cdce4c61469d768d7f23b78ac53c8209065","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        \u0027frozen\u0027: fields.BooleanField(default\u003dFalse),"},{"line_number":67,"context_line":"        \u0027active_backend_id\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        \u0027uuid\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":70,"context_line":"    }"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def obj_make_compatible(self, primitive, target_version):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f4b6375_fdd3eb5e","line":69,"range":{"start_line":69,"start_character":35,"end_line":69,"end_character":48},"in_reply_to":"3f4b6375_1a8dadd2","updated":"2017-10-23 20:27:40.000000000","message":"Yeah, it should be nullable on the SQLA model and not here ideally.","commit_id":"e88d3b2c8205a4865d64419623de10d9159eeea2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"99e862682b9c06cc6bfbfd6791ccfe50388f2994","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                value \u003d value or 0"},{"line_number":94,"context_line":"            elif isinstance(field, fields.DateTimeField):"},{"line_number":95,"context_line":"                value \u003d value or None"},{"line_number":96,"context_line":"            service[name] \u003d value"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        service._context \u003d context"},{"line_number":99,"context_line":"        if \u0027cluster\u0027 in expected_attrs:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f4b6375_9d72b7ac","line":96,"range":{"start_line":96,"start_character":12,"end_line":96,"end_character":33},"updated":"2017-10-23 20:17:04.000000000","message":"Because uuid is nullable, and defaults to None in the database, means this will set service[\u0027uuid\u0027] \u003d None for existing records, and then the check on L113 below will be False and a uuid won\u0027t be set on the service record, so they never get migrated.","commit_id":"e88d3b2c8205a4865d64419623de10d9159eeea2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"420df2cea450e162c538711c00be64e2b4d2c449","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        service.obj_reset_changes()"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        # TODO(jdg): Remove in S when we\u0027re sure all Services have UUID in db"},{"line_number":113,"context_line":"        if \u0027uuid\u0027 not in service:"},{"line_number":114,"context_line":"            service.uuid \u003d uuidutils.generate_uuid()"},{"line_number":115,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for service %(id)i\u0027,"},{"line_number":116,"context_line":"                      dict(uuid\u003dservice.uuid, id\u003dservice.id))"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f4b6375_bab57980","line":113,"updated":"2017-10-23 20:07:17.000000000","message":"Because service.uuid is nullable\u003dTrue, this would fail if service.uuid \u003d None.","commit_id":"e88d3b2c8205a4865d64419623de10d9159eeea2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6ef25cdce4c61469d768d7f23b78ac53c8209065","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        service.obj_reset_changes()"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        # TODO(jdg): Remove in S when we\u0027re sure all Services have UUID in db"},{"line_number":113,"context_line":"        if \u0027uuid\u0027 not in service:"},{"line_number":114,"context_line":"            service.uuid \u003d uuidutils.generate_uuid()"},{"line_number":115,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for service %(id)i\u0027,"},{"line_number":116,"context_line":"                      dict(uuid\u003dservice.uuid, id\u003dservice.id))"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f4b6375_9dce37b2","line":113,"in_reply_to":"3f4b6375_bab57980","updated":"2017-10-23 20:27:40.000000000","message":"Yeah, this\u0027ll never get run.","commit_id":"e88d3b2c8205a4865d64419623de10d9159eeea2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6ef25cdce4c61469d768d7f23b78ac53c8209065","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            service.uuid \u003d uuidutils.generate_uuid()"},{"line_number":115,"context_line":"            LOG.debug(\u0027Generated UUID %(uuid)s for service %(id)i\u0027,"},{"line_number":116,"context_line":"                      dict(uuid\u003dservice.uuid, id\u003dservice.id))"},{"line_number":117,"context_line":"            service.save()"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        return service"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3f4b6375_3dbd0302","line":117,"updated":"2017-10-23 20:27:40.000000000","message":"Need to handle the conflict here in case two things load and save this object at the same time. Avoid failing and grab the winning uuid so you don\u0027t tell your caller it\u0027s something it isn\u0027t.","commit_id":"e88d3b2c8205a4865d64419623de10d9159eeea2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"420df2cea450e162c538711c00be64e2b4d2c449","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        if \u0027cluster\u0027 in updates:"},{"line_number":163,"context_line":"            raise exception.ObjectActionError("},{"line_number":164,"context_line":"                action\u003d\u0027create\u0027, reason\u003d_(\u0027cluster assigned\u0027))"},{"line_number":165,"context_line":"        if \u0027uuid\u0027 not in updates:"},{"line_number":166,"context_line":"            updates[\u0027uuid\u0027] \u003d uuidutils.generate_uuid()"},{"line_number":167,"context_line":"            self.uuid \u003d updates[\u0027uuid\u0027]"},{"line_number":168,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3f4b6375_7ab38199","line":165,"updated":"2017-10-23 20:07:17.000000000","message":"Because service.uuid is nullable\u003dTrue, this would fail if service.uuid \u003d None.","commit_id":"e88d3b2c8205a4865d64419623de10d9159eeea2"}],"cinder/tests/unit/objects/test_service.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6789e147257cccfa4f053f37378fdb6740a0e67e","unresolved":false,"context_lines":[{"line_number":68,"context_line":"    @mock.patch(\u0027cinder.db.service_update\u0027)"},{"line_number":69,"context_line":"    def test_save(self, service_update):"},{"line_number":70,"context_line":"        db_service \u003d fake_service.fake_db_service()"},{"line_number":71,"context_line":"        service \u003d objects.Service._from_db_object("},{"line_number":72,"context_line":"            self.context, objects.Service(), db_service)"},{"line_number":73,"context_line":"        service.topic \u003d \u0027foobar\u0027"},{"line_number":74,"context_line":"        service.save()"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f4b6375_ba38d9ed","line":71,"updated":"2017-10-23 20:10:31.000000000","message":"Assert that service.uuid is set?","commit_id":"e88d3b2c8205a4865d64419623de10d9159eeea2"}]}
