)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b7f02b8267bcec6ca16d5a0ebf430062172a3687","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"e0cc763b_a18c725c","updated":"2023-08-11 01:09:49.000000000","message":"i hope some of this will be helpful for Ash to get the part-number api working","commit_id":"622c4429dfadebb398de0a1ad2ffdc1b80aafea9"}],"swift/common/middleware/slo.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b7f02b8267bcec6ca16d5a0ebf430062172a3687","unresolved":true,"context_lines":[{"line_number":783,"context_line":"                    seg_dict, logger\u003dself.slo.logger)"},{"line_number":784,"context_line":""},{"line_number":785,"context_line":"            seg_dict[\u0027segment-length\u0027] \u003d self._segment_length(seg_dict)"},{"line_number":786,"context_line":"            calculated_slo_object_size +\u003d seg_dict[\u0027segment-length\u0027]"},{"line_number":787,"context_line":""},{"line_number":788,"context_line":""},{"line_number":789,"context_line":"        if slo_etag is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"c7d6189d_9c5c586d","line":786,"updated":"2023-08-11 01:09:49.000000000","message":"having this be explicitly the calculated_slo_object_size *always* (same as the calculated_etag) really makes this method easier for me to grok","commit_id":"622c4429dfadebb398de0a1ad2ffdc1b80aafea9"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b7f02b8267bcec6ca16d5a0ebf430062172a3687","unresolved":true,"context_lines":[{"line_number":795,"context_line":"        if part_number is not None:"},{"line_number":796,"context_line":"            # this method manipulates client headers but returns content_length"},{"line_number":797,"context_line":"            client_response_headers.append((\u0027X-Parts-Count\u0027, len(segments)))"},{"line_number":798,"context_line":"            content_length \u003d segments[part_number - 1].get(\u0027segment-length\u0027)"},{"line_number":799,"context_line":"        else:"},{"line_number":800,"context_line":"            content_length \u003d slo_object_size"},{"line_number":801,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"b05d3d14_977f394c","line":798,"updated":"2023-08-11 01:09:49.000000000","message":"we really only need to this once; but at this point I think we may as well bring in the client_response_headers manipulation for etag and content_length as well instead of returning them","commit_id":"622c4429dfadebb398de0a1ad2ffdc1b80aafea9"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b7f02b8267bcec6ca16d5a0ebf430062172a3687","unresolved":true,"context_lines":[{"line_number":1032,"context_line":"        \"\"\""},{"line_number":1033,"context_line":"        part_number_param \u003d get_param(req, \u0027part-number\u0027)"},{"line_number":1034,"context_line":"        if part_number_param is None:"},{"line_number":1035,"context_line":"            return None"},{"line_number":1036,"context_line":"        resp_headers \u003d self._response_headers"},{"line_number":1037,"context_line":"        try:"},{"line_number":1038,"context_line":"            part_number \u003d int(part_number_param)"}],"source_content_type":"text/x-python","patch_set":1,"id":"631e5426_e110ca0a","line":1035,"updated":"2023-08-11 01:09:49.000000000","message":"this seems fine","commit_id":"622c4429dfadebb398de0a1ad2ffdc1b80aafea9"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b7f02b8267bcec6ca16d5a0ebf430062172a3687","unresolved":true,"context_lines":[{"line_number":1043,"context_line":"                # we can\u0027t override content-length on errors, becuase byte"},{"line_number":1044,"context_line":"                # enforcer will blow up"},{"line_number":1045,"context_line":"                resp_headers \u003d [t for t in resp_headers"},{"line_number":1046,"context_line":"                                if t[0] !\u003d \u0027Content-Length\u0027]"},{"line_number":1047,"context_line":"                raise HTTPRequestedRangeNotSatisfiable("},{"line_number":1048,"context_line":"                    request\u003dreq,"},{"line_number":1049,"context_line":"                    headers\u003dresp_headers,"}],"source_content_type":"text/x-python","patch_set":1,"id":"af19eef8_08b43ff0","line":1046,"updated":"2023-08-11 01:09:49.000000000","message":"this seems gross; maybe we don\u0027t *want* to pass the resp_headers we\u0027ve been working on back through to the error response?","commit_id":"622c4429dfadebb398de0a1ad2ffdc1b80aafea9"}],"test/functional/test_slo.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b7f02b8267bcec6ca16d5a0ebf430062172a3687","unresolved":true,"context_lines":[{"line_number":323,"context_line":"                (h.lower(), v)"},{"line_number":324,"context_line":"                for h, v in file_item.conn.response.getheaders())"},{"line_number":325,"context_line":"            self.assertEqual(headers[\u0027content-length\u0027], seg_info[\u0027size_bytes\u0027])"},{"line_number":326,"context_line":"            self.assertEqual(headers[\u0027etag\u0027], slo_etag)"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"    def test_slo_container_listing(self):"},{"line_number":329,"context_line":"        # the listing object size should equal the sum of the size of the"}],"source_content_type":"text/x-python","patch_set":1,"id":"6e453918_75fa75a5","line":326,"updated":"2023-08-11 01:09:49.000000000","message":"this is just a start, there\u0027s tons more functional tests we could write.\n\nbut i got distracted trying to get the part-number api to actuall work like ... functionally","commit_id":"622c4429dfadebb398de0a1ad2ffdc1b80aafea9"}],"test/unit/common/middleware/test_slo.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b7f02b8267bcec6ca16d5a0ebf430062172a3687","unresolved":true,"context_lines":[{"line_number":2171,"context_line":"            swob.HTTPOk, {\u0027Content-Type\u0027: \u0027application/json\u0027,"},{"line_number":2172,"context_line":"                          \u0027X-Static-Large-Object\u0027: \u0027true\u0027,"},{"line_number":2173,"context_line":"                          \u0027X-Object-Sysmeta-Slo-Etag\u0027: self.manifest_bc_etag,"},{"line_number":2174,"context_line":"                          \u0027X-Object-Sysmeta-Slo-Size\u0027: \u002725\u0027,"},{"line_number":2175,"context_line":"                          \u0027X-Static-Large-Object\u0027: \u0027true\u0027,"},{"line_number":2176,"context_line":"                          \u0027X-Object-Meta-Plant\u0027: \u0027Ficus\u0027,"},{"line_number":2177,"context_line":"                          \u0027Etag\u0027: md5hex(_bc_manifest_json)},"}],"source_content_type":"text/x-python","patch_set":1,"id":"a085795b_73b98aac","line":2174,"updated":"2023-08-11 01:09:49.000000000","message":"it was a big surprise to discover that for-realzy HEAD responses on for-realzy SLOs weren\u0027t getting their content-length and x-part-counts set the way unittests seemed to suggest they should.\n\nThis \"fix\" to make the registered response more like a real swift backend response (i.e. it has the slo etag and size headers) trips the early return logic and breaks\n\nswift/test/unit/common/middleware/test_slo.py::TestSloGetManifest::test_head_part_num\n\nwhich is good!  cause a real HEAD request with part-number isn\u0027t returning the correct content-length or x-parts-counts headers either, so now you can fix the code so that it will work functionally!","commit_id":"622c4429dfadebb398de0a1ad2ffdc1b80aafea9"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b7f02b8267bcec6ca16d5a0ebf430062172a3687","unresolved":true,"context_lines":[{"line_number":2179,"context_line":"        # XXX need to duplicate some tests with manifest-bc-legacy, for old"},{"line_number":2180,"context_line":"        # school SLO missing new school SLO metadata"},{"line_number":2181,"context_line":"        self.app.register("},{"line_number":2182,"context_line":"            \u0027GET\u0027, \u0027/v1/AUTH_test/gettest/manifest-bc-legacy\u0027,"},{"line_number":2183,"context_line":"            swob.HTTPOk, {\u0027Content-Type\u0027: \u0027application/json\u0027,"},{"line_number":2184,"context_line":"                          \u0027X-Static-Large-Object\u0027: \u0027true\u0027,"},{"line_number":2185,"context_line":"                          \u0027X-Object-Meta-Plant\u0027: \u0027Ficus\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ae52fef1_b79672b1","line":2182,"updated":"2023-08-11 01:09:49.000000000","message":"if you \"just\" update the test_head_part_num to use this object I expect the tests will go back to passing, and that\u0027d would be good too - I think we want to keep head responses correct regardless of the lack of modern metadata on SLO manifests\n\nWe may even want to start writing part-count into sysmeta on write/create same as we do with size/etag and then we\u0027ll REALLY want to make sure the legacy manifests still conform to the part-number API.","commit_id":"622c4429dfadebb398de0a1ad2ffdc1b80aafea9"}]}
