)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f5cbb9e259ed12025e0e75c17b7d5afc958c8b25","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"9ba68a67_0fb26cb5","updated":"2024-02-28 16:38:40.000000000","message":"For sure it\u0027s weird to have this attribute only get populated as a side-effect of `_run_bytes_through_protocol` -- and in retrospect it made the repeated tests in `test_absolute_target`, `test_request_lines`, and `test_malformed_proxy_lines` (and others?) kinda fishy.\n\nI think we need to make sure the logger gets cleared as part of `_run_bytes_through_protocol`, though, to preserve some expectations tests have today.","commit_id":"5fe00432487197d4fade5eff61040405ba2e6f17"}],"test/unit/common/test_http_protocol.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f5cbb9e259ed12025e0e75c17b7d5afc958c8b25","unresolved":true,"context_lines":[{"line_number":99,"context_line":"        rfile \u003d BytesIO(bytes_from_client)"},{"line_number":100,"context_line":"        wfile \u003d BytesIO()"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        # All this fakery is needed to make the WSGI server process one"},{"line_number":103,"context_line":"        # connection, possibly with multiple requests, in the main"},{"line_number":104,"context_line":"        # greenthread. It doesn\u0027t hurt correctness if the function is called"},{"line_number":105,"context_line":"        # in a separate greenthread, but it makes using the debugger harder."},{"line_number":106,"context_line":"        class FakeGreenthread(object):"},{"line_number":107,"context_line":"            def link(self, a_callable, *args):"},{"line_number":108,"context_line":"                a_callable(self, *args)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        class FakePool(object):"},{"line_number":111,"context_line":"            def spawn(self, a_callable, *args, **kwargs):"},{"line_number":112,"context_line":"                a_callable(*args, **kwargs)"},{"line_number":113,"context_line":"                return FakeGreenthread()"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"            def spawn_n(self, a_callable, *args, **kwargs):"},{"line_number":116,"context_line":"                a_callable(*args, **kwargs)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"            def waitall(self):"},{"line_number":119,"context_line":"                pass"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        addr \u003d (\u0027127.0.0.1\u0027, 8359)"},{"line_number":122,"context_line":"        fake_tcp_socket \u003d mock.Mock("},{"line_number":123,"context_line":"            setsockopt\u003dlambda *a: None,"},{"line_number":124,"context_line":"            makefile\u003dlambda mode, bufsize: rfile if \u0027r\u0027 in mode else wfile,"},{"line_number":125,"context_line":"            getsockname\u003dlambda *a: addr"},{"line_number":126,"context_line":"        )"},{"line_number":127,"context_line":"        fake_listen_socket \u003d mock.Mock("},{"line_number":128,"context_line":"            accept\u003dmock.MagicMock("},{"line_number":129,"context_line":"                side_effect\u003d[[fake_tcp_socket, addr],"},{"line_number":130,"context_line":"                             # KeyboardInterrupt breaks the WSGI server out of"},{"line_number":131,"context_line":"                             # its infinite accept-process-close loop."},{"line_number":132,"context_line":"                             KeyboardInterrupt]),"},{"line_number":133,"context_line":"            getsockname\u003dlambda *a: addr)"},{"line_number":134,"context_line":"        del fake_listen_socket.do_handshake"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        # If we let the WSGI server close rfile/wfile then we can\u0027t access"},{"line_number":137,"context_line":"        # their contents any more."}],"source_content_type":"text/x-python","patch_set":1,"id":"af020a0d_e84dab79","line":134,"range":{"start_line":102,"start_character":8,"end_line":134,"end_character":43},"updated":"2024-02-28 16:38:40.000000000","message":"Arguably, all of this could go in `setUp`, too...","commit_id":"5fe00432487197d4fade5eff61040405ba2e6f17"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f5cbb9e259ed12025e0e75c17b7d5afc958c8b25","unresolved":true,"context_lines":[{"line_number":269,"context_line":"    def test_bad_request_app_logging(self):"},{"line_number":270,"context_line":"        app_logger \u003d debug_logger()"},{"line_number":271,"context_line":"        app \u003d mock.MagicMock()"},{"line_number":272,"context_line":"        app.logger \u003d app_logger"},{"line_number":273,"context_line":"        with mock.patch(\u0027swift.common.http_protocol.generate_trans_id\u0027,"},{"line_number":274,"context_line":"                        return_value\u003d\u0027test-trans-id\u0027):"},{"line_number":275,"context_line":"            bytes_out \u003d self._run_bytes_through_protocol(("}],"source_content_type":"text/x-python","patch_set":1,"id":"e445b204_2fef1fe6","line":272,"updated":"2024-02-28 16:38:40.000000000","message":"Should we maybe use `self.logger` in this test? \\**shrug*\\* I suppose it doesn\u0027t really matter much.","commit_id":"5fe00432487197d4fade5eff61040405ba2e6f17"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f5cbb9e259ed12025e0e75c17b7d5afc958c8b25","unresolved":true,"context_lines":[{"line_number":494,"context_line":"            self.assertIn(b\"400 Invalid PROXY line\", lines[0])"},{"line_number":495,"context_line":"            self.assertIn(b\"X-Trans-Id\", lines[6])"},{"line_number":496,"context_line":"            self.assertIn(b\"X-Openstack-Request-Id\", lines[7])"},{"line_number":497,"context_line":"            self.assertIn(\"wsgi starting up\", info_lines[0])"},{"line_number":498,"context_line":"            self.assertIn(\"txn:\", info_lines[1])"},{"line_number":499,"context_line":""},{"line_number":500,"context_line":"    def test_unknown_client_addr(self):"},{"line_number":501,"context_line":"        # For \"UNKNOWN\", the rest of the line before the CRLF may be omitted by"}],"source_content_type":"text/x-python","patch_set":1,"id":"8079b9dd_4e2a4a74","line":498,"range":{"start_line":497,"start_character":12,"end_line":498,"end_character":48},"updated":"2024-02-28 16:38:40.000000000","message":"We should make sure the logger gets cleared on each run, now that we aren\u0027t overwriting it each time.","commit_id":"5fe00432487197d4fade5eff61040405ba2e6f17"}]}
