)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"44a4d94685a06f7e79dc80ac819b5a44782dfef9","unresolved":false,"context_lines":[{"line_number":9,"context_line":"If deleting a role, we should iterate over the assignments"},{"line_number":10,"context_line":"for this role and build the list of tokens we need to delete."},{"line_number":11,"context_line":"In order to minimize the number of token list to delete,"},{"line_number":12,"context_line":"remove any redundant user+project deletions."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"I think simplify the list for the same user is Improper,"},{"line_number":15,"context_line":"the same user and different project target different tokens."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"5f4e5783_ea1afbc9","line":12,"range":{"start_line":12,"start_character":34,"end_line":12,"end_character":43},"updated":"2017-10-13 16:49:30.000000000","message":"tokens*\n\nBecause the token will be invalid regardless when it is invalid. This would just ensure that the tokens in the backend are removed.","commit_id":"6c1ad1ae7fad5d743fdafeb0c052a2653358d8e1"}],"keystone/assignment/core.py":[{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"5fca69a6b95a6f363009dbcf25e216fe8ed269ca","unresolved":false,"context_lines":[{"line_number":1063,"context_line":"        # same user is also planned."},{"line_number":1064,"context_line":"        user_and_project_ids_to_action \u003d []"},{"line_number":1065,"context_line":"        for user_and_project_id in user_and_project_ids:"},{"line_number":1066,"context_line":"            if user_and_project_id[0] not in user_ids:"},{"line_number":1067,"context_line":"                user_and_project_ids_to_action.append(user_and_project_id)"},{"line_number":1068,"context_line":""},{"line_number":1069,"context_line":"        for user_id, project_id in user_and_project_ids_to_action:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f231b9d_16d4dcbc","side":"PARENT","line":1066,"range":{"start_line":1066,"start_character":45,"end_line":1066,"end_character":53},"updated":"2017-06-19 18:36:50.000000000","message":"I think this actually doesn\u0027t work. It looks like user_ids is never added to, so this statement will always return true. So this change looks like it fixes the issue.","commit_id":"45265c0ddffa399fcb10bed6eac98069decdf910"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"5fca69a6b95a6f363009dbcf25e216fe8ed269ca","unresolved":false,"context_lines":[{"line_number":1060,"context_line":"        # tokens, let\u0027s try and minimize the number of calls by pruning out"},{"line_number":1061,"context_line":"        # any user+project deletions where a general token deletion for that"},{"line_number":1062,"context_line":"        # same user+project is also planned."},{"line_number":1063,"context_line":"        user_and_project_ids_to_action \u003d list(set(user_and_project_ids))"},{"line_number":1064,"context_line":""},{"line_number":1065,"context_line":"        for user_id, project_id in user_and_project_ids_to_action:"},{"line_number":1066,"context_line":"            payload \u003d {\u0027user_id\u0027: user_id, \u0027project_id\u0027: project_id}"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f231b9d_d9e1f7fe","line":1063,"range":{"start_line":1063,"start_character":41,"end_line":1063,"end_character":45},"updated":"2017-06-19 18:36:50.000000000","message":"I think casting this back to a list is redundant, you are only parsing through it below once.","commit_id":"71ea6bf54bf94d78c29095b8bb345d6a19b1bb5d"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"a48810c53ea5ffd7b0a4e1bf9d7e240a82d2ef43","unresolved":false,"context_lines":[{"line_number":1056,"context_line":"                        self._emit_invalidate_user_token_persistence("},{"line_number":1057,"context_line":"                            user[\u0027id\u0027])"},{"line_number":1058,"context_line":""},{"line_number":1059,"context_line":"        # Now process the built up lists.  Before issuing calls to delete any"},{"line_number":1060,"context_line":"        # tokens, let\u0027s try and minimize the number of calls by pruning out"},{"line_number":1061,"context_line":"        # any user+project deletions where a general token deletion for that"},{"line_number":1062,"context_line":"        # same user+project is also planned."},{"line_number":1063,"context_line":"        user_and_project_ids_to_action \u003d set(user_and_project_ids)"},{"line_number":1064,"context_line":""},{"line_number":1065,"context_line":"        for user_id, project_id in user_and_project_ids_to_action:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f201791_a19ab05e","line":1062,"range":{"start_line":1059,"start_character":0,"end_line":1062,"end_character":44},"updated":"2017-06-27 19:30:30.000000000","message":"This comment doesn\u0027t apply as we are not pruning anything.  Perhaps we can remove it.","commit_id":"5a57daa55cb3cd00b009de3497cca4b763539da4"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"fd26b608ebdda0cb42cbcf6e23fc944a0192ca59","unresolved":false,"context_lines":[{"line_number":1059,"context_line":"        # Now process the built up lists.  Before issuing calls to delete any"},{"line_number":1060,"context_line":"        # tokens, let\u0027s try and minimize the number of calls by pruning out"},{"line_number":1061,"context_line":"        # any user+project deletions where a general token deletion for that"},{"line_number":1062,"context_line":"        # same user+project is also planned."},{"line_number":1063,"context_line":"        user_and_project_ids_to_action \u003d set(user_and_project_ids)"},{"line_number":1064,"context_line":""},{"line_number":1065,"context_line":"        for user_id, project_id in user_and_project_ids_to_action:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f4e5783_232d2f95","line":1062,"in_reply_to":"5f201791_2416ae4a","updated":"2017-10-11 11:48:22.000000000","message":"hmm interesting .. does this mean we don\u0027t need revocation events at all anymore?","commit_id":"5a57daa55cb3cd00b009de3497cca4b763539da4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"642f04f751bd66a3e9062c7b2189773e5e2ae054","unresolved":false,"context_lines":[{"line_number":1059,"context_line":"        # Now process the built up lists.  Before issuing calls to delete any"},{"line_number":1060,"context_line":"        # tokens, let\u0027s try and minimize the number of calls by pruning out"},{"line_number":1061,"context_line":"        # any user+project deletions where a general token deletion for that"},{"line_number":1062,"context_line":"        # same user+project is also planned."},{"line_number":1063,"context_line":"        user_and_project_ids_to_action \u003d set(user_and_project_ids)"},{"line_number":1064,"context_line":""},{"line_number":1065,"context_line":"        for user_id, project_id in user_and_project_ids_to_action:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f201791_2416ae4a","line":1062,"in_reply_to":"5f201791_a19ab05e","updated":"2017-06-27 19:46:33.000000000","message":"Actually - I wonder how much this is needed now that we rebuild the entire token context at validation time regardless of persistence.","commit_id":"5a57daa55cb3cd00b009de3497cca4b763539da4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ba827de54b4249681e7f56d96a22a6f0da52a099","unresolved":false,"context_lines":[{"line_number":1059,"context_line":"        # Now process the built up lists.  Before issuing calls to delete any"},{"line_number":1060,"context_line":"        # tokens, let\u0027s try and minimize the number of calls by pruning out"},{"line_number":1061,"context_line":"        # any user+project deletions where a general token deletion for that"},{"line_number":1062,"context_line":"        # same user+project is also planned."},{"line_number":1063,"context_line":"        user_and_project_ids_to_action \u003d set(user_and_project_ids)"},{"line_number":1064,"context_line":""},{"line_number":1065,"context_line":"        for user_id, project_id in user_and_project_ids_to_action:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f4e5783_ea8afb67","line":1062,"in_reply_to":"5f4e5783_232d2f95","updated":"2017-10-13 16:25:44.000000000","message":"I would suggest the opposite actually. We rely on revocation events more now (for both formats) that we have in the past. It\u0027s a critical path regardless of the implementation.","commit_id":"5a57daa55cb3cd00b009de3497cca4b763539da4"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"fd26b608ebdda0cb42cbcf6e23fc944a0192ca59","unresolved":false,"context_lines":[{"line_number":1060,"context_line":"        # tokens, let\u0027s try and minimize the number of calls by pruning out"},{"line_number":1061,"context_line":"        # any user+project deletions where a general token deletion for that"},{"line_number":1062,"context_line":"        # same user+project is also planned."},{"line_number":1063,"context_line":"        user_and_project_ids_to_action \u003d set(user_and_project_ids)"},{"line_number":1064,"context_line":""},{"line_number":1065,"context_line":"        for user_id, project_id in user_and_project_ids_to_action:"},{"line_number":1066,"context_line":"            payload \u003d {\u0027user_id\u0027: user_id, \u0027project_id\u0027: project_id}"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f4e5783_e0bcad6a","line":1063,"updated":"2017-10-11 11:48:22.000000000","message":"this would remove duplicates when the user has a role assignment on a proejct and a group (in which the user is part of) has the same role on that project too. I think this makes sense and the old code was not doing anything since user_ids was always empty","commit_id":"5a57daa55cb3cd00b009de3497cca4b763539da4"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"fd26b608ebdda0cb42cbcf6e23fc944a0192ca59","unresolved":false,"context_lines":[{"line_number":1062,"context_line":"        # same user+project is also planned."},{"line_number":1063,"context_line":"        user_and_project_ids_to_action \u003d set(user_and_project_ids)"},{"line_number":1064,"context_line":""},{"line_number":1065,"context_line":"        for user_id, project_id in user_and_project_ids_to_action:"},{"line_number":1066,"context_line":"            payload \u003d {\u0027user_id\u0027: user_id, \u0027project_id\u0027: project_id}"},{"line_number":1067,"context_line":"            notifications.Audit.internal("},{"line_number":1068,"context_line":"                notifications.INVALIDATE_USER_PROJECT_TOKEN_PERSISTENCE,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f4e5783_8080598d","line":1065,"range":{"start_line":1065,"start_character":35,"end_line":1065,"end_character":65},"updated":"2017-10-11 11:48:22.000000000","message":"(suggestion) replace this with set(user_and_project_ids) and remove the code above","commit_id":"5a57daa55cb3cd00b009de3497cca4b763539da4"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"44a4d94685a06f7e79dc80ac819b5a44782dfef9","unresolved":false,"context_lines":[{"line_number":1055,"context_line":"                    for user in users:"},{"line_number":1056,"context_line":"                        self._emit_invalidate_user_token_persistence("},{"line_number":1057,"context_line":"                            user[\u0027id\u0027])"},{"line_number":1058,"context_line":""},{"line_number":1059,"context_line":"        # use set() to remove duplicates when the user has a role assignment"},{"line_number":1060,"context_line":"        # on a project and a group (in which the user is part of) has the same"},{"line_number":1061,"context_line":"        # role on that project too."}],"source_content_type":"text/x-python","patch_set":4,"id":"5f4e5783_0ac9d724","line":1058,"updated":"2017-10-13 16:49:30.000000000","message":"This needs to be unit tested. I added the steps that I used to recreate this in the bug report [0]. You could use that to start building out test cases.\n\n[0] https://bugs.launchpad.net/keystone/+bug/1700748/comments/2","commit_id":"6c1ad1ae7fad5d743fdafeb0c052a2653358d8e1"}]}
