)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3592c0edd2c7db51f279a39ff43e015d9c4a5cee","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add requested_resources field to RequestSpec"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The new RequestSpec.resource_requests stores a list of RequestGroup"},{"line_number":10,"context_line":"objects each representing a granual resource request group requesting"},{"line_number":11,"context_line":"resource for the given instance."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This will be used in a later patch to communicate the Neutron port\u0027s"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5f7c97a3_4bfa4975","line":10,"range":{"start_line":10,"start_character":28,"end_line":10,"end_character":35},"updated":"2018-05-24 23:23:17.000000000","message":"granular","commit_id":"7cc6dc03f6037412bd61844967f69f8a976cb9c5"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"50a893351950882f68ba768891e7ed6998c3449f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add requested_resources field to RequestSpec"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The new RequestSpec.resource_requests stores a list of RequestGroup"},{"line_number":10,"context_line":"objects each representing a granual resource request group requesting"},{"line_number":11,"context_line":"resource for the given instance."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This will be used in a later patch to communicate the Neutron port\u0027s"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5f7c97a3_b58b17be","line":10,"range":{"start_line":10,"start_character":28,"end_line":10,"end_character":35},"in_reply_to":"5f7c97a3_4bfa4975","updated":"2018-05-29 15:18:54.000000000","message":"Done","commit_id":"7cc6dc03f6037412bd61844967f69f8a976cb9c5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3592c0edd2c7db51f279a39ff43e015d9c4a5cee","unresolved":false,"context_lines":[{"line_number":19,"context_line":"* the port\u0027s resource request is already persisted in neutron"},{"line_number":20,"context_line":"  so this would be a data duplication that could lead to data"},{"line_number":21,"context_line":"  inconsistencies"},{"line_number":22,"context_line":"* this field only used to carry information from the the nova-conductor"},{"line_number":23,"context_line":"  to the nova-scheduler for each select_destinations() request"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"blueprint: bandwidth-resource-provider"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5f7c97a3_0bf0d190","line":22,"range":{"start_line":22,"start_character":13,"end_line":22,"end_character":17},"updated":"2018-05-24 23:23:17.000000000","message":"is only","commit_id":"7cc6dc03f6037412bd61844967f69f8a976cb9c5"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"50a893351950882f68ba768891e7ed6998c3449f","unresolved":false,"context_lines":[{"line_number":19,"context_line":"* the port\u0027s resource request is already persisted in neutron"},{"line_number":20,"context_line":"  so this would be a data duplication that could lead to data"},{"line_number":21,"context_line":"  inconsistencies"},{"line_number":22,"context_line":"* this field only used to carry information from the the nova-conductor"},{"line_number":23,"context_line":"  to the nova-scheduler for each select_destinations() request"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"blueprint: bandwidth-resource-provider"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"5f7c97a3_e80f722b","line":22,"range":{"start_line":22,"start_character":13,"end_line":22,"end_character":17},"in_reply_to":"5f7c97a3_0bf0d190","updated":"2018-05-29 15:18:54.000000000","message":"Done","commit_id":"7cc6dc03f6037412bd61844967f69f8a976cb9c5"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"68beba84f14fdb9733e2ddd7daa5e1ffcfe53050","unresolved":false,"context_lines":[{"line_number":10,"context_line":"objects each representing a granular resource request group requesting"},{"line_number":11,"context_line":"resource for the given instance."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This will be used in a later patch to communicate the Neutron port\u0027s"},{"line_number":14,"context_line":"resource requests to the scheduler. Also this can be used later to"},{"line_number":15,"context_line":"refactor flavor and image metadata based resource request handling."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This new field is intentionally not persisted to the DB for two"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"5f7c97a3_d1eacc0c","line":14,"range":{"start_line":13,"start_character":50,"end_line":14,"end_character":17},"updated":"2018-06-06 12:56:44.000000000","message":"nit: Technically today each neutron port is allowed to have one resource request so \"the Neutron port\u0027s\nresource request\" would be correct.","commit_id":"5a60ed449e916ec085b8881c53fccf2a5a59457e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3470578aa543a3a6dc6f30177d1e87af26a642ab","unresolved":false,"context_lines":[{"line_number":10,"context_line":"objects each representing a granular resource request group requesting"},{"line_number":11,"context_line":"resource for the given instance."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This will be used in a later patch to communicate the Neutron port\u0027s"},{"line_number":14,"context_line":"resource requests to the scheduler. Also this can be used later to"},{"line_number":15,"context_line":"refactor flavor and image metadata based resource request handling."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This new field is intentionally not persisted to the DB for two"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"5f7c97a3_2275b5fa","line":14,"range":{"start_line":13,"start_character":50,"end_line":14,"end_character":17},"in_reply_to":"5f7c97a3_d1eacc0c","updated":"2018-06-08 15:04:39.000000000","message":"Done","commit_id":"5a60ed449e916ec085b8881c53fccf2a5a59457e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9bcb9d3c74a13df877b0b5a1e013934851fb298a","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This will be used in a later patch to communicate the Neutron port\u0027s"},{"line_number":14,"context_line":"resource request to the scheduler. Also this can be used later to"},{"line_number":15,"context_line":"refactor flavor and image metadata based resource request handling."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This new field is intentionally not persisted to the DB for two"},{"line_number":18,"context_line":"reasons:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":26,"id":"3f79a3b5_e86e3bfe","line":15,"range":{"start_line":15,"start_character":20,"end_line":15,"end_character":34},"updated":"2018-10-30 14:40:43.000000000","message":"We intentionally don\u0027t support numbered request groups in image metadata, well at least for traits:\n\nhttps://specs.openstack.org/openstack/nova-specs/specs/rocky/implemented/glance-image-traits.html","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"}],"nova/objects/request_spec.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3592c0edd2c7db51f279a39ff43e015d9c4a5cee","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from oslo_serialization import jsonutils"},{"line_number":16,"context_line":"from oslo_utils import versionutils"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from nova.db.sqlalchemy import api as db"},{"line_number":20,"context_line":"from nova.db.sqlalchemy import api_models"},{"line_number":21,"context_line":"from nova import exception"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_8b31415c","side":"PARENT","line":18,"updated":"2018-05-24 23:23:17.000000000","message":"unrelated","commit_id":"f90916f3bf2ec1315a9dd810bae02ddba48aecb2"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"50a893351950882f68ba768891e7ed6998c3449f","unresolved":false,"context_lines":[{"line_number":15,"context_line":"from oslo_serialization import jsonutils"},{"line_number":16,"context_line":"from oslo_utils import versionutils"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from nova.db.sqlalchemy import api as db"},{"line_number":20,"context_line":"from nova.db.sqlalchemy import api_models"},{"line_number":21,"context_line":"from nova import exception"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_d5949346","side":"PARENT","line":18,"in_reply_to":"5f7c97a3_8b31415c","updated":"2018-05-29 15:18:54.000000000","message":"Done","commit_id":"f90916f3bf2ec1315a9dd810bae02ddba48aecb2"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3592c0edd2c7db51f279a39ff43e015d9c4a5cee","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        \u0027scheduler_hints\u0027: fields.DictOfListOfStringsField(nullable\u003dTrue),"},{"line_number":81,"context_line":"        \u0027instance_uuid\u0027: fields.UUIDField(),"},{"line_number":82,"context_line":"        \u0027security_groups\u0027: fields.ObjectField(\u0027SecurityGroupList\u0027),"},{"line_number":83,"context_line":"        # TODO(gibi): we might need to default this to None to be able to"},{"line_number":84,"context_line":"        # detect if a RequestSpec is loaded from db and therefore the"},{"line_number":85,"context_line":"        # requested resources needs to be gathered from neutron ports again"},{"line_number":86,"context_line":"        \u0027requested_resources\u0027: fields.ListOfObjectsField(\u0027RequestGroup\u0027,"},{"line_number":87,"context_line":"                                                         default\u003d[])"},{"line_number":88,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_ebcc7536","line":85,"range":{"start_line":83,"start_character":0,"end_line":85,"end_character":75},"updated":"2018-05-24 23:23:17.000000000","message":"Is there harm in doing that now?\n\nBecause if you change it later, you\u0027re going to have to bump the object version again, right?\n\n...but is it even possible for it to ever be empty after it\u0027s been loaded?  Like, the flavor would have to be empty, or something, right?\n\nI think I\u0027m saying we should probably either make the default None now, or remove the comment.","commit_id":"7cc6dc03f6037412bd61844967f69f8a976cb9c5"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"50a893351950882f68ba768891e7ed6998c3449f","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        \u0027scheduler_hints\u0027: fields.DictOfListOfStringsField(nullable\u003dTrue),"},{"line_number":81,"context_line":"        \u0027instance_uuid\u0027: fields.UUIDField(),"},{"line_number":82,"context_line":"        \u0027security_groups\u0027: fields.ObjectField(\u0027SecurityGroupList\u0027),"},{"line_number":83,"context_line":"        # TODO(gibi): we might need to default this to None to be able to"},{"line_number":84,"context_line":"        # detect if a RequestSpec is loaded from db and therefore the"},{"line_number":85,"context_line":"        # requested resources needs to be gathered from neutron ports again"},{"line_number":86,"context_line":"        \u0027requested_resources\u0027: fields.ListOfObjectsField(\u0027RequestGroup\u0027,"},{"line_number":87,"context_line":"                                                         default\u003d[])"},{"line_number":88,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_b5a557a1","line":85,"range":{"start_line":83,"start_character":0,"end_line":85,"end_character":75},"in_reply_to":"5f7c97a3_ebcc7536","updated":"2018-05-29 15:18:54.000000000","message":"Good point.\nI will make it nullable now to be able to distinguish between unfilled (requested_resources\u003dNone) and filled but no extra groups are requested (requested_resources\u003d[]). Later if we move the unnumbered group creation to from_components factory method then requested_resources will not be [] but still can be None if not created through from_components().\n\n-- two hours later --\nThanks for pushing me to this direction. It let me found the places where the requested_resources field needs to be regenerated from the neutron ports during server move operations. The subsequent patch contains a list of TODOs in the code not to forget to implement those cases.","commit_id":"7cc6dc03f6037412bd61844967f69f8a976cb9c5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3592c0edd2c7db51f279a39ff43e015d9c4a5cee","unresolved":false,"context_lines":[{"line_number":404,"context_line":"    def from_components(cls, context, instance_uuid, image, flavor,"},{"line_number":405,"context_line":"            numa_topology, pci_requests, filter_properties, instance_group,"},{"line_number":406,"context_line":"            availability_zone, security_groups\u003dNone, project_id\u003dNone,"},{"line_number":407,"context_line":"            user_id\u003dNone, port_resource_requests\u003dNone):"},{"line_number":408,"context_line":"        \"\"\"Returns a new RequestSpec object hydrated by various components."},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"        This helper is useful in creating the RequestSpec from the various"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_2b490db6","line":407,"range":{"start_line":407,"start_character":26,"end_line":407,"end_character":48},"updated":"2018-05-24 23:23:17.000000000","message":"So we\u0027re going to add separate kwargs for every *_resource_requests?","commit_id":"7cc6dc03f6037412bd61844967f69f8a976cb9c5"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"50a893351950882f68ba768891e7ed6998c3449f","unresolved":false,"context_lines":[{"line_number":404,"context_line":"    def from_components(cls, context, instance_uuid, image, flavor,"},{"line_number":405,"context_line":"            numa_topology, pci_requests, filter_properties, instance_group,"},{"line_number":406,"context_line":"            availability_zone, security_groups\u003dNone, project_id\u003dNone,"},{"line_number":407,"context_line":"            user_id\u003dNone, port_resource_requests\u003dNone):"},{"line_number":408,"context_line":"        \"\"\"Returns a new RequestSpec object hydrated by various components."},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"        This helper is useful in creating the RequestSpec from the various"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_95effbaf","line":407,"range":{"start_line":407,"start_character":26,"end_line":407,"end_character":48},"in_reply_to":"5f7c97a3_2b490db6","updated":"2018-05-29 15:18:54.000000000","message":"We might need to as some of the requests might not add  separate group(s) but extend already existing groups. Currently traits from image_meta are added to the unnumbered group. We could move that here as well.","commit_id":"7cc6dc03f6037412bd61844967f69f8a976cb9c5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3592c0edd2c7db51f279a39ff43e015d9c4a5cee","unresolved":false,"context_lines":[{"line_number":456,"context_line":"            \u0027requested_destination\u0027)"},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"        # TODO(gibi): do the creation of the unnumbered group and any"},{"line_number":459,"context_line":"        # numbered group from the flavor by reusing some part of the"},{"line_number":460,"context_line":"        # nova.scheduler.utils.resources_from_request_spec()"},{"line_number":461,"context_line":"        spec_obj.requested_resources \u003d []"},{"line_number":462,"context_line":"        if port_resource_requests:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_0b1e91ba","line":459,"range":{"start_line":459,"start_character":44,"end_line":459,"end_character":51},"updated":"2018-05-24 23:23:17.000000000","message":"Replacing, right?  I.e. resources_from_request_spec() would simply invoke the method as ported herein","commit_id":"7cc6dc03f6037412bd61844967f69f8a976cb9c5"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"50a893351950882f68ba768891e7ed6998c3449f","unresolved":false,"context_lines":[{"line_number":456,"context_line":"            \u0027requested_destination\u0027)"},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"        # TODO(gibi): do the creation of the unnumbered group and any"},{"line_number":459,"context_line":"        # numbered group from the flavor by reusing some part of the"},{"line_number":460,"context_line":"        # nova.scheduler.utils.resources_from_request_spec()"},{"line_number":461,"context_line":"        spec_obj.requested_resources \u003d []"},{"line_number":462,"context_line":"        if port_resource_requests:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_f5242f0f","line":459,"range":{"start_line":459,"start_character":44,"end_line":459,"end_character":51},"in_reply_to":"5f7c97a3_0b1e91ba","updated":"2018-05-29 15:18:54.000000000","message":"I had concerns having every information available already here to replace the resources_from_request_spec(). Now looked that it in a bit more detail and I think everything is available here (flavor, image, requested_destination). However the requested_destination field of the spec object is manipulated later by the request_filter so I have to be careful with this a refactoring.\n\n[1] https://github.com/openstack/nova/blob/45d48d6cd2fb6f45bbda226f9c997ee81382123c/nova/scheduler/manager.py#L127","commit_id":"7cc6dc03f6037412bd61844967f69f8a976cb9c5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3592c0edd2c7db51f279a39ff43e015d9c4a5cee","unresolved":false,"context_lines":[{"line_number":482,"context_line":"            if key in [\u0027id\u0027, \u0027instance_uuid\u0027]:"},{"line_number":483,"context_line":"                setattr(spec, key, db_spec[key])"},{"line_number":484,"context_line":"            elif key \u003d\u003d \u0027requested_resources\u0027:"},{"line_number":485,"context_line":"                # do not override what we alraedy have as the object as this"},{"line_number":486,"context_line":"                # fields is not persisted"},{"line_number":487,"context_line":"                pass"},{"line_number":488,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_6b6aa51a","line":485,"range":{"start_line":485,"start_character":42,"end_line":485,"end_character":49},"updated":"2018-05-24 23:23:17.000000000","message":"already","commit_id":"7cc6dc03f6037412bd61844967f69f8a976cb9c5"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"50a893351950882f68ba768891e7ed6998c3449f","unresolved":false,"context_lines":[{"line_number":482,"context_line":"            if key in [\u0027id\u0027, \u0027instance_uuid\u0027]:"},{"line_number":483,"context_line":"                setattr(spec, key, db_spec[key])"},{"line_number":484,"context_line":"            elif key \u003d\u003d \u0027requested_resources\u0027:"},{"line_number":485,"context_line":"                # do not override what we alraedy have as the object as this"},{"line_number":486,"context_line":"                # fields is not persisted"},{"line_number":487,"context_line":"                pass"},{"line_number":488,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_55f08367","line":485,"range":{"start_line":485,"start_character":42,"end_line":485,"end_character":49},"in_reply_to":"5f7c97a3_6b6aa51a","updated":"2018-05-29 15:18:54.000000000","message":"Done","commit_id":"7cc6dc03f6037412bd61844967f69f8a976cb9c5"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3592c0edd2c7db51f279a39ff43e015d9c4a5cee","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                setattr(spec, key, db_spec[key])"},{"line_number":484,"context_line":"            elif key \u003d\u003d \u0027requested_resources\u0027:"},{"line_number":485,"context_line":"                # do not override what we alraedy have as the object as this"},{"line_number":486,"context_line":"                # fields is not persisted"},{"line_number":487,"context_line":"                pass"},{"line_number":488,"context_line":"            else:"},{"line_number":489,"context_line":"                setattr(spec, key, getattr(spec_obj, key))"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_4b6d6930","line":486,"range":{"start_line":486,"start_character":18,"end_line":486,"end_character":24},"updated":"2018-05-24 23:23:17.000000000","message":"field","commit_id":"7cc6dc03f6037412bd61844967f69f8a976cb9c5"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"50a893351950882f68ba768891e7ed6998c3449f","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                setattr(spec, key, db_spec[key])"},{"line_number":484,"context_line":"            elif key \u003d\u003d \u0027requested_resources\u0027:"},{"line_number":485,"context_line":"                # do not override what we alraedy have as the object as this"},{"line_number":486,"context_line":"                # fields is not persisted"},{"line_number":487,"context_line":"                pass"},{"line_number":488,"context_line":"            else:"},{"line_number":489,"context_line":"                setattr(spec, key, getattr(spec_obj, key))"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_35eb8778","line":486,"range":{"start_line":486,"start_character":18,"end_line":486,"end_character":24},"in_reply_to":"5f7c97a3_4b6d6930","updated":"2018-05-29 15:18:54.000000000","message":"Done","commit_id":"7cc6dc03f6037412bd61844967f69f8a976cb9c5"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"68beba84f14fdb9733e2ddd7daa5e1ffcfe53050","unresolved":false,"context_lines":[{"line_number":461,"context_line":"        # because the request filters manipulate the requested_destination"},{"line_number":462,"context_line":"        # field later in the scheduler."},{"line_number":463,"context_line":"        spec_obj.requested_resources \u003d []"},{"line_number":464,"context_line":"        if port_resource_requests:"},{"line_number":465,"context_line":"            spec_obj.requested_resources +\u003d port_resource_requests"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"        # NOTE(sbauza): Default the other fields that are not part of the"},{"line_number":468,"context_line":"        # original contract"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_3172207e","line":465,"range":{"start_line":464,"start_character":0,"end_line":465,"end_character":66},"updated":"2018-06-06 12:56:44.000000000","message":"nit: Isn\u0027t this nicer without the \u0027if\u0027?\n\n spec_obj.requested_resources.extend(port_resource_requests)","commit_id":"5a60ed449e916ec085b8881c53fccf2a5a59457e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3470578aa543a3a6dc6f30177d1e87af26a642ab","unresolved":false,"context_lines":[{"line_number":461,"context_line":"        # because the request filters manipulate the requested_destination"},{"line_number":462,"context_line":"        # field later in the scheduler."},{"line_number":463,"context_line":"        spec_obj.requested_resources \u003d []"},{"line_number":464,"context_line":"        if port_resource_requests:"},{"line_number":465,"context_line":"            spec_obj.requested_resources +\u003d port_resource_requests"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"        # NOTE(sbauza): Default the other fields that are not part of the"},{"line_number":468,"context_line":"        # original contract"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_e2125db4","line":465,"range":{"start_line":464,"start_character":0,"end_line":465,"end_character":66},"in_reply_to":"5f7c97a3_3172207e","updated":"2018-06-08 15:04:39.000000000","message":"Would be nice to do that but port_resource_requests is defaulted to None and extend() expects an iterable so it barfs on None. In the other hand we should not default port_resource_request to an mutable empty list as mutable defaults are dangerous. http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments","commit_id":"5a60ed449e916ec085b8881c53fccf2a5a59457e"},{"author":{"_account_id":15554,"name":"Bence Romsics","email":"bence.romsics@gmail.com","username":"ebenrom","status":"inactive contributor"},"change_message_id":"68beba84f14fdb9733e2ddd7daa5e1ffcfe53050","unresolved":false,"context_lines":[{"line_number":484,"context_line":"            if key in [\u0027id\u0027, \u0027instance_uuid\u0027]:"},{"line_number":485,"context_line":"                setattr(spec, key, db_spec[key])"},{"line_number":486,"context_line":"            elif key \u003d\u003d \u0027requested_resources\u0027:"},{"line_number":487,"context_line":"                # do not override what we already have as the object as this"},{"line_number":488,"context_line":"                # field is not persisted"},{"line_number":489,"context_line":"                pass"},{"line_number":490,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_f10028ae","line":487,"range":{"start_line":487,"start_character":55,"end_line":487,"end_character":57},"updated":"2018-06-06 12:56:44.000000000","message":"nit: in","commit_id":"5a60ed449e916ec085b8881c53fccf2a5a59457e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3470578aa543a3a6dc6f30177d1e87af26a642ab","unresolved":false,"context_lines":[{"line_number":484,"context_line":"            if key in [\u0027id\u0027, \u0027instance_uuid\u0027]:"},{"line_number":485,"context_line":"                setattr(spec, key, db_spec[key])"},{"line_number":486,"context_line":"            elif key \u003d\u003d \u0027requested_resources\u0027:"},{"line_number":487,"context_line":"                # do not override what we already have as the object as this"},{"line_number":488,"context_line":"                # field is not persisted"},{"line_number":489,"context_line":"                pass"},{"line_number":490,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_a281c5c5","line":487,"range":{"start_line":487,"start_character":55,"end_line":487,"end_character":57},"in_reply_to":"5f7c97a3_f10028ae","updated":"2018-06-08 15:04:39.000000000","message":"Done","commit_id":"5a60ed449e916ec085b8881c53fccf2a5a59457e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9bcb9d3c74a13df877b0b5a1e013934851fb298a","unresolved":false,"context_lines":[{"line_number":418,"context_line":"    def from_components(cls, context, instance_uuid, image, flavor,"},{"line_number":419,"context_line":"            numa_topology, pci_requests, filter_properties, instance_group,"},{"line_number":420,"context_line":"            availability_zone, security_groups\u003dNone, project_id\u003dNone,"},{"line_number":421,"context_line":"            user_id\u003dNone, port_resource_requests\u003dNone):"},{"line_number":422,"context_line":"        \"\"\"Returns a new RequestSpec object hydrated by various components."},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"        This helper is useful in creating the RequestSpec from the various"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_08a7f753","line":421,"range":{"start_line":421,"start_character":26,"end_line":421,"end_character":30},"updated":"2018-10-30 14:40:43.000000000","message":"nit: does this need to be specific to ports? The field is generic. But I guess you\u0027re just extending the list, and we could build on this later, as mentioned in the commit message, for numbered request groups in the flavor (we don\u0027t have granular request support in image metadata).","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9bcb9d3c74a13df877b0b5a1e013934851fb298a","unresolved":false,"context_lines":[{"line_number":470,"context_line":"            \u0027requested_destination\u0027)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"        # TODO(gibi): do the creation of the unnumbered group and any"},{"line_number":473,"context_line":"        # numbered group from the flavor, image and requested_destination by"},{"line_number":474,"context_line":"        # moving the logic from"},{"line_number":475,"context_line":"        # nova.scheduler.utils.resources_from_request_spec() here. Be careful"},{"line_number":476,"context_line":"        # because the request filters manipulate the requested_destination"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_283e73e3","line":473,"range":{"start_line":473,"start_character":42,"end_line":473,"end_character":47},"updated":"2018-10-30 14:40:43.000000000","message":"Again, numbered request groups aren\u0027t supported in image metadata.","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9bcb9d3c74a13df877b0b5a1e013934851fb298a","unresolved":false,"context_lines":[{"line_number":470,"context_line":"            \u0027requested_destination\u0027)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"        # TODO(gibi): do the creation of the unnumbered group and any"},{"line_number":473,"context_line":"        # numbered group from the flavor, image and requested_destination by"},{"line_number":474,"context_line":"        # moving the logic from"},{"line_number":475,"context_line":"        # nova.scheduler.utils.resources_from_request_spec() here. Be careful"},{"line_number":476,"context_line":"        # because the request filters manipulate the requested_destination"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_c84edf8f","line":473,"range":{"start_line":473,"start_character":52,"end_line":473,"end_character":73},"updated":"2018-10-30 14:40:43.000000000","message":"What about the requested_destination is related to this? The aggregates field?","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"45afbd2ea58c851b14e65c73cf73a517d9ff7b2c","unresolved":false,"context_lines":[{"line_number":470,"context_line":"            \u0027requested_destination\u0027)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"        # TODO(gibi): do the creation of the unnumbered group and any"},{"line_number":473,"context_line":"        # numbered group from the flavor, image and requested_destination by"},{"line_number":474,"context_line":"        # moving the logic from"},{"line_number":475,"context_line":"        # nova.scheduler.utils.resources_from_request_spec() here. Be careful"},{"line_number":476,"context_line":"        # because the request filters manipulate the requested_destination"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_44c0fe7d","line":473,"range":{"start_line":473,"start_character":42,"end_line":473,"end_character":47},"in_reply_to":"3f79a3b5_283e73e3","updated":"2018-11-05 22:09:54.000000000","message":"I removed the mention about image from this comment.","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"45afbd2ea58c851b14e65c73cf73a517d9ff7b2c","unresolved":false,"context_lines":[{"line_number":470,"context_line":"            \u0027requested_destination\u0027)"},{"line_number":471,"context_line":""},{"line_number":472,"context_line":"        # TODO(gibi): do the creation of the unnumbered group and any"},{"line_number":473,"context_line":"        # numbered group from the flavor, image and requested_destination by"},{"line_number":474,"context_line":"        # moving the logic from"},{"line_number":475,"context_line":"        # nova.scheduler.utils.resources_from_request_spec() here. Be careful"},{"line_number":476,"context_line":"        # because the request filters manipulate the requested_destination"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_04b68627","line":473,"range":{"start_line":473,"start_character":52,"end_line":473,"end_character":73},"in_reply_to":"3f79a3b5_c84edf8f","updated":"2018-11-05 22:09:54.000000000","message":"Also removed the mention of the requested_destination since I don\u0027t see what it has to do with this.","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9bcb9d3c74a13df877b0b5a1e013934851fb298a","unresolved":false,"context_lines":[{"line_number":518,"context_line":"            # though they should match."},{"line_number":519,"context_line":"            if key in [\u0027id\u0027, \u0027instance_uuid\u0027]:"},{"line_number":520,"context_line":"                setattr(spec, key, db_spec[key])"},{"line_number":521,"context_line":"            elif key \u003d\u003d \u0027requested_resources\u0027:"},{"line_number":522,"context_line":"                # do not override what we already have in the object as this"},{"line_number":523,"context_line":"                # field is not persisted"},{"line_number":524,"context_line":"                pass"},{"line_number":525,"context_line":"            elif key in spec_obj:"},{"line_number":526,"context_line":"                setattr(spec, key, getattr(spec_obj, key))"},{"line_number":527,"context_line":"        spec._context \u003d context"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_68122b67","line":524,"range":{"start_line":521,"start_character":12,"end_line":524,"end_character":20},"updated":"2018-10-30 14:40:43.000000000","message":"I\u0027m not sure you need this given the elif logic below, otherwise wouldn\u0027t we also need this for the network_metadata field?","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"11076f4c7b6004a6240c89e712c80b9ac603f887","unresolved":false,"context_lines":[{"line_number":521,"context_line":"            elif key \u003d\u003d \u0027requested_resources\u0027:"},{"line_number":522,"context_line":"                # do not override what we already have in the object as this"},{"line_number":523,"context_line":"                # field is not persisted"},{"line_number":524,"context_line":"                pass"},{"line_number":525,"context_line":"            elif key in spec_obj:"},{"line_number":526,"context_line":"                setattr(spec, key, getattr(spec_obj, key))"},{"line_number":527,"context_line":"        spec._context \u003d context"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_0f8136a2","line":524,"range":{"start_line":524,"start_character":16,"end_line":524,"end_character":20},"updated":"2018-10-30 19:54:29.000000000","message":"s/pass/continue/ ? Although it doesn\u0027t make a difference here.","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"45afbd2ea58c851b14e65c73cf73a517d9ff7b2c","unresolved":false,"context_lines":[{"line_number":521,"context_line":"            elif key \u003d\u003d \u0027requested_resources\u0027:"},{"line_number":522,"context_line":"                # do not override what we already have in the object as this"},{"line_number":523,"context_line":"                # field is not persisted"},{"line_number":524,"context_line":"                pass"},{"line_number":525,"context_line":"            elif key in spec_obj:"},{"line_number":526,"context_line":"                setattr(spec, key, getattr(spec_obj, key))"},{"line_number":527,"context_line":"        spec._context \u003d context"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_446ebe97","line":524,"range":{"start_line":524,"start_character":16,"end_line":524,"end_character":20},"in_reply_to":"3f79a3b5_0f8136a2","updated":"2018-11-05 22:09:54.000000000","message":"Changed to continue.","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8103333e6916feed0da880e2b7be00c335399fcd","unresolved":false,"context_lines":[{"line_number":518,"context_line":"            # though they should match."},{"line_number":519,"context_line":"            if key in [\u0027id\u0027, \u0027instance_uuid\u0027]:"},{"line_number":520,"context_line":"                setattr(spec, key, db_spec[key])"},{"line_number":521,"context_line":"            elif key \u003d\u003d \u0027requested_resources\u0027:"},{"line_number":522,"context_line":"                # do not override what we already have in the object as this"},{"line_number":523,"context_line":"                # field is not persisted"},{"line_number":524,"context_line":"                pass"},{"line_number":525,"context_line":"            elif key in spec_obj:"},{"line_number":526,"context_line":"                setattr(spec, key, getattr(spec_obj, key))"},{"line_number":527,"context_line":"        spec._context \u003d context"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_afc4c20e","line":524,"range":{"start_line":521,"start_character":12,"end_line":524,"end_character":20},"in_reply_to":"3f79a3b5_68122b67","updated":"2018-10-30 19:52:58.000000000","message":"Actually I see why you\u0027re doing this now. If save() is called after requested_resources is called, it will reset the field to None and we\u0027ll lose what is set (but not persisted) on the object. I just ran into the same thing elsewhere with the requested_destination field.","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"45afbd2ea58c851b14e65c73cf73a517d9ff7b2c","unresolved":false,"context_lines":[{"line_number":518,"context_line":"            # though they should match."},{"line_number":519,"context_line":"            if key in [\u0027id\u0027, \u0027instance_uuid\u0027]:"},{"line_number":520,"context_line":"                setattr(spec, key, db_spec[key])"},{"line_number":521,"context_line":"            elif key \u003d\u003d \u0027requested_resources\u0027:"},{"line_number":522,"context_line":"                # do not override what we already have in the object as this"},{"line_number":523,"context_line":"                # field is not persisted"},{"line_number":524,"context_line":"                pass"},{"line_number":525,"context_line":"            elif key in spec_obj:"},{"line_number":526,"context_line":"                setattr(spec, key, getattr(spec_obj, key))"},{"line_number":527,"context_line":"        spec._context \u003d context"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_e45fcae1","line":524,"range":{"start_line":521,"start_character":12,"end_line":524,"end_character":20},"in_reply_to":"3f79a3b5_afc4c20e","updated":"2018-11-05 22:09:54.000000000","message":"I added part of this to the comment for clarity.","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9bcb9d3c74a13df877b0b5a1e013934851fb298a","unresolved":false,"context_lines":[{"line_number":594,"context_line":"                del spec.network_metadata"},{"line_number":595,"context_line":"            # NOTE(gibi): Don\u0027t persist the requested_resources as it is"},{"line_number":596,"context_line":"            # per-request"},{"line_number":597,"context_line":"            if \u0027requested_resources\u0027 in spec:"},{"line_number":598,"context_line":"                spec.requested_resources \u003d None"},{"line_number":599,"context_line":""},{"line_number":600,"context_line":"            db_updates \u003d {\u0027spec\u0027: jsonutils.dumps(spec.obj_to_primitive())}"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_08037713","line":597,"updated":"2018-10-30 14:40:43.000000000","message":"nit: you could include this in the more generic for loop on L588 above.","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"45afbd2ea58c851b14e65c73cf73a517d9ff7b2c","unresolved":false,"context_lines":[{"line_number":594,"context_line":"                del spec.network_metadata"},{"line_number":595,"context_line":"            # NOTE(gibi): Don\u0027t persist the requested_resources as it is"},{"line_number":596,"context_line":"            # per-request"},{"line_number":597,"context_line":"            if \u0027requested_resources\u0027 in spec:"},{"line_number":598,"context_line":"                spec.requested_resources \u003d None"},{"line_number":599,"context_line":""},{"line_number":600,"context_line":"            db_updates \u003d {\u0027spec\u0027: jsonutils.dumps(spec.obj_to_primitive())}"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_246142a3","line":597,"in_reply_to":"3f79a3b5_08037713","updated":"2018-11-05 22:09:54.000000000","message":"Done","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"030e00c69ed1a3c567a4a7c3561446eff50c748e","unresolved":false,"context_lines":[{"line_number":472,"context_line":"        # TODO(gibi): do the creation of the unnumbered group and any"},{"line_number":473,"context_line":"        # numbered group from the flavor by moving the logic from"},{"line_number":474,"context_line":"        # nova.scheduler.utils.resources_from_request_spec() here."},{"line_number":475,"context_line":"        spec_obj.requested_resources \u003d []"},{"line_number":476,"context_line":"        if port_resource_requests:"},{"line_number":477,"context_line":"            spec_obj.requested_resources.extend(port_resource_requests)"},{"line_number":478,"context_line":""}],"source_content_type":"text/x-python","patch_set":27,"id":"3f79a3b5_5ec0c57d","line":475,"updated":"2018-11-06 06:16:49.000000000","message":"If \u0027requested_resources\u0027 is nullable, why do we care to initialize it to [] in from_components?","commit_id":"90b96170d3f269165f649e8b61739cf31ffb78b8"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"030e00c69ed1a3c567a4a7c3561446eff50c748e","unresolved":false,"context_lines":[{"line_number":521,"context_line":"                # requested_resources is populated, it will reset the field to"},{"line_number":522,"context_line":"                # None and we\u0027ll lose what is set (but not persisted) on the"},{"line_number":523,"context_line":"                # object."},{"line_number":524,"context_line":"                continue"},{"line_number":525,"context_line":"            elif key in spec_obj:"},{"line_number":526,"context_line":"                setattr(spec, key, getattr(spec_obj, key))"},{"line_number":527,"context_line":"        spec._context \u003d context"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f79a3b5_9e741d8c","line":524,"updated":"2018-11-06 06:16:49.000000000","message":"This makes me wonder why we don\u0027t do similar for our other non-persisted fields like \u0027retry\u0027 and \u0027request_destination\u0027.","commit_id":"90b96170d3f269165f649e8b61739cf31ffb78b8"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7e0ada290e3c072d05041fb6000b82c25c68f7fa","unresolved":false,"context_lines":[{"line_number":521,"context_line":"                # requested_resources is populated, it will reset the field to"},{"line_number":522,"context_line":"                # None and we\u0027ll lose what is set (but not persisted) on the"},{"line_number":523,"context_line":"                # object."},{"line_number":524,"context_line":"                continue"},{"line_number":525,"context_line":"            elif key in spec_obj:"},{"line_number":526,"context_line":"                setattr(spec, key, getattr(spec_obj, key))"},{"line_number":527,"context_line":"        spec._context \u003d context"}],"source_content_type":"text/x-python","patch_set":27,"id":"3f79a3b5_56c0a24b","line":524,"in_reply_to":"3f79a3b5_9e741d8c","updated":"2018-11-06 14:23:05.000000000","message":"Depends on how the object is used, but I will need this for requested_destination in the cross-cell resize change:\n\nhttps://review.openstack.org/#/c/603930/14/nova/objects/request_spec.py\n\nIt would probably make more sense to just not touch those fields we don\u0027t persist.","commit_id":"90b96170d3f269165f649e8b61739cf31ffb78b8"}],"nova/tests/unit/objects/test_request_spec.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"07f586658c7c10c618148d129a16f75df512037a","unresolved":false,"context_lines":[{"line_number":598,"context_line":"                as mock_create_in_db:"},{"line_number":599,"context_line":"            mock_create_in_db.side_effect \u003d orig_create_in_db"},{"line_number":600,"context_line":"            req_obj.create()"},{"line_number":601,"context_line":"            self.assertEqual(1, len(mock_create_in_db.mock_calls))"},{"line_number":602,"context_line":"            updates \u003d mock_create_in_db.mock_calls[0][1][1]"},{"line_number":603,"context_line":"            # assert that the requested_resources field is not stored in the db"},{"line_number":604,"context_line":"            self.assertIsNone(jsonutils.loads(updates[\u0027spec\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_dae86117","line":601,"range":{"start_line":601,"start_character":12,"end_line":601,"end_character":66},"updated":"2018-06-08 20:21:09.000000000","message":"or mock_create_in_db.assert_called_once()","commit_id":"48e5104fb743f41808e6beef662f1ea2dce385db"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"07f586658c7c10c618148d129a16f75df512037a","unresolved":false,"context_lines":[{"line_number":622,"context_line":"                as mock_save_in_db:"},{"line_number":623,"context_line":"            mock_save_in_db.side_effect \u003d orig_save_in_db"},{"line_number":624,"context_line":"            req_obj.save()"},{"line_number":625,"context_line":"            self.assertEqual(1, len(mock_save_in_db.mock_calls))"},{"line_number":626,"context_line":"            updates \u003d mock_save_in_db.mock_calls[0][1][2]"},{"line_number":627,"context_line":"            # assert that the requested_resources field is not stored in the db"},{"line_number":628,"context_line":"            self.assertIsNone(jsonutils.loads(updates[\u0027spec\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_1ae25931","line":625,"range":{"start_line":625,"start_character":12,"end_line":625,"end_character":64},"updated":"2018-06-08 20:21:09.000000000","message":"likewise","commit_id":"48e5104fb743f41808e6beef662f1ea2dce385db"},{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"35a790d6487a81469d95c238db80bd11dacd0677","unresolved":false,"context_lines":[{"line_number":705,"context_line":"        self.assertIn(\u0027project_id\u0027, primitive)"},{"line_number":706,"context_line":""},{"line_number":707,"context_line":"    def test_compat_requested_resources(self):"},{"line_number":708,"context_line":"        req_obj \u003d objects.RequestSpec(project_id\u003dfakes.FAKE_PROJECT_ID,"},{"line_number":709,"context_line":"                                      user_id\u003dfakes.FAKE_USER_ID)"},{"line_number":710,"context_line":"        req_obj.requested_resources \u003d []"},{"line_number":711,"context_line":"        versions \u003d ovo_base.obj_tree_get_versions(\u0027RequestSpec\u0027)"},{"line_number":712,"context_line":"        primitive \u003d req_obj.obj_to_primitive(target_version\u003d\u00271.9\u0027,"},{"line_number":713,"context_line":"                                             version_manifest\u003dversions)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_5445986d","line":710,"range":{"start_line":708,"start_character":0,"end_line":710,"end_character":40},"updated":"2018-06-14 10:01:45.000000000","message":"tiny nit: project_id and user_id args can be removed, and only requested_resources added is enough in this case. If you want to change this, you could also change these 2 line to:\n\nobjects.RequestSpec(requested_resources\u003d[])\n\nOr you just want to left these, in order to assert user_id(which is added in 1.8) in primitive.","commit_id":"d30ba9adf84003990ab14f3acdc48a8c358cfd82"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"11130b6fa6712ebb4db635476eab041d20a62796","unresolved":false,"context_lines":[{"line_number":705,"context_line":"        self.assertIn(\u0027project_id\u0027, primitive)"},{"line_number":706,"context_line":""},{"line_number":707,"context_line":"    def test_compat_requested_resources(self):"},{"line_number":708,"context_line":"        req_obj \u003d objects.RequestSpec(project_id\u003dfakes.FAKE_PROJECT_ID,"},{"line_number":709,"context_line":"                                      user_id\u003dfakes.FAKE_USER_ID)"},{"line_number":710,"context_line":"        req_obj.requested_resources \u003d []"},{"line_number":711,"context_line":"        versions \u003d ovo_base.obj_tree_get_versions(\u0027RequestSpec\u0027)"},{"line_number":712,"context_line":"        primitive \u003d req_obj.obj_to_primitive(target_version\u003d\u00271.9\u0027,"},{"line_number":713,"context_line":"                                             version_manifest\u003dversions)"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_b3402b61","line":710,"range":{"start_line":708,"start_character":0,"end_line":710,"end_character":40},"in_reply_to":"5f7c97a3_5445986d","updated":"2018-06-21 14:08:07.000000000","message":"Done","commit_id":"d30ba9adf84003990ab14f3acdc48a8c358cfd82"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"a30b71aa719ea6939bbe6879a06c7f92d7be21c0","unresolved":false,"context_lines":[{"line_number":614,"context_line":"        rg \u003d request_spec.RequestGroup(resources\u003d{\u0027fake-rc\u0027: 13})"},{"line_number":615,"context_line":"        req_obj.requested_resources \u003d [rg]"},{"line_number":616,"context_line":"        req_obj.create()"},{"line_number":617,"context_line":"        # change something to avoid bug 1775863"},{"line_number":618,"context_line":"        req_obj.num_instances \u003d 2"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"        orig_save_in_db \u003d request_spec.RequestSpec._save_in_db"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f7c97a3_9cf65bd8","line":617,"updated":"2018-07-04 15:37:10.000000000","message":"fix is merged now so this can be dropped.","commit_id":"5dd21d446ba9fbca77e66699e9a9db49e76ef367"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f1364bc3779d66db630eb1c34e9ef7be225cc985","unresolved":false,"context_lines":[{"line_number":614,"context_line":"        rg \u003d request_spec.RequestGroup(resources\u003d{\u0027fake-rc\u0027: 13})"},{"line_number":615,"context_line":"        req_obj.requested_resources \u003d [rg]"},{"line_number":616,"context_line":"        req_obj.create()"},{"line_number":617,"context_line":"        # change something to avoid bug 1775863"},{"line_number":618,"context_line":"        req_obj.num_instances \u003d 2"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"        orig_save_in_db \u003d request_spec.RequestSpec._save_in_db"}],"source_content_type":"text/x-python","patch_set":19,"id":"5f7c97a3_fca98f8e","line":617,"in_reply_to":"5f7c97a3_9cf65bd8","updated":"2018-07-04 15:44:27.000000000","message":"Done","commit_id":"5dd21d446ba9fbca77e66699e9a9db49e76ef367"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9bcb9d3c74a13df877b0b5a1e013934851fb298a","unresolved":false,"context_lines":[{"line_number":643,"context_line":"                as mock_create_in_db:"},{"line_number":644,"context_line":"            mock_create_in_db.side_effect \u003d orig_create_in_db"},{"line_number":645,"context_line":"            req_obj.create()"},{"line_number":646,"context_line":"            self.assertEqual(1, len(mock_create_in_db.mock_calls))"},{"line_number":647,"context_line":"            updates \u003d mock_create_in_db.mock_calls[0][1][1]"},{"line_number":648,"context_line":"            # assert that the requested_resources field is not stored in the db"},{"line_number":649,"context_line":"            self.assertIsNone(jsonutils.loads(updates[\u0027spec\u0027])"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_4306301e","line":646,"range":{"start_line":646,"start_character":12,"end_line":646,"end_character":66},"updated":"2018-10-30 14:40:43.000000000","message":"nit: this could just be: mock_create_in_db.assert_called_once()","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"45afbd2ea58c851b14e65c73cf73a517d9ff7b2c","unresolved":false,"context_lines":[{"line_number":643,"context_line":"                as mock_create_in_db:"},{"line_number":644,"context_line":"            mock_create_in_db.side_effect \u003d orig_create_in_db"},{"line_number":645,"context_line":"            req_obj.create()"},{"line_number":646,"context_line":"            self.assertEqual(1, len(mock_create_in_db.mock_calls))"},{"line_number":647,"context_line":"            updates \u003d mock_create_in_db.mock_calls[0][1][1]"},{"line_number":648,"context_line":"            # assert that the requested_resources field is not stored in the db"},{"line_number":649,"context_line":"            self.assertIsNone(jsonutils.loads(updates[\u0027spec\u0027])"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_04f9a6c4","line":646,"range":{"start_line":646,"start_character":12,"end_line":646,"end_character":66},"in_reply_to":"3f79a3b5_4306301e","updated":"2018-11-05 22:09:54.000000000","message":"Done","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9bcb9d3c74a13df877b0b5a1e013934851fb298a","unresolved":false,"context_lines":[{"line_number":646,"context_line":"            self.assertEqual(1, len(mock_create_in_db.mock_calls))"},{"line_number":647,"context_line":"            updates \u003d mock_create_in_db.mock_calls[0][1][1]"},{"line_number":648,"context_line":"            # assert that the requested_resources field is not stored in the db"},{"line_number":649,"context_line":"            self.assertIsNone(jsonutils.loads(updates[\u0027spec\u0027])"},{"line_number":650,"context_line":"                              [\u0027nova_object.data\u0027][\u0027requested_resources\u0027])"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"        # also we expect that requested_resources field does not reset after"},{"line_number":653,"context_line":"        # create"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_63456c4a","line":650,"range":{"start_line":649,"start_character":12,"end_line":650,"end_character":74},"updated":"2018-10-30 14:40:43.000000000","message":"Just to make sure this is correct, you might want to assert something that you do expect to be in the primitive.","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"45afbd2ea58c851b14e65c73cf73a517d9ff7b2c","unresolved":false,"context_lines":[{"line_number":646,"context_line":"            self.assertEqual(1, len(mock_create_in_db.mock_calls))"},{"line_number":647,"context_line":"            updates \u003d mock_create_in_db.mock_calls[0][1][1]"},{"line_number":648,"context_line":"            # assert that the requested_resources field is not stored in the db"},{"line_number":649,"context_line":"            self.assertIsNone(jsonutils.loads(updates[\u0027spec\u0027])"},{"line_number":650,"context_line":"                              [\u0027nova_object.data\u0027][\u0027requested_resources\u0027])"},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"        # also we expect that requested_resources field does not reset after"},{"line_number":653,"context_line":"        # create"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_24f622d7","line":650,"range":{"start_line":649,"start_character":12,"end_line":650,"end_character":74},"in_reply_to":"3f79a3b5_63456c4a","updated":"2018-11-05 22:09:54.000000000","message":"Done","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9bcb9d3c74a13df877b0b5a1e013934851fb298a","unresolved":false,"context_lines":[{"line_number":667,"context_line":"                as mock_save_in_db:"},{"line_number":668,"context_line":"            mock_save_in_db.side_effect \u003d orig_save_in_db"},{"line_number":669,"context_line":"            req_obj.save()"},{"line_number":670,"context_line":"            self.assertEqual(1, len(mock_save_in_db.mock_calls))"},{"line_number":671,"context_line":"            updates \u003d mock_save_in_db.mock_calls[0][1][2]"},{"line_number":672,"context_line":"            # assert that the requested_resources field is not stored in the db"},{"line_number":673,"context_line":"            self.assertIsNone(jsonutils.loads(updates[\u0027spec\u0027])"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_e3389ccd","line":670,"range":{"start_line":670,"start_character":12,"end_line":670,"end_character":64},"updated":"2018-10-30 14:40:43.000000000","message":"nit: same as above","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"45afbd2ea58c851b14e65c73cf73a517d9ff7b2c","unresolved":false,"context_lines":[{"line_number":667,"context_line":"                as mock_save_in_db:"},{"line_number":668,"context_line":"            mock_save_in_db.side_effect \u003d orig_save_in_db"},{"line_number":669,"context_line":"            req_obj.save()"},{"line_number":670,"context_line":"            self.assertEqual(1, len(mock_save_in_db.mock_calls))"},{"line_number":671,"context_line":"            updates \u003d mock_save_in_db.mock_calls[0][1][2]"},{"line_number":672,"context_line":"            # assert that the requested_resources field is not stored in the db"},{"line_number":673,"context_line":"            self.assertIsNone(jsonutils.loads(updates[\u0027spec\u0027])"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_c4cdee92","line":670,"range":{"start_line":670,"start_character":12,"end_line":670,"end_character":64},"in_reply_to":"3f79a3b5_e3389ccd","updated":"2018-11-05 22:09:54.000000000","message":"Done","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9bcb9d3c74a13df877b0b5a1e013934851fb298a","unresolved":false,"context_lines":[{"line_number":670,"context_line":"            self.assertEqual(1, len(mock_save_in_db.mock_calls))"},{"line_number":671,"context_line":"            updates \u003d mock_save_in_db.mock_calls[0][1][2]"},{"line_number":672,"context_line":"            # assert that the requested_resources field is not stored in the db"},{"line_number":673,"context_line":"            self.assertIsNone(jsonutils.loads(updates[\u0027spec\u0027])"},{"line_number":674,"context_line":"                              [\u0027nova_object.data\u0027][\u0027requested_resources\u0027])"},{"line_number":675,"context_line":""},{"line_number":676,"context_line":"        # also we expect that requested_resources field does not reset after"},{"line_number":677,"context_line":"        # save"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_c33fa0b0","line":674,"range":{"start_line":673,"start_character":12,"end_line":674,"end_character":74},"updated":"2018-10-30 14:40:43.000000000","message":"same as above","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"45afbd2ea58c851b14e65c73cf73a517d9ff7b2c","unresolved":false,"context_lines":[{"line_number":670,"context_line":"            self.assertEqual(1, len(mock_save_in_db.mock_calls))"},{"line_number":671,"context_line":"            updates \u003d mock_save_in_db.mock_calls[0][1][2]"},{"line_number":672,"context_line":"            # assert that the requested_resources field is not stored in the db"},{"line_number":673,"context_line":"            self.assertIsNone(jsonutils.loads(updates[\u0027spec\u0027])"},{"line_number":674,"context_line":"                              [\u0027nova_object.data\u0027][\u0027requested_resources\u0027])"},{"line_number":675,"context_line":""},{"line_number":676,"context_line":"        # also we expect that requested_resources field does not reset after"},{"line_number":677,"context_line":"        # save"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_e4d26a33","line":674,"range":{"start_line":673,"start_character":12,"end_line":674,"end_character":74},"in_reply_to":"3f79a3b5_c33fa0b0","updated":"2018-11-05 22:09:54.000000000","message":"Done","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9bcb9d3c74a13df877b0b5a1e013934851fb298a","unresolved":false,"context_lines":[{"line_number":770,"context_line":"        primitive \u003d req_obj.obj_to_primitive(target_version\u003d\u00271.11\u0027,"},{"line_number":771,"context_line":"                                             version_manifest\u003dversions)"},{"line_number":772,"context_line":"        primitive \u003d primitive[\u0027nova_object.data\u0027]"},{"line_number":773,"context_line":"        self.assertNotIn(\u0027requested_resources\u0027, primitive)"},{"line_number":774,"context_line":""},{"line_number":775,"context_line":"    def test_default_requested_destination(self):"},{"line_number":776,"context_line":"        req_obj \u003d objects.RequestSpec()"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_035fd810","line":773,"range":{"start_line":773,"start_character":8,"end_line":773,"end_character":58},"updated":"2018-10-30 14:40:43.000000000","message":"nit: put something into the request spec that you expect to be preserved in the primitive past the downgrade and assert it is still in there, to make sure this is not a false positive.","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"45afbd2ea58c851b14e65c73cf73a517d9ff7b2c","unresolved":false,"context_lines":[{"line_number":770,"context_line":"        primitive \u003d req_obj.obj_to_primitive(target_version\u003d\u00271.11\u0027,"},{"line_number":771,"context_line":"                                             version_manifest\u003dversions)"},{"line_number":772,"context_line":"        primitive \u003d primitive[\u0027nova_object.data\u0027]"},{"line_number":773,"context_line":"        self.assertNotIn(\u0027requested_resources\u0027, primitive)"},{"line_number":774,"context_line":""},{"line_number":775,"context_line":"    def test_default_requested_destination(self):"},{"line_number":776,"context_line":"        req_obj \u003d objects.RequestSpec()"}],"source_content_type":"text/x-python","patch_set":26,"id":"3f79a3b5_a4d8f250","line":773,"range":{"start_line":773,"start_character":8,"end_line":773,"end_character":58},"in_reply_to":"3f79a3b5_035fd810","updated":"2018-11-05 22:09:54.000000000","message":"Done","commit_id":"f8254462b98ee374cb07b950aecf82cc5d752f2d"}]}
