)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"94917f2d1a705c8362b64f3c47ad5ee80ee81905","unresolved":false,"context_lines":[{"line_number":14,"context_line":"Note that this has what looks like a scary schema change in it. When the"},{"line_number":15,"context_line":"column was added, it was specified as default\u003dFalse and this changes that"},{"line_number":16,"context_line":"value. This is not actually a schema change, but rather just changes what"},{"line_number":17,"context_line":"we are asking SQLAlchmey to do for us when we do an INSERT of that object"},{"line_number":18,"context_line":"if/when a value for that field is not specified. If we had used the"},{"line_number":19,"context_line":"\u0027server_default\u0027 flag, that would have been encoded into the schema and"},{"line_number":20,"context_line":"thus would require a migration to change. This patch removes it because"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5f7c97a3_00981574","line":17,"range":{"start_line":17,"start_character":14,"end_line":17,"end_character":24},"updated":"2018-07-23 18:58:45.000000000","message":"SQLAlchemy","commit_id":"22daac5f509785077ed102d888667fe85b7dd26f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"94917f2d1a705c8362b64f3c47ad5ee80ee81905","unresolved":false,"context_lines":[{"line_number":18,"context_line":"if/when a value for that field is not specified. If we had used the"},{"line_number":19,"context_line":"\u0027server_default\u0027 flag, that would have been encoded into the schema and"},{"line_number":20,"context_line":"thus would require a migration to change. This patch removes it because"},{"line_number":21,"context_line":"we need to actually be able to see those NULL values in the database in"},{"line_number":22,"context_line":"order to efficiently use them to query for records needing to be migrated."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Related to blueprint handling-down-cell"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5f7c97a3_4077ed3d","line":21,"range":{"start_line":21,"start_character":31,"end_line":21,"end_character":34},"updated":"2018-07-23 18:58:45.000000000","message":"see or set?","commit_id":"22daac5f509785077ed102d888667fe85b7dd26f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2830711024a51d7e087fd099f793123fda744bea","unresolved":false,"context_lines":[{"line_number":18,"context_line":"if/when a value for that field is not specified. If we had used the"},{"line_number":19,"context_line":"\u0027server_default\u0027 flag, that would have been encoded into the schema and"},{"line_number":20,"context_line":"thus would require a migration to change. This patch removes it because"},{"line_number":21,"context_line":"we need to actually be able to see those NULL values in the database in"},{"line_number":22,"context_line":"order to efficiently use them to query for records needing to be migrated."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Related to blueprint handling-down-cell"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5f7c97a3_d9b0d7df","line":21,"range":{"start_line":21,"start_character":31,"end_line":21,"end_character":34},"in_reply_to":"5f7c97a3_4077ed3d","updated":"2018-07-23 21:42:41.000000000","message":"See.","commit_id":"22daac5f509785077ed102d888667fe85b7dd26f"}],"nova/db/sqlalchemy/api_models.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d01f903be9c89a3fe08c20450c038de8c1fc1394","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    cell_id \u003d Column(Integer, ForeignKey(\u0027cell_mappings.id\u0027),"},{"line_number":142,"context_line":"            nullable\u003dTrue)"},{"line_number":143,"context_line":"    project_id \u003d Column(String(255), nullable\u003dFalse)"},{"line_number":144,"context_line":"    queued_for_delete \u003d Column(Boolean, default\u003dFalse)"},{"line_number":145,"context_line":"    cell_mapping \u003d orm.relationship(\u0027CellMapping\u0027,"},{"line_number":146,"context_line":"            backref\u003dbackref(\u0027instance_mapping\u0027, uselist\u003dFalse),"},{"line_number":147,"context_line":"            foreign_keys\u003dcell_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_191d1976","side":"PARENT","line":144,"updated":"2018-07-20 19:59:10.000000000","message":"We can still leave this can\u0027t we?","commit_id":"06aa82467f32ecb26f13d8a08e3f80e0fcb5c252"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4c70c4e27cdee0a8f62135150fed46ab45f9205f","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    cell_id \u003d Column(Integer, ForeignKey(\u0027cell_mappings.id\u0027),"},{"line_number":142,"context_line":"            nullable\u003dTrue)"},{"line_number":143,"context_line":"    project_id \u003d Column(String(255), nullable\u003dFalse)"},{"line_number":144,"context_line":"    queued_for_delete \u003d Column(Boolean, default\u003dFalse)"},{"line_number":145,"context_line":"    cell_mapping \u003d orm.relationship(\u0027CellMapping\u0027,"},{"line_number":146,"context_line":"            backref\u003dbackref(\u0027instance_mapping\u0027, uselist\u003dFalse),"},{"line_number":147,"context_line":"            foreign_keys\u003dcell_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_b443cc3f","side":"PARENT","line":144,"in_reply_to":"5f7c97a3_191d1976","updated":"2018-07-20 20:01:10.000000000","message":"No, because SQLA won\u0027t let us insert or query for NULL unless we remove it. I may be able to skirt it by using the non-ORM interface to insert/fetch things if you want.","commit_id":"06aa82467f32ecb26f13d8a08e3f80e0fcb5c252"}],"nova/objects/instance_mapping.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d01f903be9c89a3fe08c20450c038de8c1fc1394","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    cells \u003d objects.CellMappingList.get_all(context)"},{"line_number":150,"context_line":"    processed \u003d 0"},{"line_number":151,"context_line":"    for cell in cells:"},{"line_number":152,"context_line":"        ims \u003d ("},{"line_number":153,"context_line":"            context.session.query(api_models.InstanceMapping)"},{"line_number":154,"context_line":"            .options(joinedload(\u0027cell_mapping\u0027))"},{"line_number":155,"context_line":"            .filter("}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_19067922","line":152,"updated":"2018-07-20 19:59:10.000000000","message":"code comments please","commit_id":"f747e8c1abdaa0fb5541ae7a0502f3fdef68eae7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d01f903be9c89a3fe08c20450c038de8c1fc1394","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        with nova_context.target_cell(context, cell) as cctxt:"},{"line_number":161,"context_line":"            filters \u003d {\u0027uuid\u0027: ims_by_inst.keys(),"},{"line_number":162,"context_line":"                       \u0027deleted\u0027: True,"},{"line_number":163,"context_line":"                       \u0027soft_deleted\u0027: True}"},{"line_number":164,"context_line":"            instances \u003d objects.InstanceList.get_by_filters("},{"line_number":165,"context_line":"                cctxt, filters, expected_attrs\u003d[])"},{"line_number":166,"context_line":"        for instance in instances:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_742534ad","line":163,"range":{"start_line":163,"start_character":23,"end_line":163,"end_character":44},"updated":"2018-07-20 19:59:10.000000000","message":"You need a wrinkle for this.","commit_id":"f747e8c1abdaa0fb5541ae7a0502f3fdef68eae7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d01f903be9c89a3fe08c20450c038de8c1fc1394","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            im.queued_for_delete \u003d True"},{"line_number":169,"context_line":"            context.session.add(im)"},{"line_number":170,"context_line":"            processed +\u003d 1"},{"line_number":171,"context_line":"        for non_deleted_im in ims_by_inst.values():"},{"line_number":172,"context_line":"            non_deleted_im.queued_for_delete \u003d False"},{"line_number":173,"context_line":"            context.session.add(non_deleted_im)"},{"line_number":174,"context_line":"            processed +\u003d 1"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_94ffb0fe","line":171,"updated":"2018-07-20 19:59:10.000000000","message":"OK so this is the remainder which if it wasn\u0027t processed above wasn\u0027t a (soft_)deleted instance, so we can say it\u0027s not queued for delete and change the column value from NULL to False.","commit_id":"f747e8c1abdaa0fb5541ae7a0502f3fdef68eae7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4c70c4e27cdee0a8f62135150fed46ab45f9205f","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            im.queued_for_delete \u003d True"},{"line_number":169,"context_line":"            context.session.add(im)"},{"line_number":170,"context_line":"            processed +\u003d 1"},{"line_number":171,"context_line":"        for non_deleted_im in ims_by_inst.values():"},{"line_number":172,"context_line":"            non_deleted_im.queued_for_delete \u003d False"},{"line_number":173,"context_line":"            context.session.add(non_deleted_im)"},{"line_number":174,"context_line":"            processed +\u003d 1"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_d43e88b4","line":171,"in_reply_to":"5f7c97a3_94ffb0fe","updated":"2018-07-20 20:01:10.000000000","message":"Yeah.","commit_id":"f747e8c1abdaa0fb5541ae7a0502f3fdef68eae7"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"f48cf7c7b378cc8b49ca7899e420c4f01b73a815","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":"@db_api.api_context_manager.writer"},{"line_number":148,"context_line":"def populate_queued_for_delete(context, max_count):"},{"line_number":149,"context_line":"    cells \u003d objects.CellMappingList.get_all(context)"},{"line_number":150,"context_line":"    processed \u003d 0"},{"line_number":151,"context_line":"    for cell in cells:"},{"line_number":152,"context_line":"        ims \u003d ("}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_949570e5","line":149,"updated":"2018-07-20 20:51:55.000000000","message":"note to self: running it once will be - \n\n* take 50 im\u0027s from the first cell whose qfd is not set.\n* then go into the first cell and query for all the (deleted or soft-deleted instances) such that their uuid\u0027s are in those 50 im uuids which are sent through the filter; \n* set those instances\u0027s im.qfd to true;\n* rest of the im.qfd out of the set of 50 are set to false.","commit_id":"f00687685859bf93d417ffd8d909ca5d9bdadb3f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"f48cf7c7b378cc8b49ca7899e420c4f01b73a815","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    cells \u003d objects.CellMappingList.get_all(context)"},{"line_number":150,"context_line":"    processed \u003d 0"},{"line_number":151,"context_line":"    for cell in cells:"},{"line_number":152,"context_line":"        ims \u003d ("},{"line_number":153,"context_line":"            context.session.query(api_models.InstanceMapping)"},{"line_number":154,"context_line":"            .options(joinedload(\u0027cell_mapping\u0027))"},{"line_number":155,"context_line":"            .filter("}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_34557c52","line":152,"updated":"2018-07-20 20:51:55.000000000","message":"if we are basing this off instance_mappings, what about the case where map_instances is not run ? would give us 0 instance_mappings.. meaning we will not be indicating that there are no instance_mappings for a cell and will move to the next cell? and for orphaned instance_mappings before queens, we will be just setting this to False (when it should be True?) even if there is no instance record against it - might tumble with the logic of nova list ending up listing deleted instances for down cell. I will work on this - https://review.openstack.org/#/c/560042/ soon then.","commit_id":"f00687685859bf93d417ffd8d909ca5d9bdadb3f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d37f069cd1a66470bcd76700ca3bf05641f31617","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    cells \u003d objects.CellMappingList.get_all(context)"},{"line_number":150,"context_line":"    processed \u003d 0"},{"line_number":151,"context_line":"    for cell in cells:"},{"line_number":152,"context_line":"        ims \u003d ("},{"line_number":153,"context_line":"            context.session.query(api_models.InstanceMapping)"},{"line_number":154,"context_line":"            .options(joinedload(\u0027cell_mapping\u0027))"},{"line_number":155,"context_line":"            .filter("}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_48ef381b","line":152,"in_reply_to":"5f7c97a3_34557c52","updated":"2018-07-20 21:10:07.000000000","message":"Yeah, if we don\u0027t have mappings yet, then we won\u0027t do any of them. However, any other migrations that depend on the api database data wouldn\u0027t be able to run either. Presumably with your other patch we wouldn\u0027t have created mappings for instances we found that were deleted either right? Since there is no marker in this approach, simply re-running the online_data_migration command will pick up the mappings once they are present.\n\nWe should make sure to create them in map_instances with the proper queued_for_delete flag though yeah.","commit_id":"f00687685859bf93d417ffd8d909ca5d9bdadb3f"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"f48cf7c7b378cc8b49ca7899e420c4f01b73a815","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            .limit(max_count).all())"},{"line_number":159,"context_line":"        ims_by_inst \u003d {im.instance_uuid: im for im in ims}"},{"line_number":160,"context_line":"        with nova_context.target_cell(context, cell) as cctxt:"},{"line_number":161,"context_line":"            filters \u003d {\u0027uuid\u0027: ims_by_inst.keys(),"},{"line_number":162,"context_line":"                       \u0027deleted\u0027: True,"},{"line_number":163,"context_line":"                       \u0027soft_deleted\u0027: True}"},{"line_number":164,"context_line":"            instances \u003d objects.InstanceList.get_by_filters("}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_f4006437","line":161,"updated":"2018-07-20 20:51:55.000000000","message":"this filter means \"(deleted or soft-deleted) and (uuid in list)\" right ?","commit_id":"f00687685859bf93d417ffd8d909ca5d9bdadb3f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d37f069cd1a66470bcd76700ca3bf05641f31617","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            .limit(max_count).all())"},{"line_number":159,"context_line":"        ims_by_inst \u003d {im.instance_uuid: im for im in ims}"},{"line_number":160,"context_line":"        with nova_context.target_cell(context, cell) as cctxt:"},{"line_number":161,"context_line":"            filters \u003d {\u0027uuid\u0027: ims_by_inst.keys(),"},{"line_number":162,"context_line":"                       \u0027deleted\u0027: True,"},{"line_number":163,"context_line":"                       \u0027soft_deleted\u0027: True}"},{"line_number":164,"context_line":"            instances \u003d objects.InstanceList.get_by_filters("}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_88d2305a","line":161,"in_reply_to":"5f7c97a3_f4006437","updated":"2018-07-20 21:10:07.000000000","message":"Yeah, uuid is a requirement and soft_deleted\u003dTrue is really just a modification to deleted\u003dTrue if you look at the query logic. Also, if you remove this and run the test you\u0027ll see it fail because it will find the one instance for which we have a deleted mapping, which will fail on L167 below.","commit_id":"f00687685859bf93d417ffd8d909ca5d9bdadb3f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a2a8655de6ffaea53566202f0ebf5eaabfe4f95c","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    cells \u003d objects.CellMappingList.get_all(context)"},{"line_number":150,"context_line":"    processed \u003d 0"},{"line_number":151,"context_line":"    for cell in cells:"},{"line_number":152,"context_line":"        ims \u003d ("},{"line_number":153,"context_line":"            context.session.query(api_models.InstanceMapping)"},{"line_number":154,"context_line":"            .options(joinedload(\u0027cell_mapping\u0027))"},{"line_number":155,"context_line":"            .filter("}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_85e0b7cd","line":152,"updated":"2018-07-23 18:05:08.000000000","message":"I\u0027d still like to see a code comment here because this isn\u0027t the most trivial thing in the world.","commit_id":"22daac5f509785077ed102d888667fe85b7dd26f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a2a8655de6ffaea53566202f0ebf5eaabfe4f95c","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            context.session.query(api_models.InstanceMapping)"},{"line_number":154,"context_line":"            .options(joinedload(\u0027cell_mapping\u0027))"},{"line_number":155,"context_line":"            .filter("},{"line_number":156,"context_line":"                api_models.InstanceMapping.queued_for_delete \u003d\u003d None)  # noqa"},{"line_number":157,"context_line":"            .filter(api_models.InstanceMapping.cell_id \u003d\u003d cell.id)"},{"line_number":158,"context_line":"            .limit(max_count).all())"},{"line_number":159,"context_line":"        ims_by_inst \u003d {im.instance_uuid: im for im in ims}"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_c5246f1d","line":156,"range":{"start_line":156,"start_character":64,"end_line":156,"end_character":68},"updated":"2018-07-23 18:05:08.000000000","message":"This works, but I\u0027ve also seen this used:\n\nfrom sqlalchemy.sql import null\n\n...\n\ntable.select().where(table.c[col_name] \u003d\u003d null()).execute()\n\nI\u0027m not sure if one is more correct over the other. Would definitely be a question for zzzeek.","commit_id":"22daac5f509785077ed102d888667fe85b7dd26f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"719c4735f8788c014b9e5526af53514ec2e37a72","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            context.session.query(api_models.InstanceMapping)"},{"line_number":154,"context_line":"            .options(joinedload(\u0027cell_mapping\u0027))"},{"line_number":155,"context_line":"            .filter("},{"line_number":156,"context_line":"                api_models.InstanceMapping.queued_for_delete \u003d\u003d None)  # noqa"},{"line_number":157,"context_line":"            .filter(api_models.InstanceMapping.cell_id \u003d\u003d cell.id)"},{"line_number":158,"context_line":"            .limit(max_count).all())"},{"line_number":159,"context_line":"        ims_by_inst \u003d {im.instance_uuid: im for im in ims}"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_c55b0f87","line":156,"range":{"start_line":156,"start_character":64,"end_line":156,"end_character":68},"in_reply_to":"5f7c97a3_c5246f1d","updated":"2018-07-23 18:06:49.000000000","message":"(1:06:42 PM) zzzeek: mriedem: shouldn\u0027t make a difference","commit_id":"22daac5f509785077ed102d888667fe85b7dd26f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"94917f2d1a705c8362b64f3c47ad5ee80ee81905","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            context.session.query(api_models.InstanceMapping)"},{"line_number":154,"context_line":"            .options(joinedload(\u0027cell_mapping\u0027))"},{"line_number":155,"context_line":"            .filter("},{"line_number":156,"context_line":"                api_models.InstanceMapping.queued_for_delete \u003d\u003d None)  # noqa"},{"line_number":157,"context_line":"            .filter(api_models.InstanceMapping.cell_id \u003d\u003d cell.id)"},{"line_number":158,"context_line":"            .limit(max_count).all())"},{"line_number":159,"context_line":"        ims_by_inst \u003d {im.instance_uuid: im for im in ims}"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_e0771907","line":156,"range":{"start_line":156,"start_character":64,"end_line":156,"end_character":68},"in_reply_to":"5f7c97a3_c5246f1d","updated":"2018-07-23 18:58:45.000000000","message":"alternately you can do this:\n\n api_models.InstanceMapping.queued_for_delete.is_(None)","commit_id":"22daac5f509785077ed102d888667fe85b7dd26f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4cd34f997eb228a974fdcfddeb09eb87ec386af0","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                api_models.InstanceMapping.queued_for_delete \u003d\u003d None)  # noqa"},{"line_number":160,"context_line":"            .filter(api_models.InstanceMapping.cell_id \u003d\u003d cell.id)"},{"line_number":161,"context_line":"            .limit(max_count).all())"},{"line_number":162,"context_line":"        ims_by_inst \u003d {im.instance_uuid: im for im in ims}"},{"line_number":163,"context_line":"        with nova_context.target_cell(context, cell) as cctxt:"},{"line_number":164,"context_line":"            filters \u003d {\u0027uuid\u0027: list(ims_by_inst.keys()),"},{"line_number":165,"context_line":"                       \u0027deleted\u0027: True,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9fdfeff1_a0b08341","line":162,"range":{"start_line":162,"start_character":8,"end_line":162,"end_character":58},"updated":"2019-02-27 21:16:31.000000000","message":"If this is empty we can continue and skip the objects.InstanceList.get_by_filters query...","commit_id":"b2d469e456ccbbfd98f35bee3f2dbb358b02e846"}],"nova/tests/functional/db/test_instance_mapping.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"173b98f69b29d40e9dbce6b6529cbb2fd9ca7498","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                     \u0027instance_uuid\u0027: inst.uuid})"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        done, total \u003d instance_mapping.populate_queued_for_delete(self.context,"},{"line_number":163,"context_line":"                                                                  1000)"},{"line_number":164,"context_line":"        # Two of the mappings were already queued_for_delete\u003dTrue"},{"line_number":165,"context_line":"        self.assertEqual(8, done)"},{"line_number":166,"context_line":"        self.assertEqual(8, total)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_9476d0a2","line":163,"range":{"start_line":163,"start_character":66,"end_line":163,"end_character":70},"updated":"2018-07-20 20:01:52.000000000","message":"Probably shouldn\u0027t blow it all in a single run; if we have 8 total, do something like max_count\u003d2 and then run the rest to make sure we honor the limit.","commit_id":"f747e8c1abdaa0fb5541ae7a0502f3fdef68eae7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"863fd67c4a980b5897ffb89af4236c1e5ae2bdd9","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                        # Instances 2 and 3 are hard-deleted"},{"line_number":163,"context_line":"                        inst.destroy()"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"                instance_mapping.InstanceMapping._create_in_db("},{"line_number":166,"context_line":"                    self.context,"},{"line_number":167,"context_line":"                    {\u0027project_id\u0027: self.context.project_id,"},{"line_number":168,"context_line":"                     \u0027cell_id\u0027: cell.id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_b72972f2","line":165,"updated":"2018-07-23 13:51:34.000000000","message":"http://logs.openstack.org/04/584504/2/check/nova-tox-functional-py35/175366b/job-output.txt.gz#_2018-07-20_20_48_20_350674\n\nb\"TypeError: can\u0027t pickle dict_keys objects\"","commit_id":"f00687685859bf93d417ffd8d909ca5d9bdadb3f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a2a8655de6ffaea53566202f0ebf5eaabfe4f95c","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        # queued_for_delete in the instance mapping"},{"line_number":145,"context_line":"        for cell in cells:"},{"line_number":146,"context_line":"            for i in range(0, 5):"},{"line_number":147,"context_line":"                # Instance 4 should be SOFT_DELETED"},{"line_number":148,"context_line":"                vm_state \u003d (vm_states.SOFT_DELETED if i \u003d\u003d 4"},{"line_number":149,"context_line":"                            else vm_states.ACTIVE)"},{"line_number":150,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_e5296bf1","line":147,"range":{"start_line":147,"start_character":27,"end_line":147,"end_character":28},"updated":"2018-07-23 18:05:08.000000000","message":"nit: really this would be the 5th instance in this cell based on the index","commit_id":"22daac5f509785077ed102d888667fe85b7dd26f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"94917f2d1a705c8362b64f3c47ad5ee80ee81905","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        # queued_for_delete in the instance mapping"},{"line_number":145,"context_line":"        for cell in cells:"},{"line_number":146,"context_line":"            for i in range(0, 5):"},{"line_number":147,"context_line":"                # Instance 4 should be SOFT_DELETED"},{"line_number":148,"context_line":"                vm_state \u003d (vm_states.SOFT_DELETED if i \u003d\u003d 4"},{"line_number":149,"context_line":"                            else vm_states.ACTIVE)"},{"line_number":150,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_e0bcf96c","line":147,"range":{"start_line":147,"start_character":27,"end_line":147,"end_character":28},"in_reply_to":"5f7c97a3_e5296bf1","updated":"2018-07-23 18:58:45.000000000","message":"meh, or just use range(1, 6)","commit_id":"22daac5f509785077ed102d888667fe85b7dd26f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a2a8655de6ffaea53566202f0ebf5eaabfe4f95c","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                vm_state \u003d (vm_states.SOFT_DELETED if i \u003d\u003d 4"},{"line_number":149,"context_line":"                            else vm_states.ACTIVE)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"                # Instance 2 should already be marked as queued_for_delete"},{"line_number":152,"context_line":"                qfd \u003d True if i \u003d\u003d 2 else None"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"                with context.target_cell(self.context, cell) as cctxt:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_a5337361","line":151,"range":{"start_line":151,"start_character":27,"end_line":151,"end_character":28},"updated":"2018-07-23 18:05:08.000000000","message":"nit: 3rd instance, etc","commit_id":"22daac5f509785077ed102d888667fe85b7dd26f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2830711024a51d7e087fd099f793123fda744bea","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                vm_state \u003d (vm_states.SOFT_DELETED if i \u003d\u003d 4"},{"line_number":149,"context_line":"                            else vm_states.ACTIVE)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"                # Instance 2 should already be marked as queued_for_delete"},{"line_number":152,"context_line":"                qfd \u003d True if i \u003d\u003d 2 else None"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"                with context.target_cell(self.context, cell) as cctxt:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_f988331b","line":151,"range":{"start_line":151,"start_character":27,"end_line":151,"end_character":28},"in_reply_to":"5f7c97a3_a5337361","updated":"2018-07-23 21:42:41.000000000","message":"Instance 2 is the third instance, yes :)","commit_id":"22daac5f509785077ed102d888667fe85b7dd26f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"94917f2d1a705c8362b64f3c47ad5ee80ee81905","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                        user_id\u003dself.context.user_id)"},{"line_number":160,"context_line":"                    inst.create()"},{"line_number":161,"context_line":"                    if i in (2, 3):"},{"line_number":162,"context_line":"                        # Instances 2 and 3 are hard-deleted"},{"line_number":163,"context_line":"                        inst.destroy()"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"                instance_mapping.InstanceMapping._create_in_db("}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_20a2f140","line":162,"updated":"2018-07-23 18:58:45.000000000","message":"that way he wouldn\u0027t need to change this as well. :)","commit_id":"22daac5f509785077ed102d888667fe85b7dd26f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"94917f2d1a705c8362b64f3c47ad5ee80ee81905","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        mappings \u003d instance_mapping.InstanceMappingList.get_by_project_id("},{"line_number":187,"context_line":"            self.context, self.context.project_id)"},{"line_number":188,"context_line":"        # Six deleted instances"},{"line_number":189,"context_line":"        self.assertEqual(6, len("},{"line_number":190,"context_line":"            [im for im in mappings if im.queued_for_delete]))"},{"line_number":191,"context_line":"        # Four non-deleted instances"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_40592d5a","line":188,"range":{"start_line":188,"start_character":8,"end_line":188,"end_character":31},"updated":"2018-07-23 18:58:45.000000000","message":"making sure I am clear here... this is actually 4 hard-deleted instances and 2 soft-deleted instances, right?","commit_id":"22daac5f509785077ed102d888667fe85b7dd26f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2830711024a51d7e087fd099f793123fda744bea","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        mappings \u003d instance_mapping.InstanceMappingList.get_by_project_id("},{"line_number":187,"context_line":"            self.context, self.context.project_id)"},{"line_number":188,"context_line":"        # Six deleted instances"},{"line_number":189,"context_line":"        self.assertEqual(6, len("},{"line_number":190,"context_line":"            [im for im in mappings if im.queued_for_delete]))"},{"line_number":191,"context_line":"        # Four non-deleted instances"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_799c235c","line":188,"range":{"start_line":188,"start_character":8,"end_line":188,"end_character":31},"in_reply_to":"5f7c97a3_40592d5a","updated":"2018-07-23 21:42:41.000000000","message":"Two hard deleted and one soft deleted per cell, two cells.","commit_id":"22daac5f509785077ed102d888667fe85b7dd26f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"94917f2d1a705c8362b64f3c47ad5ee80ee81905","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            [im for im in mappings if im.queued_for_delete]))"},{"line_number":191,"context_line":"        # Four non-deleted instances"},{"line_number":192,"context_line":"        self.assertEqual(4, len("},{"line_number":193,"context_line":"            [im for im in mappings if not im.queued_for_delete]))"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"class InstanceMappingListTestCase(test.NoDBTestCase):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_c013fd67","line":193,"range":{"start_line":193,"start_character":35,"end_line":193,"end_character":62},"updated":"2018-07-23 18:58:45.000000000","message":"\"not im.queued_for_delete\" would include mappings where queued_for_delete \u003d\u003d NULL, so probably worth making this:\n\n if im.queued_for_delete \u003d\u003d False\n\nand adding a note explaining why you\u0027re deliberately looking for a False value.","commit_id":"22daac5f509785077ed102d888667fe85b7dd26f"}]}
