)]}'
{"swift/common/middleware/s3api/s3request.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"e64a1632b0e87b1e2640685fd7d68ed173fcbc15","unresolved":false,"context_lines":[{"line_number":1474,"context_line":"        elif info[\u0027status\u0027] \u003d\u003d HTTP_NOT_FOUND:"},{"line_number":1475,"context_line":"            raise NoSuchBucket(self.container_name)"},{"line_number":1476,"context_line":"        elif info[\u0027status\u0027] \u003d\u003d HTTP_SERVICE_UNAVAILABLE:"},{"line_number":1477,"context_line":"            raise ServiceUnavailable()"},{"line_number":1478,"context_line":"        else:"},{"line_number":1479,"context_line":"            raise InternalError("},{"line_number":1480,"context_line":"                \u0027unexpected status code %d\u0027 % info[\u0027status\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f621f24_9aca966a","line":1477,"updated":"2020-11-05 19:28:40.000000000","message":"is this just translating an internal swift api 503 for a container listing into a 503 s3api response?","commit_id":"b0d67f7fa7b31a4aba00a1382af0728e6404eed3"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d624f431e9ad605c9ecfdabdd70be71f99895dd3","unresolved":false,"context_lines":[{"line_number":1474,"context_line":"        elif info[\u0027status\u0027] \u003d\u003d HTTP_NOT_FOUND:"},{"line_number":1475,"context_line":"            raise NoSuchBucket(self.container_name)"},{"line_number":1476,"context_line":"        elif info[\u0027status\u0027] \u003d\u003d HTTP_SERVICE_UNAVAILABLE:"},{"line_number":1477,"context_line":"            raise ServiceUnavailable()"},{"line_number":1478,"context_line":"        else:"},{"line_number":1479,"context_line":"            raise InternalError("},{"line_number":1480,"context_line":"                \u0027unexpected status code %d\u0027 % info[\u0027status\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f621f24_ba98321b","line":1477,"in_reply_to":"1f621f24_9aca966a","updated":"2020-11-05 19:56:42.000000000","message":"Yup -- so the traceback looks like\n\nInternalError: 500 Internal Server Error (unexpected status code 503): \nTraceback (most recent call last):\n  File \".../swift/common/middleware/s3api/s3api.py\", line 303, in __call__\n    resp \u003d self.handle_request(req)\n  File \".../swift/common/middleware/s3api/s3api.py\", line 341, in handle_request\n    res \u003d handler(req)\n  File \".../swift/common/middleware/s3api/controllers/base.py\", line 60, in wrapped\n    return func(self, req)\n  File \".../swift/common/middleware/s3api/controllers/base.py\", line 71, in check_container\n    req.get_container_info(self.app)\n  File \".../swift/common/middleware/s3api/s3request.py\", line 1483, in get_container_info\n    \u0027unexpected status code %d\u0027 % info[\u0027status\u0027])\nInternalError: InternalError: 500 Internal Server Error (unexpected status code 503)\n\nand it\u0027s coming because we special-case InternalError responses: https://github.com/openstack/swift/blob/2.26.0/swift/common/middleware/s3api/s3api.py#L298-L299\n\nI\u0027m torn about whether that\u0027s good or misguided -- but it\u0027s been around a while; since 2014 it looks like: https://github.com/openstack-archive/swift3/commit/6448a43ef8e96b8c69d8c256938eb3f52543b75e#diff-869603ff0d5a187be1c30ce54a125fa8481abc88bd016417bf14a216aabe8836R918-R920\n\nRegardless of whether a traceback on all raised InternalErrors is appropriate or not, though, I think it\u0027s probably for the best that we keep updating our status-code translations to try to minimize the number of \"unexpected status code\" errors, if only so the 500s that remain are more actionable and better able to be prioritized.","commit_id":"b0d67f7fa7b31a4aba00a1382af0728e6404eed3"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"eded9137d33b9b568d8d4d1472f6f8ea59cf2ccf","unresolved":true,"context_lines":[{"line_number":1488,"context_line":"        elif info[\u0027status\u0027] \u003d\u003d HTTP_NOT_FOUND:"},{"line_number":1489,"context_line":"            raise NoSuchBucket(self.container_name)"},{"line_number":1490,"context_line":"        elif info[\u0027status\u0027] \u003d\u003d HTTP_SERVICE_UNAVAILABLE:"},{"line_number":1491,"context_line":"            raise ServiceUnavailable()"},{"line_number":1492,"context_line":"        else:"},{"line_number":1493,"context_line":"            raise InternalError("},{"line_number":1494,"context_line":"                \u0027unexpected status code %d\u0027 % info[\u0027status\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"b4d25173_1f8e9c2d","line":1491,"updated":"2022-06-27 15:29:22.000000000","message":"oic, this is on the BASE S3Request object - so this catches a lot of call sites.","commit_id":"6af4449268533af57063d5be6e83d7d17c6706b2"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"eded9137d33b9b568d8d4d1472f6f8ea59cf2ccf","unresolved":true,"context_lines":[{"line_number":1491,"context_line":"            raise ServiceUnavailable()"},{"line_number":1492,"context_line":"        else:"},{"line_number":1493,"context_line":"            raise InternalError("},{"line_number":1494,"context_line":"                \u0027unexpected status code %d\u0027 % info[\u0027status\u0027])"},{"line_number":1495,"context_line":""},{"line_number":1496,"context_line":"    def gen_multipart_manifest_delete_query(self, app, obj\u003dNone, version\u003dNone):"},{"line_number":1497,"context_line":"        if not self.conf.allow_multipart_uploads:"}],"source_content_type":"text/x-python","patch_set":2,"id":"bd4370b3_94148fb1","line":1494,"updated":"2022-06-27 15:29:22.000000000","message":"*and* we were already raising an error - so it\u0027s just about changing the type of the raised exception - which does something with logs that\u0027s helpful","commit_id":"6af4449268533af57063d5be6e83d7d17c6706b2"}],"test/unit/common/middleware/s3api/test_s3request.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"eded9137d33b9b568d8d4d1472f6f8ea59cf2ccf","unresolved":true,"context_lines":[{"line_number":339,"context_line":"                       \u0027get_container_info\u0027,"},{"line_number":340,"context_line":"                       return_value\u003d{\u0027status\u0027: status}):"},{"line_number":341,"context_line":"                self.assertRaises("},{"line_number":342,"context_line":"                    expected_error, s3_req.get_container_info, MagicMock())"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"    def test_date_header_missing(self):"},{"line_number":345,"context_line":"        self.swift.register(\u0027HEAD\u0027, \u0027/v1/AUTH_test/nojunk\u0027, swob.HTTPNotFound,"}],"source_content_type":"text/x-python","patch_set":2,"id":"716c28df_df25ecc1","line":342,"updated":"2022-06-27 15:29:22.000000000","message":"ok, and this at least hits the code... it says the raise line is raising an exception...","commit_id":"6af4449268533af57063d5be6e83d7d17c6706b2"}]}
