)]}'
{"tempest/scenario/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d4e64c336e3f23dfa7799aaf1159b7cd5db9c6a6","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        existing_vol_types \u003d client.list_volume_types()[\u0027volume_types\u0027]"},{"line_number":356,"context_line":"        for vol_type in existing_vol_types:"},{"line_number":357,"context_line":"            if vol_type[\u0027name\u0027] \u003d\u003d name:"},{"line_number":358,"context_line":"                # Volume type already exists so just return."},{"line_number":359,"context_line":"                return vol_type"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"    def create_volume_type(self, client\u003dNone, name\u003dNone, backend_name\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffb9cba7_b616b148","line":358,"updated":"2019-04-30 23:13:33.000000000","message":"Can remove this obvious comment.","commit_id":"8502bd50dcc597a4d42977d02a717db3a067a5e5"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"a4a9989cc20cbd9508d297a2fee3fa0eaeb96daf","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        existing_vol_types \u003d client.list_volume_types()[\u0027volume_types\u0027]"},{"line_number":356,"context_line":"        for vol_type in existing_vol_types:"},{"line_number":357,"context_line":"            if vol_type[\u0027name\u0027] \u003d\u003d name:"},{"line_number":358,"context_line":"                return vol_type"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def create_volume_type(self, client\u003dNone, name\u003dNone, backend_name\u003dNone):"},{"line_number":361,"context_line":"        if not client:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_278cc67d","line":358,"range":{"start_line":358,"start_character":0,"end_line":358,"end_character":31},"updated":"2019-04-30 22:56:45.000000000","message":"let\u0027s raise the error here if test is trying to duplicate the resource with same name. Because this matched volume_type with same name can be non-test resource or any other tests isolated resource which should not be used by other tests. \n\nThis way we can find the test error of creating the resource with same name","commit_id":"b37028833f268f7833c097abeef3394fb373ebca"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d4e64c336e3f23dfa7799aaf1159b7cd5db9c6a6","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        existing_vol_types \u003d client.list_volume_types()[\u0027volume_types\u0027]"},{"line_number":356,"context_line":"        for vol_type in existing_vol_types:"},{"line_number":357,"context_line":"            if vol_type[\u0027name\u0027] \u003d\u003d name:"},{"line_number":358,"context_line":"                return vol_type"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def create_volume_type(self, client\u003dNone, name\u003dNone, backend_name\u003dNone):"},{"line_number":361,"context_line":"        if not client:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_477f7a14","line":358,"range":{"start_line":358,"start_character":0,"end_line":358,"end_character":31},"in_reply_to":"ffb9cba7_278cc67d","updated":"2019-04-30 23:13:33.000000000","message":"If we were going to do that, why don\u0027t we just revert https://review.opendev.org/#/c/570161/? That change was made awhile ago and no one noticed the issue until this week (when I triaged it). So I don\u0027t see the point in just raising an error when we were already getting an error, i.e. what would be the difference? Are you saying that rather than be graceful here, we actually modify the tests that are duplicating the luks volume type and change them to use unique volume type names? If so, why? The single volume type seems fine for the tests - unless one races to cleanup while the other is still using the shared volume type.","commit_id":"b37028833f268f7833c097abeef3394fb373ebca"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"b9e917878d5aff5dc5833a1aae3a0cad98328290","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        existing_vol_types \u003d client.list_volume_types()[\u0027volume_types\u0027]"},{"line_number":356,"context_line":"        for vol_type in existing_vol_types:"},{"line_number":357,"context_line":"            if vol_type[\u0027name\u0027] \u003d\u003d name:"},{"line_number":358,"context_line":"                return vol_type"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def create_volume_type(self, client\u003dNone, name\u003dNone, backend_name\u003dNone):"},{"line_number":361,"context_line":"        if not client:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ffb9cba7_f5d40deb","line":358,"range":{"start_line":358,"start_character":0,"end_line":358,"end_character":31},"in_reply_to":"ffb9cba7_477f7a14","updated":"2019-05-01 23:28:47.000000000","message":"I mean the second point you mentioned about fixing the tests using the same name. And the main reason is race condition.\n \nAs long as tests generate the random name they like to generate and that name they pass (if they use just hardcoded name then there is a chance to conflict the name with non-test volume_type in tested env).\n\nInstead of reverting the 570161, \n1. I like this change(with raising an error if the same name exists) to detect the faulty tests. \n\n2. fix the tests using hard-coded same name.   \n\nchanged code in 570161 actually fixed the things \"test asking base method to create resource with input name but base class method again re-generate a long name appending the input one\"","commit_id":"b37028833f268f7833c097abeef3394fb373ebca"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bc0b6ad055acb84edfbe77e6599728fa047204e8","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        existing_vol_types \u003d client.list_volume_types()[\u0027volume_types\u0027]"},{"line_number":356,"context_line":"        for vol_type in existing_vol_types:"},{"line_number":357,"context_line":"            if vol_type[\u0027name\u0027] \u003d\u003d name:"},{"line_number":358,"context_line":"                return vol_type"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"    def create_volume_type(self, client\u003dNone, name\u003dNone, backend_name\u003dNone):"},{"line_number":361,"context_line":"        if not client:"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_9719c689","line":358,"range":{"start_line":358,"start_character":0,"end_line":358,"end_character":31},"in_reply_to":"ffb9cba7_f5d40deb","updated":"2019-05-03 15:57:12.000000000","message":"I still don\u0027t see the point in manually generating a random name in the tests when the create_volume_type method can do that for us and used to do just that if we revert 570161. The whole reason we\u0027re getting the conflicts is because that was changed. We don\u0027t really need conflict detection (this patch) if we\u0027re enforcing a random name, which is what would happen if we revert 570161.\n\n\u003e 2. fix the tests using hard-coded same name. \n\nChances are someone will just copy an existing test later at some point and forget / not know they need to have a unique name in their new test - so just let the helper method enforce that if it\u0027s what we want.","commit_id":"b37028833f268f7833c097abeef3394fb373ebca"}]}
