)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"cc774c0f9414680bc2a969f5932f5b0453111b80","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"3742ab66_f2737c8f","updated":"2023-08-30 14:39:14.000000000","message":"check experimental","commit_id":"b3e8cdd3e4fc0d819d18f8d0a29524e0d87f5205"},{"author":{"_account_id":30674,"name":"Lukas Piwowarski","email":"lpiwowar@redhat.com","username":"lukas-piwowarski"},"change_message_id":"e8a00e370a0800c0f0419f6e73f654c1fc110251","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"fb9c8183_6c2ffcd1","updated":"2023-09-14 11:20:58.000000000","message":"I added a few comments. The function is used only in two places in python_tempestconf but I think that the function should work well on its own if we ever want to use it somewhere else. I would at least update the docstring or add the logic before line 49.","commit_id":"834afdd6b1440d3696dcc27c9c3de04a1620ea01"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"1cd5d50fc6944ac4f388893bbb3d136a97553583","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"7dc27fd5_4695eb1c","updated":"2023-09-06 09:13:50.000000000","message":"recheck quite strange error, wondering what has changed and where","commit_id":"834afdd6b1440d3696dcc27c9c3de04a1620ea01"},{"author":{"_account_id":30674,"name":"Lukas Piwowarski","email":"lpiwowar@redhat.com","username":"lukas-piwowarski"},"change_message_id":"ab77ac45c32305de68ad8441bc6cdfa10f6c3472","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"060f60ec_dc613d15","updated":"2023-09-18 08:31:58.000000000","message":"looks good to me!","commit_id":"b5ae1f69acf67ce8cd4818e792af60869340c55e"}],"config_tempest/users.py":[{"author":{"_account_id":30674,"name":"Lukas Piwowarski","email":"lpiwowar@redhat.com","username":"lukas-piwowarski"},"change_message_id":"e8a00e370a0800c0f0419f6e73f654c1fc110251","unresolved":true,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        self.give_role_to_user(username, role_name\u003d\u0027admin\u0027)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def _filter_ids_by_name(self, mode, name, lst):"},{"line_number":52,"context_line":"        \"\"\"Filter the id that belongs to the name in the given list."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        :param mode: \u0027roles\u0027 or \u0027users\u0027, depending what we\u0027re looking for"}],"source_content_type":"text/x-python","patch_set":2,"id":"137bd201_b09b937f","line":51,"range":{"start_line":51,"start_character":46,"end_line":51,"end_character":49},"updated":"2023-09-14 11:20:58.000000000","message":"nit: list or roles_list?","commit_id":"834afdd6b1440d3696dcc27c9c3de04a1620ea01"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"ecb1a6f66f960c854a515affc4c60693052d0e17","unresolved":true,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        self.give_role_to_user(username, role_name\u003d\u0027admin\u0027)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def _filter_ids_by_name(self, mode, name, lst):"},{"line_number":52,"context_line":"        \"\"\"Filter the id that belongs to the name in the given list."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        :param mode: \u0027roles\u0027 or \u0027users\u0027, depending what we\u0027re looking for"}],"source_content_type":"text/x-python","patch_set":2,"id":"bb4a37bc_b79c5b92","line":51,"range":{"start_line":51,"start_character":46,"end_line":51,"end_character":49},"in_reply_to":"137bd201_b09b937f","updated":"2023-09-14 11:26:51.000000000","message":"list is a reserved word, roles_list is long :D really needed?","commit_id":"834afdd6b1440d3696dcc27c9c3de04a1620ea01"},{"author":{"_account_id":10459,"name":"Luigi Toscano","email":"ltoscano@redhat.com","username":"ltoscano"},"change_message_id":"0cfee4a072d5c96a409395ed59a8412372000c19","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        self.give_role_to_user(username, role_name\u003d\u0027admin\u0027)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def _filter_ids_by_name(self, mode, name, lst):"},{"line_number":52,"context_line":"        \"\"\"Filter the id that belongs to the name in the given list."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        :param mode: \u0027roles\u0027 or \u0027users\u0027, depending what we\u0027re looking for"}],"source_content_type":"text/x-python","patch_set":2,"id":"1d67bead_f947ac32","line":51,"range":{"start_line":51,"start_character":46,"end_line":51,"end_character":49},"in_reply_to":"6e4fbe14_6e13c04f","updated":"2023-09-15 08:59:55.000000000","message":"roles_list is not so long O.o and it would be definitely more clear","commit_id":"834afdd6b1440d3696dcc27c9c3de04a1620ea01"},{"author":{"_account_id":30674,"name":"Lukas Piwowarski","email":"lpiwowar@redhat.com","username":"lukas-piwowarski"},"change_message_id":"0c8379a98de1837fdd8f51065348ecce8ad031c1","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        self.give_role_to_user(username, role_name\u003d\u0027admin\u0027)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def _filter_ids_by_name(self, mode, name, lst):"},{"line_number":52,"context_line":"        \"\"\"Filter the id that belongs to the name in the given list."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        :param mode: \u0027roles\u0027 or \u0027users\u0027, depending what we\u0027re looking for"}],"source_content_type":"text/x-python","patch_set":2,"id":"6e4fbe14_6e13c04f","line":51,"range":{"start_line":51,"start_character":46,"end_line":51,"end_character":49},"in_reply_to":"bb4a37bc_b79c5b92","updated":"2023-09-15 08:47:25.000000000","message":"It\u0027s really a nit and probably more of a personal preference :D. It just caught my attention.","commit_id":"834afdd6b1440d3696dcc27c9c3de04a1620ea01"},{"author":{"_account_id":30674,"name":"Lukas Piwowarski","email":"lpiwowar@redhat.com","username":"lukas-piwowarski"},"change_message_id":"e8a00e370a0800c0f0419f6e73f654c1fc110251","unresolved":true,"context_lines":[{"line_number":71,"context_line":"        proj_id \u003d self.projects_client.get_project_by_name(project_name)[\u0027id\u0027]"},{"line_number":72,"context_line":"        users \u003d self.users_client.list_users()"},{"line_number":73,"context_line":"        user_ids \u003d self._filter_ids_by_name(\u0027users\u0027, username, users)"},{"line_number":74,"context_line":"        if not user_ids:"},{"line_number":75,"context_line":"            # let\u0027s try if there is an Admin user"},{"line_number":76,"context_line":"            username \u003d \u0027Admin\u0027"},{"line_number":77,"context_line":"            self._conf.set(\u0027auth\u0027, \u0027admin_username\u0027, username)"}],"source_content_type":"text/x-python","patch_set":2,"id":"24c18990_07188b9a","line":74,"range":{"start_line":74,"start_character":0,"end_line":74,"end_character":1},"updated":"2023-09-14 11:20:58.000000000","message":"Is it OK?\n```\n# This will lead to the function assigning user \"Admin\" role \"admin\" if \n# \"tortuga\" user does not exist on the system. It might be unwanted side effect.\ngive_role_to_user(username\u003d\"tortuga\", role\u003d\"admin\")\n```","commit_id":"834afdd6b1440d3696dcc27c9c3de04a1620ea01"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"ecb1a6f66f960c854a515affc4c60693052d0e17","unresolved":true,"context_lines":[{"line_number":71,"context_line":"        proj_id \u003d self.projects_client.get_project_by_name(project_name)[\u0027id\u0027]"},{"line_number":72,"context_line":"        users \u003d self.users_client.list_users()"},{"line_number":73,"context_line":"        user_ids \u003d self._filter_ids_by_name(\u0027users\u0027, username, users)"},{"line_number":74,"context_line":"        if not user_ids:"},{"line_number":75,"context_line":"            # let\u0027s try if there is an Admin user"},{"line_number":76,"context_line":"            username \u003d \u0027Admin\u0027"},{"line_number":77,"context_line":"            self._conf.set(\u0027auth\u0027, \u0027admin_username\u0027, username)"}],"source_content_type":"text/x-python","patch_set":2,"id":"4b359515_ec760232","line":74,"range":{"start_line":74,"start_character":0,"end_line":74,"end_character":1},"in_reply_to":"24c18990_07188b9a","updated":"2023-09-14 11:26:51.000000000","message":"should be fine, i haven\u0027t changed the logic, just made it more modular","commit_id":"834afdd6b1440d3696dcc27c9c3de04a1620ea01"},{"author":{"_account_id":30674,"name":"Lukas Piwowarski","email":"lpiwowar@redhat.com","username":"lukas-piwowarski"},"change_message_id":"0c8379a98de1837fdd8f51065348ecce8ad031c1","unresolved":true,"context_lines":[{"line_number":71,"context_line":"        proj_id \u003d self.projects_client.get_project_by_name(project_name)[\u0027id\u0027]"},{"line_number":72,"context_line":"        users \u003d self.users_client.list_users()"},{"line_number":73,"context_line":"        user_ids \u003d self._filter_ids_by_name(\u0027users\u0027, username, users)"},{"line_number":74,"context_line":"        if not user_ids:"},{"line_number":75,"context_line":"            # let\u0027s try if there is an Admin user"},{"line_number":76,"context_line":"            username \u003d \u0027Admin\u0027"},{"line_number":77,"context_line":"            self._conf.set(\u0027auth\u0027, \u0027admin_username\u0027, username)"}],"source_content_type":"text/x-python","patch_set":2,"id":"4f01f366_c4623f09","line":74,"range":{"start_line":74,"start_character":0,"end_line":74,"end_character":1},"in_reply_to":"4b359515_ec760232","updated":"2023-09-15 08:47:25.000000000","message":"From my point of view, it would be better if the logic was moved outside of this function or the docstring was updated.\n\nBut I\u0027m OK with it if you and other reviewers think it\u0027s fine:).","commit_id":"834afdd6b1440d3696dcc27c9c3de04a1620ea01"},{"author":{"_account_id":10459,"name":"Luigi Toscano","email":"ltoscano@redhat.com","username":"ltoscano"},"change_message_id":"0cfee4a072d5c96a409395ed59a8412372000c19","unresolved":true,"context_lines":[{"line_number":71,"context_line":"        proj_id \u003d self.projects_client.get_project_by_name(project_name)[\u0027id\u0027]"},{"line_number":72,"context_line":"        users \u003d self.users_client.list_users()"},{"line_number":73,"context_line":"        user_ids \u003d self._filter_ids_by_name(\u0027users\u0027, username, users)"},{"line_number":74,"context_line":"        if not user_ids:"},{"line_number":75,"context_line":"            # let\u0027s try if there is an Admin user"},{"line_number":76,"context_line":"            username \u003d \u0027Admin\u0027"},{"line_number":77,"context_line":"            self._conf.set(\u0027auth\u0027, \u0027admin_username\u0027, username)"}],"source_content_type":"text/x-python","patch_set":2,"id":"660624a0_c1ae4a17","line":74,"range":{"start_line":74,"start_character":0,"end_line":74,"end_character":1},"in_reply_to":"4f01f366_c4623f09","updated":"2023-09-15 08:59:55.000000000","message":"A note in the docstring wouldn\u0027t hurt","commit_id":"834afdd6b1440d3696dcc27c9c3de04a1620ea01"},{"author":{"_account_id":30674,"name":"Lukas Piwowarski","email":"lpiwowar@redhat.com","username":"lukas-piwowarski"},"change_message_id":"ab77ac45c32305de68ad8441bc6cdfa10f6c3472","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        proj_id \u003d self.projects_client.get_project_by_name(project_name)[\u0027id\u0027]"},{"line_number":72,"context_line":"        users \u003d self.users_client.list_users()"},{"line_number":73,"context_line":"        user_ids \u003d self._filter_ids_by_name(\u0027users\u0027, username, users)"},{"line_number":74,"context_line":"        if not user_ids:"},{"line_number":75,"context_line":"            # let\u0027s try if there is an Admin user"},{"line_number":76,"context_line":"            username \u003d \u0027Admin\u0027"},{"line_number":77,"context_line":"            self._conf.set(\u0027auth\u0027, \u0027admin_username\u0027, username)"}],"source_content_type":"text/x-python","patch_set":2,"id":"acbc3c2d_8691075d","line":74,"range":{"start_line":74,"start_character":0,"end_line":74,"end_character":1},"in_reply_to":"660624a0_c1ae4a17","updated":"2023-09-18 08:31:58.000000000","message":"Done","commit_id":"834afdd6b1440d3696dcc27c9c3de04a1620ea01"},{"author":{"_account_id":30674,"name":"Lukas Piwowarski","email":"lpiwowar@redhat.com","username":"lukas-piwowarski"},"change_message_id":"e8a00e370a0800c0f0419f6e73f654c1fc110251","unresolved":true,"context_lines":[{"line_number":83,"context_line":"        roles \u003d self.roles_client.list_roles()"},{"line_number":84,"context_line":"        self.check_user_roles(roles)"},{"line_number":85,"context_line":"        role_ids \u003d self._filter_ids_by_name(\u0027roles\u0027, role_name, roles)"},{"line_number":86,"context_line":"        if not role_ids:"},{"line_number":87,"context_line":"            # let\u0027s try if there is an Admin role"},{"line_number":88,"context_line":"            role_name \u003d \u0027Admin\u0027"},{"line_number":89,"context_line":"            role_ids \u003d self._filter_ids_by_name(\u0027roles\u0027, role_name, roles)"}],"source_content_type":"text/x-python","patch_set":2,"id":"6269652e_8ce96e93","line":86,"range":{"start_line":86,"start_character":8,"end_line":86,"end_character":24},"updated":"2023-09-14 11:20:58.000000000","message":"I\u0027m not sure but am I reading this correctly that we might assign a role \"Admin\" to a user if a given role is not found on the system. For example:\n\n```\n# This will lead to \"user1\" being assigned role \"Admin\" if it is present on the \n# system despite the user of the function wanted role \"tortuga\"  \ngive_role_to_user(username\u003d\"user1\", role_name\u003d\"tortuga\")\n```\n\nI do not know how likely this scenario is. But I would at least update the docstring for the function.","commit_id":"834afdd6b1440d3696dcc27c9c3de04a1620ea01"},{"author":{"_account_id":30674,"name":"Lukas Piwowarski","email":"lpiwowar@redhat.com","username":"lukas-piwowarski"},"change_message_id":"ab77ac45c32305de68ad8441bc6cdfa10f6c3472","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        roles \u003d self.roles_client.list_roles()"},{"line_number":84,"context_line":"        self.check_user_roles(roles)"},{"line_number":85,"context_line":"        role_ids \u003d self._filter_ids_by_name(\u0027roles\u0027, role_name, roles)"},{"line_number":86,"context_line":"        if not role_ids:"},{"line_number":87,"context_line":"            # let\u0027s try if there is an Admin role"},{"line_number":88,"context_line":"            role_name \u003d \u0027Admin\u0027"},{"line_number":89,"context_line":"            role_ids \u003d self._filter_ids_by_name(\u0027roles\u0027, role_name, roles)"}],"source_content_type":"text/x-python","patch_set":2,"id":"75e5e43e_22456b33","line":86,"range":{"start_line":86,"start_character":8,"end_line":86,"end_character":24},"in_reply_to":"6269652e_8ce96e93","updated":"2023-09-18 08:31:58.000000000","message":"Done","commit_id":"834afdd6b1440d3696dcc27c9c3de04a1620ea01"}]}
