)]}'
{"barbican_tempest_plugin/services/key_manager/json/secret_client.py":[{"author":{"_account_id":27954,"name":"Moisés Guimarães de Medeiros","email":"guimaraes@pm.me","username":"moguimar"},"change_message_id":"931ca6e53c2ff5d00b30e4616ee9ebf06cfc996c","unresolved":true,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":32,"context_line":"        super().__init__(*args, **kwargs)"},{"line_number":33,"context_line":"        self._secret_ids \u003d []"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def create_secret(self, expected_status\u003d201, **kwargs):"},{"line_number":36,"context_line":"        if \u0027name\u0027 not in kwargs:"}],"source_content_type":"text/x-python","patch_set":1,"id":"4ceb4ce7_3ee6a296","line":33,"updated":"2021-08-06 08:13:52.000000000","message":"What about using a set?\n\nYou can use self._secret_ids.add(secret_id) without checking if it is already there.\nThe same goes for removing, self._secret_ids.discard(secret_id) will remove the id but not error if it isn\u0027t there.","commit_id":"73297b790e811c184ceb5559c2646b4c577b290c"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"f5f73f945810353fbfc01777ddff91134f374810","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":32,"context_line":"        super().__init__(*args, **kwargs)"},{"line_number":33,"context_line":"        self._secret_ids \u003d []"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def create_secret(self, expected_status\u003d201, **kwargs):"},{"line_number":36,"context_line":"        if \u0027name\u0027 not in kwargs:"}],"source_content_type":"text/x-python","patch_set":1,"id":"bb6e51cb_35d787d0","line":33,"in_reply_to":"32320155_c779fc7c","updated":"2021-08-11 15:49:34.000000000","message":"Done","commit_id":"73297b790e811c184ceb5559c2646b4c577b290c"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"8321446c949e35498a18967478a3ef5b852f99ac","unresolved":true,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":32,"context_line":"        super().__init__(*args, **kwargs)"},{"line_number":33,"context_line":"        self._secret_ids \u003d []"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    def create_secret(self, expected_status\u003d201, **kwargs):"},{"line_number":36,"context_line":"        if \u0027name\u0027 not in kwargs:"}],"source_content_type":"text/x-python","patch_set":1,"id":"32320155_c779fc7c","line":33,"in_reply_to":"4ceb4ce7_3ee6a296","updated":"2021-08-11 15:29:12.000000000","message":"Yeah, that\u0027s a great idea.  discard() is definitely nicer than checking the list.","commit_id":"73297b790e811c184ceb5559c2646b4c577b290c"},{"author":{"_account_id":27954,"name":"Moisés Guimarães de Medeiros","email":"guimaraes@pm.me","username":"moguimar"},"change_message_id":"931ca6e53c2ff5d00b30e4616ee9ebf06cfc996c","unresolved":true,"context_lines":[{"line_number":101,"context_line":"    def cleanup(self):"},{"line_number":102,"context_line":"        for secret_id in self._secret_ids:"},{"line_number":103,"context_line":"            try:"},{"line_number":104,"context_line":"                self.delete_secret(secret_id)"},{"line_number":105,"context_line":"            except exceptions.NotFound:"},{"line_number":106,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"143ed7b2_210533cd","line":104,"updated":"2021-08-06 08:13:52.000000000","message":"my concern here is that self.delete_secret modifies _secret_ids during the loop, should we run the for loop on a copy of it instead?","commit_id":"73297b790e811c184ceb5559c2646b4c577b290c"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"8321446c949e35498a18967478a3ef5b852f99ac","unresolved":true,"context_lines":[{"line_number":101,"context_line":"    def cleanup(self):"},{"line_number":102,"context_line":"        for secret_id in self._secret_ids:"},{"line_number":103,"context_line":"            try:"},{"line_number":104,"context_line":"                self.delete_secret(secret_id)"},{"line_number":105,"context_line":"            except exceptions.NotFound:"},{"line_number":106,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"419a63dc_9e14a00a","line":104,"in_reply_to":"143ed7b2_210533cd","updated":"2021-08-11 15:29:12.000000000","message":"Yeah, that\u0027s a good catch... I\u0027ll refactor this so we don\u0027t mess with the set when cleaning up.","commit_id":"73297b790e811c184ceb5559c2646b4c577b290c"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"f5f73f945810353fbfc01777ddff91134f374810","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    def cleanup(self):"},{"line_number":102,"context_line":"        for secret_id in self._secret_ids:"},{"line_number":103,"context_line":"            try:"},{"line_number":104,"context_line":"                self.delete_secret(secret_id)"},{"line_number":105,"context_line":"            except exceptions.NotFound:"},{"line_number":106,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"4895b4b5_5c9e8ae9","line":104,"in_reply_to":"419a63dc_9e14a00a","updated":"2021-08-11 15:49:34.000000000","message":"Done","commit_id":"73297b790e811c184ceb5559c2646b4c577b290c"},{"author":{"_account_id":27954,"name":"Moisés Guimarães de Medeiros","email":"guimaraes@pm.me","username":"moguimar"},"change_message_id":"7bbf4383808f68420d2de1789d841084a6f9a1f0","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    def cleanup(self):"},{"line_number":102,"context_line":"        for secret_id in self._secret_ids:"},{"line_number":103,"context_line":"            try:"},{"line_number":104,"context_line":"                self.delete_secret(secret_id)"},{"line_number":105,"context_line":"            except exceptions.NotFound:"},{"line_number":106,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"c3ba335e_2ecebd45","line":104,"in_reply_to":"4895b4b5_5c9e8ae9","updated":"2021-08-12 07:50:54.000000000","message":"Is still having _secret_ids populated a problem at this point? I\u0027d clean it up after the for loop or in order to avoid the double delete methods, you can have a single delete method and run the for loop on a copy of the set.","commit_id":"73297b790e811c184ceb5559c2646b4c577b290c"},{"author":{"_account_id":7973,"name":"Douglas Mendizábal","email":"dmendiza@redhat.com","username":"dougmendizabal"},"change_message_id":"5c5c67634caef4e9aa0c06c7099c620d1a1b9a1e","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    def cleanup(self):"},{"line_number":102,"context_line":"        for secret_id in self._secret_ids:"},{"line_number":103,"context_line":"            try:"},{"line_number":104,"context_line":"                self.delete_secret(secret_id)"},{"line_number":105,"context_line":"            except exceptions.NotFound:"},{"line_number":106,"context_line":"                pass"}],"source_content_type":"text/x-python","patch_set":1,"id":"d3f00677_d3eed493","line":104,"in_reply_to":"c3ba335e_2ecebd45","updated":"2021-08-17 18:03:33.000000000","message":"No, it shouldn\u0027t be a problem.   `cleanup()` is only called during teardown, and after that the test suite exits.","commit_id":"73297b790e811c184ceb5559c2646b4c577b290c"}]}
