)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"6ad20d28930ce566b88f300ea293a8f69092e8ed","unresolved":false,"context_lines":[{"line_number":17,"context_line":"*most* of the code paths. As of this patch, it is still used in the"},{"line_number":18,"context_line":"revert_resize flow. That will need to be cleaned up later."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"WIP: Not near done with this yet, need to do the whole scheduler side,"},{"line_number":21,"context_line":"and the guts of fill_provider_mapping, and all the tests."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: I52499ff6639c1a5815a8557b22dd33106dcc386b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3fa7e38b_cff2239c","line":21,"range":{"start_line":20,"start_character":0,"end_line":21,"end_character":57},"updated":"2019-11-29 15:00:06.000000000","message":"Here","commit_id":"942731bfeb88659f17b04dc117974efb8a5039a2"}],"nova/scheduler/client/report.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"18d750363a3c60066f7c975fd7b455d49d9d721e","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        \"\"\""},{"line_number":292,"context_line":"        # Note that claim_resources() will use this version as well to"},{"line_number":293,"context_line":"        # make allocations by `PUT /allocations/{consumer_uuid}`"},{"line_number":294,"context_line":"        version \u003d MAPPINGS_VERSION"},{"line_number":295,"context_line":"        qparams \u003d resources.to_querystring()"},{"line_number":296,"context_line":"        url \u003d \"/allocation_candidates?%s\" % qparams"},{"line_number":297,"context_line":"        resp \u003d self.get(url, version\u003dversion,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_181e235f","line":294,"updated":"2019-12-03 16:33:44.000000000","message":"If we change the version in a_c don\u0027t we have to change the version in put allocation as well? I mean during claim_resources most of the cases we use the same version as the in the a_c but except when we need to handle evacuation, there we get the current allocation _with a different_ version that this from placement. See \n* https://github.com/openstack/nova/blob/b953db09e8b9195c6a922c03a57f44cd790adcb6/nova/scheduler/client/report.py#L1566\n* https://github.com/openstack/nova/blob/b953db09e8b9195c6a922c03a57f44cd790adcb6/nova/scheduler/client/report.py#L1595\n* https://github.com/openstack/nova/blob/b953db09e8b9195c6a922c03a57f44cd790adcb6/nova/scheduler/client/report.py#L1609\n\nWhile based on the test results this change works I think it  would be safer to use the same MAPPING_VERSION microversion at https://github.com/openstack/nova/blob/b953db09e8b9195c6a922c03a57f44cd790adcb6/nova/scheduler/client/report.py#L1567 as well.","commit_id":"7323ec20dc88e3a01516ff3987decdffe74e9855"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"4081d526d3d9eacd3709136e4dbaeecc8d6e0005","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        \"\"\""},{"line_number":292,"context_line":"        # Note that claim_resources() will use this version as well to"},{"line_number":293,"context_line":"        # make allocations by `PUT /allocations/{consumer_uuid}`"},{"line_number":294,"context_line":"        version \u003d MAPPINGS_VERSION"},{"line_number":295,"context_line":"        qparams \u003d resources.to_querystring()"},{"line_number":296,"context_line":"        url \u003d \"/allocation_candidates?%s\" % qparams"},{"line_number":297,"context_line":"        resp \u003d self.get(url, version\u003dversion,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_96e898df","line":294,"in_reply_to":"3fa7e38b_181e235f","updated":"2019-12-03 19:15:48.000000000","message":"\u003e If we change the version in a_c don\u0027t we have to change the version\n \u003e in put allocation as well?\n\nThe only difference in PUT/POST /allocations* from previous microversions is that it allows (but ignores) the \u0027mappings\u0027 field. So unless we\u0027ve saved the allocation *candidate* off somewhere (which I suppose we might have to do later to fix the revert_resize thing) the *allocations* we\u0027re using in all the other places could theoretically just be sent down with an older microversion.\n\nHowever, that\u0027s not what\u0027s happening. Any time we PUT allocations that were retrieved via GET /allocation_candidates, we use the microversion gleaned from the third value in the tuple returned by this method, which ends up as allocation_request_version in the code you\u0027ve linked.\n\n \u003e * https://github.com/openstack/nova/blob/b953db09e8b9195c6a922c03a57f44cd790adcb6/nova/scheduler/client/report.py#L1566\n\nGET /allocations is unchanged at the new microversion. (Importantly, it does *not* return mappings -- how could it?)\n\n \u003e * https://github.com/openstack/nova/blob/b953db09e8b9195c6a922c03a57f44cd790adcb6/nova/scheduler/client/report.py#L1595\n\nThis method does consume the allocation request returned by GET /a_c, but it peels out the allocations and uses them to assemble the new payload...\n\n \u003e * https://github.com/openstack/nova/blob/b953db09e8b9195c6a922c03a57f44cd790adcb6/nova/scheduler/client/report.py#L1609\n\n...so this payload won\u0027t have \u0027mappings\u0027 in it.\n\n \u003e While based on the test results this change works I think it  would\n \u003e be safer to use the same MAPPING_VERSION microversion at\n \u003e https://github.com/openstack/nova/blob/b953db09e8b9195c6a922c03a57f44cd790adcb6/nova/scheduler/client/report.py#L1567\n \u003e as well.\n\nThat would imply that we\u0027re expecting something different from that GET at the new microversion. We\u0027re not.\n\n(I thought you were going to say we should use the new microversion for all PUTs/POSTs to be safe, e.g. just in case _move_operation_alloc_request wasn\u0027t stripping the mappings out. But we already are, via the allocation_request_version.)","commit_id":"7323ec20dc88e3a01516ff3987decdffe74e9855"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"532ffb506d49e3f796e9041d5477e33be64b5ede","unresolved":false,"context_lines":[{"line_number":291,"context_line":"        \"\"\""},{"line_number":292,"context_line":"        # Note that claim_resources() will use this version as well to"},{"line_number":293,"context_line":"        # make allocations by `PUT /allocations/{consumer_uuid}`"},{"line_number":294,"context_line":"        version \u003d MAPPINGS_VERSION"},{"line_number":295,"context_line":"        qparams \u003d resources.to_querystring()"},{"line_number":296,"context_line":"        url \u003d \"/allocation_candidates?%s\" % qparams"},{"line_number":297,"context_line":"        resp \u003d self.get(url, version\u003dversion,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_c142c10d","line":294,"in_reply_to":"3fa7e38b_96e898df","updated":"2019-12-04 11:17:54.000000000","message":"Thanks for the explanation. I rest my case.","commit_id":"7323ec20dc88e3a01516ff3987decdffe74e9855"}],"nova/scheduler/utils.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c49d15e0add4fe0e4d56615ecdee5004111b69a7","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            # No memory encryption required, so no further action required."},{"line_number":220,"context_line":"            return"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        # TODO(efried): This should go into root_required (placement 1.35)"},{"line_number":223,"context_line":"        self._add_resource(None, orc.MEM_ENCRYPTION_CONTEXT, 1)"},{"line_number":224,"context_line":"        LOG.debug(\"Added %s\u003d1 to requested resources\","},{"line_number":225,"context_line":"                  orc.MEM_ENCRYPTION_CONTEXT)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_89b18b47","line":222,"updated":"2019-11-29 11:31:51.000000000","message":"MEM_ENCRYPTION_CONTEXT is a resource not a trait so it cannot be in root_required","commit_id":"942731bfeb88659f17b04dc117974efb8a5039a2"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3c124615eaa01a289699648375d1440855cd33fd","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            # No memory encryption required, so no further action required."},{"line_number":220,"context_line":"            return"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        # TODO(efried): This should go into root_required (placement 1.35)"},{"line_number":223,"context_line":"        self._add_resource(None, orc.MEM_ENCRYPTION_CONTEXT, 1)"},{"line_number":224,"context_line":"        LOG.debug(\"Added %s\u003d1 to requested resources\","},{"line_number":225,"context_line":"                  orc.MEM_ENCRYPTION_CONTEXT)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_7db2b008","line":222,"in_reply_to":"3fa7e38b_89b18b47","updated":"2019-12-02 19:39:37.000000000","message":"D\u0027oh, done","commit_id":"942731bfeb88659f17b04dc117974efb8a5039a2"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c49d15e0add4fe0e4d56615ecdee5004111b69a7","unresolved":false,"context_lines":[{"line_number":302,"context_line":"        if ident not in self._rg_by_id:"},{"line_number":303,"context_line":"            rq_grp \u003d objects.RequestGroup("},{"line_number":304,"context_line":"                use_same_provider\u003dbool(ident),"},{"line_number":305,"context_line":"                requester_id\u003dident)"},{"line_number":306,"context_line":"            self._rg_by_id[ident] \u003d rq_grp"},{"line_number":307,"context_line":"        return self._rg_by_id[ident]"},{"line_number":308,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_698d2f7b","line":305,"updated":"2019-11-29 11:31:51.000000000","message":"It is OK but unused so far. The requester_id of the RequestGroup objects are set for the port request at [1] and then the request group is simply added to the ResourceRequest without creating a new RequestGroup here. \n\nI think get_request_group is used to create the non suffixed group so here we setting requester_id\u003dNone. As RequestGroup.requester_id is nullable it is OK to do this.\n\n\n[1] https://github.com/openstack/nova/blob/f1382651dc3b7b945b69a2af0bc05aa472f26b28/nova/objects/request_spec.py#L1103","commit_id":"942731bfeb88659f17b04dc117974efb8a5039a2"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"07844dada096b0a493668a8fd9c6b2b3b57fafa7","unresolved":false,"context_lines":[{"line_number":302,"context_line":"        if ident not in self._rg_by_id:"},{"line_number":303,"context_line":"            rq_grp \u003d objects.RequestGroup("},{"line_number":304,"context_line":"                use_same_provider\u003dbool(ident),"},{"line_number":305,"context_line":"                requester_id\u003dident)"},{"line_number":306,"context_line":"            self._rg_by_id[ident] \u003d rq_grp"},{"line_number":307,"context_line":"        return self._rg_by_id[ident]"},{"line_number":308,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_9e18c376","line":305,"in_reply_to":"3fa7e38b_698d2f7b","updated":"2019-12-02 20:31:04.000000000","message":"Hopefully this will be clearer when the (next) patch is done, but I\u0027m doing this because I\u0027m going to be using the requester_id to correlate the mappings on the other side. If I don\u0027t add these in here, any suffixes from the flavor will be lost (and the mappings might show those as having come from the unsuffixed group?)","commit_id":"942731bfeb88659f17b04dc117974efb8a5039a2"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c49d15e0add4fe0e4d56615ecdee5004111b69a7","unresolved":false,"context_lines":[{"line_number":317,"context_line":"        requester_id is already set, use it. But ensure that it is unique"},{"line_number":318,"context_line":"        in combination with suffixes from the flavor."},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        Otherwise, if the request group has no requester_id, we will generate"},{"line_number":321,"context_line":"        one **and** set it in the request group."},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"        :param request_group: the RequestGroup to be added"},{"line_number":324,"context_line":"        :raise: RequestGroupSuffixConflict if request_group.requester_id"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_a9d80780","line":321,"range":{"start_line":320,"start_character":0,"end_line":321,"end_character":48},"updated":"2019-11-29 11:31:51.000000000","message":"Can we simply fail instead? If the group coming from outside then I think that outside party should set the requester_id","commit_id":"942731bfeb88659f17b04dc117974efb8a5039a2"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"07844dada096b0a493668a8fd9c6b2b3b57fafa7","unresolved":false,"context_lines":[{"line_number":317,"context_line":"        requester_id is already set, use it. But ensure that it is unique"},{"line_number":318,"context_line":"        in combination with suffixes from the flavor."},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        Otherwise, if the request group has no requester_id, we will generate"},{"line_number":321,"context_line":"        one **and** set it in the request group."},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"        :param request_group: the RequestGroup to be added"},{"line_number":324,"context_line":"        :raise: RequestGroupSuffixConflict if request_group.requester_id"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_be133f59","line":321,"range":{"start_line":320,"start_character":0,"end_line":321,"end_character":48},"in_reply_to":"3fa7e38b_a9d80780","updated":"2019-12-02 20:31:04.000000000","message":"Done","commit_id":"942731bfeb88659f17b04dc117974efb8a5039a2"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c49d15e0add4fe0e4d56615ecdee5004111b69a7","unresolved":false,"context_lines":[{"line_number":324,"context_line":"        :raise: RequestGroupSuffixConflict if request_group.requester_id"},{"line_number":325,"context_line":"            already exists in this ResourceRequest."},{"line_number":326,"context_line":"        \"\"\""},{"line_number":327,"context_line":"        if (\u0027requester_id\u0027 in request_group and"},{"line_number":328,"context_line":"                request_group.requester_id is not None):"},{"line_number":329,"context_line":"            if request_group.requester_id in self._rg_by_id:"},{"line_number":330,"context_line":"                raise exception.RequestGroupSuffixConflict("}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_89df4b65","line":327,"range":{"start_line":327,"start_character":12,"end_line":327,"end_character":43},"updated":"2019-11-29 11:31:51.000000000","message":"It is defaulted to None and the default is enforced at __init__[1] so this condition is not necessary\n\n[1] https://github.com/openstack/nova/blob/f1382651dc3b7b945b69a2af0bc05aa472f26b28/nova/objects/request_spec.py#L1071","commit_id":"942731bfeb88659f17b04dc117974efb8a5039a2"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"532ffb506d49e3f796e9041d5477e33be64b5ede","unresolved":false,"context_lines":[{"line_number":324,"context_line":"        :raise: RequestGroupSuffixConflict if request_group.requester_id"},{"line_number":325,"context_line":"            already exists in this ResourceRequest."},{"line_number":326,"context_line":"        \"\"\""},{"line_number":327,"context_line":"        if (\u0027requester_id\u0027 in request_group and"},{"line_number":328,"context_line":"                request_group.requester_id is not None):"},{"line_number":329,"context_line":"            if request_group.requester_id in self._rg_by_id:"},{"line_number":330,"context_line":"                raise exception.RequestGroupSuffixConflict("}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_2102b5bb","line":327,"range":{"start_line":327,"start_character":12,"end_line":327,"end_character":43},"in_reply_to":"3fa7e38b_73d72ef0","updated":"2019-12-04 11:17:54.000000000","message":"My way to enforce the invariant is to call self.obj_set_defaults() in __init__ but Dan is against that pattern.","commit_id":"942731bfeb88659f17b04dc117974efb8a5039a2"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"07844dada096b0a493668a8fd9c6b2b3b57fafa7","unresolved":false,"context_lines":[{"line_number":324,"context_line":"        :raise: RequestGroupSuffixConflict if request_group.requester_id"},{"line_number":325,"context_line":"            already exists in this ResourceRequest."},{"line_number":326,"context_line":"        \"\"\""},{"line_number":327,"context_line":"        if (\u0027requester_id\u0027 in request_group and"},{"line_number":328,"context_line":"                request_group.requester_id is not None):"},{"line_number":329,"context_line":"            if request_group.requester_id in self._rg_by_id:"},{"line_number":330,"context_line":"                raise exception.RequestGroupSuffixConflict("}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_de371be4","line":327,"range":{"start_line":327,"start_character":12,"end_line":327,"end_character":43},"in_reply_to":"3fa7e38b_89df4b65","updated":"2019-12-02 20:31:04.000000000","message":"Apparently it is technically not redundant [1], but excessively paranoid in this case, so I\u0027ll remove it.\n\n[1] http://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2019-12-02.log.html#t2019-12-02T20:04:18","commit_id":"942731bfeb88659f17b04dc117974efb8a5039a2"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"4081d526d3d9eacd3709136e4dbaeecc8d6e0005","unresolved":false,"context_lines":[{"line_number":324,"context_line":"        :raise: RequestGroupSuffixConflict if request_group.requester_id"},{"line_number":325,"context_line":"            already exists in this ResourceRequest."},{"line_number":326,"context_line":"        \"\"\""},{"line_number":327,"context_line":"        if (\u0027requester_id\u0027 in request_group and"},{"line_number":328,"context_line":"                request_group.requester_id is not None):"},{"line_number":329,"context_line":"            if request_group.requester_id in self._rg_by_id:"},{"line_number":330,"context_line":"                raise exception.RequestGroupSuffixConflict("}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_73d72ef0","line":327,"range":{"start_line":327,"start_character":12,"end_line":327,"end_character":43},"in_reply_to":"3fa7e38b_cd5bef52","updated":"2019-12-03 19:15:48.000000000","message":"Or at least provide a *way* to enforce. These things have always been a swirling vortex of mystery to me.","commit_id":"942731bfeb88659f17b04dc117974efb8a5039a2"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"18d750363a3c60066f7c975fd7b455d49d9d721e","unresolved":false,"context_lines":[{"line_number":324,"context_line":"        :raise: RequestGroupSuffixConflict if request_group.requester_id"},{"line_number":325,"context_line":"            already exists in this ResourceRequest."},{"line_number":326,"context_line":"        \"\"\""},{"line_number":327,"context_line":"        if (\u0027requester_id\u0027 in request_group and"},{"line_number":328,"context_line":"                request_group.requester_id is not None):"},{"line_number":329,"context_line":"            if request_group.requester_id in self._rg_by_id:"},{"line_number":330,"context_line":"                raise exception.RequestGroupSuffixConflict("}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_cd5bef52","line":327,"range":{"start_line":327,"start_character":12,"end_line":327,"end_character":43},"in_reply_to":"3fa7e38b_de371be4","updated":"2019-12-03 16:33:44.000000000","message":"Rhetorical question: Why do we have an object model that requires you to pre-define the fields of the object and then fails to enforce the invariant to have such fields exists in the object?","commit_id":"942731bfeb88659f17b04dc117974efb8a5039a2"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"c49d15e0add4fe0e4d56615ecdee5004111b69a7","unresolved":false,"context_lines":[{"line_number":329,"context_line":"            if request_group.requester_id in self._rg_by_id:"},{"line_number":330,"context_line":"                raise exception.RequestGroupSuffixConflict("},{"line_number":331,"context_line":"                    suffix\u003drequest_group.requester_id)"},{"line_number":332,"context_line":"        else:"},{"line_number":333,"context_line":"            # If we get here, we need to generate a unique suffix. We\u0027ll do"},{"line_number":334,"context_line":"            # this by peeling out all the suffixes that are integers (respond"},{"line_number":335,"context_line":"            # to int()) and adding 1 to the highest one."},{"line_number":336,"context_line":"            max_ident \u003d 0"},{"line_number":337,"context_line":"            for ident in self._rg_by_id:"},{"line_number":338,"context_line":"                try:"},{"line_number":339,"context_line":"                    max_ident \u003d max(int(ident), max_ident)"},{"line_number":340,"context_line":"                except (TypeError, ValueError):"},{"line_number":341,"context_line":"                    # Non-numeric or None (unsuffixed)"},{"line_number":342,"context_line":"                    continue"},{"line_number":343,"context_line":"            request_group.requester_id \u003d str(max_ident + 1)"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        self._rg_by_id[request_group.requester_id] \u003d request_group"},{"line_number":346,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_e9c7df97","line":343,"range":{"start_line":332,"start_character":1,"end_line":343,"end_character":59},"updated":"2019-11-29 11:31:51.000000000","message":"I would simply raise instead. That is less complex and I think today every external group has a proper requester_id","commit_id":"942731bfeb88659f17b04dc117974efb8a5039a2"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"07844dada096b0a493668a8fd9c6b2b3b57fafa7","unresolved":false,"context_lines":[{"line_number":329,"context_line":"            if request_group.requester_id in self._rg_by_id:"},{"line_number":330,"context_line":"                raise exception.RequestGroupSuffixConflict("},{"line_number":331,"context_line":"                    suffix\u003drequest_group.requester_id)"},{"line_number":332,"context_line":"        else:"},{"line_number":333,"context_line":"            # If we get here, we need to generate a unique suffix. We\u0027ll do"},{"line_number":334,"context_line":"            # this by peeling out all the suffixes that are integers (respond"},{"line_number":335,"context_line":"            # to int()) and adding 1 to the highest one."},{"line_number":336,"context_line":"            max_ident \u003d 0"},{"line_number":337,"context_line":"            for ident in self._rg_by_id:"},{"line_number":338,"context_line":"                try:"},{"line_number":339,"context_line":"                    max_ident \u003d max(int(ident), max_ident)"},{"line_number":340,"context_line":"                except (TypeError, ValueError):"},{"line_number":341,"context_line":"                    # Non-numeric or None (unsuffixed)"},{"line_number":342,"context_line":"                    continue"},{"line_number":343,"context_line":"            request_group.requester_id \u003d str(max_ident + 1)"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        self._rg_by_id[request_group.requester_id] \u003d request_group"},{"line_number":346,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_fe3217f3","line":343,"range":{"start_line":332,"start_character":1,"end_line":343,"end_character":59},"in_reply_to":"3fa7e38b_e9c7df97","updated":"2019-12-02 20:31:04.000000000","message":"Done","commit_id":"942731bfeb88659f17b04dc117974efb8a5039a2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1cd2b63e4124450f04ad354d5bf2ee422039c647","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        ...where ``$S`` is a string suffix as supported via Placement"},{"line_number":74,"context_line":"        microversion 1.33"},{"line_number":75,"context_line":"        https://docs.openstack.org/placement/train/specs/train/implemented/2005575-nested-magic-1.html#arbitrary-group-suffixes  # noqa"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        .. note::"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_e0f9d081","line":75,"updated":"2019-12-06 14:16:29.000000000","message":"Could have also just linked to the API reference:\n\nhttps://docs.openstack.org/placement/latest/placement-api-microversion-history.html#support-string-request-group-suffixes\n\nBut the spec probably has more detail.","commit_id":"54195a1bd967676fd9a59494cc1f60695e7f4189"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1cd2b63e4124450f04ad354d5bf2ee422039c647","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        A group coming from \"outside\" (ports, device profiles) must be given a"},{"line_number":308,"context_line":"        suffix that is unique in combination with suffixes from the flavor."},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        .. todo:: Tie suffixes to RequestGroup.requester_id"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        :param request_group: the RequestGroup to be added"},{"line_number":313,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_80ea5c9d","line":310,"updated":"2019-12-06 14:16:29.000000000","message":"Probably should have been a:\n\n# TODO(efried): Tie suffixes to RequestGroup.requester_id\n\nOutside the docstring. Easier to find TODOs like that IMO.","commit_id":"54195a1bd967676fd9a59494cc1f60695e7f4189"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"73a606abd2d5724e2e52ec01543976fdb9632ca9","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        A group coming from \"outside\" (ports, device profiles) must be given a"},{"line_number":308,"context_line":"        suffix that is unique in combination with suffixes from the flavor."},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        .. todo:: Tie suffixes to RequestGroup.requester_id"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"        :param request_group: the RequestGroup to be added"},{"line_number":313,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_6d50780b","line":310,"in_reply_to":"3fa7e38b_80ea5c9d","updated":"2019-12-06 15:59:58.000000000","message":"Ack. This goes away two patches up anyway.","commit_id":"54195a1bd967676fd9a59494cc1f60695e7f4189"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1cd2b63e4124450f04ad354d5bf2ee422039c647","unresolved":false,"context_lines":[{"line_number":450,"context_line":""},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"def build_request_spec(image, instances, instance_type\u003dNone):"},{"line_number":453,"context_line":"    \"\"\"Build a request_spec (ahem, not a RequestSpec) for the scheduler."},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"    The request_spec assumes that all instances to be scheduled are the same"},{"line_number":456,"context_line":"    type."}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_e02eb0f7","line":453,"updated":"2019-12-06 14:16:29.000000000","message":"While true, this is unrelated. Maybe should have a follow up that cleans up this method.\n\nLong-term we should kill this method, it\u0027s just for legacy compat I think.","commit_id":"54195a1bd967676fd9a59494cc1f60695e7f4189"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"65b3608d547dbea21fbba666587a57946a177967","unresolved":false,"context_lines":[{"line_number":450,"context_line":""},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"def build_request_spec(image, instances, instance_type\u003dNone):"},{"line_number":453,"context_line":"    \"\"\"Build a request_spec (ahem, not a RequestSpec) for the scheduler."},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"    The request_spec assumes that all instances to be scheduled are the same"},{"line_number":456,"context_line":"    type."}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_edd7884e","line":453,"in_reply_to":"3fa7e38b_ad419038","updated":"2019-12-06 16:11:58.000000000","message":"I\u0027m working on cleaning this up now so we can eventually jettison it:\n\nhttps://review.opendev.org/697686","commit_id":"54195a1bd967676fd9a59494cc1f60695e7f4189"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"73a606abd2d5724e2e52ec01543976fdb9632ca9","unresolved":false,"context_lines":[{"line_number":450,"context_line":""},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"def build_request_spec(image, instances, instance_type\u003dNone):"},{"line_number":453,"context_line":"    \"\"\"Build a request_spec (ahem, not a RequestSpec) for the scheduler."},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"    The request_spec assumes that all instances to be scheduled are the same"},{"line_number":456,"context_line":"    type."}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_ad419038","line":453,"in_reply_to":"3fa7e38b_e02eb0f7","updated":"2019-12-06 15:59:58.000000000","message":"Yeah, I was doing RequestSpec-y things in this patch and noticed it, and it wouldn\u0027t have been worth a whole patch on its own. Agree a separate effort could clean this up.","commit_id":"54195a1bd967676fd9a59494cc1f60695e7f4189"}],"nova/tests/functional/test_report_client.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"18d750363a3c60066f7c975fd7b455d49d9d721e","unresolved":false,"context_lines":[{"line_number":1291,"context_line":"                self.context, utils.ResourceRequest(req_spec))[0]"},{"line_number":1292,"context_line":"            # We\u0027re not going to validate all the mappings - Placement has"},{"line_number":1293,"context_line":"            # tests for that - just make sure they\u0027re there."},{"line_number":1294,"context_line":"            for ac in acs:"},{"line_number":1295,"context_line":"                self.assertIn(\u0027allocations\u0027, ac)"},{"line_number":1296,"context_line":"                self.assertEqual({\u0027_CPU\u0027, \u0027_MEM\u0027, \u0027_DISK\u0027},"},{"line_number":1297,"context_line":"                                 set(ac[\u0027mappings\u0027]))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_6a0176b5","line":1294,"updated":"2019-12-03 16:33:44.000000000","message":"This test passes if no allocation candidates are returned.","commit_id":"7323ec20dc88e3a01516ff3987decdffe74e9855"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"4081d526d3d9eacd3709136e4dbaeecc8d6e0005","unresolved":false,"context_lines":[{"line_number":1291,"context_line":"                self.context, utils.ResourceRequest(req_spec))[0]"},{"line_number":1292,"context_line":"            # We\u0027re not going to validate all the mappings - Placement has"},{"line_number":1293,"context_line":"            # tests for that - just make sure they\u0027re there."},{"line_number":1294,"context_line":"            for ac in acs:"},{"line_number":1295,"context_line":"                self.assertIn(\u0027allocations\u0027, ac)"},{"line_number":1296,"context_line":"                self.assertEqual({\u0027_CPU\u0027, \u0027_MEM\u0027, \u0027_DISK\u0027},"},{"line_number":1297,"context_line":"                                 set(ac[\u0027mappings\u0027]))"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fa7e38b_96d2d8fc","line":1294,"in_reply_to":"3fa7e38b_6a0176b5","updated":"2019-12-03 19:15:48.000000000","message":"Done","commit_id":"7323ec20dc88e3a01516ff3987decdffe74e9855"}],"nova/tests/unit/scheduler/client/test_report.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1cd2b63e4124450f04ad354d5bf2ee422039c647","unresolved":false,"context_lines":[{"line_number":2074,"context_line":"                \u0027trait:CUSTOM_TRAIT2\u0027: \u0027preferred\u0027,"},{"line_number":2075,"context_line":"                \u0027trait:CUSTOM_TRAIT3\u0027: \u0027forbidden\u0027,"},{"line_number":2076,"context_line":"                \u0027trait:CUSTOM_TRAIT4\u0027: \u0027forbidden\u0027,"},{"line_number":2077,"context_line":"                \u0027resources_DISK:DISK_GB\u0027: \u002730\u0027,"},{"line_number":2078,"context_line":"                \u0027trait_DISK:STORAGE_DISK_SSD\u0027: \u0027required\u0027,"},{"line_number":2079,"context_line":"                \u0027resources2:VGPU\u0027: \u00272\u0027,"},{"line_number":2080,"context_line":"                \u0027trait2:HW_GPU_RESOLUTION_W2560H1600\u0027: \u0027required\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_401784a4","line":2077,"updated":"2019-12-06 14:16:29.000000000","message":"Does this mean the old format on existing flavors in the wild using numbered request groups won\u0027t work now? Because if that\u0027s the case, we need an upgrade release note and likely also need to update our docs:\n\nhttps://docs.openstack.org/nova/latest/user/flavors.html#extra-specs-numbered-resource-groupings\n\nWe likely want to update those anyway for the new suffix support, right?\n\nMy main concern though is if we are supporting backward compatibility with the old format and if so, why do we need to change this test?","commit_id":"54195a1bd967676fd9a59494cc1f60695e7f4189"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"73a606abd2d5724e2e52ec01543976fdb9632ca9","unresolved":false,"context_lines":[{"line_number":2074,"context_line":"                \u0027trait:CUSTOM_TRAIT2\u0027: \u0027preferred\u0027,"},{"line_number":2075,"context_line":"                \u0027trait:CUSTOM_TRAIT3\u0027: \u0027forbidden\u0027,"},{"line_number":2076,"context_line":"                \u0027trait:CUSTOM_TRAIT4\u0027: \u0027forbidden\u0027,"},{"line_number":2077,"context_line":"                \u0027resources_DISK:DISK_GB\u0027: \u002730\u0027,"},{"line_number":2078,"context_line":"                \u0027trait_DISK:STORAGE_DISK_SSD\u0027: \u0027required\u0027,"},{"line_number":2079,"context_line":"                \u0027resources2:VGPU\u0027: \u00272\u0027,"},{"line_number":2080,"context_line":"                \u0027trait2:HW_GPU_RESOLUTION_W2560H1600\u0027: \u0027required\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_ed6468e7","line":2077,"in_reply_to":"3fa7e38b_401784a4","updated":"2019-12-06 15:59:58.000000000","message":"The old format also still works (see L2079-81).\n\nSo we don\u0027t *have* to let users know about this at all. If we decide we want to do that, we could have the discussion in a separate patch.\n\nI didn\u0027t technically need to change this test quite as much as I did, but I wanted to do so to demonstrate that the string suffixes work.","commit_id":"54195a1bd967676fd9a59494cc1f60695e7f4189"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"65b3608d547dbea21fbba666587a57946a177967","unresolved":false,"context_lines":[{"line_number":2074,"context_line":"                \u0027trait:CUSTOM_TRAIT2\u0027: \u0027preferred\u0027,"},{"line_number":2075,"context_line":"                \u0027trait:CUSTOM_TRAIT3\u0027: \u0027forbidden\u0027,"},{"line_number":2076,"context_line":"                \u0027trait:CUSTOM_TRAIT4\u0027: \u0027forbidden\u0027,"},{"line_number":2077,"context_line":"                \u0027resources_DISK:DISK_GB\u0027: \u002730\u0027,"},{"line_number":2078,"context_line":"                \u0027trait_DISK:STORAGE_DISK_SSD\u0027: \u0027required\u0027,"},{"line_number":2079,"context_line":"                \u0027resources2:VGPU\u0027: \u00272\u0027,"},{"line_number":2080,"context_line":"                \u0027trait2:HW_GPU_RESOLUTION_W2560H1600\u0027: \u0027required\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3fa7e38b_0dc6a49d","line":2077,"in_reply_to":"3fa7e38b_ed6468e7","updated":"2019-12-06 16:11:58.000000000","message":"OK as long as we have coverage for supporting the old numbered non-string suffix then I\u0027m fine.","commit_id":"54195a1bd967676fd9a59494cc1f60695e7f4189"}]}
