)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f94f31daae3ff3d55c9b0f2f3ea151a3a62446a7","unresolved":false,"context_lines":[{"line_number":15,"context_line":"    update_metadata"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I61fcdf0226a88edd466f47e4dd20625143a53c5a"},{"line_number":18,"context_line":"Closes-Bug: #1663456"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5f7c97a3_cb48358b","line":18,"updated":"2018-08-01 15:00:55.000000000","message":"This is arguably not a bug but a wishlist item. We\u0027ve had similar discussions in the past about updating the instance_actions record\u0027s updated_at field when events are created per action record, but that never got resolved I guess:\n\nhttps://openstack.nimeyo.com/88929/openstack-questions-about-instance-actions-update-finish?start\u003d10","commit_id":"3043ce784dd2af4e8782f4dc9b1bd2c736bfe142"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"852fba3ef6b5738ccc7c773f4d2141b4e30b826d","unresolved":false,"context_lines":[{"line_number":13,"context_line":"  add_host"},{"line_number":14,"context_line":"  delete_host"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"TODO(brizhang): Updating aggregate_metadata\u0027s \u0027updated_at\u0027 while the"},{"line_number":17,"context_line":"                aggregate\u0027s metadata is updated."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Co-Authored-By: Brin Zhang \u003czhangbailin@inspur.com\u003e"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"3fa7e38b_8b7d1f72","line":17,"range":{"start_line":16,"start_character":0,"end_line":17,"end_character":48},"updated":"2020-01-14 06:27:03.000000000","message":"I test in my env, based on this fixed patch or in the latest version, while I set the aggregate\u0027s metedata, it\u0027s \u0027update_at\u0027 will be populated automatically. So I think this patch will be closed this bug.\n\nroot@ubuntu-OpenStack:/opt/stack/nova# nova --debug aggregate-set-metadata test_agg0 host1\u003d\u0027aaaa\u0027\n\nVersion X-OpenStack-Nova-API-Version: 2.81 x-compute-request-id: req-c25e19d5-3862-4bb5-bb96-41fb1d30f389 x-openstack-request-id: req-c25e19d5-3862-4bb5-bb96-41fb1d30f389\nDEBUG (session:580) RESP BODY: {\"aggregate\": {\"id\": 4, \"uuid\": \"688b4bf1-6927-45bd-9c6c-6ad1108788ea\", \"name\": \"test_agg0\", \"hosts\": [], \"metadata\": {\"host1\": \"aaaa\"}, \"created_at\": \"2020-01-14T06:20:18.000000\", \"updated_at\": \"2020-01-14T06:21:34.729395\", \"deleted_at\": null, \"deleted\": false, \"availability_zone\": null}}\nDEBUG (session:943) POST call to compute for http://192.168.190.23/compute/v2.1/os-aggregates/4/action used request id req-c25e19d5-3862-4bb5-bb96-41fb1d30f389\nMetadata has been successfully updated for aggregate 4.\n+----+-----------+-------------------+-------+--------------+--------------------------------------+\n| Id | Name      | Availability Zone | Hosts | Metadata     | UUID                                 |\n+----+-----------+-------------------+-------+--------------+--------------------------------------+\n| 4  | test_agg0 | -                 |       | \u0027host1\u003daaaa\u0027 | 688b4bf1-6927-45bd-9c6c-6ad1108788ea |\n+----+-----------+-------------------+-------+--------------+--------------------------------------+","commit_id":"f3d7e1e957271b61fe93b769b95c54b8ef3a6f47"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c0ae66a287890dea719717d0463af6b70d74a225","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Populate \u0027updated_at\u0027 when aggregate is updated"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Showing an exist aggregate, the \"updated_at\" in it\u0027s resonse body"},{"line_number":10,"context_line":"is always NULL. We will save the last updated time of aggregate"},{"line_number":11,"context_line":"in following cases:"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"1fa4df85_985e3374","line":9,"range":{"start_line":9,"start_character":11,"end_line":9,"end_character":16},"updated":"2020-03-05 15:30:04.000000000","message":"existing","commit_id":"49da39c4931f0ef7b798b8f8ec73a231f7907cba"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c0ae66a287890dea719717d0463af6b70d74a225","unresolved":false,"context_lines":[{"line_number":11,"context_line":"in following cases:"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"  add_host"},{"line_number":14,"context_line":"  delete_host"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Co-Authored-By: Brin Zhang \u003czhangbailin@inspur.com\u003e"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"1fa4df85_f84c07c9","line":14,"updated":"2020-03-05 15:30:04.000000000","message":"Why not metadata update? Right now, the updated_at only reflects the actual aggregate record. You\u0027re making it *less* consistent by having it be updated when you change hosts, but not metadata items, which seem more related to the actual aggregate to me than the membership.","commit_id":"49da39c4931f0ef7b798b8f8ec73a231f7907cba"}],"doc/api_samples/os-aggregates/v2.81/aggregate-post-resp.json":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9e4c773d239d479683af7489346fa1de73fd1217","unresolved":false,"context_lines":[{"line_number":6,"context_line":"        \"deleted_at\": null,"},{"line_number":7,"context_line":"        \"id\": 1,"},{"line_number":8,"context_line":"        \"name\": \"name\","},{"line_number":9,"context_line":"        \"updated_at\": null,"},{"line_number":10,"context_line":"        \"uuid\": \"a25e34a2-4fc1-4876-82d0-cf930fa04b82\""},{"line_number":11,"context_line":"    }"},{"line_number":12,"context_line":"}"}],"source_content_type":"application/json","patch_set":19,"id":"3fa7e38b_e506e61b","line":9,"range":{"start_line":9,"start_character":22,"end_line":9,"end_character":26},"updated":"2020-01-20 10:27:04.000000000","message":"Hmm, so why isn\u0027t this being set automatically by the TimestampMixin per [1]?\n\nLater: Ah, that\u0027s only set \"on update\", not when creating. I guess if we want to change the behavior of that it should be done in oslo.db\n\n[1] https://review.opendev.org/#/c/580271/16/nova/objects/aggregate.py@75","commit_id":"62fc6d7fb322ed8cfd2fedd2b9976f9c6fab7266"}],"nova/compute/api.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8a63d2d65bb1cc7bf6c26075c5e681e86f21f60b","unresolved":false,"context_lines":[{"line_number":5255,"context_line":""},{"line_number":5256,"context_line":"        aggregate.add_host(host_name)"},{"line_number":5257,"context_line":"        self.scheduler_client.update_aggregates(context, [aggregate])"},{"line_number":5258,"context_line":"        aggregate.updated_at \u003d timeutils.utcnow()"},{"line_number":5259,"context_line":"        try:"},{"line_number":5260,"context_line":"            self.placement_client.aggregate_add_host("},{"line_number":5261,"context_line":"                context, aggregate.uuid, host_name)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_aec56d40","line":5258,"updated":"2020-01-15 11:05:08.000000000","message":"Would it be possible do this within the \u0027add_host\u0027 method, so that we don\u0027t have to remember to do this anywhere else we call this in the future?","commit_id":"fa486c6b11d2430f3da62d0c6877f1bfbcc86f64"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"e8eb1db957fbbaec61df64624417a45efa2e7dba","unresolved":false,"context_lines":[{"line_number":5255,"context_line":""},{"line_number":5256,"context_line":"        aggregate.add_host(host_name)"},{"line_number":5257,"context_line":"        self.scheduler_client.update_aggregates(context, [aggregate])"},{"line_number":5258,"context_line":"        aggregate.updated_at \u003d timeutils.utcnow()"},{"line_number":5259,"context_line":"        try:"},{"line_number":5260,"context_line":"            self.placement_client.aggregate_add_host("},{"line_number":5261,"context_line":"                context, aggregate.uuid, host_name)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_69a52f48","line":5258,"in_reply_to":"3fa7e38b_aec56d40","updated":"2020-01-15 12:23:37.000000000","message":"Done","commit_id":"fa486c6b11d2430f3da62d0c6877f1bfbcc86f64"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8a63d2d65bb1cc7bf6c26075c5e681e86f21f60b","unresolved":false,"context_lines":[{"line_number":5321,"context_line":""},{"line_number":5322,"context_line":"        aggregate.delete_host(host_name)"},{"line_number":5323,"context_line":"        self.scheduler_client.update_aggregates(context, [aggregate])"},{"line_number":5324,"context_line":"        aggregate.updated_at \u003d timeutils.utcnow()"},{"line_number":5325,"context_line":"        try:"},{"line_number":5326,"context_line":"            self.placement_client.aggregate_remove_host("},{"line_number":5327,"context_line":"                context, aggregate.uuid, host_name)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_cec22936","line":5324,"updated":"2020-01-15 11:05:08.000000000","message":"Ditto, but for \u0027delete_host\u0027","commit_id":"fa486c6b11d2430f3da62d0c6877f1bfbcc86f64"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"e8eb1db957fbbaec61df64624417a45efa2e7dba","unresolved":false,"context_lines":[{"line_number":5321,"context_line":""},{"line_number":5322,"context_line":"        aggregate.delete_host(host_name)"},{"line_number":5323,"context_line":"        self.scheduler_client.update_aggregates(context, [aggregate])"},{"line_number":5324,"context_line":"        aggregate.updated_at \u003d timeutils.utcnow()"},{"line_number":5325,"context_line":"        try:"},{"line_number":5326,"context_line":"            self.placement_client.aggregate_remove_host("},{"line_number":5327,"context_line":"                context, aggregate.uuid, host_name)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_89a2eb3e","line":5324,"in_reply_to":"3fa7e38b_cec22936","updated":"2020-01-15 12:23:37.000000000","message":"Done","commit_id":"fa486c6b11d2430f3da62d0c6877f1bfbcc86f64"}],"nova/objects/aggregate.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"5f679c528f142b7d47c3ad030d4ec2a2597b7669","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                    new_entries.append({\"key\": key,"},{"line_number":135,"context_line":"                                        \"value\": value,"},{"line_number":136,"context_line":"                                        \"aggregate_id\": aggregate_id})"},{"line_number":137,"context_line":"                if not metadata.get(\u0027update\u0027):"},{"line_number":138,"context_line":"                    _update_aggregate_db(context, aggregate_id)"},{"line_number":139,"context_line":"                if new_entries:"},{"line_number":140,"context_line":"                    context.session.execute("},{"line_number":141,"context_line":"                        api_models.AggregateMetadata.__table__.insert(None),"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_045376e0","line":138,"range":{"start_line":137,"start_character":0,"end_line":138,"end_character":63},"updated":"2020-01-11 09:35:34.000000000","message":"Adding \u0027update\u0027\u003dTrue/False is not suitable for the aggregate metadata\u0027s updated_at time, I will split a new patch to update the aggregate metadata\u0027s \u0027updated_at\u0027 field.\n\nThere are have the different db, ``aggregates`` and ``aggregate_metadata``, so I think updating the aggregate_metadata\u0027s updated_at field is better than add a new key/value(update\u003dTrue/False) to the aggregates\u0027s metadata body.","commit_id":"2ee85baafd5d1db464a755795b679f7c7be6a4a4"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"8a63d2d65bb1cc7bf6c26075c5e681e86f21f60b","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            query \u003d context.session.query(api_models.AggregateHost)"},{"line_number":80,"context_line":"            query \u003d query.filter(api_models.AggregateHost.aggregate_id \u003d\u003d"},{"line_number":81,"context_line":"                                 aggregate_id)"},{"line_number":82,"context_line":"            query.update({\u0027updated_at\u0027: timeutils.utcnow()})"},{"line_number":83,"context_line":"            return host_ref"},{"line_number":84,"context_line":"    except db_exc.DBDuplicateEntry:"},{"line_number":85,"context_line":"        raise exception.AggregateHostExists(host\u003dhost,"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_4e7879f6","line":82,"range":{"start_line":82,"start_character":40,"end_line":82,"end_character":58},"updated":"2020-01-15 11:05:08.000000000","message":"is there a chance this could race and what\u0027s in the DB might not match what\u0027s in the object, i.e. we set the DB at 23:59:59.999999 and the object at 00:00:00.000000? I guess if we get a timestamp first we could use that same value for both the DB and object itself, or we could avoid updating the object and instead refresh it from the DB once we\u0027ve done this update?","commit_id":"57a9743a385fe6be62d3a989383089f7d3d4f159"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"e8eb1db957fbbaec61df64624417a45efa2e7dba","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            query \u003d context.session.query(api_models.AggregateHost)"},{"line_number":80,"context_line":"            query \u003d query.filter(api_models.AggregateHost.aggregate_id \u003d\u003d"},{"line_number":81,"context_line":"                                 aggregate_id)"},{"line_number":82,"context_line":"            query.update({\u0027updated_at\u0027: timeutils.utcnow()})"},{"line_number":83,"context_line":"            return host_ref"},{"line_number":84,"context_line":"    except db_exc.DBDuplicateEntry:"},{"line_number":85,"context_line":"        raise exception.AggregateHostExists(host\u003dhost,"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_a9ab271d","line":82,"range":{"start_line":82,"start_character":40,"end_line":82,"end_character":58},"in_reply_to":"3fa7e38b_4e7879f6","updated":"2020-01-15 12:23:37.000000000","message":"I think it\u0027s ok, \"created_at\", \"deleted_at\" are all set for *that* resource, it\u0027s same. Other words, I dont know what are you worry.","commit_id":"57a9743a385fe6be62d3a989383089f7d3d4f159"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"fc81f46444d898c6d98938026b5f24e8293597ed","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            query \u003d context.session.query(api_models.AggregateHost)"},{"line_number":80,"context_line":"            query \u003d query.filter(api_models.AggregateHost.aggregate_id \u003d\u003d"},{"line_number":81,"context_line":"                                 aggregate_id)"},{"line_number":82,"context_line":"            query.update({\u0027updated_at\u0027: timeutils.utcnow()})"},{"line_number":83,"context_line":"            return host_ref"},{"line_number":84,"context_line":"    except db_exc.DBDuplicateEntry:"},{"line_number":85,"context_line":"        raise exception.AggregateHostExists(host\u003dhost,"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_143a8ee5","line":82,"range":{"start_line":82,"start_character":40,"end_line":82,"end_character":58},"in_reply_to":"3fa7e38b_a9ab271d","updated":"2020-01-15 13:27:25.000000000","message":"I was referring to the fact that you set this on both the object and in the DB, but that the values could be different since you call \u0027timeutils.utcnow()\u0027 twice. This shouldn\u0027t be an issue now that you\u0027ve removed the duplicate calls","commit_id":"57a9743a385fe6be62d3a989383089f7d3d4f159"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7d98e49cbbe9c61dfe6550d2c2a77626183308c1","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            host_ref.save(context.session)"},{"line_number":76,"context_line":"            # Update the field \"updated_at\" of db Aggregate"},{"line_number":77,"context_line":"            _update_aggregate_db(context, aggregate_id)"},{"line_number":78,"context_line":"            # Update the field \"updated_at\" of db AggregateHost"},{"line_number":79,"context_line":"            query \u003d context.session.query(api_models.AggregateHost)"},{"line_number":80,"context_line":"            query \u003d query.filter(api_models.AggregateHost.aggregate_id \u003d\u003d"},{"line_number":81,"context_line":"                                 aggregate_id)"},{"line_number":82,"context_line":"            query.update({\u0027updated_at\u0027: timeutils.utcnow()})"},{"line_number":83,"context_line":"            return host_ref"},{"line_number":84,"context_line":"    except db_exc.DBDuplicateEntry:"},{"line_number":85,"context_line":"        raise exception.AggregateHostExists(host\u003dhost,"}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa7e38b_ecfcb8b7","line":82,"range":{"start_line":78,"start_character":0,"end_line":82,"end_character":60},"updated":"2020-01-16 14:35:43.000000000","message":"Actually, do we need to do this? Looks like oslo.db\u0027s \u0027TimestampMixin\u0027 will take care of handling this for us when we call \u0027host_ref.save(...)\u0027 above, right?","commit_id":"fc326e0f66d8701b3ae429c5e30fc6ecffd5a210"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"532aec1c563f1030c3f641479ba1f442eb3b9742","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            host_ref.save(context.session)"},{"line_number":76,"context_line":"            # Update the field \"updated_at\" of db Aggregate"},{"line_number":77,"context_line":"            _update_aggregate_db(context, aggregate_id)"},{"line_number":78,"context_line":"            # Update the field \"updated_at\" of db AggregateHost"},{"line_number":79,"context_line":"            query \u003d context.session.query(api_models.AggregateHost)"},{"line_number":80,"context_line":"            query \u003d query.filter(api_models.AggregateHost.aggregate_id \u003d\u003d"},{"line_number":81,"context_line":"                                 aggregate_id)"},{"line_number":82,"context_line":"            query.update({\u0027updated_at\u0027: timeutils.utcnow()})"},{"line_number":83,"context_line":"            return host_ref"},{"line_number":84,"context_line":"    except db_exc.DBDuplicateEntry:"},{"line_number":85,"context_line":"        raise exception.AggregateHostExists(host\u003dhost,"}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa7e38b_4dcdbf90","line":82,"range":{"start_line":78,"start_character":0,"end_line":82,"end_character":60},"in_reply_to":"3fa7e38b_ecfcb8b7","updated":"2020-01-17 00:56:40.000000000","message":"Yeah, it\u0027s my mistake, this can be done when before host_ref.save().","commit_id":"fc326e0f66d8701b3ae429c5e30fc6ecffd5a210"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"7d98e49cbbe9c61dfe6550d2c2a77626183308c1","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        _metadata_add_to_db(context, aggregate.id, metadata)"},{"line_number":189,"context_line":"        context.session.expire(aggregate, [\u0027_metadata\u0027])"},{"line_number":190,"context_line":"        aggregate._metadata"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    # Populate the \u0027updated_at\u0027 field for new aggregate"},{"line_number":193,"context_line":"    _update_aggregate_db(context, aggregate.id)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    return aggregate"},{"line_number":196,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa7e38b_4c170cf1","line":193,"range":{"start_line":191,"start_character":0,"end_line":193,"end_character":47},"updated":"2020-01-16 14:35:43.000000000","message":"Ditto - why isn\u0027t this set when we create the aggregate above (or earlier, if it already existed)","commit_id":"fc326e0f66d8701b3ae429c5e30fc6ecffd5a210"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"532aec1c563f1030c3f641479ba1f442eb3b9742","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        _metadata_add_to_db(context, aggregate.id, metadata)"},{"line_number":189,"context_line":"        context.session.expire(aggregate, [\u0027_metadata\u0027])"},{"line_number":190,"context_line":"        aggregate._metadata"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    # Populate the \u0027updated_at\u0027 field for new aggregate"},{"line_number":193,"context_line":"    _update_aggregate_db(context, aggregate.id)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"    return aggregate"},{"line_number":196,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa7e38b_6dd0bb2b","line":193,"range":{"start_line":191,"start_character":0,"end_line":193,"end_character":47},"in_reply_to":"3fa7e38b_4c170cf1","updated":"2020-01-17 00:56:40.000000000","message":"Done","commit_id":"fc326e0f66d8701b3ae429c5e30fc6ecffd5a210"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"1935bf1977e225d18d0c5ab5805891ac8ab501d6","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"            host_ref \u003d api_models.AggregateHost()"},{"line_number":74,"context_line":"            host_ref.update({\"host\": host, \"aggregate_id\": aggregate_id,"},{"line_number":75,"context_line":"                             \"updated_at\": timeutils.utcnow()})"},{"line_number":76,"context_line":"            host_ref.save(context.session)"},{"line_number":77,"context_line":"            # Update the field \"updated_at\" of db Aggregate"},{"line_number":78,"context_line":"            _update_aggregate_db(context, aggregate_id)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3fa7e38b_9b020ab9","line":75,"range":{"start_line":75,"start_character":29,"end_line":75,"end_character":61},"updated":"2020-01-17 10:18:43.000000000","message":"This still isn\u0027t right, I don\u0027t think. Surely this happens due to the use of \u0027TimestampMixin\u0027 [1] which is part of \u0027NovaBase\u0027 [2], which is the base class of \u0027AggregateHost\u0027 [3]. Are you sure this is necessary?\n\n[1] https://github.com/openstack/oslo.db/blob/3bdd1d1315e201cc990cf3fbc56525fa364d5b87/oslo_db/sqlalchemy/models.py#L139\n[2] https://github.com/openstack/nova/blob/b44b540fc70504f3869ef23022642095de0ea99e/nova/db/sqlalchemy/models.py#L42-L43\n[3] https://github.com/openstack/nova/blob/b44b540fc70504f3869ef23022642095de0ea99e/nova/db/sqlalchemy/api_models.py#L47","commit_id":"e7c17984d3b0f234f20da70bca15e18092dec65f"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"efd0741270331f8902056a08da03aa783e424dec","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"            host_ref \u003d api_models.AggregateHost()"},{"line_number":74,"context_line":"            host_ref.update({\"host\": host, \"aggregate_id\": aggregate_id,"},{"line_number":75,"context_line":"                             \"updated_at\": timeutils.utcnow()})"},{"line_number":76,"context_line":"            host_ref.save(context.session)"},{"line_number":77,"context_line":"            # Update the field \"updated_at\" of db Aggregate"},{"line_number":78,"context_line":"            _update_aggregate_db(context, aggregate_id)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3fa7e38b_1acda6b9","line":75,"range":{"start_line":75,"start_character":29,"end_line":75,"end_character":61},"in_reply_to":"3fa7e38b_9b020ab9","updated":"2020-01-19 01:25:17.000000000","message":"Ok. Emm..personally, it is reasonable to keep \u0027create_at\u0027 and \u0027updated_at\u0027 always when the resource is being create.","commit_id":"e7c17984d3b0f234f20da70bca15e18092dec65f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"1935bf1977e225d18d0c5ab5805891ac8ab501d6","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    if not aggregate:"},{"line_number":175,"context_line":"        aggregate \u003d api_models.Aggregate()"},{"line_number":176,"context_line":"        values[\u0027updated_at\u0027] \u003d timeutils.utcnow()"},{"line_number":177,"context_line":"        aggregate.update(values)"},{"line_number":178,"context_line":"        aggregate.save(context.session)"},{"line_number":179,"context_line":"        # We don\u0027t want these to be lazy loaded later.  We know there is"}],"source_content_type":"text/x-python","patch_set":16,"id":"3fa7e38b_bbfca6b6","line":176,"range":{"start_line":176,"start_character":0,"end_line":176,"end_character":49},"updated":"2020-01-17 10:18:43.000000000","message":"Ditto","commit_id":"e7c17984d3b0f234f20da70bca15e18092dec65f"},{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"efd0741270331f8902056a08da03aa783e424dec","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    if not aggregate:"},{"line_number":175,"context_line":"        aggregate \u003d api_models.Aggregate()"},{"line_number":176,"context_line":"        values[\u0027updated_at\u0027] \u003d timeutils.utcnow()"},{"line_number":177,"context_line":"        aggregate.update(values)"},{"line_number":178,"context_line":"        aggregate.save(context.session)"},{"line_number":179,"context_line":"        # We don\u0027t want these to be lazy loaded later.  We know there is"}],"source_content_type":"text/x-python","patch_set":16,"id":"3fa7e38b_1a3286c1","line":176,"range":{"start_line":176,"start_character":0,"end_line":176,"end_character":49},"in_reply_to":"3fa7e38b_bbfca6b6","updated":"2020-01-19 01:25:17.000000000","message":"Done","commit_id":"e7c17984d3b0f234f20da70bca15e18092dec65f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"1935bf1977e225d18d0c5ab5805891ac8ab501d6","unresolved":false,"context_lines":[{"line_number":234,"context_line":"    return _aggregate_get_from_db(context, aggregate_id)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"def _update_aggregate_db(context, aggregate_id):"},{"line_number":238,"context_line":"    # Updates the field \"updated_at\" in db Aggregate"},{"line_number":239,"context_line":"    query \u003d context.session.query(api_models.Aggregate). \\"},{"line_number":240,"context_line":"        filter_by(id\u003daggregate_id)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3fa7e38b_1b17faf1","line":237,"updated":"2020-01-17 10:18:43.000000000","message":"This probably makes sense since \u0027Aggregate\u0027 won\u0027t be affected by saving an \u0027AggregateHost\u0027 instance, but we probably want to indicate that something has changed.","commit_id":"e7c17984d3b0f234f20da70bca15e18092dec65f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c0ae66a287890dea719717d0463af6b70d74a225","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            host_ref \u003d api_models.AggregateHost()"},{"line_number":74,"context_line":"            host_ref.update({\"host\": host, \"aggregate_id\": aggregate_id})"},{"line_number":75,"context_line":"            host_ref.save(context.session)"},{"line_number":76,"context_line":"            # Update the field \"updated_at\" of db Aggregate"},{"line_number":77,"context_line":"            _update_aggregate_db(context, aggregate_id)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"            return host_ref"}],"source_content_type":"text/x-python","patch_set":20,"id":"1fa4df85_780b377c","line":76,"updated":"2020-03-05 15:30:04.000000000","message":"These comments are not helpful. The method name should make it clear what is going on.","commit_id":"49da39c4931f0ef7b798b8f8ec73a231f7907cba"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c0ae66a287890dea719717d0463af6b70d74a225","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        query \u003d context.session.query(api_models.AggregateHost)"},{"line_number":92,"context_line":"        query \u003d query.filter(api_models.AggregateHost.aggregate_id \u003d\u003d"},{"line_number":93,"context_line":"                             aggregate_id)"},{"line_number":94,"context_line":"        count \u003d query.filter_by(host\u003dhost).delete()"},{"line_number":95,"context_line":"        # Update the field \"updated_at\" of db Aggregate"},{"line_number":96,"context_line":"        _update_aggregate_db(context, aggregate_id)"}],"source_content_type":"text/x-python","patch_set":20,"id":"1fa4df85_184323b1","line":93,"updated":"2020-03-05 15:30:04.000000000","message":"This is unrelated to the current patch, but git history will make it look like this was changed.","commit_id":"49da39c4931f0ef7b798b8f8ec73a231f7907cba"}]}
