)]}'
{"nova/api/openstack/placement/objects/resource_provider.py":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"174a936b687fd554ed41974c9ea4d8d86b750f30","unresolved":false,"context_lines":[{"line_number":3665,"context_line":"                context, resources, rp_ids)"},{"line_number":3666,"context_line":"        else:"},{"line_number":3667,"context_line":"            if required_trait_map:"},{"line_number":3668,"context_line":"                trait_rps \u003d _get_provider_ids_having_any_trait("},{"line_number":3669,"context_line":"                    context, required_trait_map)"},{"line_number":3670,"context_line":"                if not trait_rps:"},{"line_number":3671,"context_line":"                    # If there aren\u0027t any providers that have any of the"},{"line_number":3672,"context_line":"                    # required traits, just exit early..."}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_bd20f949","line":3669,"range":{"start_line":3668,"start_character":28,"end_line":3669,"end_character":48},"updated":"2018-03-29 10:03:25.000000000","message":"This function looks just for the short cut, so we can extend this function as well for the new \"forbidden traits\" feature in a separate patch?","commit_id":"a7bd4af74b61e97e204f9de9f88abcd69d4d22ab"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"3745d52b27ee0019666c45f6e6d075042dfdd8e6","unresolved":false,"context_lines":[{"line_number":3665,"context_line":"                context, resources, rp_ids)"},{"line_number":3666,"context_line":"        else:"},{"line_number":3667,"context_line":"            if required_trait_map:"},{"line_number":3668,"context_line":"                trait_rps \u003d _get_provider_ids_having_any_trait("},{"line_number":3669,"context_line":"                    context, required_trait_map)"},{"line_number":3670,"context_line":"                if not trait_rps:"},{"line_number":3671,"context_line":"                    # If there aren\u0027t any providers that have any of the"},{"line_number":3672,"context_line":"                    # required traits, just exit early..."}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_63e2c2a2","line":3669,"range":{"start_line":3668,"start_character":28,"end_line":3669,"end_character":48},"in_reply_to":"bf659307_00389c3a","updated":"2018-03-29 11:29:21.000000000","message":"Oh, this is trivial. My question is should we cook a separate patch to change _get_provider_ids_having_any_trait() to accept forbidden_trait_map to exit earlier in @L3670-L3673 in the case that there is some providers that satisfy required traits condition but no providers to satisfy forbidden traits condition? I don\u0027t think that is high priority, though.","commit_id":"a7bd4af74b61e97e204f9de9f88abcd69d4d22ab"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"1c0f873d9bf767fc89175be0aa16938f1c91b867","unresolved":false,"context_lines":[{"line_number":3665,"context_line":"                context, resources, rp_ids)"},{"line_number":3666,"context_line":"        else:"},{"line_number":3667,"context_line":"            if required_trait_map:"},{"line_number":3668,"context_line":"                trait_rps \u003d _get_provider_ids_having_any_trait("},{"line_number":3669,"context_line":"                    context, required_trait_map)"},{"line_number":3670,"context_line":"                if not trait_rps:"},{"line_number":3671,"context_line":"                    # If there aren\u0027t any providers that have any of the"},{"line_number":3672,"context_line":"                    # required traits, just exit early..."}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_6e3069e9","line":3669,"range":{"start_line":3668,"start_character":28,"end_line":3669,"end_character":48},"in_reply_to":"bf659307_63e2c2a2","updated":"2018-03-29 11:44:30.000000000","message":"Oh I see. Yeah, that could be a good idea. At this stage I was trying to get the most basic solution that change as little code. I suspect there\u0027s quite a lot we can do to optimize these queries.\n\nI\u0027m hoping to some analysis along those lines sometime before the end of May, but I\u0027m not sure if I\u0027m going to be able to extract the time. A bit of profiling just to see.","commit_id":"a7bd4af74b61e97e204f9de9f88abcd69d4d22ab"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"091ec02f864f44c72850477ab386e80b4cfdf172","unresolved":false,"context_lines":[{"line_number":3665,"context_line":"                context, resources, rp_ids)"},{"line_number":3666,"context_line":"        else:"},{"line_number":3667,"context_line":"            if required_trait_map:"},{"line_number":3668,"context_line":"                trait_rps \u003d _get_provider_ids_having_any_trait("},{"line_number":3669,"context_line":"                    context, required_trait_map)"},{"line_number":3670,"context_line":"                if not trait_rps:"},{"line_number":3671,"context_line":"                    # If there aren\u0027t any providers that have any of the"},{"line_number":3672,"context_line":"                    # required traits, just exit early..."}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_00389c3a","line":3669,"range":{"start_line":3668,"start_character":28,"end_line":3669,"end_character":48},"in_reply_to":"bf659307_bd20f949","updated":"2018-03-29 10:19:35.000000000","message":"I don\u0027t think I\u0027m understanding what you\u0027re asking here?","commit_id":"a7bd4af74b61e97e204f9de9f88abcd69d4d22ab"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ef7480e70ae3706495ef94b796b7150aa68975e4","unresolved":false,"context_lines":[{"line_number":3216,"context_line":"    return AllocationRequest(ctx, resource_requests\u003dresource_requests)"},{"line_number":3217,"context_line":""},{"line_number":3218,"context_line":""},{"line_number":3219,"context_line":"def _alloc_candidates_no_shared(ctx, requested_resources, rp_ids):"},{"line_number":3220,"context_line":"    \"\"\"Returns a tuple of (allocation requests, provider summaries) for a"},{"line_number":3221,"context_line":"    supplied set of requested resource amounts and resource providers. The"},{"line_number":3222,"context_line":"    supplied resource providers have capacity to satisfy ALL of the resources"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf659307_10ad119a","line":3219,"range":{"start_line":3219,"start_character":4,"end_line":3219,"end_character":31},"updated":"2018-04-02 16:42:19.000000000","message":"It\u0027s confusing correlating _alloc_candidates_no_shared vs. _alloc_candidates_with_shared in my head.  I would have expected them to be symmetrical e.g. in terms of preconditions like whether we\u0027ve already filtered for traits.  But they aren\u0027t.\n\nNot requesting action (and certainly not in this patch). Just noting that, when I saw your changes to _with_shared, I wondered why there weren\u0027t corresponding changes to _no_shared, and it took me a while to figure out.","commit_id":"4bbbef71f8c05e6409af4c1678263590d1fb117e"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"24f458c069f98816ec77bc1e27f687a492ed832c","unresolved":false,"context_lines":[{"line_number":3216,"context_line":"    return AllocationRequest(ctx, resource_requests\u003dresource_requests)"},{"line_number":3217,"context_line":""},{"line_number":3218,"context_line":""},{"line_number":3219,"context_line":"def _alloc_candidates_no_shared(ctx, requested_resources, rp_ids):"},{"line_number":3220,"context_line":"    \"\"\"Returns a tuple of (allocation requests, provider summaries) for a"},{"line_number":3221,"context_line":"    supplied set of requested resource amounts and resource providers. The"},{"line_number":3222,"context_line":"    supplied resource providers have capacity to satisfy ALL of the resources"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf659307_b80c3c94","line":3219,"range":{"start_line":3219,"start_character":4,"end_line":3219,"end_character":31},"in_reply_to":"bf659307_10ad119a","updated":"2018-04-03 14:52:05.000000000","message":"I experienced a _lot_ of confusion when trying to find where to inject the forbidden stuff in this code. In the end I basically went with \"wherever I see traits, split into required and forbidden\".\n\nWhich is not a strategy I\u0027m very happy with. I would have much reather been able to conceptualize and correlate things more directly. So yeah, I agree it would be nice if we can do some eventually clean up, but also agree that here/now is not the time for that.","commit_id":"4bbbef71f8c05e6409af4c1678263590d1fb117e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ef7480e70ae3706495ef94b796b7150aa68975e4","unresolved":false,"context_lines":[{"line_number":3233,"context_line":"    :param requested_resources: dict, keyed by resource class ID, of amounts"},{"line_number":3234,"context_line":"                                being requested for that resource class"},{"line_number":3235,"context_line":"    :param rp_ids: List of resource provider IDs for providers that matched the"},{"line_number":3236,"context_line":"                   requested resources"},{"line_number":3237,"context_line":"    \"\"\""},{"line_number":3238,"context_line":"    if not rp_ids:"},{"line_number":3239,"context_line":"        return [], []"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf659307_701a4d17","line":3236,"updated":"2018-04-02 16:42:19.000000000","message":"and required/forbidden traits","commit_id":"4bbbef71f8c05e6409af4c1678263590d1fb117e"},{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"1cec4911368079ab3d67c72b17f6bff8ea85d715","unresolved":false,"context_lines":[{"line_number":3421,"context_line":"                        break"},{"line_number":3422,"context_line":""},{"line_number":3423,"context_line":"                rp_traits \u003d set(prov_traits.get(rp_id, []))"},{"line_number":3424,"context_line":"                conflict_traits \u003d (set(forbidden_traits)"},{"line_number":3425,"context_line":"                                   \u0026 set(rp_traits))"},{"line_number":3426,"context_line":"                if conflict_traits:"},{"line_number":3427,"context_line":"                    LOG.debug(\u0027Excluding sharing provider %s, it has \u0027"},{"line_number":3428,"context_line":"                              \u0027forbidden traits: (%s).\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf659307_f90ad31d","line":3425,"range":{"start_line":3424,"start_character":0,"end_line":3425,"end_character":52},"updated":"2018-04-02 05:14:20.000000000","message":"nit: I personally like this to be one line.","commit_id":"4bbbef71f8c05e6409af4c1678263590d1fb117e"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"24f458c069f98816ec77bc1e27f687a492ed832c","unresolved":false,"context_lines":[{"line_number":3421,"context_line":"                        break"},{"line_number":3422,"context_line":""},{"line_number":3423,"context_line":"                rp_traits \u003d set(prov_traits.get(rp_id, []))"},{"line_number":3424,"context_line":"                conflict_traits \u003d (set(forbidden_traits)"},{"line_number":3425,"context_line":"                                   \u0026 set(rp_traits))"},{"line_number":3426,"context_line":"                if conflict_traits:"},{"line_number":3427,"context_line":"                    LOG.debug(\u0027Excluding sharing provider %s, it has \u0027"},{"line_number":3428,"context_line":"                              \u0027forbidden traits: (%s).\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf659307_d85d7079","line":3425,"range":{"start_line":3424,"start_character":0,"end_line":3425,"end_character":52},"in_reply_to":"bf659307_b0a545a4","updated":"2018-04-03 14:52:05.000000000","message":"If we ever decide to do a heavy refactor and stop caring about nova\u0027s formatting preferences, I hope we can declare visual indent a thing of the past and a dreadful mistake. So bad for the diff.\n\nAnyway, this was probably supposed to be a single line but ended up otherwise because of changing indents during development. I\u0027ll fix it.","commit_id":"4bbbef71f8c05e6409af4c1678263590d1fb117e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"ef7480e70ae3706495ef94b796b7150aa68975e4","unresolved":false,"context_lines":[{"line_number":3421,"context_line":"                        break"},{"line_number":3422,"context_line":""},{"line_number":3423,"context_line":"                rp_traits \u003d set(prov_traits.get(rp_id, []))"},{"line_number":3424,"context_line":"                conflict_traits \u003d (set(forbidden_traits)"},{"line_number":3425,"context_line":"                                   \u0026 set(rp_traits))"},{"line_number":3426,"context_line":"                if conflict_traits:"},{"line_number":3427,"context_line":"                    LOG.debug(\u0027Excluding sharing provider %s, it has \u0027"},{"line_number":3428,"context_line":"                              \u0027forbidden traits: (%s).\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf659307_b0a545a4","line":3425,"range":{"start_line":3424,"start_character":0,"end_line":3425,"end_character":52},"in_reply_to":"bf659307_f90ad31d","updated":"2018-04-02 16:42:19.000000000","message":"There\u0027s also a pep rule we have disabled (or maybe it\u0027s a sonar rule) that wants the operator on the previous line.  (I don\u0027t happen to agree with that rule, btw.)","commit_id":"4bbbef71f8c05e6409af4c1678263590d1fb117e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"a308cbd8a698c4e7388cebf8f15247e2dc00a00e","unresolved":false,"context_lines":[{"line_number":3421,"context_line":"                        break"},{"line_number":3422,"context_line":""},{"line_number":3423,"context_line":"                rp_traits \u003d set(prov_traits.get(rp_id, []))"},{"line_number":3424,"context_line":"                conflict_traits \u003d (set(forbidden_traits) \u0026 set(rp_traits))"},{"line_number":3425,"context_line":"                if conflict_traits:"},{"line_number":3426,"context_line":"                    LOG.debug(\u0027Excluding sharing provider %s, it has \u0027"},{"line_number":3427,"context_line":"                              \u0027forbidden traits: (%s).\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"bf659307_b233f413","line":3424,"range":{"start_line":3424,"start_character":34,"end_line":3424,"end_character":74},"updated":"2018-04-03 15:22:06.000000000","message":"outer parens are now unnecessary.","commit_id":"d2049a3a162726694a52d66373fbba3e10d3c030"}],"nova/tests/functional/api/openstack/placement/db/test_allocation_candidates.py":[{"author":{"_account_id":25625,"name":"Tetsuro Nakamura","email":"tetsuro.nakamura.bc@hco.ntt.co.jp","username":"tetsuro0907"},"change_message_id":"174a936b687fd554ed41974c9ea4d8d86b750f30","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        # associated any traits with the providers"},{"line_number":227,"context_line":"        avx2_t \u003d rp_obj.Trait.get_by_name(self.ctx, os_traits.HW_CPU_X86_AVX2)"},{"line_number":228,"context_line":"        # _get_provider_ids_matching()\u0027s required_traits and forbidden_traits"},{"line_number":229,"context_line":"        # arguments maps, keyed by trait name, of the trait internal ID"},{"line_number":230,"context_line":"        req_traits \u003d {os_traits.HW_CPU_X86_AVX2: avx2_t.id}"},{"line_number":231,"context_line":"        res \u003d rp_obj._get_provider_ids_matching(self.ctx, resources,"},{"line_number":232,"context_line":"                                                req_traits, {})"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_60bdd800","line":229,"range":{"start_line":229,"start_character":10,"end_line":229,"end_character":24},"updated":"2018-03-29 10:03:25.000000000","message":"nit: arguments are maps","commit_id":"a7bd4af74b61e97e204f9de9f88abcd69d4d22ab"}],"nova/tests/functional/db/test_allocation_candidates.py":[{"author":{"_account_id":20722,"name":"Yikun Jiang","email":"yikunkero@gmail.com","username":"yikunkero"},"change_message_id":"8c1c051d96ea3de40b8ff71d62e899eb0d0241d2","unresolved":false,"context_lines":[{"line_number":534,"context_line":"        }"},{"line_number":535,"context_line":"        self._validate_provider_summary_traits(expected, alloc_cands)"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        # Confirm that forbidden traits changes the resuts to get cn1."},{"line_number":538,"context_line":"        alloc_cands \u003d self._get_allocation_candidates(["},{"line_number":539,"context_line":"            placement_lib.RequestGroup("},{"line_number":540,"context_line":"                use_same_provider\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_ccf0e46a","line":537,"range":{"start_line":537,"start_character":52,"end_line":537,"end_character":58},"updated":"2018-03-27 12:35:32.000000000","message":"result","commit_id":"ca897c9518806d4aa013b9d445cc2bac3b2b9e12"}]}
