)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f0db2e38295715e3b62dbf578b888aa847b525d7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"12a0b1f7_c2f494f5","updated":"2023-06-26 17:10:54.000000000","message":"alternative attempt at encapsulation here : https://review.opendev.org/c/openstack/swift/+/886994","commit_id":"53214d86c272bdb4e7f58c62e2bf51400607109f"}],"swift/common/request_helpers.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"969d74f41a82b0373390b427699759c9a6d22bf3","unresolved":true,"context_lines":[{"line_number":785,"context_line":"    5-tuples."},{"line_number":786,"context_line":""},{"line_number":787,"context_line":"    The response must either be a 200 or a 206; if you feed in a 204 or"},{"line_number":788,"context_line":"    something similar, this probably won\u0027t work."},{"line_number":789,"context_line":""},{"line_number":790,"context_line":"    :param response: HTTP response, like from bufferedhttp.http_connect(),"},{"line_number":791,"context_line":"        not a swob.Response."}],"source_content_type":"text/x-python","patch_set":2,"id":"c033ef4a_032004f9","side":"PARENT","line":788,"updated":"2023-06-26 17:30:01.000000000","message":"I think this became evident because the refactor changed the time at which the http_response_to_document_iters method was executed - previously we only got here once the response status int had been checked, but the refactor caused this to be executed for every response...and things like 204 or 404 would blow up.\n\nThe alternative refactoring https://review.opendev.org/c/openstack/swift/+/886994 avoids that by lazily constructing the source parts_iter, but do we want to make this change *anyway*??","commit_id":"4f463c72970b4aa0c1f8f04d2f917172c67bf5bb"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"74d599a64d0f4ddfeacaaf76b749128ba492b1c5","unresolved":true,"context_lines":[{"line_number":792,"context_line":"    \"\"\""},{"line_number":793,"context_line":"    chunked \u003d is_chunked(dict(response.getheaders()))"},{"line_number":794,"context_line":""},{"line_number":795,"context_line":"    if response.status !\u003d 206:"},{"line_number":796,"context_line":"        if chunked:"},{"line_number":797,"context_line":"            # Single \"range\" that\u0027s the whole object with an unknown length"},{"line_number":798,"context_line":"            return iter([(0, None, None, response.getheaders(),"}],"source_content_type":"text/x-python","patch_set":2,"id":"0a1e6481_c72a762c","line":795,"updated":"2023-05-22 23:59:59.000000000","message":"Good call! Yeah, I\u0027d only expect to be thinking about `Content-Type: multipart/byteranges` or `Content-Range` on a 206. Makes me wonder a bit about the accuracy of the above comment now... I think a 404 (or most other errors) actually probably *would* be fine now...\n\nThe one big exception would be a 416, which would come back with something like `Content-Range: */{obj_size}`","commit_id":"53214d86c272bdb4e7f58c62e2bf51400607109f"}],"swift/proxy/controllers/base.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"74d599a64d0f4ddfeacaaf76b749128ba492b1c5","unresolved":true,"context_lines":[{"line_number":950,"context_line":"    :param src: the response from the backend"},{"line_number":951,"context_line":"    \"\"\""},{"line_number":952,"context_line":"    if not src:"},{"line_number":953,"context_line":"        return"},{"line_number":954,"context_line":"    try:"},{"line_number":955,"context_line":"        # Since the backends set \"Connection: close\" in their response"},{"line_number":956,"context_line":"        # headers, the response object (src) is solely responsible for the"}],"source_content_type":"text/x-python","patch_set":2,"id":"f00fa610_917228de","line":953,"updated":"2023-05-22 23:59:59.000000000","message":"I mean, given the\n```\nexcept Exception:\n    pass\n```\nat the end, it doesn\u0027t really matter... 🤮","commit_id":"53214d86c272bdb4e7f58c62e2bf51400607109f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"74d599a64d0f4ddfeacaaf76b749128ba492b1c5","unresolved":true,"context_lines":[{"line_number":1040,"context_line":"            \u0027swift_conn\u0027: None,"},{"line_number":1041,"context_line":"            \u0027node\u0027: None,"},{"line_number":1042,"context_line":"            \u0027parts_iter\u0027: None,"},{"line_number":1043,"context_line":"        }"},{"line_number":1044,"context_line":"        self.latest_404_timestamp \u003d Timestamp(0)"},{"line_number":1045,"context_line":"        if self.server_type \u003d\u003d \u0027Object\u0027:"},{"line_number":1046,"context_line":"            self.node_timeout \u003d self.app.recoverable_node_timeout"}],"source_content_type":"text/x-python","patch_set":2,"id":"c8e565c4_73ed8444","line":1043,"updated":"2023-05-22 23:59:59.000000000","message":"I almost wonder if it\u0027d be worth using `self._set_source` here, so we have just the one place where we define what all goes in this dict.\n\nDrawing a line around this particular bag of attributes like this makes me wonder if we\u0027d be better off making a proper class for it -- `BackendResponse` maybe? Or maybe we can just extend `BufferedHTTPResponse` with a few more attributes/properties?","commit_id":"53214d86c272bdb4e7f58c62e2bf51400607109f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"74d599a64d0f4ddfeacaaf76b749128ba492b1c5","unresolved":true,"context_lines":[{"line_number":1578,"context_line":"    def get_working_response(self, req):"},{"line_number":1579,"context_line":"        success \u003d self._find_and_set_source()"},{"line_number":1580,"context_line":"        res \u003d None"},{"line_number":1581,"context_line":"        if success:"},{"line_number":1582,"context_line":"            res \u003d Response(request\u003dreq)"},{"line_number":1583,"context_line":"            res.status \u003d self.source[\u0027resp\u0027].status"},{"line_number":1584,"context_line":"            update_headers(res, self.source[\u0027resp\u0027].getheaders())"}],"source_content_type":"text/x-python","patch_set":2,"id":"9d94cfdd_aed4eb57","line":1581,"range":{"start_line":1581,"start_character":11,"end_line":1581,"end_character":18},"updated":"2023-05-22 23:59:59.000000000","message":"Pretty sure _every_ place we\u0027ve got this `success` flag we don\u0027t actually need to name it, but could instead rephrase as something like `if self._find_and_set_source():` (Maybe it\u0027d be better as `_can_find_and_set_source`?)","commit_id":"53214d86c272bdb4e7f58c62e2bf51400607109f"}],"test/unit/proxy/test_server.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f0db2e38295715e3b62dbf578b888aa847b525d7","unresolved":true,"context_lines":[{"line_number":3186,"context_line":"        sabotaged \u003d [False]"},{"line_number":3187,"context_line":""},{"line_number":3188,"context_line":"        def single_sabotage_hrtdi(resp, **kw):"},{"line_number":3189,"context_line":"            if resp.code \u003d\u003d 206 and not sabotaged[0]:"},{"line_number":3190,"context_line":"                sabotaged[0] \u003d True"},{"line_number":3191,"context_line":"                return sabotaged_hrtdi(resp, **kw)"},{"line_number":3192,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ced05a61_45fb7968","line":3189,"updated":"2023-06-26 17:10:54.000000000","message":"so was this just a little imprecise in matching which responses to blow up - but it was OK because the responses were 206 anyway? And now, it manadate that responses are 206 for the test to pass?\n\nupdate: ah, no, it seems the test was previously sabotaging the account HEAD ?!","commit_id":"53214d86c272bdb4e7f58c62e2bf51400607109f"}]}
