)]}'
{"swift/container/updater.py":[{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"f6f472269d1513f29fba153b89341910637983e0","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                con_path \u003d os.path.join(dev_path, DATADIR)"},{"line_number":87,"context_line":"                if not os.path.exists(con_path):"},{"line_number":88,"context_line":"                    continue"},{"line_number":89,"context_line":"                for partition in os.listdir(con_path):"},{"line_number":90,"context_line":"                    paths.append(os.path.join(con_path, partition))"},{"line_number":91,"context_line":"            shuffle(paths)"},{"line_number":92,"context_line":"            return paths"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa201ad_34296337","line":89,"updated":"2014-10-08 06:38:56.000000000","message":"Exception most likely happens in os.listdir, right?","commit_id":"751a9d42e1ff0c3a568d76f3eaf798b99173f8f6"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"c3d78ec9d4c37b3698f65f1455a32056d6e20aa1","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                con_path \u003d os.path.join(dev_path, DATADIR)"},{"line_number":87,"context_line":"                if not os.path.exists(con_path):"},{"line_number":88,"context_line":"                    continue"},{"line_number":89,"context_line":"                for partition in os.listdir(con_path):"},{"line_number":90,"context_line":"                    paths.append(os.path.join(con_path, partition))"},{"line_number":91,"context_line":"            shuffle(paths)"},{"line_number":92,"context_line":"            return paths"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_26409e06","line":89,"in_reply_to":"baa201ad_34296337","updated":"2014-10-23 23:15:32.000000000","message":"It could happen in the first or second case.  I have updated the code to limit the scope of the try block.","commit_id":"751a9d42e1ff0c3a568d76f3eaf798b99173f8f6"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"f6f472269d1513f29fba153b89341910637983e0","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                            self.successes \u003d 0"},{"line_number":149,"context_line":"                            self.failures \u003d 0"},{"line_number":150,"context_line":"                            self.new_account_suppressions \u003d open(tmpfilename,"},{"line_number":151,"context_line":"                                                                 \u0027w\u0027)"},{"line_number":152,"context_line":"                            forkbegin \u003d time.time()"},{"line_number":153,"context_line":"                            self.container_sweep(path)"},{"line_number":154,"context_line":"                            elapsed \u003d time.time() - forkbegin"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa201ad_b4fd53b3","line":151,"updated":"2014-10-08 06:38:56.000000000","message":"Is the exception raised here?","commit_id":"751a9d42e1ff0c3a568d76f3eaf798b99173f8f6"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"c3d78ec9d4c37b3698f65f1455a32056d6e20aa1","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                            self.successes \u003d 0"},{"line_number":149,"context_line":"                            self.failures \u003d 0"},{"line_number":150,"context_line":"                            self.new_account_suppressions \u003d open(tmpfilename,"},{"line_number":151,"context_line":"                                                                 \u0027w\u0027)"},{"line_number":152,"context_line":"                            forkbegin \u003d time.time()"},{"line_number":153,"context_line":"                            self.container_sweep(path)"},{"line_number":154,"context_line":"                            elapsed \u003d time.time() - forkbegin"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_664d463e","line":151,"in_reply_to":"baa201ad_b4fd53b3","updated":"2014-10-23 23:15:32.000000000","message":"No ...","commit_id":"751a9d42e1ff0c3a568d76f3eaf798b99173f8f6"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"f6f472269d1513f29fba153b89341910637983e0","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                            self.new_account_suppressions \u003d open(tmpfilename,"},{"line_number":151,"context_line":"                                                                 \u0027w\u0027)"},{"line_number":152,"context_line":"                            forkbegin \u003d time.time()"},{"line_number":153,"context_line":"                            self.container_sweep(path)"},{"line_number":154,"context_line":"                            elapsed \u003d time.time() - forkbegin"},{"line_number":155,"context_line":"                            self.logger.debug("},{"line_number":156,"context_line":"                                _(\u0027Container update sweep of %(path)s \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"baa201ad_f4327ba5","line":153,"updated":"2014-10-08 06:38:56.000000000","message":"Or here?","commit_id":"751a9d42e1ff0c3a568d76f3eaf798b99173f8f6"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"c3d78ec9d4c37b3698f65f1455a32056d6e20aa1","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                            self.new_account_suppressions \u003d open(tmpfilename,"},{"line_number":151,"context_line":"                                                                 \u0027w\u0027)"},{"line_number":152,"context_line":"                            forkbegin \u003d time.time()"},{"line_number":153,"context_line":"                            self.container_sweep(path)"},{"line_number":154,"context_line":"                            elapsed \u003d time.time() - forkbegin"},{"line_number":155,"context_line":"                            self.logger.debug("},{"line_number":156,"context_line":"                                _(\u0027Container update sweep of %(path)s \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_864a2a24","line":153,"in_reply_to":"baa201ad_f4327ba5","updated":"2014-10-23 23:15:32.000000000","message":"Could come from here.  I updated the code to limit it to here.","commit_id":"751a9d42e1ff0c3a568d76f3eaf798b99173f8f6"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"40e13d4857ec0216010aec6d9a3227c5356472b2","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            return os.listdir(path)"},{"line_number":76,"context_line":"        except OSError as e:"},{"line_number":77,"context_line":"            self.logger.error(_(\u0027ERROR:  Failed to get paths to drive \u0027"},{"line_number":78,"context_line":"                                \u0027partitions: %s\u0027) % e)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def get_paths(self):"},{"line_number":81,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_3e07b9cb","line":78,"updated":"2014-10-24 13:25:55.000000000","message":"nit: you could return [] here, since you apply a default each time you use _listdir. then it would be safe to have e.g. \n\n  for device in self._listdir(self.devices) \n\nat line 87","commit_id":"5ec40aea9a90bcd8b8e04e8469b4e319a7364efd"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"f6afbee3c6080a7280830e0c747e5dabd546795d","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            return os.listdir(path)"},{"line_number":76,"context_line":"        except OSError as e:"},{"line_number":77,"context_line":"            self.logger.error(_(\u0027ERROR:  Failed to get paths to drive \u0027"},{"line_number":78,"context_line":"                                \u0027partitions: %s\u0027) % e)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def get_paths(self):"},{"line_number":81,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_84b773f4","line":78,"in_reply_to":"9aa7fdbe_3e07b9cb","updated":"2014-10-24 19:06:03.000000000","message":"Good idea.  Thanks.","commit_id":"5ec40aea9a90bcd8b8e04e8469b4e319a7364efd"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"40e13d4857ec0216010aec6d9a3227c5356472b2","unresolved":false,"context_lines":[{"line_number":130,"context_line":"            # read from account ring to ensure it\u0027s fresh"},{"line_number":131,"context_line":"            self.get_account_ring().get_nodes(\u0027\u0027)"},{"line_number":132,"context_line":"            paths \u003d self.get_paths()"},{"line_number":133,"context_line":"            for path in (paths or []):"},{"line_number":134,"context_line":"                while len(pid2filename) \u003e\u003d self.concurrency:"},{"line_number":135,"context_line":"                    pid \u003d os.wait()[0]"},{"line_number":136,"context_line":"                    try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_3b06eb86","line":133,"updated":"2014-10-24 13:25:55.000000000","message":"Is this change needed? - looks like get_paths will always return a list","commit_id":"5ec40aea9a90bcd8b8e04e8469b4e319a7364efd"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"f6afbee3c6080a7280830e0c747e5dabd546795d","unresolved":false,"context_lines":[{"line_number":130,"context_line":"            # read from account ring to ensure it\u0027s fresh"},{"line_number":131,"context_line":"            self.get_account_ring().get_nodes(\u0027\u0027)"},{"line_number":132,"context_line":"            paths \u003d self.get_paths()"},{"line_number":133,"context_line":"            for path in (paths or []):"},{"line_number":134,"context_line":"                while len(pid2filename) \u003e\u003d self.concurrency:"},{"line_number":135,"context_line":"                    pid \u003d os.wait()[0]"},{"line_number":136,"context_line":"                    try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_a4cb9751","line":133,"in_reply_to":"9aa7fdbe_3b06eb86","updated":"2014-10-24 19:06:03.000000000","message":"Done","commit_id":"5ec40aea9a90bcd8b8e04e8469b4e319a7364efd"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"40e13d4857ec0216010aec6d9a3227c5356472b2","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                    self.successes \u003d 0"},{"line_number":150,"context_line":"                    self.failures \u003d 0"},{"line_number":151,"context_line":"                    self.new_account_suppressions \u003d open(tmpfilename,"},{"line_number":152,"context_line":"                                                         \u0027w\u0027)"},{"line_number":153,"context_line":"                    forkbegin \u003d time.time()"},{"line_number":154,"context_line":"                    # Catch any exceptions so we can ensure to call"},{"line_number":155,"context_line":"                    # sys.exit() so we do not leave any orphaned processes."}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_5b800fc0","line":152,"updated":"2014-10-24 13:25:55.000000000","message":"unnecessary change","commit_id":"5ec40aea9a90bcd8b8e04e8469b4e319a7364efd"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"f6afbee3c6080a7280830e0c747e5dabd546795d","unresolved":false,"context_lines":[{"line_number":149,"context_line":"                    self.successes \u003d 0"},{"line_number":150,"context_line":"                    self.failures \u003d 0"},{"line_number":151,"context_line":"                    self.new_account_suppressions \u003d open(tmpfilename,"},{"line_number":152,"context_line":"                                                         \u0027w\u0027)"},{"line_number":153,"context_line":"                    forkbegin \u003d time.time()"},{"line_number":154,"context_line":"                    # Catch any exceptions so we can ensure to call"},{"line_number":155,"context_line":"                    # sys.exit() so we do not leave any orphaned processes."}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_64ae0f83","line":152,"in_reply_to":"9aa7fdbe_5b800fc0","updated":"2014-10-24 19:06:03.000000000","message":"You are correct. Sorry, that was left over from a previous attempt.","commit_id":"5ec40aea9a90bcd8b8e04e8469b4e319a7364efd"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"40e13d4857ec0216010aec6d9a3227c5356472b2","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                    # sys.exit() so we do not leave any orphaned processes."},{"line_number":156,"context_line":"                    try:"},{"line_number":157,"context_line":"                        self.container_sweep(path)"},{"line_number":158,"context_line":"                    except OSError as e:"},{"line_number":159,"context_line":"                        self.logger.error(_(\u0027ERROR:  Container update \u0027"},{"line_number":160,"context_line":"                                            \u0027sweep of %(path)s failed: \u0027"},{"line_number":161,"context_line":"                                            \u0027%(exception)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_2ff7855a","line":158,"updated":"2014-10-24 13:25:55.000000000","message":"can container_sweep ever raise OSError? - I couldn\u0027t see it (os.walk does not raise error)","commit_id":"5ec40aea9a90bcd8b8e04e8469b4e319a7364efd"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"f6afbee3c6080a7280830e0c747e5dabd546795d","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                    # sys.exit() so we do not leave any orphaned processes."},{"line_number":156,"context_line":"                    try:"},{"line_number":157,"context_line":"                        self.container_sweep(path)"},{"line_number":158,"context_line":"                    except OSError as e:"},{"line_number":159,"context_line":"                        self.logger.error(_(\u0027ERROR:  Container update \u0027"},{"line_number":160,"context_line":"                                            \u0027sweep of %(path)s failed: \u0027"},{"line_number":161,"context_line":"                                            \u0027%(exception)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_44802bc0","line":158,"in_reply_to":"9aa7fdbe_2ff7855a","updated":"2014-10-24 19:06:03.000000000","message":"I had thought it could.  Though, we have already verified in get_paths that we have access to the directory so we should be safe to not do a catch here.","commit_id":"5ec40aea9a90bcd8b8e04e8469b4e319a7364efd"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"40e13d4857ec0216010aec6d9a3227c5356472b2","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                        {\u0027path\u0027: path, \u0027elapsed\u0027: elapsed,"},{"line_number":171,"context_line":"                         \u0027success\u0027: self.successes,"},{"line_number":172,"context_line":"                         \u0027fail\u0027: self.failures,"},{"line_number":173,"context_line":"                         \u0027no_change\u0027: self.no_changes})"},{"line_number":174,"context_line":"                    sys.exit()"},{"line_number":175,"context_line":"            while pid2filename:"},{"line_number":176,"context_line":"                pid \u003d os.wait()[0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_7bcf9329","line":173,"updated":"2014-10-24 13:25:55.000000000","message":"unnecessary change - or did I miss an actual change along with the reformat?","commit_id":"5ec40aea9a90bcd8b8e04e8469b4e319a7364efd"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"f6afbee3c6080a7280830e0c747e5dabd546795d","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                        {\u0027path\u0027: path, \u0027elapsed\u0027: elapsed,"},{"line_number":171,"context_line":"                         \u0027success\u0027: self.successes,"},{"line_number":172,"context_line":"                         \u0027fail\u0027: self.failures,"},{"line_number":173,"context_line":"                         \u0027no_change\u0027: self.no_changes})"},{"line_number":174,"context_line":"                    sys.exit()"},{"line_number":175,"context_line":"            while pid2filename:"},{"line_number":176,"context_line":"                pid \u003d os.wait()[0]"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_e44bdfae","line":173,"in_reply_to":"9aa7fdbe_7bcf9329","updated":"2014-10-24 19:06:03.000000000","message":"Done","commit_id":"5ec40aea9a90bcd8b8e04e8469b4e319a7364efd"}],"test/unit/container/test_updater.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"40e13d4857ec0216010aec6d9a3227c5356472b2","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            \u0027node_timeout\u0027: \u002715\u0027,"},{"line_number":176,"context_line":"            \u0027account_suppression_time\u0027: 0"},{"line_number":177,"context_line":"        })"},{"line_number":178,"context_line":"        cu.run_forever"},{"line_number":179,"context_line":"        self.assertEqual(0, mock_os_fork.call_count)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    @mock.patch.object(container_updater.ContainerUpdater, \u0027get_paths\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_0a18ef1c","line":178,"updated":"2014-10-24 13:25:55.000000000","message":"missing () so method isn\u0027t actually called","commit_id":"5ec40aea9a90bcd8b8e04e8469b4e319a7364efd"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"40e13d4857ec0216010aec6d9a3227c5356472b2","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            \u0027account_suppression_time\u0027: 0"},{"line_number":177,"context_line":"        })"},{"line_number":178,"context_line":"        cu.run_forever"},{"line_number":179,"context_line":"        self.assertEqual(0, mock_os_fork.call_count)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    @mock.patch.object(container_updater.ContainerUpdater, \u0027get_paths\u0027)"},{"line_number":182,"context_line":"    @mock.patch(\u0027time.sleep\u0027, return_value\u003dNone)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_2ac3f357","line":179,"updated":"2014-10-24 13:25:55.000000000","message":"It would be good to check that the errors got logged, perhaps  by installing a FakeLogger in cu instance and checking the error lines get logged.","commit_id":"5ec40aea9a90bcd8b8e04e8469b4e319a7364efd"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"f6afbee3c6080a7280830e0c747e5dabd546795d","unresolved":false,"context_lines":[{"line_number":176,"context_line":"            \u0027account_suppression_time\u0027: 0"},{"line_number":177,"context_line":"        })"},{"line_number":178,"context_line":"        cu.run_forever"},{"line_number":179,"context_line":"        self.assertEqual(0, mock_os_fork.call_count)"},{"line_number":180,"context_line":""},{"line_number":181,"context_line":"    @mock.patch.object(container_updater.ContainerUpdater, \u0027get_paths\u0027)"},{"line_number":182,"context_line":"    @mock.patch(\u0027time.sleep\u0027, return_value\u003dNone)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_b0a8288e","line":179,"in_reply_to":"9aa7fdbe_2ac3f357","updated":"2014-10-24 19:06:03.000000000","message":"Done","commit_id":"5ec40aea9a90bcd8b8e04e8469b4e319a7364efd"}]}
