)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"35c670a1c0f38ac8c2c576efc91c0fcd17621f4c","unresolved":true,"context_lines":[{"line_number":11,"context_line":"sub-requests (like the DELETE operation that cleans"},{"line_number":12,"context_line":"up the upload marker).This caused sub-requests to log"},{"line_number":13,"context_line":"the parent\u0027s S3 bucket/object names instead of the"},{"line_number":14,"context_line":"actual Swift container/object they were operating on."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I5520eba7b12d6bd3831ddff7935911a0fb61e9f6"},{"line_number":17,"context_line":"Signed-off-by: ashnair \u003cashnair@nvidia.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"40e60206_6b27579e","line":14,"updated":"2025-12-01 20:31:21.000000000","message":"So I\u0027m not seeing this behavior on master -- I take it this is because of our custom s3-aware ratelimiter setting `swift.backend_path` early?\n\nRemind me: what\u0027s the pipeline look like? I know there\u0027ll be a `... proxy-logging ... s3api ... proxy-logging ...`, but where\u0027s the custom middleware fit in?\n\nMainly, I\u0027m trying to think of whether this is going to have any weird knock-on implications with, for example, the real-time stats added with https://review.opendev.org/c/openstack/swift/+/930918 -- like, could we find ourselves emitting stats for the S3 path as we\u0027re reading the request but the underlying swift path as we\u0027re yielding the response -- or were we already in that situation?","commit_id":"c1c8a3adda3406d691cf7285ea42c716d229cb35"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"846bfaafa2b8376d14cc48505ee93f94caf7797e","unresolved":true,"context_lines":[{"line_number":11,"context_line":"sub-requests (like the DELETE operation that cleans"},{"line_number":12,"context_line":"up the upload marker).This caused sub-requests to log"},{"line_number":13,"context_line":"the parent\u0027s S3 bucket/object names instead of the"},{"line_number":14,"context_line":"actual Swift container/object they were operating on."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I5520eba7b12d6bd3831ddff7935911a0fb61e9f6"},{"line_number":17,"context_line":"Signed-off-by: ashnair \u003cashnair@nvidia.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"e777ed61_2d1d214a","line":14,"in_reply_to":"40e60206_6b27579e","updated":"2026-01-13 00:30:35.000000000","message":"You\u0027re right to be concerned, i see the issue now!\n\nI see 3 possibili\u003dties henceforth:\n\nThe first option i think is to revert to master behavior but fix the \"specific\" MPU complete log by having s3api set swift.backend_path earlier or preserving the parent request path explicitly. OR we could s3api.backend_path only for the main request, not subrequests, or track both parent and subrequest paths separately.\n\nOR maybe thirdly update swift.backend_path only if it\u0027s not already set by middleware earlier in the pipeline by ensuring s3api sets it for the main request before subrequests.\n\nwhat do u think could be the best case scenario ?","commit_id":"c1c8a3adda3406d691cf7285ea42c716d229cb35"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f04d54689beae4712b64d3a172d916f25511a6eb","unresolved":true,"context_lines":[{"line_number":11,"context_line":"sub-requests (like the DELETE operation that cleans"},{"line_number":12,"context_line":"up the upload marker).This caused sub-requests to log"},{"line_number":13,"context_line":"the parent\u0027s S3 bucket/object names instead of the"},{"line_number":14,"context_line":"actual Swift container/object they were operating on."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I5520eba7b12d6bd3831ddff7935911a0fb61e9f6"},{"line_number":17,"context_line":"Signed-off-by: ashnair \u003cashnair@nvidia.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"f16bb05d_c2cb9d34","line":14,"in_reply_to":"e777ed61_2d1d214a","updated":"2026-01-21 16:29:27.000000000","message":"@nairashwin952013@gmail.com can you please write up a launchpad bug with links and a repro strategy so we can all see the issue that the patch is trying to fix.\n\nAFAICT our proprietary ratelimit middleware does not set swift.backend_path \u0027early\u0027.","commit_id":"c1c8a3adda3406d691cf7285ea42c716d229cb35"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f04d54689beae4712b64d3a172d916f25511a6eb","unresolved":true,"context_lines":[{"line_number":4,"context_line":"Commit:     ashnair \u003cashnair@nvidia.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2026-01-20 16:12:23 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"s3api: fix s3api mpu complete log for correct c/o"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When completing S3 multipart uploads, the proxy access"},{"line_number":10,"context_line":"logs show incorrect container and object fields for"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"ea58e197_2ed5f365","line":7,"updated":"2026-01-21 16:29:27.000000000","message":"I don\u0027t see any new test assertions about log messages so I can\u0027t be sure that this fixes the bug as claimed.\n\nI suggest getting a test in test_multi_upload that asserts an expected log line and fails without your change to s3api.py","commit_id":"aee1b89a532a02410272517fe35aab8286702dc9"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"35c670a1c0f38ac8c2c576efc91c0fcd17621f4c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"1e882ce3_2dab4571","updated":"2025-12-01 20:31:21.000000000","message":"I think I get it... but I\u0027m also hesitant to have s3api *always* set `swift.backend_path`, even when it was already set... I might need to think on this a bit -- and think about how a third-party middleware could try to preserve the old behavior if that was something they really wanted.","commit_id":"c1c8a3adda3406d691cf7285ea42c716d229cb35"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f04d54689beae4712b64d3a172d916f25511a6eb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"98b60480_6ccdd7b6","updated":"2026-01-21 16:29:27.000000000","message":"I can\u0027t be sure of either what this patch is fixing nor whether it has succeeded.\n\nWe need:\n\n- a launchpad bug with an example of the inconsistent logs and if possible a description of why it is happening. \n\n- a test for mpu_complete that includes proxy logging middleware and reproduces the bug. If that is not exactly possible because the bug is due to an interaction with a third-party middleware then the test should use a simple dummy middleware that does the same thing. (Or, consider if the bug is actually in the 3rd party middleware).","commit_id":"aee1b89a532a02410272517fe35aab8286702dc9"}],"swift/common/middleware/s3api/s3api.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f04d54689beae4712b64d3a172d916f25511a6eb","unresolved":true,"context_lines":[{"line_number":474,"context_line":"            resp.headers[\u0027x-amz-id-2\u0027] \u003d env[\u0027swift.trans_id\u0027]"},{"line_number":475,"context_line":"            resp.headers[\u0027x-amz-request-id\u0027] \u003d env[\u0027swift.trans_id\u0027]"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"        if \u0027s3api.backend_path\u0027 in env:"},{"line_number":478,"context_line":"            env[\u0027swift.backend_path\u0027] \u003d env[\u0027s3api.backend_path\u0027]"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"        # emit metric with header labels now path and status may be available"}],"source_content_type":"text/x-python","patch_set":11,"id":"26fdd206_0a19df6a","line":477,"updated":"2026-01-21 16:29:27.000000000","message":"who else sets swift.backend_path? If it is a third party middleware and it is setting it *before* s3api, perhaps it shouldn\u0027t?","commit_id":"aee1b89a532a02410272517fe35aab8286702dc9"}],"test/unit/common/middleware/s3api/test_s3api.py":[{"author":{"_account_id":38368,"name":"Christian Ohanaja","display_name":"Christian Ohanaja","email":"cohanaja@nvidia.com","username":"cohanaja"},"change_message_id":"8fdcc23c36e3f4132332fbd134bdf11c1840607d","unresolved":true,"context_lines":[{"line_number":1828,"context_line":"        self.assertEqual(\u0027/v1/AUTH_test/bucket/object\u0027,"},{"line_number":1829,"context_line":"                         req.environ[\u0027swift.backend_path\u0027])"},{"line_number":1830,"context_line":""},{"line_number":1831,"context_line":"    def test_backend_path_updated_on_subrequest(self):"},{"line_number":1832,"context_line":"        req_env \u003d {\u0027REQUEST_METHOD\u0027: \u0027GET\u0027,"},{"line_number":1833,"context_line":"                   \u0027s3api.backend_path\u0027: (\u0027/v1/AUTH_test/bucket+segments/\u0027"},{"line_number":1834,"context_line":"                                          \u0027object/uploadid\u0027),"},{"line_number":1835,"context_line":"                   \u0027swift.backend_path\u0027: \u0027/v1/AUTH_test/bucket/object\u0027}"},{"line_number":1836,"context_line":""},{"line_number":1837,"context_line":"        if \u0027s3api.backend_path\u0027 in req_env:"},{"line_number":1838,"context_line":"            req_env[\u0027swift.backend_path\u0027] \u003d req_env[\u0027s3api.backend_path\u0027]"},{"line_number":1839,"context_line":""},{"line_number":1840,"context_line":"        self.assertEqual(\u0027/v1/AUTH_test/bucket+segments/object/uploadid\u0027,"},{"line_number":1841,"context_line":"                         req_env[\u0027swift.backend_path\u0027])"},{"line_number":1842,"context_line":""},{"line_number":1843,"context_line":"    def test_backend_path_mpu_complete_scenario(self):"},{"line_number":1844,"context_line":"        # POST complete MPU request"}],"source_content_type":"text/x-python","patch_set":5,"id":"e1ef9cf0_a6825d75","line":1841,"range":{"start_line":1831,"start_character":0,"end_line":1841,"end_character":55},"updated":"2025-11-18 18:38:23.000000000","message":"LGTM! But for a more verbose check for the path updating logic, I\u0027d maybe modify it to call the middleware. The way you have it reads fine to me though\n\n```\n    def test_backend_path_updated_on_subrequest(self):\n        req \u003d Request.blank(\u0027/v1/AUTH_test/bucket/object\u0027,\n                            environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027GET\u0027})\n        \n        # add both possible env paths\n        req.environ[\u0027s3api.backend_path\u0027] \u003d (\n            \u0027/v1/AUTH_test/bucket+segments/object/uploadid\u0027)\n        req.environ[\u0027swift.backend_path\u0027] \u003d \u0027/v1/AUTH_test/bucket/object\u0027\n        \n        self.swift.register(\u0027GET\u0027, \u0027/v1/AUTH_test/bucket/object\u0027,\n                            swob.HTTPOk, {}, b\u0027response\u0027)\n        \n        self.call_s3api(req)\n\n        # make sure swift.backend_path was properly set during __call__\n        self.assertIn(\u0027swift.backend_path\u0027, req.environ)\n        self.assertEqual(\u0027/v1/AUTH_test/bucket+segments/object/uploadid\u0027,\n                         req.environ[\u0027swift.backend_path\u0027])\n```","commit_id":"1cce25792c5cbfa0809c528bc91808b45d06d38d"},{"author":{"_account_id":34892,"name":"ASHWIN A NAIR","display_name":"indianwhocodes","email":"nairashwin952013@gmail.com","username":"indianwhocodes","status":"Nvidia"},"change_message_id":"846bfaafa2b8376d14cc48505ee93f94caf7797e","unresolved":false,"context_lines":[{"line_number":1828,"context_line":"        self.assertEqual(\u0027/v1/AUTH_test/bucket/object\u0027,"},{"line_number":1829,"context_line":"                         req.environ[\u0027swift.backend_path\u0027])"},{"line_number":1830,"context_line":""},{"line_number":1831,"context_line":"    def test_backend_path_updated_on_subrequest(self):"},{"line_number":1832,"context_line":"        req_env \u003d {\u0027REQUEST_METHOD\u0027: \u0027GET\u0027,"},{"line_number":1833,"context_line":"                   \u0027s3api.backend_path\u0027: (\u0027/v1/AUTH_test/bucket+segments/\u0027"},{"line_number":1834,"context_line":"                                          \u0027object/uploadid\u0027),"},{"line_number":1835,"context_line":"                   \u0027swift.backend_path\u0027: \u0027/v1/AUTH_test/bucket/object\u0027}"},{"line_number":1836,"context_line":""},{"line_number":1837,"context_line":"        if \u0027s3api.backend_path\u0027 in req_env:"},{"line_number":1838,"context_line":"            req_env[\u0027swift.backend_path\u0027] \u003d req_env[\u0027s3api.backend_path\u0027]"},{"line_number":1839,"context_line":""},{"line_number":1840,"context_line":"        self.assertEqual(\u0027/v1/AUTH_test/bucket+segments/object/uploadid\u0027,"},{"line_number":1841,"context_line":"                         req_env[\u0027swift.backend_path\u0027])"},{"line_number":1842,"context_line":""},{"line_number":1843,"context_line":"    def test_backend_path_mpu_complete_scenario(self):"},{"line_number":1844,"context_line":"        # POST complete MPU request"}],"source_content_type":"text/x-python","patch_set":5,"id":"d8b7d572_e81f01ad","line":1841,"range":{"start_line":1831,"start_character":0,"end_line":1841,"end_character":55},"in_reply_to":"e1ef9cf0_a6825d75","updated":"2026-01-13 00:30:35.000000000","message":"Done","commit_id":"1cce25792c5cbfa0809c528bc91808b45d06d38d"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"f1e6be81f4bc719cb716e3fcf3efdc39c22f73e2","unresolved":true,"context_lines":[{"line_number":2376,"context_line":"                   \u0027swift.backend_path\u0027: \u0027/v1/AUTH_test/bucket/object\u0027}"},{"line_number":2377,"context_line":""},{"line_number":2378,"context_line":"        if \u0027s3api.backend_path\u0027 in req_env:"},{"line_number":2379,"context_line":"            req_env[\u0027swift.backend_path\u0027] \u003d req_env[\u0027s3api.backend_path\u0027]"},{"line_number":2380,"context_line":""},{"line_number":2381,"context_line":"        self.assertEqual(\u0027/v1/AUTH_test/bucket+segments/object/uploadid\u0027,"},{"line_number":2382,"context_line":"                         req_env[\u0027swift.backend_path\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"ce788584_1c6d2b4f","line":2379,"updated":"2026-01-19 03:23:24.000000000","message":"Ahhh, what\u0027s going on here? create a req env, then if `s3api.backend_path` (which we just did) then change the swift.backend_path.. yet we never actually call anything, so this is really just testing how dictionarys work.\n\nI think you forgot to call something","commit_id":"1d8511995d5f2c1238a3c0e6933d86baecc60bdc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"f04d54689beae4712b64d3a172d916f25511a6eb","unresolved":true,"context_lines":[{"line_number":2388,"context_line":"        self.assertEqual(\u0027/v1/AUTH_test/bucket/object\u0027,"},{"line_number":2389,"context_line":"                         req.environ[\u0027swift.backend_path\u0027])"},{"line_number":2390,"context_line":""},{"line_number":2391,"context_line":"    def test_backend_path_mpu_complete_scenario(self):"},{"line_number":2392,"context_line":"        # POST complete MPU request"},{"line_number":2393,"context_line":"        post_req \u003d Request.blank("},{"line_number":2394,"context_line":"            \u0027/bucket/object?uploadId\u003dtest-upload-id\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"48d0c253_40405bb2","line":2391,"updated":"2026-01-21 16:29:27.000000000","message":"perhaps belongs in test_multi_upload? or maybe there\u0027s already a test there to which you could add backend_path assertions?","commit_id":"aee1b89a532a02410272517fe35aab8286702dc9"}]}
