)]}'
{"nova/conductor/tasks/migrate.py":[{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"1e46f9c79f488826f70a89795dbc974ffd180cb0","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        # oslo.messaging #1529084 to transform datetime values into strings."},{"line_number":78,"context_line":"        # tl;dr: datetimes in dicts are not accepted as correct values by the"},{"line_number":79,"context_line":"        # rpc fake driver."},{"line_number":80,"context_line":"        legacy_spec \u003d jsonutils.loads(jsonutils.dumps(legacy_spec))"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        # Put back pci_requests"},{"line_number":83,"context_line":"        if pci_requests:"}],"source_content_type":"text/x-python","patch_set":5,"id":"9abb7d3a_22025c0a","line":80,"updated":"2016-06-01 18:36:43.000000000","message":"This is kind of hacky.\n\nRemoving the DictCompat from InstancePCIRequests makes the object not serializable.\n\nNot sure what is the best way to fix this ...\n\nAnother option would be to not rely on jsonutils do fix the datetime objects.","commit_id":"79d0f2abbfa43a9f9928bb965be84577dbaeea44"}],"nova/objects/instance_pci_requests.py":[{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"e1de0b83295b7cdd0a8a0b7a3ec27094867ab447","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":54,"context_line":"class InstancePCIRequests(base.NovaObject):"},{"line_number":55,"context_line":"    # Version 1.0: Initial version"},{"line_number":56,"context_line":"    # Version 1.1: InstancePCIRequest 1.1"},{"line_number":57,"context_line":"    VERSION \u003d \u00271.1\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_af4f20bd","line":54,"range":{"start_line":54,"start_character":41,"end_line":54,"end_character":43},"updated":"2016-05-03 01:42:31.000000000","message":"remove the base.NovaObjectDictCompat, means InstancePCIRequests not a dict, so ** operation is unsuported anymore. we need identify where the \"InstancePCIRequests\" been unpacked, and fix that.\n\nrefer to:\nhttp://52.27.155.124/pci/311870/1/screen-logs/n-cond.log.2016-05-03-061436.gz\n\nerror:\n Failed to compute_task_build_instances: type object argument after ** must be a mapping, not InstancePCIRequest","commit_id":"9ba32fe49da43351b565bdcd646524e41a687d26"},{"author":{"_account_id":7543,"name":"Yongli He","email":"yongli.he@intel.com","username":"yongli.he"},"change_message_id":"bbe1f18ece5e8fc5424dbdf29508165158470118","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":54,"context_line":"class InstancePCIRequests(base.NovaObject):"},{"line_number":55,"context_line":"    # Version 1.0: Initial version"},{"line_number":56,"context_line":"    # Version 1.1: InstancePCIRequest 1.1"},{"line_number":57,"context_line":"    VERSION \u003d \u00271.1\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_9cb7d7d6","line":54,"range":{"start_line":54,"start_character":41,"end_line":54,"end_character":43},"in_reply_to":"1a122d0e_411f33b7","updated":"2016-05-04 01:21:19.000000000","message":"cool,thanks identify where the ** came from.","commit_id":"9ba32fe49da43351b565bdcd646524e41a687d26"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"ccfe65b9e5b3aaa32b74df63072903fca490fb4e","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":54,"context_line":"class InstancePCIRequests(base.NovaObject):"},{"line_number":55,"context_line":"    # Version 1.0: Initial version"},{"line_number":56,"context_line":"    # Version 1.1: InstancePCIRequest 1.1"},{"line_number":57,"context_line":"    VERSION \u003d \u00271.1\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_411f33b7","line":54,"range":{"start_line":54,"start_character":41,"end_line":54,"end_character":43},"in_reply_to":"1a122d0e_af4f20bd","updated":"2016-05-03 13:54:06.000000000","message":"No.  Removing NovaObjectDictCompat means that you can\u0027t access fields on the object using dict like access.\n\nIt doesn\u0027t mean that you can\u0027t build a InstancePCIRequests from a dictionary, which is still valid.  But I agree that in long terms we need to get rid of that as well.\n\nProblem (as I indicated in the comment below), is that sched_utils.build_request_spec is creating/using a dictionary for the instance and it\u0027s objects.  Until this is fixed, we need to support the ** operation.","commit_id":"9ba32fe49da43351b565bdcd646524e41a687d26"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"a68281a136ecbbfa2d993289bd4aa013a85fa266","unresolved":false,"context_lines":[{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    @classmethod"},{"line_number":146,"context_line":"    def from_request_spec_instance_props(cls, pci_requests):"},{"line_number":147,"context_line":"        # NOTE(lbeliveau): select_destinations() is getting a request_spec"},{"line_number":148,"context_line":"        # dict made by sched_utils.build_request_spec()."},{"line_number":149,"context_line":"        # TODO(lbeliveau): To be removed once all RequestSpec hydrations are"},{"line_number":150,"context_line":"        # done on the conductor side."}],"source_content_type":"text/x-python","patch_set":4,"id":"bab6814e_0cba56c0","line":147,"range":{"start_line":147,"start_character":62,"end_line":147,"end_character":74},"updated":"2016-05-19 21:41:50.000000000","message":"is it getting a request_spec dict or a pci_request dict? because you\u0027re checking below to see if pci_requests is a dict","commit_id":"af5802f3e5ca4c8258e3c46c5ec8aeb1e7df0efc"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"a68281a136ecbbfa2d993289bd4aa013a85fa266","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        # dict made by sched_utils.build_request_spec()."},{"line_number":149,"context_line":"        # TODO(lbeliveau): To be removed once all RequestSpec hydrations are"},{"line_number":150,"context_line":"        # done on the conductor side."},{"line_number":151,"context_line":"        if isinstance(pci_requests, dict):"},{"line_number":152,"context_line":"            objs \u003d [request for request in pci_requests[\u0027requests\u0027]]"},{"line_number":153,"context_line":"            return cls(requests\u003dobjs,"},{"line_number":154,"context_line":"                       instance_uuid\u003dpci_requests[\u0027instance_uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab6814e_ac786ac5","line":151,"updated":"2016-05-19 21:41:50.000000000","message":"Looking at https://github.com/openstack/nova/blob/master/nova/objects/request_spec.py#L44, every pci request that will be coming across from the RequestSpec object will always have an InstancePCIRequests object set, so this should never be a dict.\n\nIf this is removed, I\u0027m betting it will blow up in https://github.com/openstack/nova/blob/433edb6cf6dc302655a6fca4425d695ba7655911/nova/tests/unit/objects/test_request_spec.py#L127-L129 because they\u0027re faking out not only the instance as a dict, but also faking out the pci_requests as a dict. Because this object is no longer DictCompat, that kind of mocking out will blow up in places using object notation. Because of that, the test should be updated to use an InstancePCIRequests object instead of a dict. That should allow you to remove this dict check.","commit_id":"af5802f3e5ca4c8258e3c46c5ec8aeb1e7df0efc"},{"author":{"_account_id":17973,"name":"Ludovic Beliveau","email":"lbeliveau@gmail.com","username":"lbeliveau"},"change_message_id":"86b1e8182441d2dd645948addb9cffa7e8978b23","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        # dict made by sched_utils.build_request_spec()."},{"line_number":149,"context_line":"        # TODO(lbeliveau): To be removed once all RequestSpec hydrations are"},{"line_number":150,"context_line":"        # done on the conductor side."},{"line_number":151,"context_line":"        if isinstance(pci_requests, dict):"},{"line_number":152,"context_line":"            objs \u003d [request for request in pci_requests[\u0027requests\u0027]]"},{"line_number":153,"context_line":"            return cls(requests\u003dobjs,"},{"line_number":154,"context_line":"                       instance_uuid\u003dpci_requests[\u0027instance_uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab6814e_c6fae674","line":151,"in_reply_to":"bab6814e_ac786ac5","updated":"2016-05-19 23:50:04.000000000","message":"Ryan, I retested with the dict check removed.  This works fine for the unit tests.\n\nBut the issue is with the functional tests.\n\nThe problem is with build_request_spec() which return a json string which is guaranteed to be a dictionary.\n\nhttps://github.com/openstack/nova/blob/master/nova/scheduler/utils.py#L82\n\nUntil this is fixed, I\u0027m not sure how we can avoid doing this check in the PCI request object.","commit_id":"af5802f3e5ca4c8258e3c46c5ec8aeb1e7df0efc"},{"author":{"_account_id":11803,"name":"Ryan Rossiter","email":"rlrossit@us.ibm.com","username":"rlrossiter"},"change_message_id":"a4aa19da88a90139aaf4e405a2685268212c4e57","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        # dict made by sched_utils.build_request_spec()."},{"line_number":149,"context_line":"        # TODO(lbeliveau): To be removed once all RequestSpec hydrations are"},{"line_number":150,"context_line":"        # done on the conductor side."},{"line_number":151,"context_line":"        if isinstance(pci_requests, dict):"},{"line_number":152,"context_line":"            objs \u003d [request for request in pci_requests[\u0027requests\u0027]]"},{"line_number":153,"context_line":"            return cls(requests\u003dobjs,"},{"line_number":154,"context_line":"                       instance_uuid\u003dpci_requests[\u0027instance_uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab6814e_aea5cda2","line":151,"in_reply_to":"bab6814e_c6fae674","updated":"2016-05-20 18:32:33.000000000","message":"I know what\u0027s going on now. This is always called with pci_requests being a dict I think. https://github.com/openstack/nova/blob/master/nova/objects/request_spec.py#L185 is called shortly after build_request_spec(), which calls _from_instance(), which then calls from_request_spec_instance_props() with the pci_requests primitive.\n\nSo now I\u0027m torn as to how this function should exist. Should we always assume it\u0027s a dict, and fix it in places it isn\u0027t called with a dict? Or should we change over _from_instance() to just generate a request spec instead of calling this?\n\nHaving the if/else on the typing is something I don\u0027t want in here, because it just gets confusing, and I don\u0027t see that being removed ever.","commit_id":"af5802f3e5ca4c8258e3c46c5ec8aeb1e7df0efc"}]}
