)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"465b3946b170d5f0be2c8cc85508aa9c9b734961","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"792359f4_efa800c9","updated":"2025-07-18 10:24:53.000000000","message":"So I\u0027ve tested that this works and that the tests pass (for me locally anyway), but I\u0027m unsure whether this requires specific testing to check that it works or not. If so, I\u0027m unsure how that could be implemented with Swift\u0027s test suite.","commit_id":"ca2f2bde0774ed888af27b702fac69f9ec17eb09"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a88d2f3c6aea822f905eb46b9ac422cc0ed4677b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"f21d7363_5f8624de","updated":"2025-07-20 23:35:03.000000000","message":"The rolling upgrade failure seem spurious; I think we just got a bad (slow) node. I was going to offer to look at what some (unit) tests might look like, but I see you\u0027re already on it. 😊\n\nI\u0027m still mulling over whether it\u0027s better to\n\n- stick policy info in static web response headers (like patchset 1),\n- copy policy info back into request headers (like patchset 2), or\n- work on getting policy info into *all* object response headers (see [898783](https://review.opendev.org/c/openstack/swift/+/898783))","commit_id":"ca2f2bde0774ed888af27b702fac69f9ec17eb09"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"ab7eb4b8f03994b72b6292d5d5b9424c0be85b3f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"47267d4a_0a6bd7f9","in_reply_to":"53f4edca_3f993b2f","updated":"2025-07-20 23:01:00.000000000","message":"Added some unit testing to make sure that headers are being set in the correct cases.","commit_id":"ca2f2bde0774ed888af27b702fac69f9ec17eb09"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"f5e4f0481d3882754c1069d865892e23c0bf0da0","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"53f4edca_3f993b2f","in_reply_to":"792359f4_efa800c9","updated":"2025-07-18 10:28:09.000000000","message":"Marking as unresolved.","commit_id":"ca2f2bde0774ed888af27b702fac69f9ec17eb09"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"591d64ca441d6ec0bec67b6c84303c096e31c51c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"3ef00f3e_5271f872","in_reply_to":"f21d7363_5f8624de","updated":"2025-07-21 00:35:28.000000000","message":"If I was to express a preference, a solution like 898793 would probably be ideal. I\u0027m not under any illusion that other middlewares that do similar things to `staticweb` don\u0027t suffer from this issue, this is just the only case I\u0027ve encountered it so far.\n\nI really want it put into response headers since that seems like the best place to put it *if* we were going to go the \"do it within `staticweb`\" route, but it\u0027s much more difficult since you have to inject it into every possible response and I haven\u0027t managed to find a \"common\" place where it could be put except for `self._response_headers` (which is not always generated by everything, either).\n\nHence me resorting to copying policy info into request headers, which is the only case I\u0027ve found so far that both works *and* passes all of the tests.","commit_id":"ca2f2bde0774ed888af27b702fac69f9ec17eb09"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"11312fdb0cd6a2b76a90fffca5e11ebf8b4a7667","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"b91f8eef_c9795438","updated":"2025-07-21 05:57:10.000000000","message":"recheck grenade-skip-level-always TIMED_OUT","commit_id":"16b0121c4b3973135a3aa6b4c30faa68f192963a"}],"swift/common/middleware/staticweb.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a88d2f3c6aea822f905eb46b9ac422cc0ed4677b","unresolved":true,"context_lines":[{"line_number":321,"context_line":"                tempurl_qs \u003d \u0027?\u0027 + \u0027\u0026amp;\u0027.join(parts)"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"        headers \u003d {\u0027Content-Type\u0027: \u0027text/html; charset\u003dUTF-8\u0027,"},{"line_number":324,"context_line":"                   \u0027X-Backend-Content-Generator\u0027: \u0027staticweb\u0027}"},{"line_number":325,"context_line":"        body \u003d \u0027\u003c!DOCTYPE html\u003e\\n\u0027 \\"},{"line_number":326,"context_line":"               \u0027\u003chtml\u003e\\n\u0027 \\"},{"line_number":327,"context_line":"               \u0027 \u003chead\u003e\\n\u0027 \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"ada4f725_6010ef60","line":324,"updated":"2025-07-20 23:35:03.000000000","message":"I was expecting us to want to add something like\n```\npolicy_hdr \u003d \u0027X-Backend-Storage-Policy-Index\u0027\nif policy_hdr in resp.headers:\n    headers[policy_hdr] \u003d resp.headers[policy_hdr]\n```\naround here -- or do we not really care about the policy for listings?","commit_id":"ca2f2bde0774ed888af27b702fac69f9ec17eb09"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"018d891d8ca04773251dfa502943e778fdc33ea2","unresolved":true,"context_lines":[{"line_number":321,"context_line":"                tempurl_qs \u003d \u0027?\u0027 + \u0027\u0026amp;\u0027.join(parts)"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"        headers \u003d {\u0027Content-Type\u0027: \u0027text/html; charset\u003dUTF-8\u0027,"},{"line_number":324,"context_line":"                   \u0027X-Backend-Content-Generator\u0027: \u0027staticweb\u0027}"},{"line_number":325,"context_line":"        body \u003d \u0027\u003c!DOCTYPE html\u003e\\n\u0027 \\"},{"line_number":326,"context_line":"               \u0027\u003chtml\u003e\\n\u0027 \\"},{"line_number":327,"context_line":"               \u0027 \u003chead\u003e\\n\u0027 \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"4664a1c9_66287ce0","line":324,"in_reply_to":"2a37dc7b_e618827b","updated":"2025-07-21 03:50:43.000000000","message":"If we continue with request headers like in patchset 2, this isn\u0027t required. If we switch back to reponse headers, this needs to be done.","commit_id":"ca2f2bde0774ed888af27b702fac69f9ec17eb09"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"591d64ca441d6ec0bec67b6c84303c096e31c51c","unresolved":true,"context_lines":[{"line_number":321,"context_line":"                tempurl_qs \u003d \u0027?\u0027 + \u0027\u0026amp;\u0027.join(parts)"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"        headers \u003d {\u0027Content-Type\u0027: \u0027text/html; charset\u003dUTF-8\u0027,"},{"line_number":324,"context_line":"                   \u0027X-Backend-Content-Generator\u0027: \u0027staticweb\u0027}"},{"line_number":325,"context_line":"        body \u003d \u0027\u003c!DOCTYPE html\u003e\\n\u0027 \\"},{"line_number":326,"context_line":"               \u0027\u003chtml\u003e\\n\u0027 \\"},{"line_number":327,"context_line":"               \u0027 \u003chead\u003e\\n\u0027 \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"2a37dc7b_e618827b","line":324,"in_reply_to":"ada4f725_6010ef60","updated":"2025-07-21 00:35:28.000000000","message":"I don\u0027t personally care for my use case but for completeness\u0027 sake I\u0027d like to cover all cases where we\u0027re dealing with the context of a specific container, so I\u0027ll add it in.","commit_id":"ca2f2bde0774ed888af27b702fac69f9ec17eb09"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a88d2f3c6aea822f905eb46b9ac422cc0ed4677b","unresolved":true,"context_lines":[{"line_number":442,"context_line":"        tmp_env[\u0027swift.source\u0027] \u003d \u0027SW\u0027"},{"line_number":443,"context_line":"        tmp_env[\u0027PATH_INFO\u0027] +\u003d str_to_wsgi(self._index)"},{"line_number":444,"context_line":"        resp \u003d self._app_call(tmp_env)"},{"line_number":445,"context_line":"        # NOTE(callumdickinson): Set storage policy index in response"},{"line_number":446,"context_line":"        # headers so it can be logged as policy_index in proxy logging."},{"line_number":447,"context_line":"        if self._policy_index is not None:"},{"line_number":448,"context_line":"            self._response_headers.append("}],"source_content_type":"text/x-python","patch_set":1,"id":"39aef8af_ca593ed0","line":445,"range":{"start_line":445,"start_character":10,"end_line":445,"end_character":32},"updated":"2025-07-20 23:35:03.000000000","message":"I wouldn\u0027t sweat the attribution; we always have `git blame` if we really want to know.","commit_id":"ca2f2bde0774ed888af27b702fac69f9ec17eb09"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"018d891d8ca04773251dfa502943e778fdc33ea2","unresolved":false,"context_lines":[{"line_number":442,"context_line":"        tmp_env[\u0027swift.source\u0027] \u003d \u0027SW\u0027"},{"line_number":443,"context_line":"        tmp_env[\u0027PATH_INFO\u0027] +\u003d str_to_wsgi(self._index)"},{"line_number":444,"context_line":"        resp \u003d self._app_call(tmp_env)"},{"line_number":445,"context_line":"        # NOTE(callumdickinson): Set storage policy index in response"},{"line_number":446,"context_line":"        # headers so it can be logged as policy_index in proxy logging."},{"line_number":447,"context_line":"        if self._policy_index is not None:"},{"line_number":448,"context_line":"            self._response_headers.append("}],"source_content_type":"text/x-python","patch_set":1,"id":"d855996a_eedbec69","line":445,"range":{"start_line":445,"start_character":10,"end_line":445,"end_character":32},"in_reply_to":"39aef8af_ca593ed0","updated":"2025-07-21 03:50:43.000000000","message":"Thanks!","commit_id":"ca2f2bde0774ed888af27b702fac69f9ec17eb09"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a88d2f3c6aea822f905eb46b9ac422cc0ed4677b","unresolved":true,"context_lines":[{"line_number":470,"context_line":"        tmp_env[\u0027HTTP_USER_AGENT\u0027] \u003d \\"},{"line_number":471,"context_line":"            \u0027%s StaticWeb\u0027 % env.get(\u0027HTTP_USER_AGENT\u0027)"},{"line_number":472,"context_line":"        tmp_env[\u0027swift.source\u0027] \u003d \u0027SW\u0027"},{"line_number":473,"context_line":"        resp \u003d self._app_call(tmp_env)"},{"line_number":474,"context_line":"        status_int \u003d self._get_status_int()"},{"line_number":475,"context_line":"        self._get_container_info(env)"},{"line_number":476,"context_line":"        # NOTE(callumdickinson): Set storage policy index in response"}],"source_content_type":"text/x-python","patch_set":1,"id":"d31163a0_ec9b8210","line":473,"updated":"2025-07-20 23:35:03.000000000","message":"I\u0027m surprised this `_app_call` doesn\u0027t already get policy info into `self._response_headers`...\n\nOh, I think I see it now! We don\u0027t populate storage policy info in object response headers! Then since we\u0027re using `tmp_env`, *that* gets the updated *request* `X-Backend-Storage-Policy-Index` header populated, which in turn is what proxy-logging has been relying upon. I should maybe dust off https://review.opendev.org/c/openstack/swift/+/898783 ...","commit_id":"ca2f2bde0774ed888af27b702fac69f9ec17eb09"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"591d64ca441d6ec0bec67b6c84303c096e31c51c","unresolved":true,"context_lines":[{"line_number":470,"context_line":"        tmp_env[\u0027HTTP_USER_AGENT\u0027] \u003d \\"},{"line_number":471,"context_line":"            \u0027%s StaticWeb\u0027 % env.get(\u0027HTTP_USER_AGENT\u0027)"},{"line_number":472,"context_line":"        tmp_env[\u0027swift.source\u0027] \u003d \u0027SW\u0027"},{"line_number":473,"context_line":"        resp \u003d self._app_call(tmp_env)"},{"line_number":474,"context_line":"        status_int \u003d self._get_status_int()"},{"line_number":475,"context_line":"        self._get_container_info(env)"},{"line_number":476,"context_line":"        # NOTE(callumdickinson): Set storage policy index in response"}],"source_content_type":"text/x-python","patch_set":1,"id":"d34b83e6_e1c1b913","line":473,"in_reply_to":"d31163a0_ec9b8210","updated":"2025-07-21 00:35:28.000000000","message":"I\u0027m happy to help anyway I can if it means working out a better solution for fixing this issue.","commit_id":"ca2f2bde0774ed888af27b702fac69f9ec17eb09"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"a88d2f3c6aea822f905eb46b9ac422cc0ed4677b","unresolved":true,"context_lines":[{"line_number":489,"context_line":"                    and content_length \u003c\u003d 1:"},{"line_number":490,"context_line":"                status_int \u003d HTTP_NOT_FOUND"},{"line_number":491,"context_line":"            else:"},{"line_number":492,"context_line":"                start_response(self._response_status, self._response_headers,"},{"line_number":493,"context_line":"                               self._response_exc_info)"},{"line_number":494,"context_line":"                return resp"},{"line_number":495,"context_line":"        if status_int !\u003d HTTP_NOT_FOUND:"}],"source_content_type":"text/x-python","patch_set":1,"id":"523f8fbb_6960a6bd","line":492,"updated":"2025-07-20 23:35:03.000000000","message":"Just to sanity check -- this should be the return path we\u0027re hitting for the bug, right?","commit_id":"ca2f2bde0774ed888af27b702fac69f9ec17eb09"},{"author":{"_account_id":36393,"name":"Callum Dickinson","email":"callum.dickinson@catalystcloud.nz","username":"Callum027","status":"Catalyst Cloud"},"change_message_id":"591d64ca441d6ec0bec67b6c84303c096e31c51c","unresolved":true,"context_lines":[{"line_number":489,"context_line":"                    and content_length \u003c\u003d 1:"},{"line_number":490,"context_line":"                status_int \u003d HTTP_NOT_FOUND"},{"line_number":491,"context_line":"            else:"},{"line_number":492,"context_line":"                start_response(self._response_status, self._response_headers,"},{"line_number":493,"context_line":"                               self._response_exc_info)"},{"line_number":494,"context_line":"                return resp"},{"line_number":495,"context_line":"        if status_int !\u003d HTTP_NOT_FOUND:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1438113b_c506dbe5","line":492,"in_reply_to":"523f8fbb_6960a6bd","updated":"2025-07-21 00:35:28.000000000","message":"This is the specific one that matters for my use case I believe, but since there are many cases in both `handle_container` and `handle_object` that return separate responses generated using different means, I wanted a way to handle all of them.","commit_id":"ca2f2bde0774ed888af27b702fac69f9ec17eb09"}]}
