)]}'
{"nova/db/api.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"97aab8408c18d11595a5d8dd5c865b0fcac848f7","unresolved":false,"context_lines":[{"line_number":1942,"context_line":"    return IMPL.archive_deleted_rows(max_rows\u003dmax_rows)"},{"line_number":1943,"context_line":""},{"line_number":1944,"context_line":""},{"line_number":1945,"context_line":"def OnlineDataMigration(obj_cls, db_model, **filter_kwargs):"},{"line_number":1946,"context_line":"    return IMPL.OnlineDataMigration(obj_cls, db_model, **filter_kwargs)"},{"line_number":1947,"context_line":""},{"line_number":1948,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a57f1b5_d1eedaeb","line":1945,"updated":"2016-02-10 09:45:59.000000000","message":"Nit: online_data_migration?\n\noh wait, maybe get_online_data_migration_facade?","commit_id":"05d5cf4f9c7944f0458597d2ce558b5c5331fca7"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"97aab8408c18d11595a5d8dd5c865b0fcac848f7","unresolved":false,"context_lines":[{"line_number":6171,"context_line":"                      cls\u003dself.obj_cls.__name__)"},{"line_number":6172,"context_line":"        else:"},{"line_number":6173,"context_line":"            results \u003d self._run_query(max_count)"},{"line_number":6174,"context_line":"            self.process_query_results(results)"},{"line_number":6175,"context_line":""},{"line_number":6176,"context_line":"            for db_dict in results:"},{"line_number":6177,"context_line":"                count_all +\u003d 1"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a57f1b5_3183aece","line":6174,"updated":"2016-02-10 09:45:59.000000000","message":"honestly, I think we should do something more like:\n\nobj_cls.process_data_migrations(max_count)\n\nand we get back the count of migrations. i.e. if should_migrate \u003d true and count \u003d 0, we are done.\n\ntempting to return -1 for unable to migrate, but that seems a bit of an abuse.","commit_id":"05d5cf4f9c7944f0458597d2ce558b5c5331fca7"}],"nova/objects/base.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b15ba39170d954829e543cd9ee3e9acb4c38eccd","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    is happy to hit at a time)."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    This class expects that loading a db dict into an object will do all the"},{"line_number":76,"context_line":"    necessary data migration, and dirty the fields that need to be saved. It"},{"line_number":77,"context_line":"    also expects that it can do a DB query using a db method that is defined"},{"line_number":78,"context_line":"    for each object (as these may differ in the way they fetch and join data"},{"line_number":79,"context_line":"    and cannot be efficiently abstracted)."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    For object FooBar, this code expects that the nova DB API exposes"},{"line_number":82,"context_line":"    foobar_online_data_migration_get()"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_978fc522","line":79,"range":{"start_line":76,"start_character":74,"end_line":79,"end_character":42},"updated":"2016-02-15 20:36:04.000000000","message":"Did you mean to finish this with \"... to detect if any data needs migrating\" ?","commit_id":"94bca36e3d630ec18627995e6ce8ac0dbeb6b542"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b15ba39170d954829e543cd9ee3e9acb4c38eccd","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        try:"},{"line_number":100,"context_line":"            db_method \u003d getattr(db, db_method_name)"},{"line_number":101,"context_line":"        except AttributeError:"},{"line_number":102,"context_line":"            LOG.error(_LW(\"Online migratio db method %(meth)s is not defined\"),"},{"line_number":103,"context_line":"                      meth\u003ddb_method_name)"},{"line_number":104,"context_line":"            return None"},{"line_number":105,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_b71489f5","line":102,"range":{"start_line":102,"start_character":34,"end_line":102,"end_character":42},"updated":"2016-02-15 20:36:04.000000000","message":"\"migration\"","commit_id":"94bca36e3d630ec18627995e6ce8ac0dbeb6b542"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b15ba39170d954829e543cd9ee3e9acb4c38eccd","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        except NotImplementedError:"},{"line_number":121,"context_line":"            LOG.warn(_LW(\"There seem to be no online data migrations defined \""},{"line_number":122,"context_line":"                         \"for %(cls)s\"), cls\u003dself.obj_cls.__name__)"},{"line_number":123,"context_line":"            return count_all, count_hit"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        if not should_migrate:"},{"line_number":126,"context_line":"            LOG.error(_LE(\"Data migrations for %(cls)s are not safe, likely \""}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_770a01d4","line":123,"updated":"2016-02-15 20:36:04.000000000","message":"My gut feeling is that this is overly simplistic in that it assumes migrations will always be related to one object, or have a primary object.\n\nThe instance flavor one was primarily centered around Instance I guess, but it involved Flavor.\n\nThe upcoming ones are going to involve ComputeNode, ResourceProvider, Allocation, Inventory, and Instance -- somewhat all at once. I suppose that they could be considered to be two parts, centered around Instance and ComputeNode, but.. There are also ordering concerns that would be hard to express this way I think. Like, an Instance can\u0027t be converted to use an Allocation until its ComputeNode has converted itself to a resource provider. Maybe you could model that in Instance.should_migrate(), but I dunno.\n\nIt also feels weird to center this around objects (and even if we do. I don\u0027t like having this in base.py, FWIW). I know that all the current and former such transitions have been handled inside the object because that\u0027s our facade, but it just seems really weird to key it off of \"does this object have a should_migrate.\"","commit_id":"94bca36e3d630ec18627995e6ce8ac0dbeb6b542"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b15ba39170d954829e543cd9ee3e9acb4c38eccd","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"                for db_dict in results:"},{"line_number":136,"context_line":"                    count_all +\u003d 1"},{"line_number":137,"context_line":"                    obj \u003d self.obj_cls._from_db_object(self.context,"},{"line_number":138,"context_line":"                                                    self.obj_cls(),"},{"line_number":139,"context_line":"                                                    db_dict)"},{"line_number":140,"context_line":"                    self.process_each_object(obj)"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_37d99922","line":137,"range":{"start_line":137,"start_character":38,"end_line":137,"end_character":54},"updated":"2016-02-15 20:36:04.000000000","message":"I know it\u0027s a little late for this, but not all our objects implement this method and I don\u0027t really think they\u0027re all exactly the same. For example, you have to pass certain expected_attrs to the one for Instance in order to get it to do some things.\n\nThis was *supposed* to be private and somewhat transitional, although like I say, we do this everywhere. I hate that we do, but maybe I should just not worry about it, I dunno.","commit_id":"94bca36e3d630ec18627995e6ce8ac0dbeb6b542"}]}
