)]}'
{"swift/common/wsgi.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"104b1f9a6d62038aec7c515cd088911db8298e11","unresolved":false,"context_lines":[{"line_number":690,"context_line":"    pool.waitall()"},{"line_number":691,"context_line":""},{"line_number":692,"context_line":""},{"line_number":693,"context_line":"class StrategyBase(object):"},{"line_number":694,"context_line":"    \"\"\""},{"line_number":695,"context_line":"    Some operations common to all strategy classes."},{"line_number":696,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_4023babe","line":693,"range":{"start_line":693,"start_character":6,"end_line":693,"end_character":18},"updated":"2019-12-12 07:06:56.000000000","message":"This guy -- introduced in the related change, https://review.opendev.org/#/c/691423/","commit_id":"772971e2fc3664d0d1fa23cbd2c93ef81bf85917"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b7ea61a77cee9a3b5682b426720800bf2ff8a090","unresolved":false,"context_lines":[{"line_number":791,"context_line":"        starting the wsgi server."},{"line_number":792,"context_line":"        \"\"\""},{"line_number":793,"context_line":""},{"line_number":794,"context_line":"        drop_privileges(self.conf.get(\u0027user\u0027, \u0027swift\u0027))"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def log_sock_exit(self, sock, _unused):"},{"line_number":797,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_b8218cfe","line":794,"updated":"2019-12-11 18:28:42.000000000","message":"I lifted this from what we do in the ServerPerPort strategy","commit_id":"772971e2fc3664d0d1fa23cbd2c93ef81bf85917"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"561030092e3737ccca4d12fe24e1281828ea08e3","unresolved":false,"context_lines":[{"line_number":791,"context_line":"        starting the wsgi server."},{"line_number":792,"context_line":"        \"\"\""},{"line_number":793,"context_line":""},{"line_number":794,"context_line":"        drop_privileges(self.conf.get(\u0027user\u0027, \u0027swift\u0027))"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def log_sock_exit(self, sock, _unused):"},{"line_number":797,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_608276a7","line":794,"in_reply_to":"3fa7e38b_abab781b","updated":"2019-12-12 06:45:20.000000000","message":"What is StrategyBase?","commit_id":"772971e2fc3664d0d1fa23cbd2c93ef81bf85917"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"821669c55ba106e1f7bb070901d20af8d7b496e1","unresolved":false,"context_lines":[{"line_number":791,"context_line":"        starting the wsgi server."},{"line_number":792,"context_line":"        \"\"\""},{"line_number":793,"context_line":""},{"line_number":794,"context_line":"        drop_privileges(self.conf.get(\u0027user\u0027, \u0027swift\u0027))"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def log_sock_exit(self, sock, _unused):"},{"line_number":797,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_f22aaa75","line":794,"in_reply_to":"3fa7e38b_abab781b","updated":"2019-12-12 23:02:44.000000000","message":"sure #willfix\n\nunrelated - i think the deamon worker strategy *might* have been an inspiration - run_wsgi and run_daemon have always been similar \"in spirit\"","commit_id":"772971e2fc3664d0d1fa23cbd2c93ef81bf85917"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"cbe1aa9cda29fbdef02eb775d605581099034237","unresolved":false,"context_lines":[{"line_number":791,"context_line":"        starting the wsgi server."},{"line_number":792,"context_line":"        \"\"\""},{"line_number":793,"context_line":""},{"line_number":794,"context_line":"        drop_privileges(self.conf.get(\u0027user\u0027, \u0027swift\u0027))"},{"line_number":795,"context_line":""},{"line_number":796,"context_line":"    def log_sock_exit(self, sock, _unused):"},{"line_number":797,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_abab781b","line":794,"in_reply_to":"3fa7e38b_b8218cfe","updated":"2019-12-11 19:40:09.000000000","message":"Should we just hoist it up into StrategyBase then?\n\nSide question: do these have any relation to the DaemonStrategy in swift/common/daemon.py? Or is the similar name mostly by chance?","commit_id":"772971e2fc3664d0d1fa23cbd2c93ef81bf85917"}],"test/unit/common/test_wsgi.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"cbe1aa9cda29fbdef02eb775d605581099034237","unresolved":false,"context_lines":[{"line_number":850,"context_line":"                                                           socket\u003dTrue,"},{"line_number":851,"context_line":"                                                           select\u003dTrue,"},{"line_number":852,"context_line":"                                                           thread\u003dTrue)"},{"line_number":853,"context_line":"        # run_wsgi() no longer calls drop_privileges() in the parent process,"},{"line_number":854,"context_line":"        # just clean_up_deemon_hygene()"},{"line_number":855,"context_line":"        self.assertEqual([], _d_privs.mock_calls)"},{"line_number":856,"context_line":"        self.assertEqual([mock.call()], _c_hyg.mock_calls)"},{"line_number":857,"context_line":""},{"line_number":858,"context_line":"    @mock.patch(\u0027swift.common.wsgi.run_server\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_8e11ea55","line":855,"range":{"start_line":853,"start_character":8,"end_line":855,"end_character":49},"updated":"2019-12-11 19:40:09.000000000","message":"I mean, the related change positively checks that drop_privileges was NOT called -- IDK that it pulled the mock out down there *unintentionally*...\n\nCome to think of it, why doesn\u0027t this fail? Is post_fork_hook not getting called?","commit_id":"772971e2fc3664d0d1fa23cbd2c93ef81bf85917"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"821669c55ba106e1f7bb070901d20af8d7b496e1","unresolved":false,"context_lines":[{"line_number":850,"context_line":"                                                           socket\u003dTrue,"},{"line_number":851,"context_line":"                                                           select\u003dTrue,"},{"line_number":852,"context_line":"                                                           thread\u003dTrue)"},{"line_number":853,"context_line":"        # run_wsgi() no longer calls drop_privileges() in the parent process,"},{"line_number":854,"context_line":"        # just clean_up_deemon_hygene()"},{"line_number":855,"context_line":"        self.assertEqual([], _d_privs.mock_calls)"},{"line_number":856,"context_line":"        self.assertEqual([mock.call()], _c_hyg.mock_calls)"},{"line_number":857,"context_line":""},{"line_number":858,"context_line":"    @mock.patch(\u0027swift.common.wsgi.run_server\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_123ae6cb","line":855,"range":{"start_line":853,"start_character":8,"end_line":855,"end_character":49},"in_reply_to":"3fa7e38b_8e11ea55","updated":"2019-12-12 23:02:44.000000000","message":"right, not called in the parent any longer","commit_id":"772971e2fc3664d0d1fa23cbd2c93ef81bf85917"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b7ea61a77cee9a3b5682b426720800bf2ff8a090","unresolved":false,"context_lines":[{"line_number":1291,"context_line":""},{"line_number":1292,"context_line":"        self.assertEqual(["},{"line_number":1293,"context_line":"            mock.call(\u0027bob\u0027),"},{"line_number":1294,"context_line":"        ], self.mock_drop_privileges.mock_calls)"},{"line_number":1295,"context_line":""},{"line_number":1296,"context_line":""},{"line_number":1297,"context_line":"class TestServersPerPortStrategy(unittest.TestCase, CommonTestMixin):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_3864bc48","line":1294,"updated":"2019-12-11 18:28:42.000000000","message":"something in our test strategy seems off.  In the related change we managed to remove drop-priv from both TestCase and only add it back into one... maybe more common testing would help over time?  :grimace:","commit_id":"772971e2fc3664d0d1fa23cbd2c93ef81bf85917"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e354d0662396dd837bc335bdb229761db7087912","unresolved":false,"context_lines":[{"line_number":1291,"context_line":""},{"line_number":1292,"context_line":"        self.assertEqual(["},{"line_number":1293,"context_line":"            mock.call(\u0027bob\u0027),"},{"line_number":1294,"context_line":"        ], self.mock_drop_privileges.mock_calls)"},{"line_number":1295,"context_line":""},{"line_number":1296,"context_line":""},{"line_number":1297,"context_line":"class TestServersPerPortStrategy(unittest.TestCase, CommonTestMixin):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_6abd5366","line":1294,"updated":"2019-12-13 23:16:56.000000000","message":"Pops real nice:\n\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\nFAIL: test_post_fork_hook (test.unit.common.test_wsgi.TestWorkersStrategy)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n  File \"/vagrant/swift/test/unit/common/test_wsgi.py\", line 1294, in test_post_fork_hook\n    ], self.mock_drop_privileges.mock_calls)\nAssertionError: [call(\u0027bob\u0027)] !\u003d []\n    \"[call(\u0027bob\u0027)] !\u003d []\" \u003d \u0027%s !\u003d %s\u0027 % _common_shorten_repr([call(\u0027bob\u0027)], [])\n    \"[call(\u0027bob\u0027)] !\u003d []\" \u003d self._formatMessage(\"[call(\u0027bob\u0027)] !\u003d []\", \"[call(\u0027bob\u0027)] !\u003d []\")\n\u003e\u003e  raise self.failureException(\"[call(\u0027bob\u0027)] !\u003d []\")","commit_id":"6b33cf99f43892a22f1ab4124b10c49462b9cbc2"}]}
