)]}'
{"keystone/federation/controllers.py":[{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"122c2981fab98272d687358752e8d508a3c7bfea","unresolved":false,"context_lines":[{"line_number":453,"context_line":"            request.auth_context[\u0027user_id\u0027])"},{"line_number":454,"context_line":"        # remove duplicates"},{"line_number":455,"context_line":"        domains \u003d [dict(t) for t in set("},{"line_number":456,"context_line":"            [tuple(sorted(d.items())) for d in domains])]"},{"line_number":457,"context_line":"        return DomainV3.wrap_collection(request.context_dict, domains)"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff346bd7_a4712fe3","line":456,"range":{"start_line":456,"start_character":19,"end_line":456,"end_character":25},"updated":"2017-07-24 14:22:00.000000000","message":"I am not getting how just sorting these items is fixing the issue","commit_id":"67d67693beb556109c5ce37627f20b3eba5b0428"},{"author":{"_account_id":6508,"name":"Dmitry Stepanenko","email":"dstepanenko@mirantis.com","username":"dstepanenko"},"change_message_id":"90b164dd82363e6ce62cd80c74c3e8c8f69aa9d5","unresolved":false,"context_lines":[{"line_number":453,"context_line":"            request.auth_context[\u0027user_id\u0027])"},{"line_number":454,"context_line":"        # remove duplicates"},{"line_number":455,"context_line":"        domains \u003d [dict(t) for t in set("},{"line_number":456,"context_line":"            [tuple(sorted(d.items())) for d in domains])]"},{"line_number":457,"context_line":"        return DomainV3.wrap_collection(request.context_dict, domains)"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff346bd7_28502dd4","line":456,"range":{"start_line":456,"start_character":19,"end_line":456,"end_character":25},"in_reply_to":"ff346bd7_a4712fe3","updated":"2017-07-26 07:04:27.000000000","message":"So, here we create set of tuples. The set will remove duplicates. \n\n[tuple((d.items())) for d in domains] will return list of tuples where each tuple contains (key, value) pairs from appropriate domain dict. \n\nSo, if domains looked like\ndomains \u003d [{\u0027a\u0027: 1, \u0027b\u0027: 2}, {\u0027b\u0027: 2, \u0027a\u0027: 1}]\n\nthen\n[tuple((d.items())) for d in domains] will return \n[((\u0027a\u0027, 1), (\u0027b\u0027, 2)), ((\u0027b\u0027, 2), (\u0027a\u0027, 1))]\n\nNow if you create set from this list you will recieve 2 items in this set, but if these values were sorted in the stage of getting dict items, set would have contained only 1 item.","commit_id":"67d67693beb556109c5ce37627f20b3eba5b0428"}],"keystone/tests/unit/test_v3_federation.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"21ed16ad86f02ef6435c74b74fdc3bc618bfa80f","unresolved":false,"context_lines":[{"line_number":3150,"context_line":"    @mock.patch.object(keystone.assignment.core.Manager,"},{"line_number":3151,"context_line":"                       \u0027list_projects_for_user\u0027)"},{"line_number":3152,"context_line":"    @mock.patch.object(keystone.assignment.core.Manager,"},{"line_number":3153,"context_line":"                       \u0027list_projects_for_groups\u0027)"},{"line_number":3154,"context_line":"    def test_list_projects_with_duplicates("},{"line_number":3155,"context_line":"            self, fake_list_projects_for_user, fake_list_projects_for_groups):"},{"line_number":3156,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_4d637443","line":3153,"updated":"2017-07-14 21:09:33.000000000","message":"Why do we have to mock these out? How come we can\u0027t just rely on the normal backends to recreate the issue?","commit_id":"67d67693beb556109c5ce37627f20b3eba5b0428"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"122c2981fab98272d687358752e8d508a3c7bfea","unresolved":false,"context_lines":[{"line_number":3150,"context_line":"    @mock.patch.object(keystone.assignment.core.Manager,"},{"line_number":3151,"context_line":"                       \u0027list_projects_for_user\u0027)"},{"line_number":3152,"context_line":"    @mock.patch.object(keystone.assignment.core.Manager,"},{"line_number":3153,"context_line":"                       \u0027list_projects_for_groups\u0027)"},{"line_number":3154,"context_line":"    def test_list_projects_with_duplicates("},{"line_number":3155,"context_line":"            self, fake_list_projects_for_user, fake_list_projects_for_groups):"},{"line_number":3156,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ff346bd7_24565f2b","line":3153,"in_reply_to":"1f1a1f67_4d637443","updated":"2017-07-24 14:22:00.000000000","message":"++\n\nWould be nice to have a test alone in a separate commit exposing the issue before we fix it. We can\u0027t make sure the bug is real if we can\u0027t verify it","commit_id":"67d67693beb556109c5ce37627f20b3eba5b0428"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"21ed16ad86f02ef6435c74b74fdc3bc618bfa80f","unresolved":false,"context_lines":[{"line_number":3180,"context_line":"            user_id, project_ref[\u0027id\u0027], role_ref[\u0027id\u0027])"},{"line_number":3181,"context_line":""},{"line_number":3182,"context_line":"        # get federation projects"},{"line_number":3183,"context_line":"        r \u003d self.get(\u0027/OS-FEDERATION/projects\u0027, token\u003dunscoped_token)"},{"line_number":3184,"context_line":"        fed_projects \u003d r.result[\u0027projects\u0027]"},{"line_number":3185,"context_line":"        self.assertThat(fed_projects, matchers.HasLength(1))"},{"line_number":3186,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_edbb606f","line":3183,"updated":"2017-07-14 21:09:33.000000000","message":"This needs to test the /auth/projects API, too. The /OS-FEDERATION/projects path and the /auth/projects both do the same thing, so we should ensure we test them equally.","commit_id":"67d67693beb556109c5ce37627f20b3eba5b0428"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"21ed16ad86f02ef6435c74b74fdc3bc618bfa80f","unresolved":false,"context_lines":[{"line_number":3202,"context_line":"    @mock.patch.object(keystone.assignment.core.Manager,"},{"line_number":3203,"context_line":"                       \u0027list_domains_for_user\u0027)"},{"line_number":3204,"context_line":"    @mock.patch.object(keystone.assignment.core.Manager,"},{"line_number":3205,"context_line":"                       \u0027list_domains_for_groups\u0027)"},{"line_number":3206,"context_line":"    def test_list_domains_for_user_duplicates_elimination("},{"line_number":3207,"context_line":"            self, fake_list_domains_for_groups, fake_list_domains_for_user):"},{"line_number":3208,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_cdb2e494","line":3205,"updated":"2017-07-14 21:09:33.000000000","message":"Same comment here as above.","commit_id":"67d67693beb556109c5ce37627f20b3eba5b0428"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"21ed16ad86f02ef6435c74b74fdc3bc618bfa80f","unresolved":false,"context_lines":[{"line_number":3225,"context_line":"        user_id, unscoped_token \u003d self._authenticate_via_saml()"},{"line_number":3226,"context_line":""},{"line_number":3227,"context_line":"        # get federation group domains"},{"line_number":3228,"context_line":"        r \u003d self.get(\u0027/OS-FEDERATION/domains\u0027, token\u003dunscoped_token)"},{"line_number":3229,"context_line":"        user_domains \u003d r.result[\u0027domains\u0027]"},{"line_number":3230,"context_line":"        self.assertThat(user_domains, matchers.HasLength(1))"},{"line_number":3231,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_2d671828","line":3228,"updated":"2017-07-14 21:09:33.000000000","message":"Same comment here as above.","commit_id":"67d67693beb556109c5ce37627f20b3eba5b0428"}],"keystone/token/providers/common.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"21ed16ad86f02ef6435c74b74fdc3bc618bfa80f","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                                                 project_id)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"        # remove duplicates"},{"line_number":196,"context_line":"        roles \u003d [dict(t) for t in set([tuple(sorted(d.items())) for d in roles])]"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        check_roles(roles, user_id, project_id, domain_id)"},{"line_number":199,"context_line":"        token_data[\u0027roles\u0027] \u003d roles"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_6d7cf0b4","line":196,"updated":"2017-07-14 21:09:33.000000000","message":"The bug report doesn\u0027t mention anything about pruning duplicate roles from the token response. This seems different from what\u0027s reported in the bug. Is this tested somewhere?","commit_id":"67d67693beb556109c5ce37627f20b3eba5b0428"},{"author":{"_account_id":6508,"name":"Dmitry Stepanenko","email":"dstepanenko@mirantis.com","username":"dstepanenko"},"change_message_id":"90b164dd82363e6ce62cd80c74c3e8c8f69aa9d5","unresolved":false,"context_lines":[{"line_number":193,"context_line":"                                                 project_id)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"        # remove duplicates"},{"line_number":196,"context_line":"        roles \u003d [dict(t) for t in set([tuple(sorted(d.items())) for d in roles])]"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"        check_roles(roles, user_id, project_id, domain_id)"},{"line_number":199,"context_line":"        token_data[\u0027roles\u0027] \u003d roles"}],"source_content_type":"text/x-python","patch_set":3,"id":"ff346bd7_480371b9","line":196,"in_reply_to":"1f1a1f67_6d7cf0b4","updated":"2017-07-26 07:04:27.000000000","message":"yes, this issue was the first found","commit_id":"67d67693beb556109c5ce37627f20b3eba5b0428"}]}
