)]}'
{".zuul.yaml":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"6a5355a06f55a89a2bc839b920649f4823156d19","unresolved":true,"context_lines":[{"line_number":397,"context_line":"      under Python 3."},{"line_number":398,"context_line":"    timeout: 7200"},{"line_number":399,"context_line":"    vars:"},{"line_number":400,"context_line":"      s3_acl: yes"},{"line_number":401,"context_line":"      bindep_profile: test py36"},{"line_number":402,"context_line":"    pre-run:"},{"line_number":403,"context_line":"      - tools/playbooks/common/install_dependencies.yaml"}],"source_content_type":"text/x-yaml","patch_set":14,"id":"f5775d2d_64a1747c","line":400,"updated":"2023-11-13 19:41:52.000000000","message":"Do we strictly *need* this for the new test to pass? It passes on my machine even without `s3_acl`, and we tend to recommend having it off...","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cb9c1a4f062619ccf567ad9636dcff1f6b75f0ab","unresolved":false,"context_lines":[{"line_number":397,"context_line":"      under Python 3."},{"line_number":398,"context_line":"    timeout: 7200"},{"line_number":399,"context_line":"    vars:"},{"line_number":400,"context_line":"      s3_acl: yes"},{"line_number":401,"context_line":"      bindep_profile: test py36"},{"line_number":402,"context_line":"    pre-run:"},{"line_number":403,"context_line":"      - tools/playbooks/common/install_dependencies.yaml"}],"source_content_type":"text/x-yaml","patch_set":14,"id":"1a0dffd3_35bf0248","line":400,"in_reply_to":"3f16649f_995c4a73","updated":"2023-11-14 18:17:41.000000000","message":"Done","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ed0514d9e57f7a4635f504e1d1c835f76ebdd0a9","unresolved":true,"context_lines":[{"line_number":397,"context_line":"      under Python 3."},{"line_number":398,"context_line":"    timeout: 7200"},{"line_number":399,"context_line":"    vars:"},{"line_number":400,"context_line":"      s3_acl: yes"},{"line_number":401,"context_line":"      bindep_profile: test py36"},{"line_number":402,"context_line":"    pre-run:"},{"line_number":403,"context_line":"      - tools/playbooks/common/install_dependencies.yaml"}],"source_content_type":"text/x-yaml","patch_set":14,"id":"5f9f9b1a_2c73d11a","line":400,"in_reply_to":"3f16649f_995c4a73","updated":"2023-11-22 12:54:03.000000000","message":"seems ok \n\n``2023-11-14 13:31:11.769823 | centos-8-stream | test/probe/test_mixed_policy_mpu.py::TestMixedPolicyMPU::test_mixed_policy_upload PASSED ``","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":true,"context_lines":[{"line_number":397,"context_line":"      under Python 3."},{"line_number":398,"context_line":"    timeout: 7200"},{"line_number":399,"context_line":"    vars:"},{"line_number":400,"context_line":"      s3_acl: yes"},{"line_number":401,"context_line":"      bindep_profile: test py36"},{"line_number":402,"context_line":"    pre-run:"},{"line_number":403,"context_line":"      - tools/playbooks/common/install_dependencies.yaml"}],"source_content_type":"text/x-yaml","patch_set":14,"id":"3f16649f_995c4a73","line":400,"in_reply_to":"533020ae_d3643970","updated":"2023-11-14 13:01:22.000000000","message":"I can try changing it","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":397,"context_line":"      under Python 3."},{"line_number":398,"context_line":"    timeout: 7200"},{"line_number":399,"context_line":"    vars:"},{"line_number":400,"context_line":"      s3_acl: yes"},{"line_number":401,"context_line":"      bindep_profile: test py36"},{"line_number":402,"context_line":"    pre-run:"},{"line_number":403,"context_line":"      - tools/playbooks/common/install_dependencies.yaml"}],"source_content_type":"text/x-yaml","patch_set":14,"id":"533020ae_d3643970","line":400,"in_reply_to":"f5775d2d_64a1747c","updated":"2023-11-13 20:09:24.000000000","message":"it\u0027s referenced in playbooks/add_s3api - maybe it just needs to have A value?","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"6a5355a06f55a89a2bc839b920649f4823156d19","unresolved":true,"context_lines":[{"line_number":403,"context_line":"      - tools/playbooks/common/install_dependencies.yaml"},{"line_number":404,"context_line":"      - tools/playbooks/saio_single_node_setup/setup_saio.yaml"},{"line_number":405,"context_line":"      - tools/playbooks/saio_single_node_setup/make_rings.yaml"},{"line_number":406,"context_line":"      - tools/playbooks/saio_single_node_setup/add_s3api.yaml"},{"line_number":407,"context_line":"    run: tools/playbooks/probetests/run.yaml"},{"line_number":408,"context_line":"    post-run: tools/playbooks/probetests/post.yaml"},{"line_number":409,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":14,"id":"edb436c6_e08f75d7","line":406,"updated":"2023-11-13 19:41:52.000000000","message":"We should be able to clean up `swift-func-cors` a little now that we\u0027re installing `s3api` for base probe tests.","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":false,"context_lines":[{"line_number":403,"context_line":"      - tools/playbooks/common/install_dependencies.yaml"},{"line_number":404,"context_line":"      - tools/playbooks/saio_single_node_setup/setup_saio.yaml"},{"line_number":405,"context_line":"      - tools/playbooks/saio_single_node_setup/make_rings.yaml"},{"line_number":406,"context_line":"      - tools/playbooks/saio_single_node_setup/add_s3api.yaml"},{"line_number":407,"context_line":"    run: tools/playbooks/probetests/run.yaml"},{"line_number":408,"context_line":"    post-run: tools/playbooks/probetests/post.yaml"},{"line_number":409,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":14,"id":"2d7356ae_465f1128","line":406,"in_reply_to":"edb436c6_e08f75d7","updated":"2023-11-14 13:01:22.000000000","message":"Done","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"}],"/COMMIT_MSG":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ec7268c6f6ac9371f7e8eac4e2df01438f1cc247","unresolved":true,"context_lines":[{"line_number":24,"context_line":"request\u0027s infocache, since this is most likely to be that of the"},{"line_number":25,"context_line":"container cited in the original request path. As a fallback, the"},{"line_number":26,"context_line":"storage policy is taken from the most recent swift backend request\u0027s"},{"line_number":27,"context_line":"headers."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"TODO:"},{"line_number":30,"context_line":"- will infocache ever NOT have the storage policy? I think perhaps"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"e91ba76d_68821cca","line":27,"updated":"2023-10-10 18:35:19.000000000","message":"For a bucket request it seems the prefered value is in the response headers.  That seems to be what proxy logging would prefer.  I don\u0027t think the cache is ever the preferred value - although it\u0027s often used to inform object requests.  Perhaps for an object request the best value is the header the proxy crammed into the request environ (since we can\u0027t trust the response to have a value)","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1241cfa9e21e84e4f165bd7406251c07b0b14069","unresolved":false,"context_lines":[{"line_number":24,"context_line":"request\u0027s infocache, since this is most likely to be that of the"},{"line_number":25,"context_line":"container cited in the original request path. As a fallback, the"},{"line_number":26,"context_line":"storage policy is taken from the most recent swift backend request\u0027s"},{"line_number":27,"context_line":"headers."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"TODO:"},{"line_number":30,"context_line":"- will infocache ever NOT have the storage policy? I think perhaps"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"125cf4a4_051f1e64","line":27,"in_reply_to":"e91ba76d_68821cca","updated":"2023-10-12 17:22:58.000000000","message":"Done","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ec7268c6f6ac9371f7e8eac4e2df01438f1cc247","unresolved":true,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"TODO:"},{"line_number":30,"context_line":"- will infocache ever NOT have the storage policy? I think perhaps"},{"line_number":31,"context_line":"  for a bucket create, and deletes."},{"line_number":32,"context_line":"- is fallback to the backend request header sufficient or should"},{"line_number":33,"context_line":"  we audit the s3api to identify the correct requests to use to"},{"line_number":34,"context_line":"  stash the policy index?"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"79b2294b_37d583fa","line":31,"updated":"2023-10-10 18:35:19.000000000","message":"super skeptical about using cache","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1241cfa9e21e84e4f165bd7406251c07b0b14069","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"TODO:"},{"line_number":30,"context_line":"- will infocache ever NOT have the storage policy? I think perhaps"},{"line_number":31,"context_line":"  for a bucket create, and deletes."},{"line_number":32,"context_line":"- is fallback to the backend request header sufficient or should"},{"line_number":33,"context_line":"  we audit the s3api to identify the correct requests to use to"},{"line_number":34,"context_line":"  stash the policy index?"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"185a1784_30b0b48b","line":31,"in_reply_to":"79b2294b_37d583fa","updated":"2023-10-12 17:22:58.000000000","message":"Done","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ec7268c6f6ac9371f7e8eac4e2df01438f1cc247","unresolved":true,"context_lines":[{"line_number":31,"context_line":"  for a bucket create, and deletes."},{"line_number":32,"context_line":"- is fallback to the backend request header sufficient or should"},{"line_number":33,"context_line":"  we audit the s3api to identify the correct requests to use to"},{"line_number":34,"context_line":"  stash the policy index?"},{"line_number":35,"context_line":"- more tests"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Change-Id: I2793e335a08ad373c49cbbe6759d4e97cc420867"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"64435961_073384d0","line":34,"updated":"2023-10-10 18:35:19.000000000","message":"I\u0027m not sure I understand the stash pattern?  For a single-request response it seems like it should be sufficient to just wait till the last second and pull from the req/resp same as proxy-logging.  Is stash needed for multi-sub-request responses?  I didn\u0027t see a `if already set: assume first request value is better`","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1241cfa9e21e84e4f165bd7406251c07b0b14069","unresolved":false,"context_lines":[{"line_number":31,"context_line":"  for a bucket create, and deletes."},{"line_number":32,"context_line":"- is fallback to the backend request header sufficient or should"},{"line_number":33,"context_line":"  we audit the s3api to identify the correct requests to use to"},{"line_number":34,"context_line":"  stash the policy index?"},{"line_number":35,"context_line":"- more tests"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Change-Id: I2793e335a08ad373c49cbbe6759d4e97cc420867"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"55ebc83b_6c1d8675","line":34,"in_reply_to":"64435961_073384d0","updated":"2023-10-12 17:22:58.000000000","message":"Done","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8959d7ad72a300c11ee849c85748a4cb13bfca28","unresolved":true,"context_lines":[{"line_number":24,"context_line":"that backend request\u0027s path i.e. proxy_logging will log the correct"},{"line_number":25,"context_line":"policy index for the logged path."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"The FakeSwift helper no longer looks in registered object responses"},{"line_number":28,"context_line":"for an X-Backend-Storage-Policy-Index header to update an object"},{"line_number":29,"context_line":"request. Real Swift object responses do not have an"},{"line_number":30,"context_line":"X-Backend-Storage-Policy-Index header. By default, FakeSwift will now"},{"line_number":31,"context_line":"update *all* object requests with an X-Backend-Storage-Policy-Index as"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"2c5a74d9_b7fee39d","line":28,"range":{"start_line":27,"start_character":40,"end_line":28,"end_character":44},"updated":"2023-10-12 19:42:31.000000000","message":"Did we have any tests that would register an object response with an `X-Backend-Storage-Policy-Index`?","commit_id":"2fa313b78113316e409091a52f71649701cc5ad1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d5fb1ca6975d79a4d16e9f6573c3a35e104fd469","unresolved":false,"context_lines":[{"line_number":24,"context_line":"that backend request\u0027s path i.e. proxy_logging will log the correct"},{"line_number":25,"context_line":"policy index for the logged path."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"The FakeSwift helper no longer looks in registered object responses"},{"line_number":28,"context_line":"for an X-Backend-Storage-Policy-Index header to update an object"},{"line_number":29,"context_line":"request. Real Swift object responses do not have an"},{"line_number":30,"context_line":"X-Backend-Storage-Policy-Index header. By default, FakeSwift will now"},{"line_number":31,"context_line":"update *all* object requests with an X-Backend-Storage-Policy-Index as"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ee4336b7_2ead3fcc","line":28,"range":{"start_line":27,"start_character":40,"end_line":28,"end_character":44},"in_reply_to":"2c5a74d9_b7fee39d","updated":"2023-10-13 11:16:35.000000000","message":"test_simple_object_copy in common/middleware/s3api/test_obj.py is the only one I found : that registered an object HEAD with the spi header.","commit_id":"2fa313b78113316e409091a52f71649701cc5ad1"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8959d7ad72a300c11ee849c85748a4cb13bfca28","unresolved":true,"context_lines":[{"line_number":40,"context_line":"using FakeSwift.calls_wth_headers() to make assertions about captured"},{"line_number":41,"context_line":"headers no longer need to make allowance for the header that FakeSwift"},{"line_number":42,"context_line":"added. If required, the updated request headers can be inspected using"},{"line_number":43,"context_line":"a new FakeSwift.updated_calls_with_headers() method."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"Co-Authored-By: Clay Gerrard \u003cclay.gerrard@gmail.com\u003e"},{"line_number":46,"context_line":"Closes-Bug: #2038459"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ad6669c1_76815d0d","line":43,"range":{"start_line":43,"start_character":16,"end_line":43,"end_character":42},"updated":"2023-10-12 19:42:31.000000000","message":"I suppose this is mainly useful for middleware like s3api that make more than one app call while re-using the environment -- so you can sanity check that the app really *did* manipulate the environment in a way that was subsequently undone for the second call. Yeah?\n\nShould we update some tests in `test/unit/common/middleware/test_copy.py` to use it?","commit_id":"2fa313b78113316e409091a52f71649701cc5ad1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d5fb1ca6975d79a4d16e9f6573c3a35e104fd469","unresolved":false,"context_lines":[{"line_number":40,"context_line":"using FakeSwift.calls_wth_headers() to make assertions about captured"},{"line_number":41,"context_line":"headers no longer need to make allowance for the header that FakeSwift"},{"line_number":42,"context_line":"added. If required, the updated request headers can be inspected using"},{"line_number":43,"context_line":"a new FakeSwift.updated_calls_with_headers() method."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"Co-Authored-By: Clay Gerrard \u003cclay.gerrard@gmail.com\u003e"},{"line_number":46,"context_line":"Closes-Bug: #2038459"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5a7fd4cb_4523de0f","line":43,"range":{"start_line":43,"start_character":16,"end_line":43,"end_character":42},"in_reply_to":"ad6669c1_76815d0d","updated":"2023-10-13 11:16:35.000000000","message":"I\u0027m not 100% sure of the utility of updated_calls_with_headers except for sanity checks like you say: FakeSwift really did annotate my request but it hasn\u0027t polluted my other requests.\n\nThere is an s3api test where I used it (presumably copy)","commit_id":"2fa313b78113316e409091a52f71649701cc5ad1"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":13,"context_line":"and breaks mixed policy multipart uploads."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This patch sets the X-Backend-Storage-Policy-Index header on s3api"},{"line_number":16,"context_line":"responses rather than requests.  Each pair of backend request/response"},{"line_number":17,"context_line":"headers are searched for X-Backend-Storage-Policy-Index in the same"},{"line_number":18,"context_line":"way that proxy_logging would (i.e. preferring a response header over a"},{"line_number":19,"context_line":"request header). The s3api adds the value from the final backend"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"8ad365ce_497695e1","line":16,"updated":"2023-11-13 20:09:24.000000000","message":"IIUC it\u0027s the NEW behavior of searching response headers that fixes bucket spi logging.","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cb9c1a4f062619ccf567ad9636dcff1f6b75f0ab","unresolved":false,"context_lines":[{"line_number":13,"context_line":"and breaks mixed policy multipart uploads."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This patch sets the X-Backend-Storage-Policy-Index header on s3api"},{"line_number":16,"context_line":"responses rather than requests.  Each pair of backend request/response"},{"line_number":17,"context_line":"headers are searched for X-Backend-Storage-Policy-Index in the same"},{"line_number":18,"context_line":"way that proxy_logging would (i.e. preferring a response header over a"},{"line_number":19,"context_line":"request header). The s3api adds the value from the final backend"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"67f9f7e3_0ac1618d","line":16,"in_reply_to":"4ae96de5_a690db62","updated":"2023-11-14 18:17:41.000000000","message":"Done","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":true,"context_lines":[{"line_number":13,"context_line":"and breaks mixed policy multipart uploads."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This patch sets the X-Backend-Storage-Policy-Index header on s3api"},{"line_number":16,"context_line":"responses rather than requests.  Each pair of backend request/response"},{"line_number":17,"context_line":"headers are searched for X-Backend-Storage-Policy-Index in the same"},{"line_number":18,"context_line":"way that proxy_logging would (i.e. preferring a response header over a"},{"line_number":19,"context_line":"request header). The s3api adds the value from the final backend"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"4ae96de5_a690db62","line":16,"in_reply_to":"8ad365ce_497695e1","updated":"2023-11-14 13:01:22.000000000","message":"I\u0027m not sure what you\u0027re getting at here, as in, what I should have written differently. The primary bug is fixed by not setting the SPI header on requests. IIRC spi logging wasn\u0027t broken, unless there may have been some lurking bug that is fixed by looking in response headers before request headers.","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cb9c1a4f062619ccf567ad9636dcff1f6b75f0ab","unresolved":true,"context_lines":[{"line_number":22,"context_line":"*and* response headers, in the same way that proxy_logging would"},{"line_number":23,"context_line":"(preferring a response header over a request header). This means that"},{"line_number":24,"context_line":"a policy index is now logged for bucket requests, which only have"},{"line_number":25,"context_line":"X-Backend-Storage-Policy-Index header in their response headers."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"The s3api adds the value from the *final* backend request/response"},{"line_number":28,"context_line":"pair to its response headers. Returning the policy index from the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"28dd0108_fba17460","line":25,"updated":"2023-11-14 18:17:41.000000000","message":"thanks for calling this out!  I think it\u0027s a nice improvement.  Benifit of \"doing the right thing\" is \"it just works!\"","commit_id":"60c04f116b41f97a5dcf9c07ef6e77ae9bdfe61e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cb9c1a4f062619ccf567ad9636dcff1f6b75f0ab","unresolved":true,"context_lines":[{"line_number":28,"context_line":"pair to its response headers. Returning the policy index from the"},{"line_number":29,"context_line":"final backend request/response is consistent with swift.backend_path"},{"line_number":30,"context_line":"being set to that backend request\u0027s path i.e. proxy_logging will log"},{"line_number":31,"context_line":"the correct policy index for the logged path."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"The FakeSwift helper no longer looks in registered object responses"},{"line_number":34,"context_line":"for an X-Backend-Storage-Policy-Index header to update an object"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"15ea69a8_059c50a0","line":31,"updated":"2023-11-14 18:17:41.000000000","message":"I wish the object-server or proxy-app would also send spi via resp headers for object requests; but it\u0027s necessary that s3api is doing it when there\u0027s subrequests anyway.","commit_id":"60c04f116b41f97a5dcf9c07ef6e77ae9bdfe61e"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ec7268c6f6ac9371f7e8eac4e2df01438f1cc247","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"97a71c15_f06427d1","updated":"2023-10-10 18:35:19.000000000","message":"proxy logging uses common.utils.get_policy_index to pull the spi out of a req/resp pair.  It prefers the resp, and falls back to req only if it\u0027s missing.\n\nI think s3api should return `x-backend-storage-policy-index` in the response headers to indicate to proxy logging how it\u0027d like it\u0027s requests logged - that seems to be the interface it\u0027s established with the proxy for swift requests.  I think any mw that\u0027s filtering x-backend headers is it\u0027s own bug; if we don\u0027t trust mw\u0027s to preserve them we should probably fix the proxy to communicate with proxy-logging via req.environ[\u0027swift.proxy_logging.storage_policy_index\u0027]\n\nI\u0027m not sure how middlewares that make cross-bucket/policy-requests should handle this interface.  A complete-mpu call for example might make requests to multiple buckets, but the response going back to the client should have the spi match the bucket the client called into.  Presumably they might override the x-backend-spi resp header with the value they want before they pass it back out.\n\nWe should avoid putting any headers into the req.environ that might effect sub-requests that get made from that environ; it\u0027s not exactly obvious to me how the proxy manages to pollute the req environ that a middleware give it knowning that they might later change the PATH_INFO in that same environ and send another request - i\u0027m pretty sure the proxy would respect the x-backend-storage-policy as \"over-riding\" container_info on any subsequent object-get.  I think there was another version of a fix for this laying around that had to update COPY:\n\nhttps://github.com/NVIDIA/swift/blob/master/swift/common/middleware/copy.py#L288","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8959d7ad72a300c11ee849c85748a4cb13bfca28","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"beef3dd3_e0c1f245","updated":"2023-10-12 19:42:31.000000000","message":"My thoughts are all over the place on this:\n\n- I hate having multiple sources of truth -- I\u0027ve got this sense that `get_policy_index` should use *either* request *or* response headers, but definitely not look at *both*, that\u0027s just asking for confusion. FWIW, *only* looking at response headers would only break three tests on master: one of them is `test/unit/common/test_utils.py::TestUtils::test_get_policy_index`, and the other two are variations of a single s3api test.\n- After seeing all the downsides of policy headers accidentally getting copied/re-used for subrequests and the hoops we go through in `FakeSwift`, the proxy-server app adding the backend header to the request env is starting to feel a little weird -- I\u0027m half-tempted to say it should only do that in its own local copy of the env. But then I think about how if we were thinking about anything else in the pipeline, *of course* we\u0027d expect them to manipulate the env (surely it\u0027d tank performance to expect every middleware to create a fresh copy of the request env, right?), and those manipulations would of course be visible to whatever was left of us...\n- In part because of the above, actively refusing to update the request env seems like a strange position to take. We continue to set it in the proxy, and mimic that behavior in `FakeSwift` -- what makes s3api so special? It feels like we\u0027ve just gotten so thoroughly confused about what it can/should mean that we\u0027ve thrown up our hands completely, but only here.\n- I keep wondering *why* we look at both responses and requests. Is it that we think response headers are more locally-scoped, and so more likely to get dropped on the floor somewhere? Do we really expect the request environment to be any longer-lived?\n- How *should* we be trying to communicate between pipeline components? Response headers are one means, and they can only be used to communicate left-ward -- should we make it a policy to use request envs only to communicate right-ward?\n\nI need to stew on this a while, I think... by which time I expect there to be changes under `swift/` again ;-)","commit_id":"90c38008b0f4972215dc868e1bf331145bd46994"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d5fb1ca6975d79a4d16e9f6573c3a35e104fd469","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"91ed391a_14f35e00","in_reply_to":"beef3dd3_e0c1f245","updated":"2023-10-13 11:16:35.000000000","message":"First, apologies that I inadvertently pushed my branch after reverting swift/ to compare tests against master.\n\nAFAICT the reason why we look at response and then request is that not all responses have an SPI header (object responses) and not all requests have an SPI header (container requests).\n\nI\u0027d be supportive of moving towards all response headers having an spi. Then get_policy_index() could be updated accordingly. However, that change would not in itself fix the bug being addressed here, because the backend response headers don\u0027t always make it leftwards from s3api. Whether they should or not is IMHO beyond the scope of fixing this regression.\n\nSo this fix boils down to :\n\n* Where does s3api find an spi? - the current \"source of truth\" is get_policy_index() and that is a useful abstraction from any changes to which headers carry the SPI.\n\n* How does s3api propagate that back to proxy_logging? - updating its response headers seems appropriate.\n\nOn the topic of mutable request environ:\n\n* middlewares should be aware that the request env is mutable and should therefore be defensive when choosing to re-use the request env.\n\n* s3api is not special in this regard\n\n* s3api is well behaved in that it clones new swift requests from its incoming request, and AFAICT keeps its incoming env \"clean\", except in the case of this bug. Refusing to update the incoming request environ seems like a *sensible* position to take given that it may be re-used for multiple backend requests. \n\nThe copy middleware appears to be well behaved but chooses to pop the header before re-using the request environ. The proxy app is arguably the special case because it\u0027s the last in the pipeline, but in fact it also needs to be well-behaved when issuing subrequests - AFAIK the proxy does not copy subrequest headers back into the original request environ.","commit_id":"90c38008b0f4972215dc868e1bf331145bd46994"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1db6c0c043302585850a43ff65b5cdd028bd72fb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"a31c9b71_687d4e8c","updated":"2023-10-13 18:27:54.000000000","message":"Yeah, I think I can live with this. I might try to put together a follow-up or two, though:\n\n- stick upload-id in `log_info`\n- get storage policy index into obj GET/HEAD responses\n\nNow that I\u0027m looking at https://review.opendev.org/c/openstack/swift/+/693893 again, I\u0027m realizing there are some interesting upgrade considerations to adding storage policy to object server responses, but maybe we can make the proxy app do it?\n\nThe changes to `test_slo`/`test_symlink`/`test_internal_client` are a little unexpected, but fall out of the `FakeSwift` changes.","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2752aa86be3a139bac120506b655801db5ce0f8c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"0863fa91_f422e3a0","updated":"2023-10-16 21:06:22.000000000","message":"wow, very thorough!\n\nI have some questions about the interaction of the _register_storage_policy helper in some places - I need to think about the relationship with proxy behavior WRT to cache/HEAD request manipulation vs FakeSwift implementation.","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"704cfdb1_aca2a942","updated":"2023-11-14 13:01:22.000000000","message":"Thanks for the reviews, and I\u0027m grateful for the + votes despite the potential to make FakeSwift even better.","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"e12189b0_560f7b0d","updated":"2023-11-13 20:09:24.000000000","message":"this fixes (at least one!) important bug!  I really like it.\n\nI think refining the fakeswift interface and test infra changes could continue in follow-ups.  Leaving off +A to get some feedback on calling out the happy accident (?) WRT bucket spi logging in the commit message; it\u0027s possible I don\u0027t quite understand what\u0027s changed or if it\u0027s only good.","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cb9c1a4f062619ccf567ad9636dcff1f6b75f0ab","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":17,"id":"258d85f3_8b0ec5b7","updated":"2023-11-14 18:17:41.000000000","message":"hard to imagine a change that fixes TWO bugs getting much better.","commit_id":"60c04f116b41f97a5dcf9c07ef6e77ae9bdfe61e"}],"swift/common/middleware/s3api/controllers/multi_upload.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1db6c0c043302585850a43ff65b5cdd028bd72fb","unresolved":true,"context_lines":[{"line_number":110,"context_line":"    except NoSuchKey:"},{"line_number":111,"context_line":"        # ensure consistent path and policy are logged despite manifest HEAD"},{"line_number":112,"context_line":"        upload_marker_path \u003d req.environ.get(\u0027s3api.backend_path\u0027)"},{"line_number":113,"context_line":"        policy_index \u003d req.policy_index"},{"line_number":114,"context_line":"        try:"},{"line_number":115,"context_line":"            resp \u003d req.get_response(app, \u0027HEAD\u0027)"},{"line_number":116,"context_line":"            if resp.sysmeta_headers.get(sysmeta_header("}],"source_content_type":"text/x-python","patch_set":9,"id":"8012cef2_895b611a","line":113,"updated":"2023-10-13 18:27:54.000000000","message":"OK, so this should always be the policy for the upload marker, based upon the `sw_req` header that was added by the proxy app but *not* propagated to `req`\u0027s headers.","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    except NoSuchKey:"},{"line_number":111,"context_line":"        # ensure consistent path and policy are logged despite manifest HEAD"},{"line_number":112,"context_line":"        upload_marker_path \u003d req.environ.get(\u0027s3api.backend_path\u0027)"},{"line_number":113,"context_line":"        policy_index \u003d req.policy_index"},{"line_number":114,"context_line":"        try:"},{"line_number":115,"context_line":"            resp \u003d req.get_response(app, \u0027HEAD\u0027)"},{"line_number":116,"context_line":"            if resp.sysmeta_headers.get(sysmeta_header("}],"source_content_type":"text/x-python","patch_set":9,"id":"7b3d8db3_5534e60d","line":113,"in_reply_to":"8012cef2_895b611a","updated":"2023-11-13 18:52:29.000000000","message":"Ack","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1db6c0c043302585850a43ff65b5cdd028bd72fb","unresolved":true,"context_lines":[{"line_number":112,"context_line":"        upload_marker_path \u003d req.environ.get(\u0027s3api.backend_path\u0027)"},{"line_number":113,"context_line":"        policy_index \u003d req.policy_index"},{"line_number":114,"context_line":"        try:"},{"line_number":115,"context_line":"            resp \u003d req.get_response(app, \u0027HEAD\u0027)"},{"line_number":116,"context_line":"            if resp.sysmeta_headers.get(sysmeta_header("},{"line_number":117,"context_line":"                    \u0027object\u0027, \u0027upload-id\u0027)) \u003d\u003d upload_id:"},{"line_number":118,"context_line":"                return resp"}],"source_content_type":"text/x-python","patch_set":9,"id":"b2fe2690_96c6321c","line":115,"updated":"2023-10-13 18:27:54.000000000","message":"So at *this* point, `req.policy_index` is set, but won\u0027t impact anything...","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        upload_marker_path \u003d req.environ.get(\u0027s3api.backend_path\u0027)"},{"line_number":113,"context_line":"        policy_index \u003d req.policy_index"},{"line_number":114,"context_line":"        try:"},{"line_number":115,"context_line":"            resp \u003d req.get_response(app, \u0027HEAD\u0027)"},{"line_number":116,"context_line":"            if resp.sysmeta_headers.get(sysmeta_header("},{"line_number":117,"context_line":"                    \u0027object\u0027, \u0027upload-id\u0027)) \u003d\u003d upload_id:"},{"line_number":118,"context_line":"                return resp"}],"source_content_type":"text/x-python","patch_set":9,"id":"462bb429_e3b362ad","line":115,"in_reply_to":"b2fe2690_96c6321c","updated":"2023-11-13 18:52:29.000000000","message":"Ack","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1db6c0c043302585850a43ff65b5cdd028bd72fb","unresolved":true,"context_lines":[{"line_number":124,"context_line":"            if upload_marker_path is not None:"},{"line_number":125,"context_line":"                req.environ[\u0027s3api.backend_path\u0027] \u003d upload_marker_path"},{"line_number":126,"context_line":"            if policy_index is not None:"},{"line_number":127,"context_line":"                req.policy_index \u003d policy_index"},{"line_number":128,"context_line":"        raise NoSuchUpload(upload_id\u003dupload_id)"},{"line_number":129,"context_line":"    finally:"},{"line_number":130,"context_line":"        # ...making sure to restore any copy-source before returning"}],"source_content_type":"text/x-python","patch_set":9,"id":"461f7588_89761672","line":127,"updated":"2023-10-13 18:27:54.000000000","message":"...so by here, we\u0027re looking at the *manifest\u0027s* policy, and we want to go back to matching the policy for the logged path.\n\nWould `policy_index` ever be `None`? I don\u0027t think that it would... even if it were, I\u0027m not convinced that leaving the manifest policy would be preferable to clearing it...\n\nOTOH, it\u0027s the same general pattern used by `s3api.backend_path`, so \\*shrug\\*. I wonder a little if we might want to use a single structure for the path/policy tuple, though...","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2752aa86be3a139bac120506b655801db5ce0f8c","unresolved":true,"context_lines":[{"line_number":124,"context_line":"            if upload_marker_path is not None:"},{"line_number":125,"context_line":"                req.environ[\u0027s3api.backend_path\u0027] \u003d upload_marker_path"},{"line_number":126,"context_line":"            if policy_index is not None:"},{"line_number":127,"context_line":"                req.policy_index \u003d policy_index"},{"line_number":128,"context_line":"        raise NoSuchUpload(upload_id\u003dupload_id)"},{"line_number":129,"context_line":"    finally:"},{"line_number":130,"context_line":"        # ...making sure to restore any copy-source before returning"}],"source_content_type":"text/x-python","patch_set":9,"id":"e1f5e11f_2d850fe1","line":127,"in_reply_to":"461f7588_89761672","updated":"2023-10-16 21:06:22.000000000","message":"I like the idea of coupling policy/path together since our current best idea is that they should at least be consistent!\n\nBut in a mixed-policy future I wonder if we\u0027ll ever want to modify/track/update them independently - i think this is a pretty good starting point.","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            if upload_marker_path is not None:"},{"line_number":125,"context_line":"                req.environ[\u0027s3api.backend_path\u0027] \u003d upload_marker_path"},{"line_number":126,"context_line":"            if policy_index is not None:"},{"line_number":127,"context_line":"                req.policy_index \u003d policy_index"},{"line_number":128,"context_line":"        raise NoSuchUpload(upload_id\u003dupload_id)"},{"line_number":129,"context_line":"    finally:"},{"line_number":130,"context_line":"        # ...making sure to restore any copy-source before returning"}],"source_content_type":"text/x-python","patch_set":9,"id":"7c63aaee_9cc22247","line":127,"in_reply_to":"e1f5e11f_2d850fe1","updated":"2023-11-13 18:52:29.000000000","message":"Ack","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":95,"context_line":"MAX_COMPLETE_UPLOAD_BODY_SIZE \u003d 2048 * 1024"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"def _get_upload_info(req, app, upload_id):"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    container \u003d req.container_name + MULTIUPLOAD_SUFFIX"},{"line_number":101,"context_line":"    obj \u003d \u0027%s/%s\u0027 % (req.object_name, upload_id)"}],"source_content_type":"text/x-python","patch_set":14,"id":"f04a849f_dfbeebbd","line":98,"updated":"2023-11-13 20:09:24.000000000","message":"unrelated: this function\u0027s name belies it\u0027s oft used for it\u0027s side-effects (decorate req, raise NotSuchUpload)","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":124,"context_line":"            if upload_marker_path is not None:"},{"line_number":125,"context_line":"                req.environ[\u0027s3api.backend_path\u0027] \u003d upload_marker_path"},{"line_number":126,"context_line":"            if policy_index is not None:"},{"line_number":127,"context_line":"                req.policy_index \u003d policy_index"},{"line_number":128,"context_line":"        raise NoSuchUpload(upload_id\u003dupload_id)"},{"line_number":129,"context_line":"    finally:"},{"line_number":130,"context_line":"        # ...making sure to restore any copy-source before returning"}],"source_content_type":"text/x-python","patch_set":14,"id":"ea1817b0_4e4e8190","line":127,"updated":"2023-11-13 20:09:24.000000000","message":"hrmm... this isn\u0027t the resp headers...\n\ni like that it\u0027s consistent with the path from upload marker tho!","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cb9c1a4f062619ccf567ad9636dcff1f6b75f0ab","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            if upload_marker_path is not None:"},{"line_number":125,"context_line":"                req.environ[\u0027s3api.backend_path\u0027] \u003d upload_marker_path"},{"line_number":126,"context_line":"            if policy_index is not None:"},{"line_number":127,"context_line":"                req.policy_index \u003d policy_index"},{"line_number":128,"context_line":"        raise NoSuchUpload(upload_id\u003dupload_id)"},{"line_number":129,"context_line":"    finally:"},{"line_number":130,"context_line":"        # ...making sure to restore any copy-source before returning"}],"source_content_type":"text/x-python","patch_set":14,"id":"32627f1f_77d6763b","line":127,"in_reply_to":"d5777431_ca6600c6","updated":"2023-11-14 18:17:41.000000000","message":"Done","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":true,"context_lines":[{"line_number":124,"context_line":"            if upload_marker_path is not None:"},{"line_number":125,"context_line":"                req.environ[\u0027s3api.backend_path\u0027] \u003d upload_marker_path"},{"line_number":126,"context_line":"            if policy_index is not None:"},{"line_number":127,"context_line":"                req.policy_index \u003d policy_index"},{"line_number":128,"context_line":"        raise NoSuchUpload(upload_id\u003dupload_id)"},{"line_number":129,"context_line":"    finally:"},{"line_number":130,"context_line":"        # ...making sure to restore any copy-source before returning"}],"source_content_type":"text/x-python","patch_set":14,"id":"d5777431_ca6600c6","line":127,"in_reply_to":"ea1817b0_4e4e8190","updated":"2023-11-14 13:01:22.000000000","message":"this is the result of get_policy_index(sw_req.headers, sw_resp.headers) set in S3Request._get_response, so it might be from the *swift* response headers. (Except this is an object request so the response headers don\u0027t have SPI)","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"}],"swift/common/middleware/s3api/s3api.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ec7268c6f6ac9371f7e8eac4e2df01438f1cc247","unresolved":true,"context_lines":[{"line_number":368,"context_line":"            env[\u0027swift.backend_path\u0027] \u003d env[\u0027s3api.backend_path\u0027]"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        if \u0027s3api.backend_storage_policy_index\u0027 in env:"},{"line_number":371,"context_line":"            env.setdefault(\u0027HTTP_X_BACKEND_STORAGE_POLICY_INDEX\u0027,"},{"line_number":372,"context_line":"                           str(env[\u0027s3api.backend_storage_policy_index\u0027]))"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        return resp(env, start_response)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ddc27113_c59b1e96","line":371,"updated":"2023-10-10 18:35:19.000000000","message":"this seems to be updating the request headers - exactly what the comment said not to do (I guess this request is on the way out tho)","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1241cfa9e21e84e4f165bd7406251c07b0b14069","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            env[\u0027swift.backend_path\u0027] \u003d env[\u0027s3api.backend_path\u0027]"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        if \u0027s3api.backend_storage_policy_index\u0027 in env:"},{"line_number":371,"context_line":"            env.setdefault(\u0027HTTP_X_BACKEND_STORAGE_POLICY_INDEX\u0027,"},{"line_number":372,"context_line":"                           str(env[\u0027s3api.backend_storage_policy_index\u0027]))"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        return resp(env, start_response)"}],"source_content_type":"text/x-python","patch_set":1,"id":"6b4d8ff0_82528101","line":371,"in_reply_to":"8f649338_e69c0833","updated":"2023-10-12 17:22:58.000000000","message":"Done","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bd5f845e18d411a0ce607e2ec60eb8c809718ed5","unresolved":true,"context_lines":[{"line_number":368,"context_line":"            env[\u0027swift.backend_path\u0027] \u003d env[\u0027s3api.backend_path\u0027]"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"        if \u0027s3api.backend_storage_policy_index\u0027 in env:"},{"line_number":371,"context_line":"            env.setdefault(\u0027HTTP_X_BACKEND_STORAGE_POLICY_INDEX\u0027,"},{"line_number":372,"context_line":"                           str(env[\u0027s3api.backend_storage_policy_index\u0027]))"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"        return resp(env, start_response)"}],"source_content_type":"text/x-python","patch_set":1,"id":"8f649338_e69c0833","line":371,"in_reply_to":"ddc27113_c59b1e96","updated":"2023-10-11 18:46:30.000000000","message":"The commit message said not to do it indiscriminately, but once the request has been handled.\n\nBut, that is narrow thinking - s3api may be done with the request but some other left-wise middleware may have plans to repurpose it, so it would be best not to set the request header *ever*.","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1db6c0c043302585850a43ff65b5cdd028bd72fb","unresolved":true,"context_lines":[{"line_number":348,"context_line":"            req \u003d req_class(env, self.app, self.conf)"},{"line_number":349,"context_line":"            resp \u003d self.handle_request(req)"},{"line_number":350,"context_line":"            if req.policy_index is not None:"},{"line_number":351,"context_line":"                resp.headers.setdefault(\u0027X-Backend-Storage-Policy-Index\u0027,"},{"line_number":352,"context_line":"                                        req.policy_index)"},{"line_number":353,"context_line":"        except NotS3Request:"},{"line_number":354,"context_line":"            resp \u003d self.app"}],"source_content_type":"text/x-python","patch_set":9,"id":"870bec37_ee35b7d8","line":351,"range":{"start_line":351,"start_character":29,"end_line":351,"end_character":39},"updated":"2023-10-13 18:27:54.000000000","message":"Would this ever already be set?","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":348,"context_line":"            req \u003d req_class(env, self.app, self.conf)"},{"line_number":349,"context_line":"            resp \u003d self.handle_request(req)"},{"line_number":350,"context_line":"            if req.policy_index is not None:"},{"line_number":351,"context_line":"                resp.headers.setdefault(\u0027X-Backend-Storage-Policy-Index\u0027,"},{"line_number":352,"context_line":"                                        req.policy_index)"},{"line_number":353,"context_line":"        except NotS3Request:"},{"line_number":354,"context_line":"            resp \u003d self.app"}],"source_content_type":"text/x-python","patch_set":9,"id":"03b1a036_1fa3ce66","line":351,"range":{"start_line":351,"start_character":29,"end_line":351,"end_character":39},"in_reply_to":"870bec37_ee35b7d8","updated":"2023-11-13 18:52:29.000000000","message":"I don\u0027t expect it to be set, but see no harm in using setdefault, in case an s3 controller does start copying sw_resp backend headers into the s3api resp","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":349,"context_line":"            resp \u003d self.handle_request(req)"},{"line_number":350,"context_line":"            if req.policy_index is not None:"},{"line_number":351,"context_line":"                resp.headers.setdefault(\u0027X-Backend-Storage-Policy-Index\u0027,"},{"line_number":352,"context_line":"                                        req.policy_index)"},{"line_number":353,"context_line":"        except NotS3Request:"},{"line_number":354,"context_line":"            resp \u003d self.app"},{"line_number":355,"context_line":"        except InvalidSubresource as e:"}],"source_content_type":"text/x-python","patch_set":14,"id":"92d9818c_36485f1d","line":352,"updated":"2023-11-13 20:09:24.000000000","message":"ah, only pass on useful information - indeed!\n\nthis transfer of knowledge does not happen on many error responses - which is probably reasonable - but maybe not obviously intentional.","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":false,"context_lines":[{"line_number":349,"context_line":"            resp \u003d self.handle_request(req)"},{"line_number":350,"context_line":"            if req.policy_index is not None:"},{"line_number":351,"context_line":"                resp.headers.setdefault(\u0027X-Backend-Storage-Policy-Index\u0027,"},{"line_number":352,"context_line":"                                        req.policy_index)"},{"line_number":353,"context_line":"        except NotS3Request:"},{"line_number":354,"context_line":"            resp \u003d self.app"},{"line_number":355,"context_line":"        except InvalidSubresource as e:"}],"source_content_type":"text/x-python","patch_set":14,"id":"c5abb8f9_4fc95ab6","line":352,"in_reply_to":"92d9818c_36485f1d","updated":"2023-11-14 13:01:22.000000000","message":"Ack","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":393,"context_line":"        else:"},{"line_number":394,"context_line":"            raise MethodNotAllowed(req.method,"},{"line_number":395,"context_line":"                                   req.controller.resource_type())"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        return res"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"    def check_pipeline(self, wsgi_conf):"}],"source_content_type":"text/x-python","patch_set":14,"id":"1942c430_77153d7c","line":396,"updated":"2023-11-13 20:09:24.000000000","message":"perhaps more obvious wrt to errors?\n\n\tdiff --git a/swift/common/middleware/s3api/s3api.py b/swift/common/middleware/s3api/s3api.py\n\tindex ea3b37362..bd0f0c01e 100644\n\t--- a/swift/common/middleware/s3api/s3api.py\n\t+++ b/swift/common/middleware/s3api/s3api.py\n\t@@ -347,9 +347,6 @@ class S3ApiMiddleware(object):\n\t\t     req_class \u003d get_request_class(env, self.conf.s3_acl)\n\t\t     req \u003d req_class(env, self.app, self.conf)\n\t\t     resp \u003d self.handle_request(req)\n\t-            if req.policy_index is not None:\n\t-                resp.headers.setdefault(\u0027X-Backend-Storage-Policy-Index\u0027,\n\t-                                        req.policy_index)\n\t\t except NotS3Request:\n\t\t     resp \u003d self.app\n\t\t except InvalidSubresource as e:\n\t@@ -394,6 +391,9 @@ class S3ApiMiddleware(object):\n\t\t     raise MethodNotAllowed(req.method,\n\t\t\t\t\t    req.controller.resource_type())\n\t \n\t+        if req.policy_index is not None:\n\t+            res.headers.setdefault(\u0027X-Backend-Storage-Policy-Index\u0027,\n\t+                                   req.policy_index)\n\t\t return res\n\t \n\t     def check_pipeline(self, wsgi_conf):\n\n... seems to pass tests?","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":true,"context_lines":[{"line_number":393,"context_line":"        else:"},{"line_number":394,"context_line":"            raise MethodNotAllowed(req.method,"},{"line_number":395,"context_line":"                                   req.controller.resource_type())"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        return res"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"    def check_pipeline(self, wsgi_conf):"}],"source_content_type":"text/x-python","patch_set":14,"id":"7f4cc7a5_fe5b5bf1","line":396,"in_reply_to":"1942c430_77153d7c","updated":"2023-11-14 13:01:22.000000000","message":"WFM thanks!","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cb9c1a4f062619ccf567ad9636dcff1f6b75f0ab","unresolved":false,"context_lines":[{"line_number":393,"context_line":"        else:"},{"line_number":394,"context_line":"            raise MethodNotAllowed(req.method,"},{"line_number":395,"context_line":"                                   req.controller.resource_type())"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        return res"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"    def check_pipeline(self, wsgi_conf):"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a1cec9c_bb4cc95c","line":396,"in_reply_to":"7f4cc7a5_fe5b5bf1","updated":"2023-11-14 18:17:41.000000000","message":"Done","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"ed0514d9e57f7a4635f504e1d1c835f76ebdd0a9","unresolved":false,"context_lines":[{"line_number":393,"context_line":"        else:"},{"line_number":394,"context_line":"            raise MethodNotAllowed(req.method,"},{"line_number":395,"context_line":"                                   req.controller.resource_type())"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        return res"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"    def check_pipeline(self, wsgi_conf):"}],"source_content_type":"text/x-python","patch_set":14,"id":"5a752b42_8f025f18","line":396,"in_reply_to":"7f4cc7a5_fe5b5bf1","updated":"2023-11-22 12:54:03.000000000","message":"Done","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"}],"swift/common/middleware/s3api/s3request.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2713c247500fa6bdea2cf9c411c61fe76745d378","unresolved":true,"context_lines":[{"line_number":1364,"context_line":"            # Update s3.backend_path from the response environ"},{"line_number":1365,"context_line":"            self.environ[\u0027s3api.backend_path\u0027] \u003d sw_resp.environ[\u0027PATH_INFO\u0027]"},{"line_number":1366,"context_line":"            self.stash_storage_policy_index("},{"line_number":1367,"context_line":"                sw_req.headers.get(\u0027X-Backend-Storage-Policy-Index\u0027))"},{"line_number":1368,"context_line":""},{"line_number":1369,"context_line":"        resp \u003d S3Response.from_swift_resp(sw_resp)"},{"line_number":1370,"context_line":"        status \u003d resp.status_int  # pylint: disable-msg\u003dE1101"}],"source_content_type":"text/x-python","patch_set":1,"id":"e966638b_963f56ce","line":1367,"updated":"2023-10-10 18:01:57.000000000","message":"this is a fallback - hopefully we already have the spi stahed from get_container_info","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1241cfa9e21e84e4f165bd7406251c07b0b14069","unresolved":false,"context_lines":[{"line_number":1364,"context_line":"            # Update s3.backend_path from the response environ"},{"line_number":1365,"context_line":"            self.environ[\u0027s3api.backend_path\u0027] \u003d sw_resp.environ[\u0027PATH_INFO\u0027]"},{"line_number":1366,"context_line":"            self.stash_storage_policy_index("},{"line_number":1367,"context_line":"                sw_req.headers.get(\u0027X-Backend-Storage-Policy-Index\u0027))"},{"line_number":1368,"context_line":""},{"line_number":1369,"context_line":"        resp \u003d S3Response.from_swift_resp(sw_resp)"},{"line_number":1370,"context_line":"        status \u003d resp.status_int  # pylint: disable-msg\u003dE1101"}],"source_content_type":"text/x-python","patch_set":1,"id":"7b3c8d85_8c09e5f6","line":1367,"in_reply_to":"e966638b_963f56ce","updated":"2023-10-12 17:22:58.000000000","message":"Done","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2713c247500fa6bdea2cf9c411c61fe76745d378","unresolved":true,"context_lines":[{"line_number":1496,"context_line":"        sw_req \u003d self.to_swift_req(\u0027TEST\u0027, self.container_name, None)"},{"line_number":1497,"context_line":"        info \u003d get_container_info(sw_req.environ, app, swift_source\u003d\u0027S3\u0027)"},{"line_number":1498,"context_line":"        if is_success(info[\u0027status\u0027]):"},{"line_number":1499,"context_line":"            self.stash_storage_policy_index(info.get(\u0027storage_policy\u0027))"},{"line_number":1500,"context_line":"            return info"},{"line_number":1501,"context_line":"        elif info[\u0027status\u0027] \u003d\u003d HTTP_NOT_FOUND:"},{"line_number":1502,"context_line":"            raise NoSuchBucket(self.container_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9c0ea1c0_ef81198c","line":1499,"updated":"2023-10-10 18:01:57.000000000","message":"stashing the spi here, but NOT setting the header yet","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ec7268c6f6ac9371f7e8eac4e2df01438f1cc247","unresolved":true,"context_lines":[{"line_number":1496,"context_line":"        sw_req \u003d self.to_swift_req(\u0027TEST\u0027, self.container_name, None)"},{"line_number":1497,"context_line":"        info \u003d get_container_info(sw_req.environ, app, swift_source\u003d\u0027S3\u0027)"},{"line_number":1498,"context_line":"        if is_success(info[\u0027status\u0027]):"},{"line_number":1499,"context_line":"            self.stash_storage_policy_index(info.get(\u0027storage_policy\u0027))"},{"line_number":1500,"context_line":"            return info"},{"line_number":1501,"context_line":"        elif info[\u0027status\u0027] \u003d\u003d HTTP_NOT_FOUND:"},{"line_number":1502,"context_line":"            raise NoSuchBucket(self.container_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"4d7659d7_d68be49a","line":1499,"updated":"2023-10-10 18:35:19.000000000","message":"this feels a little sketch; yes the cached container info *should* have the correct storage policy; but I don\u0027t see why we\u0027d ever need to get it here and not from a swift response (or the swift request headers AFTER it\u0027s returned the response)","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1241cfa9e21e84e4f165bd7406251c07b0b14069","unresolved":false,"context_lines":[{"line_number":1496,"context_line":"        sw_req \u003d self.to_swift_req(\u0027TEST\u0027, self.container_name, None)"},{"line_number":1497,"context_line":"        info \u003d get_container_info(sw_req.environ, app, swift_source\u003d\u0027S3\u0027)"},{"line_number":1498,"context_line":"        if is_success(info[\u0027status\u0027]):"},{"line_number":1499,"context_line":"            self.stash_storage_policy_index(info.get(\u0027storage_policy\u0027))"},{"line_number":1500,"context_line":"            return info"},{"line_number":1501,"context_line":"        elif info[\u0027status\u0027] \u003d\u003d HTTP_NOT_FOUND:"},{"line_number":1502,"context_line":"            raise NoSuchBucket(self.container_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"27916337_5cc26a5d","line":1499,"in_reply_to":"38b859d8_e34aea2f","updated":"2023-10-12 17:22:58.000000000","message":"Done","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bd5f845e18d411a0ce607e2ec60eb8c809718ed5","unresolved":true,"context_lines":[{"line_number":1496,"context_line":"        sw_req \u003d self.to_swift_req(\u0027TEST\u0027, self.container_name, None)"},{"line_number":1497,"context_line":"        info \u003d get_container_info(sw_req.environ, app, swift_source\u003d\u0027S3\u0027)"},{"line_number":1498,"context_line":"        if is_success(info[\u0027status\u0027]):"},{"line_number":1499,"context_line":"            self.stash_storage_policy_index(info.get(\u0027storage_policy\u0027))"},{"line_number":1500,"context_line":"            return info"},{"line_number":1501,"context_line":"        elif info[\u0027status\u0027] \u003d\u003d HTTP_NOT_FOUND:"},{"line_number":1502,"context_line":"            raise NoSuchBucket(self.container_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"38b859d8_e34aea2f","line":1499,"in_reply_to":"4d7659d7_d68be49a","updated":"2023-10-11 18:46:30.000000000","message":"The advantage I perceived of getting it here is that this will be the policy of the bucket cited in the request (vs varying policy from various multipart backend requests).\n\nBut, it seems that is not how we select the *path* to log..e.g. backend_path is set to the upload marker path (in the segments container) for a multipart complete...so the policy index should match that.\n\nAlso, I agree it\u0027s suspect w.r.t. bucket requests.\n\nScrapping this approach.","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1241cfa9e21e84e4f165bd7406251c07b0b14069","unresolved":false,"context_lines":[{"line_number":1496,"context_line":"        sw_req \u003d self.to_swift_req(\u0027TEST\u0027, self.container_name, None)"},{"line_number":1497,"context_line":"        info \u003d get_container_info(sw_req.environ, app, swift_source\u003d\u0027S3\u0027)"},{"line_number":1498,"context_line":"        if is_success(info[\u0027status\u0027]):"},{"line_number":1499,"context_line":"            self.stash_storage_policy_index(info.get(\u0027storage_policy\u0027))"},{"line_number":1500,"context_line":"            return info"},{"line_number":1501,"context_line":"        elif info[\u0027status\u0027] \u003d\u003d HTTP_NOT_FOUND:"},{"line_number":1502,"context_line":"            raise NoSuchBucket(self.container_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ca2956b2_5f10d275","line":1499,"in_reply_to":"9c0ea1c0_ef81198c","updated":"2023-10-12 17:22:58.000000000","message":"Done","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ec7268c6f6ac9371f7e8eac4e2df01438f1cc247","unresolved":true,"context_lines":[{"line_number":1509,"context_line":"    def stash_storage_policy_index(self, storage_policy_index):"},{"line_number":1510,"context_line":"        if storage_policy_index is not None:"},{"line_number":1511,"context_line":"            self.environ.setdefault(\u0027s3api.backend_storage_policy_index\u0027,"},{"line_number":1512,"context_line":"                                    storage_policy_index)"},{"line_number":1513,"context_line":""},{"line_number":1514,"context_line":"    def gen_multipart_manifest_delete_query(self, app, obj\u003dNone, version\u003dNone):"},{"line_number":1515,"context_line":"        if not self.conf.allow_multipart_uploads:"}],"source_content_type":"text/x-python","patch_set":1,"id":"03eb159c_efbdc1f4","line":1512,"updated":"2023-10-10 18:35:19.000000000","message":"i\u0027m not sure I understand the need to use the request environ to stash this - it\u0027s not like we\u0027re going to reference the value from another middleware (are we!?)","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bd5f845e18d411a0ce607e2ec60eb8c809718ed5","unresolved":true,"context_lines":[{"line_number":1509,"context_line":"    def stash_storage_policy_index(self, storage_policy_index):"},{"line_number":1510,"context_line":"        if storage_policy_index is not None:"},{"line_number":1511,"context_line":"            self.environ.setdefault(\u0027s3api.backend_storage_policy_index\u0027,"},{"line_number":1512,"context_line":"                                    storage_policy_index)"},{"line_number":1513,"context_line":""},{"line_number":1514,"context_line":"    def gen_multipart_manifest_delete_query(self, app, obj\u003dNone, version\u003dNone):"},{"line_number":1515,"context_line":"        if not self.conf.allow_multipart_uploads:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5e39feb4_cec4cc2d","line":1512,"in_reply_to":"03eb159c_efbdc1f4","updated":"2023-10-11 18:46:30.000000000","message":"it\u0027s WIP and I\u0027m wondering if there may end up being a case to let proxy_logging dig this out i.e. if it what we want logged may differ from the req or resp headers (similar to swift.backend_path)","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1241cfa9e21e84e4f165bd7406251c07b0b14069","unresolved":false,"context_lines":[{"line_number":1509,"context_line":"    def stash_storage_policy_index(self, storage_policy_index):"},{"line_number":1510,"context_line":"        if storage_policy_index is not None:"},{"line_number":1511,"context_line":"            self.environ.setdefault(\u0027s3api.backend_storage_policy_index\u0027,"},{"line_number":1512,"context_line":"                                    storage_policy_index)"},{"line_number":1513,"context_line":""},{"line_number":1514,"context_line":"    def gen_multipart_manifest_delete_query(self, app, obj\u003dNone, version\u003dNone):"},{"line_number":1515,"context_line":"        if not self.conf.allow_multipart_uploads:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3bbfdeb0_a5132062","line":1512,"in_reply_to":"5e39feb4_cec4cc2d","updated":"2023-10-12 17:22:58.000000000","message":"I flipped to using an S3Request attribute, but that does mean we have different patterns for this and s3api.backend_path","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bd5f845e18d411a0ce607e2ec60eb8c809718ed5","unresolved":true,"context_lines":[{"line_number":1368,"context_line":"        # keep a record of the backend policy index so that the s3api can add"},{"line_number":1369,"context_line":"        # it to the headers of whatever response it returns, which may not"},{"line_number":1370,"context_line":"        # necessarily be this resp."},{"line_number":1371,"context_line":"        self.policy_index \u003d get_policy_index(sw_req.headers, sw_resp.headers)"},{"line_number":1372,"context_line":"        resp \u003d S3Response.from_swift_resp(sw_resp)"},{"line_number":1373,"context_line":"        status \u003d resp.status_int  # pylint: disable-msg\u003dE1101"},{"line_number":1374,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"75b484ab_46637833","line":1371,"updated":"2023-10-11 18:46:30.000000000","message":"note: different pattern w.r.t. s3api.backend_path (which IIUC could also be an S3Request attribute)","commit_id":"e664d0f52f308ff2bd1a469346f9f4510eef02a1"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2752aa86be3a139bac120506b655801db5ce0f8c","unresolved":true,"context_lines":[{"line_number":1368,"context_line":"        # keep a record of the backend policy index so that the s3api can add"},{"line_number":1369,"context_line":"        # it to the headers of whatever response it returns, which may not"},{"line_number":1370,"context_line":"        # necessarily be this resp."},{"line_number":1371,"context_line":"        self.policy_index \u003d get_policy_index(sw_req.headers, sw_resp.headers)"},{"line_number":1372,"context_line":"        resp \u003d S3Response.from_swift_resp(sw_resp)"},{"line_number":1373,"context_line":"        status \u003d resp.status_int  # pylint: disable-msg\u003dE1101"},{"line_number":1374,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da257da6_d53bcfaf","line":1371,"in_reply_to":"75b484ab_46637833","updated":"2023-10-16 21:06:22.000000000","message":"heh, yeah - and then use it later to fill in `env[\u0027swift.backend_path\u0027]`","commit_id":"e664d0f52f308ff2bd1a469346f9f4510eef02a1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":1368,"context_line":"        # keep a record of the backend policy index so that the s3api can add"},{"line_number":1369,"context_line":"        # it to the headers of whatever response it returns, which may not"},{"line_number":1370,"context_line":"        # necessarily be this resp."},{"line_number":1371,"context_line":"        self.policy_index \u003d get_policy_index(sw_req.headers, sw_resp.headers)"},{"line_number":1372,"context_line":"        resp \u003d S3Response.from_swift_resp(sw_resp)"},{"line_number":1373,"context_line":"        status \u003d resp.status_int  # pylint: disable-msg\u003dE1101"},{"line_number":1374,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"8576d34c_61ad0d01","line":1371,"in_reply_to":"da257da6_d53bcfaf","updated":"2023-11-13 18:52:29.000000000","message":"Ack","commit_id":"e664d0f52f308ff2bd1a469346f9f4510eef02a1"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1db6c0c043302585850a43ff65b5cdd028bd72fb","unresolved":true,"context_lines":[{"line_number":920,"context_line":"                                     swob.str_to_wsgi(src_obj),"},{"line_number":921,"context_line":"                                     headers\u003dheaders, query\u003dquery)"},{"line_number":922,"context_line":"        # we can\u0027t let this HEAD req spoil our COPY"},{"line_number":923,"context_line":"        self.headers.pop(\u0027x-backend-storage-policy-index\u0027)"},{"line_number":924,"context_line":"        if src_resp.status_int \u003d\u003d 304:  # pylint: disable-msg\u003dE1101"},{"line_number":925,"context_line":"            raise PreconditionFailed()"},{"line_number":926,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"a9082894_9226fba2","side":"PARENT","line":923,"updated":"2023-10-13 18:27:54.000000000","message":"Right; we no longer need to pop this off, because it\u0027s no longer copied back from `sw_req` so it\u0027s not present at all.","commit_id":"d31a54a65c186550a99bb985f056c071690a3939"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":920,"context_line":"                                     swob.str_to_wsgi(src_obj),"},{"line_number":921,"context_line":"                                     headers\u003dheaders, query\u003dquery)"},{"line_number":922,"context_line":"        # we can\u0027t let this HEAD req spoil our COPY"},{"line_number":923,"context_line":"        self.headers.pop(\u0027x-backend-storage-policy-index\u0027)"},{"line_number":924,"context_line":"        if src_resp.status_int \u003d\u003d 304:  # pylint: disable-msg\u003dE1101"},{"line_number":925,"context_line":"            raise PreconditionFailed()"},{"line_number":926,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7327310a_9938c5e9","side":"PARENT","line":923,"in_reply_to":"a9082894_9226fba2","updated":"2023-11-13 18:52:29.000000000","message":"Ack","commit_id":"d31a54a65c186550a99bb985f056c071690a3939"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1db6c0c043302585850a43ff65b5cdd028bd72fb","unresolved":true,"context_lines":[{"line_number":549,"context_line":"        }"},{"line_number":550,"context_line":"        self.account \u003d None"},{"line_number":551,"context_line":"        self.user_id \u003d None"},{"line_number":552,"context_line":"        self.policy_index \u003d None"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"        # Avoids that swift.swob.Response replaces Location header value"},{"line_number":555,"context_line":"        # by full URL when absolute path given. See swift.swob for more detail."}],"source_content_type":"text/x-python","patch_set":9,"id":"98d131c4_1d4d4db8","line":552,"updated":"2023-10-13 18:27:54.000000000","message":"OK, right -- _not_ proxied through to the env/headers (like would be for `content_type`, say), but an honest attr, since it\u0027s `S3Request`-specific.\n\nI\u0027m kind of tempted to say that there *should* be a `policy_index` `_header_property` dangling off `swob.Request` and `swob.Response`, but I also realize why having that already wouldn\u0027t help us here.","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":549,"context_line":"        }"},{"line_number":550,"context_line":"        self.account \u003d None"},{"line_number":551,"context_line":"        self.user_id \u003d None"},{"line_number":552,"context_line":"        self.policy_index \u003d None"},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"        # Avoids that swift.swob.Response replaces Location header value"},{"line_number":555,"context_line":"        # by full URL when absolute path given. See swift.swob for more detail."}],"source_content_type":"text/x-python","patch_set":9,"id":"5ff8c2af_c652369c","line":552,"in_reply_to":"98d131c4_1d4d4db8","updated":"2023-11-13 18:52:29.000000000","message":"Ack","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":1373,"context_line":"        # keep a record of the backend policy index so that the s3api can add"},{"line_number":1374,"context_line":"        # it to the headers of whatever response it returns, which may not"},{"line_number":1375,"context_line":"        # necessarily be this resp."},{"line_number":1376,"context_line":"        self.policy_index \u003d get_policy_index(sw_req.headers, sw_resp.headers)"},{"line_number":1377,"context_line":"        resp \u003d S3Response.from_swift_resp(sw_resp)"},{"line_number":1378,"context_line":"        status \u003d resp.status_int  # pylint: disable-msg\u003dE1101"},{"line_number":1379,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"1bcef80c_27d4ebbe","line":1376,"updated":"2023-11-13 20:09:24.000000000","message":"this seems seems less invasive than master - kudos\n\nFWIW I believe get_policy_index can return None, but maybe only in legacy contexts or requests to resources we don\u0027t care about; probably not on c/o req/resp anyway.","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":false,"context_lines":[{"line_number":1373,"context_line":"        # keep a record of the backend policy index so that the s3api can add"},{"line_number":1374,"context_line":"        # it to the headers of whatever response it returns, which may not"},{"line_number":1375,"context_line":"        # necessarily be this resp."},{"line_number":1376,"context_line":"        self.policy_index \u003d get_policy_index(sw_req.headers, sw_resp.headers)"},{"line_number":1377,"context_line":"        resp \u003d S3Response.from_swift_resp(sw_resp)"},{"line_number":1378,"context_line":"        status \u003d resp.status_int  # pylint: disable-msg\u003dE1101"},{"line_number":1379,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"04d9e827_5b7ef244","line":1376,"in_reply_to":"1bcef80c_27d4ebbe","updated":"2023-11-14 13:01:22.000000000","message":"Ack","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"}],"test/probe/test_mixed_policy_mpu.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":107,"context_line":"                            Config\u003dconfig)"},{"line_number":108,"context_line":"        # s3 mpu request succeeds"},{"line_number":109,"context_line":"        s3_head_resp \u003d self.s3.head_object(Bucket\u003dself.bucket_name,"},{"line_number":110,"context_line":"                                           Key\u003dself.mpu_name)"},{"line_number":111,"context_line":"        self.assertEqual(expected_size, int(s3_head_resp[\u0027ContentLength\u0027]))"},{"line_number":112,"context_line":"        self.assertEqual(num_chunks, int("},{"line_number":113,"context_line":"            s3_head_resp[\u0027ETag\u0027].strip(\u0027\"\u0027).rsplit(\u0027-\u0027)[-1]))"}],"source_content_type":"text/x-python","patch_set":14,"id":"c9901dfc_fe3c31e9","line":110,"updated":"2023-11-13 20:09:24.000000000","message":"w/o the fix this fails:\n\n\t\u003e       s3_head_resp \u003d self.s3.head_object(Bucket\u003dself.bucket_name,\n\t\t\t\t\t\t   Key\u003dself.mpu_name)\n\n\tswift/test/probe/test_mixed_policy_mpu.py:109: \n\t...\n\t\tif http.status_code \u003e\u003d 300:\n\t\t    error_code \u003d parsed_response.get(\"Error\", {}).get(\"Code\")\n\t\t    error_class \u003d self.exceptions.from_code(error_code)\n\t\u003e           raise error_class(parsed_response, operation_name)\n\tE           botocore.exceptions.ClientError: An error occurred (404) when calling the HeadObject operation: Not Found","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                            Config\u003dconfig)"},{"line_number":108,"context_line":"        # s3 mpu request succeeds"},{"line_number":109,"context_line":"        s3_head_resp \u003d self.s3.head_object(Bucket\u003dself.bucket_name,"},{"line_number":110,"context_line":"                                           Key\u003dself.mpu_name)"},{"line_number":111,"context_line":"        self.assertEqual(expected_size, int(s3_head_resp[\u0027ContentLength\u0027]))"},{"line_number":112,"context_line":"        self.assertEqual(num_chunks, int("},{"line_number":113,"context_line":"            s3_head_resp[\u0027ETag\u0027].strip(\u0027\"\u0027).rsplit(\u0027-\u0027)[-1]))"}],"source_content_type":"text/x-python","patch_set":14,"id":"f09c9e7f_10f6d10d","line":110,"in_reply_to":"c9901dfc_fe3c31e9","updated":"2023-11-14 13:01:22.000000000","message":"Ack","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"}],"test/unit/common/middleware/helpers.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bd5f845e18d411a0ce607e2ec60eb8c809718ed5","unresolved":true,"context_lines":[{"line_number":216,"context_line":""},{"line_number":217,"context_line":"        resp_class, headers, body \u003d self._select_response(env, method, path)"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        # Update req.headers before capturing the request"},{"line_number":220,"context_line":"        if method in (\u0027GET\u0027, \u0027HEAD\u0027) and obj:"},{"line_number":221,"context_line":"            req.headers[\u0027X-Backend-Storage-Policy-Index\u0027] \u003d headers.get("},{"line_number":222,"context_line":"                \u0027x-backend-storage-policy-index\u0027, \u00272\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"f0b7d4ca_f892e9e4","side":"PARENT","line":219,"updated":"2023-10-11 18:46:30.000000000","message":"alternatively, let\u0027s capture exactly what was received (isn\u0027t that what we want to make assertions about?) rather than fixing up tests to assert that FakeSwift added a header","commit_id":"d31a54a65c186550a99bb985f056c071690a3939"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":216,"context_line":""},{"line_number":217,"context_line":"        resp_class, headers, body \u003d self._select_response(env, method, path)"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"        # Update req.headers before capturing the request"},{"line_number":220,"context_line":"        if method in (\u0027GET\u0027, \u0027HEAD\u0027) and obj:"},{"line_number":221,"context_line":"            req.headers[\u0027X-Backend-Storage-Policy-Index\u0027] \u003d headers.get("},{"line_number":222,"context_line":"                \u0027x-backend-storage-policy-index\u0027, \u00272\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"e7766fc3_c63fcd3f","side":"PARENT","line":219,"in_reply_to":"f0b7d4ca_f892e9e4","updated":"2023-11-13 18:52:29.000000000","message":"Ack","commit_id":"d31a54a65c186550a99bb985f056c071690a3939"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bd5f845e18d411a0ce607e2ec60eb8c809718ed5","unresolved":true,"context_lines":[{"line_number":206,"context_line":"        except KeyError:"},{"line_number":207,"context_line":"            headers \u003d {}"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        return headers"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def __call__(self, env, start_response):"},{"line_number":212,"context_line":"        method \u003d env[\u0027REQUEST_METHOD\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"72dc7b74_a78889a4","line":209,"updated":"2023-10-11 18:46:30.000000000","message":"slightly lame attempt to do the right thing\n\nI\u0027m wondering if FakeSwift should just have a dict of container name -\u003eSPI\u0027s and annotate requests using that","commit_id":"e664d0f52f308ff2bd1a469346f9f4510eef02a1"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8959d7ad72a300c11ee849c85748a4cb13bfca28","unresolved":true,"context_lines":[{"line_number":206,"context_line":"        except KeyError:"},{"line_number":207,"context_line":"            headers \u003d {}"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        return headers"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def __call__(self, env, start_response):"},{"line_number":212,"context_line":"        method \u003d env[\u0027REQUEST_METHOD\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"c4d15551_612b4353","line":209,"in_reply_to":"72dc7b74_a78889a4","updated":"2023-10-12 19:42:31.000000000","message":"It definitely feels a little strange -- if we\u0027re trying to simulate a deleted container, for example, `_get_container_headers` won\u0027t actually return the registered `X-Backend-Delete-Timestamp`!\n\nWe only use this to determine storage policy, yeah? I might find it less strange if we had this as a `_get_container_policy` helper instead, and I think it\u0027d break up the\n```\n            req.headers.setdefault(spi_hdr, self._get_container_headers(\n                acc, cont).get(spi_hdr, str(int(POLICIES.default))))\n```\na little more naturally. Working with deleted containers could still get a little messy, though -- why *do* we have that `if not is_success(...): headers \u003d {}`??","commit_id":"e664d0f52f308ff2bd1a469346f9f4510eef02a1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d5fb1ca6975d79a4d16e9f6573c3a35e104fd469","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        except KeyError:"},{"line_number":207,"context_line":"            headers \u003d {}"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"        return headers"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def __call__(self, env, start_response):"},{"line_number":212,"context_line":"        method \u003d env[\u0027REQUEST_METHOD\u0027]"}],"source_content_type":"text/x-python","patch_set":2,"id":"b5b855b6_ef2115aa","line":209,"in_reply_to":"c4d15551_612b4353","updated":"2023-10-13 11:16:35.000000000","message":"agree, this was a little too quick an dirty. Making this focus on getting an spi will be better. Simulating every container operation is beyond my scope.\n\nI\u0027ll try to rework this.","commit_id":"e664d0f52f308ff2bd1a469346f9f4510eef02a1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bd5f845e18d411a0ce607e2ec60eb8c809718ed5","unresolved":true,"context_lines":[{"line_number":286,"context_line":"        if obj:"},{"line_number":287,"context_line":"            spi_hdr \u003d \u0027X-Backend-Storage-Policy-Index\u0027"},{"line_number":288,"context_line":"            req.headers.setdefault(spi_hdr, self._get_container_headers("},{"line_number":289,"context_line":"                acc, cont).get(spi_hdr, headers.get(spi_hdr, \u00272\u0027)))"},{"line_number":290,"context_line":"        req_headers_copy \u003d HeaderKeyDict(req.headers)"},{"line_number":291,"context_line":"        self._updated_calls.append("},{"line_number":292,"context_line":"            FakeSwiftCall(method, path, req_headers_copy))"}],"source_content_type":"text/x-python","patch_set":2,"id":"6661cb60_a86172fd","line":289,"range":{"start_line":289,"start_character":40,"end_line":289,"end_character":59},"updated":"2023-10-11 18:46:30.000000000","message":"I\u0027m still not too happy with this.","commit_id":"e664d0f52f308ff2bd1a469346f9f4510eef02a1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1241cfa9e21e84e4f165bd7406251c07b0b14069","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        if obj:"},{"line_number":287,"context_line":"            spi_hdr \u003d \u0027X-Backend-Storage-Policy-Index\u0027"},{"line_number":288,"context_line":"            req.headers.setdefault(spi_hdr, self._get_container_headers("},{"line_number":289,"context_line":"                acc, cont).get(spi_hdr, headers.get(spi_hdr, \u00272\u0027)))"},{"line_number":290,"context_line":"        req_headers_copy \u003d HeaderKeyDict(req.headers)"},{"line_number":291,"context_line":"        self._updated_calls.append("},{"line_number":292,"context_line":"            FakeSwiftCall(method, path, req_headers_copy))"}],"source_content_type":"text/x-python","patch_set":2,"id":"7da91e54_db7c2d29","line":289,"range":{"start_line":289,"start_character":40,"end_line":289,"end_character":59},"in_reply_to":"6661cb60_a86172fd","updated":"2023-10-12 17:22:58.000000000","message":"Done","commit_id":"e664d0f52f308ff2bd1a469346f9f4510eef02a1"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8959d7ad72a300c11ee849c85748a4cb13bfca28","unresolved":true,"context_lines":[{"line_number":201,"context_line":"        env \u003d {\u0027PATH_INFO\u0027: path,"},{"line_number":202,"context_line":"               \u0027REQUEST_METHOD\u0027: \u0027HEAD\u0027}"},{"line_number":203,"context_line":"        try:"},{"line_number":204,"context_line":"            resp_class, headers, _ \u003d self._select_response(env, \u0027HEAD\u0027, path)"},{"line_number":205,"context_line":"            if not is_success(resp_class().status_int):"},{"line_number":206,"context_line":"                headers \u003d {}"},{"line_number":207,"context_line":"        except KeyError:"}],"source_content_type":"text/x-python","patch_set":3,"id":"d3059bad_2d9e2d71","line":204,"range":{"start_line":204,"start_character":59,"end_line":204,"end_character":71},"updated":"2023-10-12 19:42:31.000000000","message":"Off-topic: That `_select_response` API feels weird -- why don\u0027t we just pick method off the `env`?","commit_id":"2fa313b78113316e409091a52f71649701cc5ad1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        env \u003d {\u0027PATH_INFO\u0027: path,"},{"line_number":202,"context_line":"               \u0027REQUEST_METHOD\u0027: \u0027HEAD\u0027}"},{"line_number":203,"context_line":"        try:"},{"line_number":204,"context_line":"            resp_class, headers, _ \u003d self._select_response(env, \u0027HEAD\u0027, path)"},{"line_number":205,"context_line":"            if not is_success(resp_class().status_int):"},{"line_number":206,"context_line":"                headers \u003d {}"},{"line_number":207,"context_line":"        except KeyError:"}],"source_content_type":"text/x-python","patch_set":3,"id":"a101857a_a1d519cf","line":204,"range":{"start_line":204,"start_character":59,"end_line":204,"end_character":71},"in_reply_to":"0fa28e35_cb06e312","updated":"2023-11-13 18:52:29.000000000","message":"Done\n\npath gets a `normalize_path` but we could repeat that for the sake of a simple _select_response signature","commit_id":"2fa313b78113316e409091a52f71649701cc5ad1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":true,"context_lines":[{"line_number":201,"context_line":"        env \u003d {\u0027PATH_INFO\u0027: path,"},{"line_number":202,"context_line":"               \u0027REQUEST_METHOD\u0027: \u0027HEAD\u0027}"},{"line_number":203,"context_line":"        try:"},{"line_number":204,"context_line":"            resp_class, headers, _ \u003d self._select_response(env, \u0027HEAD\u0027, path)"},{"line_number":205,"context_line":"            if not is_success(resp_class().status_int):"},{"line_number":206,"context_line":"                headers \u003d {}"},{"line_number":207,"context_line":"        except KeyError:"}],"source_content_type":"text/x-python","patch_set":3,"id":"2083e6ad_e1f6d45a","line":204,"range":{"start_line":204,"start_character":59,"end_line":204,"end_character":71},"in_reply_to":"0fa28e35_cb06e312","updated":"2023-11-13 18:52:29.000000000","message":"there\u0027s a normalize_path(path) in `__call__` so we might want to still pass in path","commit_id":"2fa313b78113316e409091a52f71649701cc5ad1"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2752aa86be3a139bac120506b655801db5ce0f8c","unresolved":true,"context_lines":[{"line_number":201,"context_line":"        env \u003d {\u0027PATH_INFO\u0027: path,"},{"line_number":202,"context_line":"               \u0027REQUEST_METHOD\u0027: \u0027HEAD\u0027}"},{"line_number":203,"context_line":"        try:"},{"line_number":204,"context_line":"            resp_class, headers, _ \u003d self._select_response(env, \u0027HEAD\u0027, path)"},{"line_number":205,"context_line":"            if not is_success(resp_class().status_int):"},{"line_number":206,"context_line":"                headers \u003d {}"},{"line_number":207,"context_line":"        except KeyError:"}],"source_content_type":"text/x-python","patch_set":3,"id":"0fa28e35_cb06e312","line":204,"range":{"start_line":204,"start_character":59,"end_line":204,"end_character":71},"in_reply_to":"d3059bad_2d9e2d71","updated":"2023-10-16 21:06:22.000000000","message":"heh, and even path - we could do all the qs normalization we need in _select_response w/ just the env.","commit_id":"2fa313b78113316e409091a52f71649701cc5ad1"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2752aa86be3a139bac120506b655801db5ce0f8c","unresolved":true,"context_lines":[{"line_number":229,"context_line":"        self.swift_sources.append(env.get(\u0027swift.source\u0027))"},{"line_number":230,"context_line":"        self.txn_ids.append(env.get(\u0027swift.trans_id\u0027))"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        resp_class, headers, body \u003d self._select_response(env, method, path)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        # Capture the request before reading the body, in case the iter raises"},{"line_number":235,"context_line":"        # an exception."}],"source_content_type":"text/x-python","patch_set":9,"id":"781c0f7b_5d5fde0b","line":232,"updated":"2023-10-16 21:06:22.000000000","message":"I guess here when we\u0027re calling we already have the named variables; it does seem like we *could* just pass in env","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        self.swift_sources.append(env.get(\u0027swift.source\u0027))"},{"line_number":230,"context_line":"        self.txn_ids.append(env.get(\u0027swift.trans_id\u0027))"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        resp_class, headers, body \u003d self._select_response(env, method, path)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        # Capture the request before reading the body, in case the iter raises"},{"line_number":235,"context_line":"        # an exception."}],"source_content_type":"text/x-python","patch_set":9,"id":"3d4c6473_a9416cb7","line":232,"in_reply_to":"781c0f7b_5d5fde0b","updated":"2023-11-13 18:52:29.000000000","message":"Done","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2752aa86be3a139bac120506b655801db5ce0f8c","unresolved":true,"context_lines":[{"line_number":235,"context_line":"        # an exception."},{"line_number":236,"context_line":"        # note: tests may assume this copy of req_headers is case insensitive"},{"line_number":237,"context_line":"        # so we deliberately use a HeaderKeyDict"},{"line_number":238,"context_line":"        req_headers_copy \u003d HeaderKeyDict(req.headers)"},{"line_number":239,"context_line":"        self._calls.append("},{"line_number":240,"context_line":"            FakeSwiftCall(method, path, req_headers_copy))"},{"line_number":241,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bd2b1453_1a29d4ed","line":238,"updated":"2023-10-16 21:06:22.000000000","message":"doh!  if we\u0027d manipulatd the request headers just one line later tests would already have been able to ignore the x-backend-storage-policy header value","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":235,"context_line":"        # an exception."},{"line_number":236,"context_line":"        # note: tests may assume this copy of req_headers is case insensitive"},{"line_number":237,"context_line":"        # so we deliberately use a HeaderKeyDict"},{"line_number":238,"context_line":"        req_headers_copy \u003d HeaderKeyDict(req.headers)"},{"line_number":239,"context_line":"        self._calls.append("},{"line_number":240,"context_line":"            FakeSwiftCall(method, path, req_headers_copy))"},{"line_number":241,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"d2553595_f56cbde6","line":238,"in_reply_to":"bd2b1453_1a29d4ed","updated":"2023-11-13 18:52:29.000000000","message":"Ack","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2752aa86be3a139bac120506b655801db5ce0f8c","unresolved":true,"context_lines":[{"line_number":288,"context_line":"                                   self._get_policy_index(acc, cont))"},{"line_number":289,"context_line":"        req_headers_copy \u003d HeaderKeyDict(req.headers)"},{"line_number":290,"context_line":"        self._updated_calls.append("},{"line_number":291,"context_line":"            FakeSwiftCall(method, path, req_headers_copy))"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        # Apply conditional etag overrides"},{"line_number":294,"context_line":"        conditional_etag \u003d resolve_etag_is_at_header(req, headers)"}],"source_content_type":"text/x-python","patch_set":9,"id":"256540dc_bcde81da","line":291,"updated":"2023-10-16 21:06:22.000000000","message":"i\u0027m not sure i understand the use-case for this second copy of the FakeSwiftCall list","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":288,"context_line":"                                   self._get_policy_index(acc, cont))"},{"line_number":289,"context_line":"        req_headers_copy \u003d HeaderKeyDict(req.headers)"},{"line_number":290,"context_line":"        self._updated_calls.append("},{"line_number":291,"context_line":"            FakeSwiftCall(method, path, req_headers_copy))"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"        # Apply conditional etag overrides"},{"line_number":294,"context_line":"        conditional_etag \u003d resolve_etag_is_at_header(req, headers)"}],"source_content_type":"text/x-python","patch_set":9,"id":"c9e6c57f_46278f1a","line":291,"in_reply_to":"256540dc_bcde81da","updated":"2023-11-13 18:52:29.000000000","message":"Done","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":205,"context_line":"               \u0027REQUEST_METHOD\u0027: \u0027HEAD\u0027}"},{"line_number":206,"context_line":"        try:"},{"line_number":207,"context_line":"            resp_class, headers, _ \u003d self._select_response(env)"},{"line_number":208,"context_line":"            policy_index \u003d headers.get(\u0027X-Backend-Storage-Policy-Index\u0027)"},{"line_number":209,"context_line":"        except KeyError:"},{"line_number":210,"context_line":"            policy_index \u003d None"},{"line_number":211,"context_line":"        if policy_index is None:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7608b9de_d2102528","line":208,"updated":"2023-11-13 20:09:24.000000000","message":"real swift is as likely to get the container spi from memcace as a container HEAD - but the container is the source of truth - here the fake is strongly leaning into real-swift behavior.","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":false,"context_lines":[{"line_number":205,"context_line":"               \u0027REQUEST_METHOD\u0027: \u0027HEAD\u0027}"},{"line_number":206,"context_line":"        try:"},{"line_number":207,"context_line":"            resp_class, headers, _ \u003d self._select_response(env)"},{"line_number":208,"context_line":"            policy_index \u003d headers.get(\u0027X-Backend-Storage-Policy-Index\u0027)"},{"line_number":209,"context_line":"        except KeyError:"},{"line_number":210,"context_line":"            policy_index \u003d None"},{"line_number":211,"context_line":"        if policy_index is None:"}],"source_content_type":"text/x-python","patch_set":14,"id":"9268b631_f9174709","line":208,"in_reply_to":"7608b9de_d2102528","updated":"2023-11-14 13:01:22.000000000","message":"Ack","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":209,"context_line":"        except KeyError:"},{"line_number":210,"context_line":"            policy_index \u003d None"},{"line_number":211,"context_line":"        if policy_index is None:"},{"line_number":212,"context_line":"            policy_index \u003d str(int(POLICIES.default))"},{"line_number":213,"context_line":"        return policy_index"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def _parse_path(self, env):"}],"source_content_type":"text/x-python","patch_set":14,"id":"e496d751_fdb520cc","line":212,"updated":"2023-11-13 20:09:24.000000000","message":"seems reasonable","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        except KeyError:"},{"line_number":210,"context_line":"            policy_index \u003d None"},{"line_number":211,"context_line":"        if policy_index is None:"},{"line_number":212,"context_line":"            policy_index \u003d str(int(POLICIES.default))"},{"line_number":213,"context_line":"        return policy_index"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"    def _parse_path(self, env):"}],"source_content_type":"text/x-python","patch_set":14,"id":"d98e0a5d_5bce59f2","line":212,"in_reply_to":"e496d751_fdb520cc","updated":"2023-11-14 13:01:22.000000000","message":"Ack","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"}],"test/unit/common/middleware/s3api/__init__.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1241cfa9e21e84e4f165bd7406251c07b0b14069","unresolved":true,"context_lines":[{"line_number":136,"context_line":"        self.swift.register(\u0027HEAD\u0027, \u0027/v1/AUTH_test/\u0027 + bucket,"},{"line_number":137,"context_line":"                            swob.HTTPNoContent,"},{"line_number":138,"context_line":"                            {\u0027X-Backend-Storage-Policy-Index\u0027:"},{"line_number":139,"context_line":"                             str(bucket_policy_index)}, None)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def _assert_policy_index(self, req_headers, resp_headers, policy_index):"},{"line_number":142,"context_line":"        self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req_headers)"}],"source_content_type":"text/x-python","patch_set":5,"id":"fe9a0d3f_97f3cc21","line":139,"updated":"2023-10-12 17:22:58.000000000","message":"I made this a helper for two reasons:\n\n(a) to comment *why* this container HEAD is registered \n\n(b) to provide single point of change if we decide on a different approach in FakeSwift","commit_id":"e0c8226da7306e7bf995eb5b510fc24441c77fc0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":true,"context_lines":[{"line_number":136,"context_line":"        self.swift.register(\u0027HEAD\u0027, \u0027/v1/AUTH_test/\u0027 + bucket,"},{"line_number":137,"context_line":"                            swob.HTTPNoContent,"},{"line_number":138,"context_line":"                            {\u0027X-Backend-Storage-Policy-Index\u0027:"},{"line_number":139,"context_line":"                             str(bucket_policy_index)}, None)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def _assert_policy_index(self, req_headers, resp_headers, policy_index):"},{"line_number":142,"context_line":"        self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req_headers)"}],"source_content_type":"text/x-python","patch_set":5,"id":"faa92097_99de6558","line":139,"in_reply_to":"91f6547d_10ed99b1","updated":"2023-11-13 18:52:29.000000000","message":"We do want to overwrite existing HEAD. I don\u0027t think this is different from other places outside of setUp() where tests register responses that may overwrite what\u0027s been done in setUp().\n\nI\u0027ll change the method name to _register_policy_HEAD so it\u0027s clearer what the method is going to do.","commit_id":"e0c8226da7306e7bf995eb5b510fc24441c77fc0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        self.swift.register(\u0027HEAD\u0027, \u0027/v1/AUTH_test/\u0027 + bucket,"},{"line_number":137,"context_line":"                            swob.HTTPNoContent,"},{"line_number":138,"context_line":"                            {\u0027X-Backend-Storage-Policy-Index\u0027:"},{"line_number":139,"context_line":"                             str(bucket_policy_index)}, None)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def _assert_policy_index(self, req_headers, resp_headers, policy_index):"},{"line_number":142,"context_line":"        self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req_headers)"}],"source_content_type":"text/x-python","patch_set":5,"id":"a871d06e_7fbddafc","line":139,"in_reply_to":"91f6547d_10ed99b1","updated":"2023-11-13 18:52:29.000000000","message":"we need to overwrite existing HEADS from setUp() - it\u0027s not an unusual pattern to do so. But I\u0027ll change the method name to make it clearer what is does.","commit_id":"e0c8226da7306e7bf995eb5b510fc24441c77fc0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        self.swift.register(\u0027HEAD\u0027, \u0027/v1/AUTH_test/\u0027 + bucket,"},{"line_number":137,"context_line":"                            swob.HTTPNoContent,"},{"line_number":138,"context_line":"                            {\u0027X-Backend-Storage-Policy-Index\u0027:"},{"line_number":139,"context_line":"                             str(bucket_policy_index)}, None)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def _assert_policy_index(self, req_headers, resp_headers, policy_index):"},{"line_number":142,"context_line":"        self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req_headers)"}],"source_content_type":"text/x-python","patch_set":5,"id":"a6a047ba_a26d33a0","line":139,"in_reply_to":"faa92097_99de6558","updated":"2023-11-14 13:01:22.000000000","message":"Done","commit_id":"e0c8226da7306e7bf995eb5b510fc24441c77fc0"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2752aa86be3a139bac120506b655801db5ce0f8c","unresolved":true,"context_lines":[{"line_number":136,"context_line":"        self.swift.register(\u0027HEAD\u0027, \u0027/v1/AUTH_test/\u0027 + bucket,"},{"line_number":137,"context_line":"                            swob.HTTPNoContent,"},{"line_number":138,"context_line":"                            {\u0027X-Backend-Storage-Policy-Index\u0027:"},{"line_number":139,"context_line":"                             str(bucket_policy_index)}, None)"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    def _assert_policy_index(self, req_headers, resp_headers, policy_index):"},{"line_number":142,"context_line":"        self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req_headers)"}],"source_content_type":"text/x-python","patch_set":5,"id":"91f6547d_10ed99b1","line":139,"in_reply_to":"fe9a0d3f_97f3cc21","updated":"2023-10-16 21:06:22.000000000","message":"maybe we should check if there\u0027s an existing HEAD registered before we ovewrite it\u0027s headers?","commit_id":"e0c8226da7306e7bf995eb5b510fc24441c77fc0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1241cfa9e21e84e4f165bd7406251c07b0b14069","unresolved":true,"context_lines":[{"line_number":141,"context_line":"    def _assert_policy_index(self, req_headers, resp_headers, policy_index):"},{"line_number":142,"context_line":"        self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req_headers)"},{"line_number":143,"context_line":"        self.assertEqual(resp_headers.get(\u0027X-Backend-Storage-Policy-Index\u0027),"},{"line_number":144,"context_line":"                         str(policy_index))"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _get_error_code(self, body):"},{"line_number":147,"context_line":"        elem \u003d fromstring(body, \u0027Error\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"2a78553e_87193a0d","line":144,"updated":"2023-10-12 17:22:58.000000000","message":"I made this a helper to ease comparing test outcomes on master: on master we\u0027d expect the header to be in req_headers.\n\n```\ndiff --git a/test/unit/common/middleware/s3api/__init__.py b/test/unit/common/middleware/s3api/__init__.py\nindex bf27f9240..cd04315a8 100644\n--- a/test/unit/common/middleware/s3api/__init__.py\n+++ b/test/unit/common/middleware/s3api/__init__.py\n@@ -139,8 +139,8 @@ class S3ApiTestCase(unittest.TestCase):\n                              str(bucket_policy_index)}, None)\n\n     def _assert_policy_index(self, req_headers, resp_headers, policy_index):\n-        self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req_headers)\n-        self.assertEqual(resp_headers.get(\u0027X-Backend-Storage-Policy-Index\u0027),\n+        # self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req_headers)\n+        self.assertEqual(req_headers.get(\u0027X-Backend-Storage-Policy-Index\u0027),\n                          str(policy_index))\n\n     def _get_error_code(self, body):\n     ```\n\nWith that change, almost all the assertions about policy index in headers here pass on master (i.e. we\u0027re still passing back the same policy index, just in a resp header rather than a req header). Except bucket GET tests, which don\u0027t get a policy header on master because it\u0027s not added to the request by the proxy.","commit_id":"e0c8226da7306e7bf995eb5b510fc24441c77fc0"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    def _assert_policy_index(self, req_headers, resp_headers, policy_index):"},{"line_number":142,"context_line":"        self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req_headers)"},{"line_number":143,"context_line":"        self.assertEqual(resp_headers.get(\u0027X-Backend-Storage-Policy-Index\u0027),"},{"line_number":144,"context_line":"                         str(policy_index))"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _get_error_code(self, body):"},{"line_number":147,"context_line":"        elem \u003d fromstring(body, \u0027Error\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5566d21d_1ab02290","line":144,"in_reply_to":"2a78553e_87193a0d","updated":"2023-11-13 18:52:29.000000000","message":"Ack","commit_id":"e0c8226da7306e7bf995eb5b510fc24441c77fc0"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"6a5355a06f55a89a2bc839b920649f4823156d19","unresolved":true,"context_lines":[{"line_number":134,"context_line":"    def _register_bucket_head(self, bucket, bucket_policy_index, headers\u003dNone):"},{"line_number":135,"context_line":"        # register bucket HEAD response with given policy index header"},{"line_number":136,"context_line":"        headers \u003d {} if headers is None else headers"},{"line_number":137,"context_line":"        headers.setdefault(\u0027X-Backend-Storage-Policy-Index\u0027,"},{"line_number":138,"context_line":"                           str(bucket_policy_index))"},{"line_number":139,"context_line":"        self.swift.register(\u0027HEAD\u0027, \u0027/v1/AUTH_test/\u0027 + bucket,"},{"line_number":140,"context_line":"                            swob.HTTPNoContent, headers, None)"}],"source_content_type":"text/x-python","patch_set":14,"id":"bbfbde48_8a46ad0c","line":137,"updated":"2023-11-13 19:41:52.000000000","message":"Feels a little funny to have a (required) policy index param now that we\u0027re got a general headers param... Why _shouldn\u0027t_ we expect callers to indicate policy by way of headers?","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cb9c1a4f062619ccf567ad9636dcff1f6b75f0ab","unresolved":false,"context_lines":[{"line_number":134,"context_line":"    def _register_bucket_head(self, bucket, bucket_policy_index, headers\u003dNone):"},{"line_number":135,"context_line":"        # register bucket HEAD response with given policy index header"},{"line_number":136,"context_line":"        headers \u003d {} if headers is None else headers"},{"line_number":137,"context_line":"        headers.setdefault(\u0027X-Backend-Storage-Policy-Index\u0027,"},{"line_number":138,"context_line":"                           str(bucket_policy_index))"},{"line_number":139,"context_line":"        self.swift.register(\u0027HEAD\u0027, \u0027/v1/AUTH_test/\u0027 + bucket,"},{"line_number":140,"context_line":"                            swob.HTTPNoContent, headers, None)"}],"source_content_type":"text/x-python","patch_set":14,"id":"d83a9596_9dfb2154","line":137,"in_reply_to":"3326ee23_fe753185","updated":"2023-11-14 18:17:41.000000000","message":"ok, so _register_bucket_policy_index_head w/o extra headers kwarg is the \"interface abstraction\" - and the FakeSwift.register(\u0027HEAD\u0027, \u0027/bucket\u0027) is an implementation detail until we come up with a better plan.\n\nI think i was hung up thinking that \"typically\" a registered request means the test should make such a request - but that\u0027s not necessary or true in practice; a registered request is quite happy never being used.  Also there\u0027s really no better sensible way to fake the real-swift behavior of caching container_info or doing a HEAD to the bucket so it can decorate object layer requests with the correct SPI than registering a HEAD response for the bucket with the correct SPI short of inventing a totally out-of-band interface that\u0027s nothing like realy swift.  I\u0027m at peace with this.","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":134,"context_line":"    def _register_bucket_head(self, bucket, bucket_policy_index, headers\u003dNone):"},{"line_number":135,"context_line":"        # register bucket HEAD response with given policy index header"},{"line_number":136,"context_line":"        headers \u003d {} if headers is None else headers"},{"line_number":137,"context_line":"        headers.setdefault(\u0027X-Backend-Storage-Policy-Index\u0027,"},{"line_number":138,"context_line":"                           str(bucket_policy_index))"},{"line_number":139,"context_line":"        self.swift.register(\u0027HEAD\u0027, \u0027/v1/AUTH_test/\u0027 + bucket,"},{"line_number":140,"context_line":"                            swob.HTTPNoContent, headers, None)"}],"source_content_type":"text/x-python","patch_set":14,"id":"bdd05204_4a772dcb","line":137,"in_reply_to":"bbfbde48_8a46ad0c","updated":"2023-11-13 20:09:24.000000000","message":"yeah i\u0027m not 100% sold on FakeSwift pushing callers towards registering a bucket HEAD to get the desired spi in the object req headers.  It gets weirder for me when the (non)interaction w/ cache comes into consideration.\n\nIF there\u0027s a container HEAD request registered I\u0027m sure it makes sense; but having a helper that\u0027s mostly for setting the desired SPI via registering a bucket HEAD seems like tail wagging the dog or something.\n\nbut I don\u0027t have a better idea.","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":true,"context_lines":[{"line_number":134,"context_line":"    def _register_bucket_head(self, bucket, bucket_policy_index, headers\u003dNone):"},{"line_number":135,"context_line":"        # register bucket HEAD response with given policy index header"},{"line_number":136,"context_line":"        headers \u003d {} if headers is None else headers"},{"line_number":137,"context_line":"        headers.setdefault(\u0027X-Backend-Storage-Policy-Index\u0027,"},{"line_number":138,"context_line":"                           str(bucket_policy_index))"},{"line_number":139,"context_line":"        self.swift.register(\u0027HEAD\u0027, \u0027/v1/AUTH_test/\u0027 + bucket,"},{"line_number":140,"context_line":"                            swob.HTTPNoContent, headers, None)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3326ee23_fe753185","line":137,"in_reply_to":"bdd05204_4a772dcb","updated":"2023-11-14 13:01:22.000000000","message":"I\u0027m using a helper so that when we think of a better way to register the SPI we can change it in one place.\n\nIIRC I called it ``_register_bucket_policy_index``, but that name hid the fact that it registered a HEAD, so I changed to ``_register_bucket_head``. Then the support for extra headers crept in, but it wasn\u0027t meant to be a general purpose helper to register any HEAD. So I\u0027m going to drop the extra headers arg and rename it to ``register_bucket_policy_index_head``.\n\nYes, the combination of FakeSwift and FakeMemcache gets weird! It feels \"wrong\" that we could have tests setting up container info in FakeMemcache for which a HEAD would fail. Perhaps we should register all responses with FakeSwift and then selectively \"export\" some of them into FakeMemcache during test setup, so there is one point of truth (FakeSwift)? Or be clear when a test is using FakeMemcache to actually test interactions with memcache, rather than as a shortcut alternative to registering with FakeSwift.","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":137,"context_line":"        headers.setdefault(\u0027X-Backend-Storage-Policy-Index\u0027,"},{"line_number":138,"context_line":"                           str(bucket_policy_index))"},{"line_number":139,"context_line":"        self.swift.register(\u0027HEAD\u0027, \u0027/v1/AUTH_test/\u0027 + bucket,"},{"line_number":140,"context_line":"                            swob.HTTPNoContent, headers, None)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _assert_policy_index(self, req_headers, resp_headers, policy_index):"},{"line_number":143,"context_line":"        self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req_headers)"}],"source_content_type":"text/x-python","patch_set":14,"id":"64d4e8bd_4d4fe4d4","line":140,"updated":"2023-11-13 20:09:24.000000000","message":"I see this added to a lot of tests - I assume it\u0027s related to FakeSwift using the registered HEAD to figure out the correct spi for the object request more so than a actual new HEAD request being made for the bucket.","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":true,"context_lines":[{"line_number":137,"context_line":"        headers.setdefault(\u0027X-Backend-Storage-Policy-Index\u0027,"},{"line_number":138,"context_line":"                           str(bucket_policy_index))"},{"line_number":139,"context_line":"        self.swift.register(\u0027HEAD\u0027, \u0027/v1/AUTH_test/\u0027 + bucket,"},{"line_number":140,"context_line":"                            swob.HTTPNoContent, headers, None)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _assert_policy_index(self, req_headers, resp_headers, policy_index):"},{"line_number":143,"context_line":"        self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req_headers)"}],"source_content_type":"text/x-python","patch_set":14,"id":"e1eafbfc_3bb598bb","line":140,"in_reply_to":"64d4e8bd_4d4fe4d4","updated":"2023-11-14 13:01:22.000000000","message":"yes. I considered giving FakeSwift a dict of policy indexes to apply, but that\u0027s nothing like real swift.","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cb9c1a4f062619ccf567ad9636dcff1f6b75f0ab","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        headers.setdefault(\u0027X-Backend-Storage-Policy-Index\u0027,"},{"line_number":138,"context_line":"                           str(bucket_policy_index))"},{"line_number":139,"context_line":"        self.swift.register(\u0027HEAD\u0027, \u0027/v1/AUTH_test/\u0027 + bucket,"},{"line_number":140,"context_line":"                            swob.HTTPNoContent, headers, None)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _assert_policy_index(self, req_headers, resp_headers, policy_index):"},{"line_number":143,"context_line":"        self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req_headers)"}],"source_content_type":"text/x-python","patch_set":14,"id":"53c5f88a_40cca2f4","line":140,"in_reply_to":"e1eafbfc_3bb598bb","updated":"2023-11-14 18:17:41.000000000","message":"Done","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":142,"context_line":"    def _assert_policy_index(self, req_headers, resp_headers, policy_index):"},{"line_number":143,"context_line":"        self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req_headers)"},{"line_number":144,"context_line":"        self.assertEqual(resp_headers.get(\u0027X-Backend-Storage-Policy-Index\u0027),"},{"line_number":145,"context_line":"                         str(policy_index))"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _get_error_code(self, body):"},{"line_number":148,"context_line":"        elem \u003d fromstring(body, \u0027Error\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"e9f93732_b5091743","line":145,"updated":"2023-11-13 20:09:24.000000000","message":"i got what felt like a number pf \"unrelated\" test failures (~30) in test_multi_upload with these asserts when I reverted the fix across the 3 files in swift/common/mw/s3api\n\nsomething like\n\n\tdiff --git a/test/unit/common/middleware/s3api/__init__.py b/test/unit/common/middleware/s3api/__init__.py\n\tindex 1781c1f45..04c46b83c 100644\n\t--- a/test/unit/common/middleware/s3api/__init__.py\n\t+++ b/test/unit/common/middleware/s3api/__init__.py\n\t@@ -20,6 +20,7 @@ import mock\n\t import time\n\t \n\t from swift.common import swob\n\t+from swift.common.utils import get_policy_index\n\t \n\t from swift.common.middleware.s3api.s3api import filter_factory\n\t from swift.common.middleware.s3api.etree import fromstring\n\t@@ -140,9 +141,11 @@ class S3ApiTestCase(unittest.TestCase):\n\t\t\t\t     swob.HTTPNoContent, headers, None)\n\t \n\t     def _assert_policy_index(self, req_headers, resp_headers, policy_index):\n\t-        self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req_headers)\n\t-        self.assertEqual(resp_headers.get(\u0027X-Backend-Storage-Policy-Index\u0027),\n\t-                         str(policy_index))\n\t+        self.assertEqual(policy_index, int(get_policy_index(\n\t+            req_headers, resp_headers)))\n\t+        # self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req_headers)\n\t+        # self.assertEqual(resp_headers.get(\u0027X-Backend-Storage-Policy-Index\u0027),\n\t+        #                  str(policy_index))\n\t \n\t     def _get_error_code(self, body):\n\t\t elem \u003d fromstring(body, \u0027Error\u0027)\n\nmight be a little less \"on the nose\" - but not necessarily \"better\" since here this change does have a prescribed strategy for propogating the spi to proxy_logging i.e. use the resp headers!","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cb9c1a4f062619ccf567ad9636dcff1f6b75f0ab","unresolved":false,"context_lines":[{"line_number":142,"context_line":"    def _assert_policy_index(self, req_headers, resp_headers, policy_index):"},{"line_number":143,"context_line":"        self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req_headers)"},{"line_number":144,"context_line":"        self.assertEqual(resp_headers.get(\u0027X-Backend-Storage-Policy-Index\u0027),"},{"line_number":145,"context_line":"                         str(policy_index))"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _get_error_code(self, body):"},{"line_number":148,"context_line":"        elem \u003d fromstring(body, \u0027Error\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"29132794_fe4f94b9","line":145,"in_reply_to":"972c5520_7d579814","updated":"2023-11-14 18:17:41.000000000","message":"Ack","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":true,"context_lines":[{"line_number":142,"context_line":"    def _assert_policy_index(self, req_headers, resp_headers, policy_index):"},{"line_number":143,"context_line":"        self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req_headers)"},{"line_number":144,"context_line":"        self.assertEqual(resp_headers.get(\u0027X-Backend-Storage-Policy-Index\u0027),"},{"line_number":145,"context_line":"                         str(policy_index))"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _get_error_code(self, body):"},{"line_number":148,"context_line":"        elem \u003d fromstring(body, \u0027Error\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"972c5520_7d579814","line":145,"in_reply_to":"e9f93732_b5091743","updated":"2023-11-14 13:01:22.000000000","message":"I think I prefer the original. In conversations I think I\u0027ve heard consensus that the ideal place to communicate the SPI is in the *response* headers - ideally we\u0027d like object response to do that, for example. So having made the effort to have s3api do \"the right thing\" I think it\u0027s worth asserting that precisely. The bug we\u0027re fixing was s3api shooting itself in the foot by mutating the request SPI internally, so let\u0027s be sure s3api doesn\u0027t shoot some other middleware in the foot by mutating the request.","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"}],"test/unit/common/middleware/s3api/test_bucket.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2752aa86be3a139bac120506b655801db5ce0f8c","unresolved":true,"context_lines":[{"line_number":239,"context_line":"                            environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027GET\u0027},"},{"line_number":240,"context_line":"                            headers\u003d{\u0027Authorization\u0027: \u0027AWS test:tester:hmac\u0027,"},{"line_number":241,"context_line":"                                     \u0027Date\u0027: self.get_date_header()})"},{"line_number":242,"context_line":"        self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req.headers)"},{"line_number":243,"context_line":"        status, headers, body \u003d self.call_s3api(req)"},{"line_number":244,"context_line":"        self.assertEqual(status.split()[0], \u0027200\u0027)"},{"line_number":245,"context_line":"        self._assert_policy_index(req.headers, headers, 3)"}],"source_content_type":"text/x-python","patch_set":9,"id":"97003332_f3411ef0","line":242,"updated":"2023-10-16 21:06:22.000000000","message":"this assert (and others like it) seems a little strange to be because we just created the request and haven\u0027t called the app yet - not sure what it\u0027s trying to signal?","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                            environ\u003d{\u0027REQUEST_METHOD\u0027: \u0027GET\u0027},"},{"line_number":240,"context_line":"                            headers\u003d{\u0027Authorization\u0027: \u0027AWS test:tester:hmac\u0027,"},{"line_number":241,"context_line":"                                     \u0027Date\u0027: self.get_date_header()})"},{"line_number":242,"context_line":"        self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req.headers)"},{"line_number":243,"context_line":"        status, headers, body \u003d self.call_s3api(req)"},{"line_number":244,"context_line":"        self.assertEqual(status.split()[0], \u0027200\u0027)"},{"line_number":245,"context_line":"        self._assert_policy_index(req.headers, headers, 3)"}],"source_content_type":"text/x-python","patch_set":9,"id":"2fd77ff4_91227c35","line":242,"in_reply_to":"97003332_f3411ef0","updated":"2023-11-13 18:52:29.000000000","message":"err, IIUC you suggested it :) https://review.opendev.org/c/openstack/swift/+/897864/comment/51c16d74_6f3bad92/\n\nbut I agree, it is pretty redundant. will fix.","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":154,"context_line":"        self.assertEqual(1, len(access_lines))"},{"line_number":155,"context_line":"        parts \u003d access_lines[0].split()"},{"line_number":156,"context_line":"        self.assertEqual(\u0027 \u0027.join(parts[3:7]), \u0027HEAD /junk HTTP/1.0 200\u0027)"},{"line_number":157,"context_line":"        self.assertEqual(parts[-1], str(bucket_policy_index))"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def test_bucket_HEAD_policy_index_logging(self):"},{"line_number":160,"context_line":"        self._do_test_bucket_HEAD_policy_index_logging(0)"}],"source_content_type":"text/x-python","patch_set":14,"id":"fca314d9_44ba961c","line":157,"updated":"2023-11-13 20:09:24.000000000","message":"master:\n\n\tNov 13 19:33:24 saio proxy-server: 127.0.0.1 127.0.0.1 13/Nov/2023/19/33/24 HEAD /v1/AUTH_test/s3test%3Fformat%3Djson%26states%3Dlisting HTTP/1.0 204 - aws-cli/1.29.51%20md/Botocore%231.31.51%20ua/2.0%20os/linux%235.4.0-166-generic%20md/arch%23x86_64%20lang/python%233.8.10%20md/pyimpl%23CPython%20cfg/retry-mode%23legacy%20botocore/1.31.51 - - - - txc5249eb5c39c489bafe9f-0065527a04 - 0.0104 S3 - 1699904004.502532959 1699904004.512901545 0\n\tNov 13 19:33:24 saio proxy-server: 127.0.0.1 127.0.0.1 13/Nov/2023/19/33/24 HEAD /s3test HTTP/1.0 200 - aws-cli/1.29.51%20md/Botocore%231.31.51%20ua/2.0%20os/linux%235.4.0-166-generic%20md/arch%23x86_64%20lang/python%233.8.10%20md/pyimpl%23CPython%20cfg/retry-mode%23legacy%20botocore/1.31.51 - - - - txc5249eb5c39c489bafe9f-0065527a04 - 0.0159 - - 1699904004.499068022 1699904004.514937639 -\nafter:\n\n\tNov 13 19:34:41 saio proxy-server: 127.0.0.1 127.0.0.1 13/Nov/2023/19/34/41 HEAD /v1/AUTH_test/s3test%3Fformat%3Djson%26states%3Dlisting HTTP/1.0 204 - aws-cli/1.29.51%20md/Botocore%231.31.51%20ua/2.0%20os/linux%235.4.0-166-generic%20md/arch%23x86_64%20lang/python%233.8.10%20md/pyimpl%23CPython%20cfg/retry-mode%23legacy%20botocore/1.31.51 - - - - txf57888a5f5c74426a514a-0065527a51 - 0.0129 S3 - 1699904081.877562284 1699904081.890453577 0\n\tNov 13 19:34:41 saio proxy-server: removed response headers: [(\u0027X-Backend-Storage-Policy-Index\u0027, \u00270\u0027)] (txn: txf57888a5f5c74426a514a-0065527a51) (client_ip: 127.0.0.1)\n\tNov 13 19:34:41 saio proxy-server: 127.0.0.1 127.0.0.1 13/Nov/2023/19/34/41 HEAD /s3test HTTP/1.0 200 - aws-cli/1.29.51%20md/Botocore%231.31.51%20ua/2.0%20os/linux%235.4.0-166-generic%20md/arch%23x86_64%20lang/python%233.8.10%20md/pyimpl%23CPython%20cfg/retry-mode%23legacy%20botocore/1.31.51 - - - - txf57888a5f5c74426a514a-0065527a51 - 0.0292 - - 1699904081.864635468 1699904081.893826723 0\n\nthat is to say: we\u0027ve also fixed spi logging on bucket reqeusts to better match the swift request logging (\u00270\u0027 instead of \u0027-\u0027)","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cb9c1a4f062619ccf567ad9636dcff1f6b75f0ab","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        self.assertEqual(1, len(access_lines))"},{"line_number":155,"context_line":"        parts \u003d access_lines[0].split()"},{"line_number":156,"context_line":"        self.assertEqual(\u0027 \u0027.join(parts[3:7]), \u0027HEAD /junk HTTP/1.0 200\u0027)"},{"line_number":157,"context_line":"        self.assertEqual(parts[-1], str(bucket_policy_index))"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def test_bucket_HEAD_policy_index_logging(self):"},{"line_number":160,"context_line":"        self._do_test_bucket_HEAD_policy_index_logging(0)"}],"source_content_type":"text/x-python","patch_set":14,"id":"13075066_31edab99","line":157,"in_reply_to":"3440ea2c_4f039ad3","updated":"2023-11-14 18:17:41.000000000","message":"Ack","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":true,"context_lines":[{"line_number":154,"context_line":"        self.assertEqual(1, len(access_lines))"},{"line_number":155,"context_line":"        parts \u003d access_lines[0].split()"},{"line_number":156,"context_line":"        self.assertEqual(\u0027 \u0027.join(parts[3:7]), \u0027HEAD /junk HTTP/1.0 200\u0027)"},{"line_number":157,"context_line":"        self.assertEqual(parts[-1], str(bucket_policy_index))"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def test_bucket_HEAD_policy_index_logging(self):"},{"line_number":160,"context_line":"        self._do_test_bucket_HEAD_policy_index_logging(0)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3440ea2c_4f039ad3","line":157,"in_reply_to":"fca314d9_44ba961c","updated":"2023-11-14 13:01:22.000000000","message":"aah, now I understand your comment in the commit message 😊\n\nOn master we only look in the request headers, and bucket request headers don\u0027t have an SPI","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"}],"test/unit/common/middleware/s3api/test_multi_upload.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ec7268c6f6ac9371f7e8eac4e2df01438f1cc247","unresolved":true,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"class TestS3ApiMultiUpload(S3ApiTestCase):"},{"line_number":96,"context_line":"    SEGMENT_BUCKET_POLICY_INDEX \u003d 99"},{"line_number":97,"context_line":"    BUCKET_POLICY_INDEX \u003d 11"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def setUp(self):"},{"line_number":100,"context_line":"        super(TestS3ApiMultiUpload, self).setUp()"}],"source_content_type":"text/x-python","patch_set":1,"id":"eb20d2e8_c30c00b0","line":97,"updated":"2023-10-10 18:35:19.000000000","message":"this seems like it may be related to something a little more specific - maybe better to do something more targeted in these tests or squash it all together.","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1241cfa9e21e84e4f165bd7406251c07b0b14069","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"class TestS3ApiMultiUpload(S3ApiTestCase):"},{"line_number":96,"context_line":"    SEGMENT_BUCKET_POLICY_INDEX \u003d 99"},{"line_number":97,"context_line":"    BUCKET_POLICY_INDEX \u003d 11"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def setUp(self):"},{"line_number":100,"context_line":"        super(TestS3ApiMultiUpload, self).setUp()"}],"source_content_type":"text/x-python","patch_set":1,"id":"6d2abf38_8abc2b93","line":97,"in_reply_to":"eb20d2e8_c30c00b0","updated":"2023-10-12 17:22:58.000000000","message":"Done","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ec7268c6f6ac9371f7e8eac4e2df01438f1cc247","unresolved":true,"context_lines":[{"line_number":116,"context_line":"                   for item in OBJECTS_TEMPLATE]"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        self.swift.register(\u0027HEAD\u0027, \u0027/v1/AUTH_test/bucket\u0027, swob.HTTPOk,"},{"line_number":119,"context_line":"                            manifest_bucket_headers, None)"},{"line_number":120,"context_line":"        self.swift.register(\u0027PUT\u0027, \u0027/v1/AUTH_test/bucket/object\u0027,"},{"line_number":121,"context_line":"                            swob.HTTPCreated, manifest_bucket_headers, None)"},{"line_number":122,"context_line":"        self.swift.register(\u0027PUT\u0027, self.segment_bucket,"}],"source_content_type":"text/x-python","patch_set":1,"id":"4768d62e_1be6984f","line":119,"updated":"2023-10-10 18:35:19.000000000","message":"this makes sense, of course container responses have to include the storage policy index.","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d5fb1ca6975d79a4d16e9f6573c3a35e104fd469","unresolved":false,"context_lines":[{"line_number":116,"context_line":"                   for item in OBJECTS_TEMPLATE]"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        self.swift.register(\u0027HEAD\u0027, \u0027/v1/AUTH_test/bucket\u0027, swob.HTTPOk,"},{"line_number":119,"context_line":"                            manifest_bucket_headers, None)"},{"line_number":120,"context_line":"        self.swift.register(\u0027PUT\u0027, \u0027/v1/AUTH_test/bucket/object\u0027,"},{"line_number":121,"context_line":"                            swob.HTTPCreated, manifest_bucket_headers, None)"},{"line_number":122,"context_line":"        self.swift.register(\u0027PUT\u0027, self.segment_bucket,"}],"source_content_type":"text/x-python","patch_set":1,"id":"a8b0ff36_6098fed0","line":119,"in_reply_to":"4768d62e_1be6984f","updated":"2023-10-13 11:16:35.000000000","message":"Ack","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ec7268c6f6ac9371f7e8eac4e2df01438f1cc247","unresolved":true,"context_lines":[{"line_number":118,"context_line":"        self.swift.register(\u0027HEAD\u0027, \u0027/v1/AUTH_test/bucket\u0027, swob.HTTPOk,"},{"line_number":119,"context_line":"                            manifest_bucket_headers, None)"},{"line_number":120,"context_line":"        self.swift.register(\u0027PUT\u0027, \u0027/v1/AUTH_test/bucket/object\u0027,"},{"line_number":121,"context_line":"                            swob.HTTPCreated, manifest_bucket_headers, None)"},{"line_number":122,"context_line":"        self.swift.register(\u0027PUT\u0027, self.segment_bucket,"},{"line_number":123,"context_line":"                            swob.HTTPAccepted, segment_bucket_headers, None)"},{"line_number":124,"context_line":"        # default to just returning everybody..."}],"source_content_type":"text/x-python","patch_set":1,"id":"2d0b4b3c_05d50cad","line":121,"updated":"2023-10-10 18:35:19.000000000","message":"so object PUT responses *do* include the storage policy?","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bd5f845e18d411a0ce607e2ec60eb8c809718ed5","unresolved":true,"context_lines":[{"line_number":118,"context_line":"        self.swift.register(\u0027HEAD\u0027, \u0027/v1/AUTH_test/bucket\u0027, swob.HTTPOk,"},{"line_number":119,"context_line":"                            manifest_bucket_headers, None)"},{"line_number":120,"context_line":"        self.swift.register(\u0027PUT\u0027, \u0027/v1/AUTH_test/bucket/object\u0027,"},{"line_number":121,"context_line":"                            swob.HTTPCreated, manifest_bucket_headers, None)"},{"line_number":122,"context_line":"        self.swift.register(\u0027PUT\u0027, self.segment_bucket,"},{"line_number":123,"context_line":"                            swob.HTTPAccepted, segment_bucket_headers, None)"},{"line_number":124,"context_line":"        # default to just returning everybody..."}],"source_content_type":"text/x-python","patch_set":1,"id":"495e4f99_f023f1c4","line":121,"in_reply_to":"2d0b4b3c_05d50cad","updated":"2023-10-11 18:46:30.000000000","message":"no, we know they do not.\n\nbut, WIP, and the object request *does* get annotated with an spi, and this serves to have FakeSwift do that.\n\nThe fact that I even could use FakeSwift resp headers to annotate the request in this way is suspect.","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        self.swift.register(\u0027HEAD\u0027, \u0027/v1/AUTH_test/bucket\u0027, swob.HTTPOk,"},{"line_number":119,"context_line":"                            manifest_bucket_headers, None)"},{"line_number":120,"context_line":"        self.swift.register(\u0027PUT\u0027, \u0027/v1/AUTH_test/bucket/object\u0027,"},{"line_number":121,"context_line":"                            swob.HTTPCreated, manifest_bucket_headers, None)"},{"line_number":122,"context_line":"        self.swift.register(\u0027PUT\u0027, self.segment_bucket,"},{"line_number":123,"context_line":"                            swob.HTTPAccepted, segment_bucket_headers, None)"},{"line_number":124,"context_line":"        # default to just returning everybody..."}],"source_content_type":"text/x-python","patch_set":1,"id":"566d6dbc_42f6ae68","line":121,"in_reply_to":"495e4f99_f023f1c4","updated":"2023-11-13 18:52:29.000000000","message":"Done","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ec7268c6f6ac9371f7e8eac4e2df01438f1cc247","unresolved":true,"context_lines":[{"line_number":120,"context_line":"        self.swift.register(\u0027PUT\u0027, \u0027/v1/AUTH_test/bucket/object\u0027,"},{"line_number":121,"context_line":"                            swob.HTTPCreated, manifest_bucket_headers, None)"},{"line_number":122,"context_line":"        self.swift.register(\u0027PUT\u0027, self.segment_bucket,"},{"line_number":123,"context_line":"                            swob.HTTPAccepted, segment_bucket_headers, None)"},{"line_number":124,"context_line":"        # default to just returning everybody..."},{"line_number":125,"context_line":"        self.swift.register(\u0027GET\u0027, self.segment_bucket, swob.HTTPOk,"},{"line_number":126,"context_line":"                            segment_bucket_headers, json.dumps(objects))"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ac4fb91_c48c2041","line":123,"updated":"2023-10-10 18:35:19.000000000","message":"seems legit\n\n```\nvagrant@saio:~$ curl http://127.0.0.2:6021/sdb2/28/AUTH_test/test3 -XPUT -H \"x-timestamp: $(date +%s)\" -v -H \u0027x-backend-storage-policy-index: 1\u0027\n*   Trying 127.0.0.2:6021...\n* TCP_NODELAY set\n* Connected to 127.0.0.2 (127.0.0.2) port 6021 (#0)\n\u003e PUT /sdb2/28/AUTH_test/test3 HTTP/1.1\n\u003e Host: 127.0.0.2:6021\n\u003e User-Agent: curl/7.68.0\n\u003e Accept: */*\n\u003e x-timestamp: 1696961813\n\u003e x-backend-storage-policy-index: 1\n\u003e \n* Mark bundle as not supporting multiuse\n\u003c HTTP/1.1 201 Created\n\u003c Content-Type: text/html; charset\u003dUTF-8\n\u003c X-Backend-Storage-Policy-Index: 1\n\u003c Content-Length: 0\n\u003c Date: Tue, 10 Oct 2023 18:16:53 GMT\n\u003c \n* Connection #0 to host 127.0.0.2 left intact\n```","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d5fb1ca6975d79a4d16e9f6573c3a35e104fd469","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        self.swift.register(\u0027PUT\u0027, \u0027/v1/AUTH_test/bucket/object\u0027,"},{"line_number":121,"context_line":"                            swob.HTTPCreated, manifest_bucket_headers, None)"},{"line_number":122,"context_line":"        self.swift.register(\u0027PUT\u0027, self.segment_bucket,"},{"line_number":123,"context_line":"                            swob.HTTPAccepted, segment_bucket_headers, None)"},{"line_number":124,"context_line":"        # default to just returning everybody..."},{"line_number":125,"context_line":"        self.swift.register(\u0027GET\u0027, self.segment_bucket, swob.HTTPOk,"},{"line_number":126,"context_line":"                            segment_bucket_headers, json.dumps(objects))"}],"source_content_type":"text/x-python","patch_set":1,"id":"eca728ab_4e7e7df2","line":123,"in_reply_to":"7ac4fb91_c48c2041","updated":"2023-10-13 11:16:35.000000000","message":"Ack","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ec7268c6f6ac9371f7e8eac4e2df01438f1cc247","unresolved":true,"context_lines":[{"line_number":155,"context_line":"        self.swift.register(\u0027DELETE\u0027, self.segment_bucket + \u0027/object/X\u0027,"},{"line_number":156,"context_line":"                            swob.HTTPNoContent, segment_bucket_headers, None)"},{"line_number":157,"context_line":"        self.swift.register(\u0027GET\u0027, self.segment_bucket + \u0027/object/invalid\u0027,"},{"line_number":158,"context_line":"                            swob.HTTPNotFound, segment_bucket_headers, None)"},{"line_number":159,"context_line":"        self.swift.register(\u0027PUT\u0027, self.segment_bucket + \u0027/object/X/1\u0027,"},{"line_number":160,"context_line":"                            swob.HTTPCreated, put_headers, None)"},{"line_number":161,"context_line":"        self.swift.register(\u0027DELETE\u0027, self.segment_bucket + \u0027/object/X/1\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"bd51205e_d2c245c1","line":158,"updated":"2023-10-10 18:35:19.000000000","message":"404 is going to specify storage policy index!?  not from the object-server:\n\n```\nvagrant@saio:~$ curl http://127.0.0.2:6020/sdb2/40/AUTH_test/test/foo -v -H \u0027x-backend-storage-policy-index: 1\u0027\n*   Trying 127.0.0.2:6020...\n* TCP_NODELAY set\n* Connected to 127.0.0.2 (127.0.0.2) port 6020 (#0)\n\u003e GET /sdb2/40/AUTH_test/test/foo HTTP/1.1\n\u003e Host: 127.0.0.2:6020\n\u003e User-Agent: curl/7.68.0\n\u003e Accept: */*\n\u003e x-backend-storage-policy-index: 1\n\u003e \n* Mark bundle as not supporting multiuse\n\u003c HTTP/1.1 404 Not Found\n\u003c Content-Type: text/html; charset\u003dUTF-8\n\u003c Content-Length: 70\n\u003c Date: Tue, 10 Oct 2023 18:19:47 GMT\n\u003c \n* Connection #0 to host 127.0.0.2 left intact\n\u003chtml\u003e\u003ch1\u003eNot Found\u003c/h1\u003e\u003cp\u003eThe resource could not be found.\u003c/p\u003e\u003c/html\u003evagrant@saio:~$ \n```\n\nis the proxy server doing this!?","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bd5f845e18d411a0ce607e2ec60eb8c809718ed5","unresolved":true,"context_lines":[{"line_number":155,"context_line":"        self.swift.register(\u0027DELETE\u0027, self.segment_bucket + \u0027/object/X\u0027,"},{"line_number":156,"context_line":"                            swob.HTTPNoContent, segment_bucket_headers, None)"},{"line_number":157,"context_line":"        self.swift.register(\u0027GET\u0027, self.segment_bucket + \u0027/object/invalid\u0027,"},{"line_number":158,"context_line":"                            swob.HTTPNotFound, segment_bucket_headers, None)"},{"line_number":159,"context_line":"        self.swift.register(\u0027PUT\u0027, self.segment_bucket + \u0027/object/X/1\u0027,"},{"line_number":160,"context_line":"                            swob.HTTPCreated, put_headers, None)"},{"line_number":161,"context_line":"        self.swift.register(\u0027DELETE\u0027, self.segment_bucket + \u0027/object/X/1\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"ea84876e_802d491b","line":158,"in_reply_to":"bd51205e_d2c245c1","updated":"2023-10-11 18:46:30.000000000","message":"no, as above, this is abusing suspect FakeSwift behavior to get a *request* spi header","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1241cfa9e21e84e4f165bd7406251c07b0b14069","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        self.swift.register(\u0027DELETE\u0027, self.segment_bucket + \u0027/object/X\u0027,"},{"line_number":156,"context_line":"                            swob.HTTPNoContent, segment_bucket_headers, None)"},{"line_number":157,"context_line":"        self.swift.register(\u0027GET\u0027, self.segment_bucket + \u0027/object/invalid\u0027,"},{"line_number":158,"context_line":"                            swob.HTTPNotFound, segment_bucket_headers, None)"},{"line_number":159,"context_line":"        self.swift.register(\u0027PUT\u0027, self.segment_bucket + \u0027/object/X/1\u0027,"},{"line_number":160,"context_line":"                            swob.HTTPCreated, put_headers, None)"},{"line_number":161,"context_line":"        self.swift.register(\u0027DELETE\u0027, self.segment_bucket + \u0027/object/X/1\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"fd8ac972_7e0b1f0d","line":158,"in_reply_to":"ea84876e_802d491b","updated":"2023-10-12 17:22:58.000000000","message":"Done","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2713c247500fa6bdea2cf9c411c61fe76745d378","unresolved":true,"context_lines":[{"line_number":1064,"context_line":"            status, headers, body \u003d self.call_s3api(req)"},{"line_number":1065,"context_line":"        self.assertEqual(self._get_error_code(body), \u0027NoSuchBucket\u0027)"},{"line_number":1066,"context_line":""},{"line_number":1067,"context_line":"    def _do_test_object_multipart_upload_complete(self):"},{"line_number":1068,"context_line":"        content_md5 \u003d base64.b64encode(md5("},{"line_number":1069,"context_line":"            XML.encode(\u0027ascii\u0027), usedforsecurity\u003dFalse).digest())"},{"line_number":1070,"context_line":"        req \u003d Request.blank(\u0027/bucket/object?uploadId\u003dX\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3431bda3_6f9611b3","line":1067,"updated":"2023-10-10 18:01:57.000000000","message":"TODO: add assertions for init multipart and part upload","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d5fb1ca6975d79a4d16e9f6573c3a35e104fd469","unresolved":false,"context_lines":[{"line_number":1064,"context_line":"            status, headers, body \u003d self.call_s3api(req)"},{"line_number":1065,"context_line":"        self.assertEqual(self._get_error_code(body), \u0027NoSuchBucket\u0027)"},{"line_number":1066,"context_line":""},{"line_number":1067,"context_line":"    def _do_test_object_multipart_upload_complete(self):"},{"line_number":1068,"context_line":"        content_md5 \u003d base64.b64encode(md5("},{"line_number":1069,"context_line":"            XML.encode(\u0027ascii\u0027), usedforsecurity\u003dFalse).digest())"},{"line_number":1070,"context_line":"        req \u003d Request.blank(\u0027/bucket/object?uploadId\u003dX\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7b26a4bd_5b8092bc","line":1067,"in_reply_to":"3431bda3_6f9611b3","updated":"2023-10-13 11:16:35.000000000","message":"Done","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ec7268c6f6ac9371f7e8eac4e2df01438f1cc247","unresolved":true,"context_lines":[{"line_number":1072,"context_line":"                            headers\u003d{\u0027Authorization\u0027: \u0027AWS test:tester:hmac\u0027,"},{"line_number":1073,"context_line":"                                     \u0027Date\u0027: self.get_date_header(),"},{"line_number":1074,"context_line":"                                     \u0027Content-MD5\u0027: content_md5, },"},{"line_number":1075,"context_line":"                            body\u003dXML)"},{"line_number":1076,"context_line":"        status, headers, body \u003d self.call_s3api(req)"},{"line_number":1077,"context_line":"        elem \u003d fromstring(body, \u0027CompleteMultipartUploadResult\u0027)"},{"line_number":1078,"context_line":"        self.assertNotIn(\u0027Etag\u0027, headers)"}],"source_content_type":"text/x-python","patch_set":1,"id":"51c16d74_6f3bad92","line":1075,"updated":"2023-10-10 18:35:19.000000000","message":"maybe sanity `\u0027x-backen-spi\u0027 not in req.headers` before the call","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1241cfa9e21e84e4f165bd7406251c07b0b14069","unresolved":false,"context_lines":[{"line_number":1072,"context_line":"                            headers\u003d{\u0027Authorization\u0027: \u0027AWS test:tester:hmac\u0027,"},{"line_number":1073,"context_line":"                                     \u0027Date\u0027: self.get_date_header(),"},{"line_number":1074,"context_line":"                                     \u0027Content-MD5\u0027: content_md5, },"},{"line_number":1075,"context_line":"                            body\u003dXML)"},{"line_number":1076,"context_line":"        status, headers, body \u003d self.call_s3api(req)"},{"line_number":1077,"context_line":"        elem \u003d fromstring(body, \u0027CompleteMultipartUploadResult\u0027)"},{"line_number":1078,"context_line":"        self.assertNotIn(\u0027Etag\u0027, headers)"}],"source_content_type":"text/x-python","patch_set":1,"id":"be179382_94c6c304","line":1075,"in_reply_to":"0a0cdcdb_fcb78bcb","updated":"2023-10-12 17:22:58.000000000","message":"Done","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bd5f845e18d411a0ce607e2ec60eb8c809718ed5","unresolved":true,"context_lines":[{"line_number":1072,"context_line":"                            headers\u003d{\u0027Authorization\u0027: \u0027AWS test:tester:hmac\u0027,"},{"line_number":1073,"context_line":"                                     \u0027Date\u0027: self.get_date_header(),"},{"line_number":1074,"context_line":"                                     \u0027Content-MD5\u0027: content_md5, },"},{"line_number":1075,"context_line":"                            body\u003dXML)"},{"line_number":1076,"context_line":"        status, headers, body \u003d self.call_s3api(req)"},{"line_number":1077,"context_line":"        elem \u003d fromstring(body, \u0027CompleteMultipartUploadResult\u0027)"},{"line_number":1078,"context_line":"        self.assertNotIn(\u0027Etag\u0027, headers)"}],"source_content_type":"text/x-python","patch_set":1,"id":"0a0cdcdb_fcb78bcb","line":1075,"in_reply_to":"51c16d74_6f3bad92","updated":"2023-10-11 18:46:30.000000000","message":"ack, still to do","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2713c247500fa6bdea2cf9c411c61fe76745d378","unresolved":true,"context_lines":[{"line_number":1079,"context_line":"        self.assertEqual(elem.find(\u0027ETag\u0027).text, S3_ETAG)"},{"line_number":1080,"context_line":"        self.assertEqual(status.split()[0], \u0027200\u0027)"},{"line_number":1081,"context_line":"        self.assertEqual(str(self.BUCKET_POLICY_INDEX),"},{"line_number":1082,"context_line":"                         req.headers.get(\u0027X-Backend-Storage-Policy-Index\u0027))"},{"line_number":1083,"context_line":""},{"line_number":1084,"context_line":"        self.assertEqual(self.swift.calls, ["},{"line_number":1085,"context_line":"            # Bucket exists"}],"source_content_type":"text/x-python","patch_set":1,"id":"b134cafd_2eb2e25b","line":1082,"updated":"2023-10-10 18:01:57.000000000","message":"this will fail on master - currently the segments bucket spi is logged","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d5fb1ca6975d79a4d16e9f6573c3a35e104fd469","unresolved":false,"context_lines":[{"line_number":1079,"context_line":"        self.assertEqual(elem.find(\u0027ETag\u0027).text, S3_ETAG)"},{"line_number":1080,"context_line":"        self.assertEqual(status.split()[0], \u0027200\u0027)"},{"line_number":1081,"context_line":"        self.assertEqual(str(self.BUCKET_POLICY_INDEX),"},{"line_number":1082,"context_line":"                         req.headers.get(\u0027X-Backend-Storage-Policy-Index\u0027))"},{"line_number":1083,"context_line":""},{"line_number":1084,"context_line":"        self.assertEqual(self.swift.calls, ["},{"line_number":1085,"context_line":"            # Bucket exists"}],"source_content_type":"text/x-python","patch_set":1,"id":"8fdf7397_d80a2daf","line":1082,"in_reply_to":"b134cafd_2eb2e25b","updated":"2023-10-13 11:16:35.000000000","message":"Ack","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2752aa86be3a139bac120506b655801db5ce0f8c","unresolved":true,"context_lines":[{"line_number":758,"context_line":"            segment_bucket_policy_index \u003d bucket_policy_index"},{"line_number":759,"context_line":"        self._register_bucket_policy(\u0027bucket\u0027, bucket_policy_index)"},{"line_number":760,"context_line":"        self._register_bucket_policy(\u0027bucket+segments\u0027,"},{"line_number":761,"context_line":"                                     segment_bucket_policy_index)"},{"line_number":762,"context_line":"        headers.update({"},{"line_number":763,"context_line":"            \u0027Authorization\u0027: \u0027AWS test:tester:hmac\u0027,"},{"line_number":764,"context_line":"            \u0027Date\u0027: self.get_date_header(),"}],"source_content_type":"text/x-python","patch_set":9,"id":"92c7fd86_aa85c41a","line":761,"updated":"2023-10-16 21:06:22.000000000","message":"some callers seemed to setup some specific cache/HEAD state before calling this method; I\u0027m nervos about overwriting that - but I guess it\u0027s working.","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":758,"context_line":"            segment_bucket_policy_index \u003d bucket_policy_index"},{"line_number":759,"context_line":"        self._register_bucket_policy(\u0027bucket\u0027, bucket_policy_index)"},{"line_number":760,"context_line":"        self._register_bucket_policy(\u0027bucket+segments\u0027,"},{"line_number":761,"context_line":"                                     segment_bucket_policy_index)"},{"line_number":762,"context_line":"        headers.update({"},{"line_number":763,"context_line":"            \u0027Authorization\u0027: \u0027AWS test:tester:hmac\u0027,"},{"line_number":764,"context_line":"            \u0027Date\u0027: self.get_date_header(),"}],"source_content_type":"text/x-python","patch_set":9,"id":"bab28b48_74f79802","line":761,"in_reply_to":"92c7fd86_aa85c41a","updated":"2023-11-13 18:52:29.000000000","message":"some tests set the bucket+segments status to 404 in cache, but there\u0027s already a 200 GET registered for that bucket in setUp. The FakeSwift registration won\u0027t override the cache response. But all the fakery is a little scary.","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2752aa86be3a139bac120506b655801db5ce0f8c","unresolved":true,"context_lines":[{"line_number":834,"context_line":"        fake_memcache.store[get_cache_key("},{"line_number":835,"context_line":"            \u0027AUTH_test\u0027, \u0027bucket+segments\u0027)] \u003d {\u0027status\u0027: 204}"},{"line_number":836,"context_line":"        fake_memcache.store[get_cache_key("},{"line_number":837,"context_line":"            \u0027AUTH_test\u0027, \u0027bucket\u0027)] \u003d {\u0027status\u0027: 204}"},{"line_number":838,"context_line":"        self._test_object_multipart_upload_initiate("},{"line_number":839,"context_line":"            {}, fake_memcache, bucket_policy_index\u003d0,"},{"line_number":840,"context_line":"            segment_bucket_policy_index\u003d1)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3993600e_abb2ef70","line":837,"updated":"2023-10-16 21:06:22.000000000","message":"we have a couple of tests that seem to also be playing at pre-existing +segments state:\n\ntest_object_multipart_upload_initiate_s3acl_with_segment_bucket\ntest_object_multipart_upload_initiate_s3acl_with_cached_seg_buck","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":834,"context_line":"        fake_memcache.store[get_cache_key("},{"line_number":835,"context_line":"            \u0027AUTH_test\u0027, \u0027bucket+segments\u0027)] \u003d {\u0027status\u0027: 204}"},{"line_number":836,"context_line":"        fake_memcache.store[get_cache_key("},{"line_number":837,"context_line":"            \u0027AUTH_test\u0027, \u0027bucket\u0027)] \u003d {\u0027status\u0027: 204}"},{"line_number":838,"context_line":"        self._test_object_multipart_upload_initiate("},{"line_number":839,"context_line":"            {}, fake_memcache, bucket_policy_index\u003d0,"},{"line_number":840,"context_line":"            segment_bucket_policy_index\u003d1)"}],"source_content_type":"text/x-python","patch_set":9,"id":"0b1be56f_419088f6","line":837,"in_reply_to":"3993600e_abb2ef70","updated":"2023-11-13 18:52:29.000000000","message":"Done","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":834,"context_line":"        fake_memcache.store[get_cache_key("},{"line_number":835,"context_line":"            \u0027AUTH_test\u0027, \u0027bucket+segments\u0027)] \u003d {\u0027status\u0027: 204}"},{"line_number":836,"context_line":"        fake_memcache.store[get_cache_key("},{"line_number":837,"context_line":"            \u0027AUTH_test\u0027, \u0027bucket\u0027)] \u003d {\u0027status\u0027: 204}"},{"line_number":838,"context_line":"        self._test_object_multipart_upload_initiate("},{"line_number":839,"context_line":"            {}, fake_memcache, bucket_policy_index\u003d0,"},{"line_number":840,"context_line":"            segment_bucket_policy_index\u003d1)"}],"source_content_type":"text/x-python","patch_set":9,"id":"0ee3bcdb_d0a9b662","line":837,"in_reply_to":"3993600e_abb2ef70","updated":"2023-11-13 18:52:29.000000000","message":"Done","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":826,"context_line":"        fake_memcache.store[get_cache_key("},{"line_number":827,"context_line":"            \u0027AUTH_test\u0027, \u0027bucket+segments\u0027)] \u003d {\u0027status\u0027: 204}"},{"line_number":828,"context_line":"        fake_memcache.store[get_cache_key("},{"line_number":829,"context_line":"            \u0027AUTH_test\u0027, \u0027bucket\u0027)] \u003d {\u0027status\u0027: 204}"},{"line_number":830,"context_line":"        self._test_object_multipart_upload_initiate("},{"line_number":831,"context_line":"            {}, fake_memcache, bucket_policy_index\u003d0,"},{"line_number":832,"context_line":"            segment_bucket_policy_index\u003d1)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3cb0ce7b_86d455e8","line":829,"updated":"2023-11-13 20:09:24.000000000","message":"so the mw is looking at container_info to make decisions about *creating* the +segments bucket; but not which spi to use with the object requests (that\u0027s the proxy-app/fake-swift\u0027s job)","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":true,"context_lines":[{"line_number":826,"context_line":"        fake_memcache.store[get_cache_key("},{"line_number":827,"context_line":"            \u0027AUTH_test\u0027, \u0027bucket+segments\u0027)] \u003d {\u0027status\u0027: 204}"},{"line_number":828,"context_line":"        fake_memcache.store[get_cache_key("},{"line_number":829,"context_line":"            \u0027AUTH_test\u0027, \u0027bucket\u0027)] \u003d {\u0027status\u0027: 204}"},{"line_number":830,"context_line":"        self._test_object_multipart_upload_initiate("},{"line_number":831,"context_line":"            {}, fake_memcache, bucket_policy_index\u003d0,"},{"line_number":832,"context_line":"            segment_bucket_policy_index\u003d1)"}],"source_content_type":"text/x-python","patch_set":14,"id":"4253f2ad_f2b83388","line":829,"in_reply_to":"3cb0ce7b_86d455e8","updated":"2023-11-14 13:01:22.000000000","message":"This separation of setting up FakeMemcache vs FakeSwift is hairy :/ Why do we use FakeMemcache in this way - is it just to avoid registering more FakeSwift responses?? Probably not that simple - we\u0027re checking that s3api uses container_info.","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"cb9c1a4f062619ccf567ad9636dcff1f6b75f0ab","unresolved":false,"context_lines":[{"line_number":826,"context_line":"        fake_memcache.store[get_cache_key("},{"line_number":827,"context_line":"            \u0027AUTH_test\u0027, \u0027bucket+segments\u0027)] \u003d {\u0027status\u0027: 204}"},{"line_number":828,"context_line":"        fake_memcache.store[get_cache_key("},{"line_number":829,"context_line":"            \u0027AUTH_test\u0027, \u0027bucket\u0027)] \u003d {\u0027status\u0027: 204}"},{"line_number":830,"context_line":"        self._test_object_multipart_upload_initiate("},{"line_number":831,"context_line":"            {}, fake_memcache, bucket_policy_index\u003d0,"},{"line_number":832,"context_line":"            segment_bucket_policy_index\u003d1)"}],"source_content_type":"text/x-python","patch_set":14,"id":"f175b655_23f73546","line":829,"in_reply_to":"4253f2ad_f2b83388","updated":"2023-11-14 18:17:41.000000000","message":"Ack","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":1173,"context_line":"        # s3api doesn\u0027t set storage policy index on backend requests"},{"line_number":1174,"context_line":"        spi \u003d [hdrs.get(\u0027X-Backend-Storage-Policy-Index\u0027)"},{"line_number":1175,"context_line":"               for _, _, hdrs in self.swift.calls_with_headers]"},{"line_number":1176,"context_line":"        self.assertEqual(spi, [None] * 5)"},{"line_number":1177,"context_line":""},{"line_number":1178,"context_line":"    def test_object_multipart_upload_complete(self):"},{"line_number":1179,"context_line":"        self._do_test_object_multipart_upload_complete()"}],"source_content_type":"text/x-python","patch_set":14,"id":"c430b262_54f5c77b","line":1176,"updated":"2023-11-13 20:09:24.000000000","message":"this is pretty strong assertion on the behavior we want - don\u0027t pollute backend sub-requests with spi; not our job!\n\n\tswift/test/unit/common/middleware/s3api/test_multi_upload.py:1176: in _do_test_object_multipart_upload_complete\n\t    self.assertEqual(spi, [None] * 5)\n\tE   AssertionError: Lists differ: [None, None, None, \u00270\u0027, \u00270\u0027] !\u003d [None, None, None, None, None]\n\tE   \n\tE   First differing element 3:\n\tE   \u00270\u0027\n\tE   None\n\tE   \n\tE   - [None, None, None, \u00270\u0027, \u00270\u0027]\n\tE   ?                    ^^^  ^^^\n\tE   \n\tE   + [None, None, None, None, None]\n\tE   ?                    ^^^^  ^^^^","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":false,"context_lines":[{"line_number":1173,"context_line":"        # s3api doesn\u0027t set storage policy index on backend requests"},{"line_number":1174,"context_line":"        spi \u003d [hdrs.get(\u0027X-Backend-Storage-Policy-Index\u0027)"},{"line_number":1175,"context_line":"               for _, _, hdrs in self.swift.calls_with_headers]"},{"line_number":1176,"context_line":"        self.assertEqual(spi, [None] * 5)"},{"line_number":1177,"context_line":""},{"line_number":1178,"context_line":"    def test_object_multipart_upload_complete(self):"},{"line_number":1179,"context_line":"        self._do_test_object_multipart_upload_complete()"}],"source_content_type":"text/x-python","patch_set":14,"id":"0f15e5cc_30bfe75c","line":1176,"in_reply_to":"c430b262_54f5c77b","updated":"2023-11-14 13:01:22.000000000","message":"Ack","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"}],"test/unit/common/middleware/s3api/test_obj.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"ec7268c6f6ac9371f7e8eac4e2df01438f1cc247","unresolved":true,"context_lines":[{"line_number":193,"context_line":"        parts \u003d access_lines[0].split()"},{"line_number":194,"context_line":"        self.assertEqual(\u0027 \u0027.join(parts[3:7]),"},{"line_number":195,"context_line":"                         \u0027GET /bucket/object HTTP/1.0 200\u0027)"},{"line_number":196,"context_line":"        self.assertEqual(parts[-1], \u00272\u0027)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def _test_object_HEAD_Range(self, range_value):"},{"line_number":199,"context_line":"        req \u003d Request.blank(\u0027/bucket/object\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7c6d482e_70a57a0b","line":196,"updated":"2023-10-10 18:35:19.000000000","message":"oh wow, there\u0027s an existing test - we should add one in test_bucket too!","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bd5f845e18d411a0ce607e2ec60eb8c809718ed5","unresolved":true,"context_lines":[{"line_number":193,"context_line":"        parts \u003d access_lines[0].split()"},{"line_number":194,"context_line":"        self.assertEqual(\u0027 \u0027.join(parts[3:7]),"},{"line_number":195,"context_line":"                         \u0027GET /bucket/object HTTP/1.0 200\u0027)"},{"line_number":196,"context_line":"        self.assertEqual(parts[-1], \u00272\u0027)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def _test_object_HEAD_Range(self, range_value):"},{"line_number":199,"context_line":"        req \u003d Request.blank(\u0027/bucket/object\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"daacea54_e0c5b495","line":196,"in_reply_to":"7c6d482e_70a57a0b","updated":"2023-10-11 18:46:30.000000000","message":"we should add a bunch more asserts of swift.backend_path too","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1241cfa9e21e84e4f165bd7406251c07b0b14069","unresolved":false,"context_lines":[{"line_number":193,"context_line":"        parts \u003d access_lines[0].split()"},{"line_number":194,"context_line":"        self.assertEqual(\u0027 \u0027.join(parts[3:7]),"},{"line_number":195,"context_line":"                         \u0027GET /bucket/object HTTP/1.0 200\u0027)"},{"line_number":196,"context_line":"        self.assertEqual(parts[-1], \u00272\u0027)"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def _test_object_HEAD_Range(self, range_value):"},{"line_number":199,"context_line":"        req \u003d Request.blank(\u0027/bucket/object\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3c143f98_ead75a04","line":196,"in_reply_to":"daacea54_e0c5b495","updated":"2023-10-12 17:22:58.000000000","message":"Done","commit_id":"14f18285af04a025cc07497ddc40dc575d8b7b32"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"8959d7ad72a300c11ee849c85748a4cb13bfca28","unresolved":true,"context_lines":[{"line_number":888,"context_line":"        self.assertNotIn(\u0027x-backend-storage-policy-index\u0027, head_call.headers)"},{"line_number":889,"context_line":"        self.assertEqual(put_call.headers[\u0027x-copy-from\u0027], \u0027/some/source\u0027)"},{"line_number":890,"context_line":"        self.assertNotIn(\u0027x-backend-storage-policy-index\u0027, put_call.headers)"},{"line_number":891,"context_line":"        head_call, put_call \u003d self.swift.updated_calls_with_headers"},{"line_number":892,"context_line":"        self.assertEqual("},{"line_number":893,"context_line":"            head_call.headers[\u0027x-backend-storage-policy-index\u0027],"},{"line_number":894,"context_line":"            str(src_policy_index))"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f41414b_8054498f","line":891,"updated":"2023-10-12 19:42:31.000000000","message":"This bugs me a bit -- what are we really *trying* to test by looking at these updated calls? Because it *feels like* we\u0027re just testing that `FakeSwift` is doing its thing, which isn\u0027t necessarily how the actual proxy behaves... certainly, prior to https://github.com/openstack/swift/commit/f4a34c2998f44a7142542ed1f6e5818524ebc292 the two differed, and I\u0027d be shocked if there weren\u0027t still some differences today.\n\nI guess it\u0027s that we want to sanity check that despite the request env getting updated as part of the first call, it\u0027s cleared out again by the time we make the subsequent call?","commit_id":"2fa313b78113316e409091a52f71649701cc5ad1"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1db6c0c043302585850a43ff65b5cdd028bd72fb","unresolved":true,"context_lines":[{"line_number":888,"context_line":"        self.assertNotIn(\u0027x-backend-storage-policy-index\u0027, head_call.headers)"},{"line_number":889,"context_line":"        self.assertEqual(put_call.headers[\u0027x-copy-from\u0027], \u0027/some/source\u0027)"},{"line_number":890,"context_line":"        self.assertNotIn(\u0027x-backend-storage-policy-index\u0027, put_call.headers)"},{"line_number":891,"context_line":"        head_call, put_call \u003d self.swift.updated_calls_with_headers"},{"line_number":892,"context_line":"        self.assertEqual("},{"line_number":893,"context_line":"            head_call.headers[\u0027x-backend-storage-policy-index\u0027],"},{"line_number":894,"context_line":"            str(src_policy_index))"}],"source_content_type":"text/x-python","patch_set":3,"id":"b1c13be3_69bf2239","line":891,"in_reply_to":"373d20b2_a23963fe","updated":"2023-10-13 18:27:54.000000000","message":"\u003e the comment about the real proxy differing\n\nMy point was just that prior to that patch, `FakeSwift` *didn\u0027t* add the spi to the request even though the proxy *did* -- and there are surely *other* things that the real proxy does that `FakeSwift` doesn\u0027t (or does *differently*). Ultimately, I think my objection was mostly that it seems bad/weird to be testing `FakeSwift` behaviors in s3api tests, especially now that we\u0027ve got a dedicated `test_helpers`...\n\n I think I can get behind the sanity-check argument, though. It\u0027s not **that** big of an objection.","commit_id":"2fa313b78113316e409091a52f71649701cc5ad1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d5fb1ca6975d79a4d16e9f6573c3a35e104fd469","unresolved":true,"context_lines":[{"line_number":888,"context_line":"        self.assertNotIn(\u0027x-backend-storage-policy-index\u0027, head_call.headers)"},{"line_number":889,"context_line":"        self.assertEqual(put_call.headers[\u0027x-copy-from\u0027], \u0027/some/source\u0027)"},{"line_number":890,"context_line":"        self.assertNotIn(\u0027x-backend-storage-policy-index\u0027, put_call.headers)"},{"line_number":891,"context_line":"        head_call, put_call \u003d self.swift.updated_calls_with_headers"},{"line_number":892,"context_line":"        self.assertEqual("},{"line_number":893,"context_line":"            head_call.headers[\u0027x-backend-storage-policy-index\u0027],"},{"line_number":894,"context_line":"            str(src_policy_index))"}],"source_content_type":"text/x-python","patch_set":3,"id":"373d20b2_a23963fe","line":891,"in_reply_to":"9f41414b_8054498f","updated":"2023-10-13 11:16:35.000000000","message":"yes, it\u0027s intended to be a sanity check that the backend requests were annotated with spi\u0027s by the proxy but that the spi did not propagate between requests.\n\nSo in a way it is asserting that FakeSwift did its thing, but for the purpose of checking that adding spi to the HEAD did not pollute the PUT.\n\nI\u0027m not sure I understand the comment about the real proxy differing - AFAICT the real proxy does add spi header to object *requests*.","commit_id":"2fa313b78113316e409091a52f71649701cc5ad1"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2752aa86be3a139bac120506b655801db5ce0f8c","unresolved":true,"context_lines":[{"line_number":888,"context_line":"        self.assertNotIn(\u0027x-backend-storage-policy-index\u0027, head_call.headers)"},{"line_number":889,"context_line":"        self.assertEqual(put_call.headers[\u0027x-copy-from\u0027], \u0027/some/source\u0027)"},{"line_number":890,"context_line":"        self.assertNotIn(\u0027x-backend-storage-policy-index\u0027, put_call.headers)"},{"line_number":891,"context_line":"        head_call, put_call \u003d self.swift.updated_calls_with_headers"},{"line_number":892,"context_line":"        self.assertEqual("},{"line_number":893,"context_line":"            head_call.headers[\u0027x-backend-storage-policy-index\u0027],"},{"line_number":894,"context_line":"            str(src_policy_index))"}],"source_content_type":"text/x-python","patch_set":3,"id":"bc455a08_e70c9076","line":891,"in_reply_to":"b1c13be3_69bf2239","updated":"2023-10-16 21:06:22.000000000","message":"there\u0027s some inertia to write the test this way; and my initial preference was for FakeSwift not to have to keep two copies of the call list - but the spirit of the test seems to be \"assert the real backend storage call was made with the correct headers\" - which is FakeSwift land would be looking at the updated headers list.\n\nmaybe the test would be about as strong if just looked at req.headers and noticed they were modified (I assume they were!?)","commit_id":"2fa313b78113316e409091a52f71649701cc5ad1"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":888,"context_line":"        self.assertNotIn(\u0027x-backend-storage-policy-index\u0027, head_call.headers)"},{"line_number":889,"context_line":"        self.assertEqual(put_call.headers[\u0027x-copy-from\u0027], \u0027/some/source\u0027)"},{"line_number":890,"context_line":"        self.assertNotIn(\u0027x-backend-storage-policy-index\u0027, put_call.headers)"},{"line_number":891,"context_line":"        head_call, put_call \u003d self.swift.updated_calls_with_headers"},{"line_number":892,"context_line":"        self.assertEqual("},{"line_number":893,"context_line":"            head_call.headers[\u0027x-backend-storage-policy-index\u0027],"},{"line_number":894,"context_line":"            str(src_policy_index))"}],"source_content_type":"text/x-python","patch_set":3,"id":"bac93691_7a38bcbc","line":891,"in_reply_to":"bc455a08_e70c9076","updated":"2023-11-13 18:52:29.000000000","message":"\u003e maybe the test would be about as strong if just looked at req.headers and noticed they were modified (I assume they were!?)\n\nthis is what these assertions are doing (these are the backend calls so the test does not create them, they have to be captured).\n\nI\u0027m not wedded to updated_call_headers - making these sanity check assertions is the only current use case, and as Tim says, we do *test* that FakeSwift does that so we could just trust it.","commit_id":"2fa313b78113316e409091a52f71649701cc5ad1"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2752aa86be3a139bac120506b655801db5ce0f8c","unresolved":true,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @patch_policies(["},{"line_number":80,"context_line":"        StoragePolicy(0, \u0027gold\u0027, is_default\u003dTrue),"},{"line_number":81,"context_line":"        StoragePolicy(1, \u0027silver\u0027)])"},{"line_number":82,"context_line":"    def _test_object_GETorHEAD(self, method):"},{"line_number":83,"context_line":"        bucket_policy_index \u003d 1"},{"line_number":84,"context_line":"        self._register_bucket_policy(\u0027bucket\u0027, bucket_policy_index)"}],"source_content_type":"text/x-python","patch_set":9,"id":"2163e874_8060541f","line":81,"updated":"2023-10-16 21:06:22.000000000","message":"i normally expect indivual test methods to patch policies - not test helpers.","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    @patch_policies(["},{"line_number":80,"context_line":"        StoragePolicy(0, \u0027gold\u0027, is_default\u003dTrue),"},{"line_number":81,"context_line":"        StoragePolicy(1, \u0027silver\u0027)])"},{"line_number":82,"context_line":"    def _test_object_GETorHEAD(self, method):"},{"line_number":83,"context_line":"        bucket_policy_index \u003d 1"},{"line_number":84,"context_line":"        self._register_bucket_policy(\u0027bucket\u0027, bucket_policy_index)"}],"source_content_type":"text/x-python","patch_set":9,"id":"b208a759_d9383f4d","line":81,"in_reply_to":"2163e874_8060541f","updated":"2023-11-13 18:52:29.000000000","message":"turns out the patching isn\u0027t necessary","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2752aa86be3a139bac120506b655801db5ce0f8c","unresolved":true,"context_lines":[{"line_number":888,"context_line":"                         req.environ[\u0027swift.backend_path\u0027])"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"        head_call, put_call \u003d self.swift.calls_with_headers"},{"line_number":891,"context_line":"        self.assertNotIn(\u0027x-backend-storage-policy-index\u0027, head_call.headers)"},{"line_number":892,"context_line":"        self.assertEqual(put_call.headers[\u0027x-copy-from\u0027], \u0027/some/source\u0027)"},{"line_number":893,"context_line":"        self.assertNotIn(\u0027x-backend-storage-policy-index\u0027, put_call.headers)"},{"line_number":894,"context_line":"        head_call, put_call \u003d self.swift.updated_calls_with_headers"}],"source_content_type":"text/x-python","patch_set":9,"id":"0cdc081f_9386988c","line":891,"updated":"2023-10-16 21:06:22.000000000","message":"this representation of the put_call headers should also be missing the the backend-spi despite the proxy updating the put requests environ/headers before forwarding it to the backend storage servers.","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":888,"context_line":"                         req.environ[\u0027swift.backend_path\u0027])"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"        head_call, put_call \u003d self.swift.calls_with_headers"},{"line_number":891,"context_line":"        self.assertNotIn(\u0027x-backend-storage-policy-index\u0027, head_call.headers)"},{"line_number":892,"context_line":"        self.assertEqual(put_call.headers[\u0027x-copy-from\u0027], \u0027/some/source\u0027)"},{"line_number":893,"context_line":"        self.assertNotIn(\u0027x-backend-storage-policy-index\u0027, put_call.headers)"},{"line_number":894,"context_line":"        head_call, put_call \u003d self.swift.updated_calls_with_headers"}],"source_content_type":"text/x-python","patch_set":9,"id":"6d5696ac_84873bdd","line":891,"in_reply_to":"0cdc081f_9386988c","updated":"2023-11-13 18:52:29.000000000","message":"yep. see line 893. but I\u0027ll slide it up a line so these two asserts are adjacent.","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":892,"context_line":"        head_call, put_call \u003d self.swift.calls_with_headers"},{"line_number":893,"context_line":"        self.assertNotIn(\u0027x-backend-storage-policy-index\u0027, head_call.headers)"},{"line_number":894,"context_line":"        self.assertNotIn(\u0027x-backend-storage-policy-index\u0027, put_call.headers)"},{"line_number":895,"context_line":"        self.assertEqual(put_call.headers[\u0027x-copy-from\u0027], \u0027/some/source\u0027)"},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"    @s3acl"},{"line_number":898,"context_line":"    def test_object_PUT_copy(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"fae66c50_cf05ac3a","line":895,"updated":"2023-11-13 20:09:24.000000000","message":"FWIW all these behavoiral assertions pass on master with the less strict:\n\n\tdiff --git a/test/unit/common/middleware/s3api/__init__.py b/test/unit/common/middleware/s3api/__init__.py\n\tindex 1781c1f45..783184765 100644\n\t--- a/test/unit/common/middleware/s3api/__init__.py\n\t+++ b/test/unit/common/middleware/s3api/__init__.py\n\t@@ -140,9 +140,9 @@ class S3ApiTestCase(unittest.TestCase):\n\t\t\t\t     swob.HTTPNoContent, headers, None)\n\t \n\t     def _assert_policy_index(self, req_headers, resp_headers, policy_index):\n\t-        self.assertNotIn(\u0027X-Backend-Storage-Policy-Index\u0027, req_headers)\n\t-        self.assertEqual(resp_headers.get(\u0027X-Backend-Storage-Policy-Index\u0027),\n\t-                         str(policy_index))\n\t+        from swift.common.utils import get_policy_index\n\t+        self.assertEqual(policy_index, int(get_policy_index(\n\t+            req_headers, resp_headers)))\n\t \n\t     def _get_error_code(self, body):\n\t\t elem \u003d fromstring(body, \u0027Error\u0027)\n\nthat is to say, despite any apparent test churn, I think we can say with some confidence the changes to spi handling do not cause any regression WRT logging/behavior of s3api object requests/responses.","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":false,"context_lines":[{"line_number":892,"context_line":"        head_call, put_call \u003d self.swift.calls_with_headers"},{"line_number":893,"context_line":"        self.assertNotIn(\u0027x-backend-storage-policy-index\u0027, head_call.headers)"},{"line_number":894,"context_line":"        self.assertNotIn(\u0027x-backend-storage-policy-index\u0027, put_call.headers)"},{"line_number":895,"context_line":"        self.assertEqual(put_call.headers[\u0027x-copy-from\u0027], \u0027/some/source\u0027)"},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"    @s3acl"},{"line_number":898,"context_line":"    def test_object_PUT_copy(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"87ddc3b4_7ff35188","line":895,"in_reply_to":"fae66c50_cf05ac3a","updated":"2023-11-14 13:01:22.000000000","message":"Ack","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"}],"test/unit/common/middleware/test_helpers.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1db6c0c043302585850a43ff65b5cdd028bd72fb","unresolved":true,"context_lines":[{"line_number":529,"context_line":"        self.assertEqual((\u0027GET\u0027, \u0027/v1/a/c/o\u0027,"},{"line_number":530,"context_line":"                          {\u0027Host\u0027: \u0027localhost:80\u0027,"},{"line_number":531,"context_line":"                           \u0027X-Backend-Storage-Policy-Index\u0027: \u00270\u0027}),"},{"line_number":532,"context_line":"                         swift.updated_calls_with_headers[-1])"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"        # register a container with storage policy 99..."},{"line_number":535,"context_line":"        swift.register(\u0027HEAD\u0027, \u0027/v1/a/c\u0027, HTTPCreated,"}],"source_content_type":"text/x-python","patch_set":9,"id":"093dbe5c_169cdea8","line":532,"updated":"2023-10-13 18:27:54.000000000","message":"I\u0027d feel even better about this if we had some assertions about `req.headers` pre- and post-`get_response`","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2752aa86be3a139bac120506b655801db5ce0f8c","unresolved":true,"context_lines":[{"line_number":529,"context_line":"        self.assertEqual((\u0027GET\u0027, \u0027/v1/a/c/o\u0027,"},{"line_number":530,"context_line":"                          {\u0027Host\u0027: \u0027localhost:80\u0027,"},{"line_number":531,"context_line":"                           \u0027X-Backend-Storage-Policy-Index\u0027: \u00270\u0027}),"},{"line_number":532,"context_line":"                         swift.updated_calls_with_headers[-1])"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"        # register a container with storage policy 99..."},{"line_number":535,"context_line":"        swift.register(\u0027HEAD\u0027, \u0027/v1/a/c\u0027, HTTPCreated,"}],"source_content_type":"text/x-python","patch_set":9,"id":"e728cfc5_e94bb8a9","line":532,"in_reply_to":"093dbe5c_169cdea8","updated":"2023-10-16 21:06:22.000000000","message":"💯","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":529,"context_line":"        self.assertEqual((\u0027GET\u0027, \u0027/v1/a/c/o\u0027,"},{"line_number":530,"context_line":"                          {\u0027Host\u0027: \u0027localhost:80\u0027,"},{"line_number":531,"context_line":"                           \u0027X-Backend-Storage-Policy-Index\u0027: \u00270\u0027}),"},{"line_number":532,"context_line":"                         swift.updated_calls_with_headers[-1])"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"        # register a container with storage policy 99..."},{"line_number":535,"context_line":"        swift.register(\u0027HEAD\u0027, \u0027/v1/a/c\u0027, HTTPCreated,"}],"source_content_type":"text/x-python","patch_set":9,"id":"b88a2499_8f2106f1","line":532,"in_reply_to":"e728cfc5_e94bb8a9","updated":"2023-11-13 18:52:29.000000000","message":"ok, but...\n\nhttps://review.opendev.org/c/openstack/swift/+/897864/comment/97003332_f3411ef0/","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1db6c0c043302585850a43ff65b5cdd028bd72fb","unresolved":true,"context_lines":[{"line_number":532,"context_line":"                         swift.updated_calls_with_headers[-1])"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"        # register a container with storage policy 99..."},{"line_number":535,"context_line":"        swift.register(\u0027HEAD\u0027, \u0027/v1/a/c\u0027, HTTPCreated,"},{"line_number":536,"context_line":"                       {\u0027X-Backend-Storage-Policy-Index\u0027: \u002799\u0027}, None)"},{"line_number":537,"context_line":"        req \u003d Request.blank(\u0027/v1/a/c/o\u0027)"},{"line_number":538,"context_line":"        req.method \u003d \u0027GET\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"ce7ae127_eb240aba","line":535,"range":{"start_line":535,"start_character":42,"end_line":535,"end_character":53},"updated":"2023-10-13 18:27:54.000000000","message":"🤔\n\nMeh, w/e","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":532,"context_line":"                         swift.updated_calls_with_headers[-1])"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"        # register a container with storage policy 99..."},{"line_number":535,"context_line":"        swift.register(\u0027HEAD\u0027, \u0027/v1/a/c\u0027, HTTPCreated,"},{"line_number":536,"context_line":"                       {\u0027X-Backend-Storage-Policy-Index\u0027: \u002799\u0027}, None)"},{"line_number":537,"context_line":"        req \u003d Request.blank(\u0027/v1/a/c/o\u0027)"},{"line_number":538,"context_line":"        req.method \u003d \u0027GET\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"97cda7fd_d3b708c1","line":535,"range":{"start_line":535,"start_character":42,"end_line":535,"end_character":53},"in_reply_to":"35cfacbe_4616da3a","updated":"2023-11-13 18:52:29.000000000","message":"😄 not sure how that crept in!","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"2752aa86be3a139bac120506b655801db5ce0f8c","unresolved":true,"context_lines":[{"line_number":532,"context_line":"                         swift.updated_calls_with_headers[-1])"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"        # register a container with storage policy 99..."},{"line_number":535,"context_line":"        swift.register(\u0027HEAD\u0027, \u0027/v1/a/c\u0027, HTTPCreated,"},{"line_number":536,"context_line":"                       {\u0027X-Backend-Storage-Policy-Index\u0027: \u002799\u0027}, None)"},{"line_number":537,"context_line":"        req \u003d Request.blank(\u0027/v1/a/c/o\u0027)"},{"line_number":538,"context_line":"        req.method \u003d \u0027GET\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"35cfacbe_4616da3a","line":535,"range":{"start_line":535,"start_character":42,"end_line":535,"end_character":53},"in_reply_to":"ce7ae127_eb240aba","updated":"2023-10-16 21:06:22.000000000","message":"😄","commit_id":"99e74415ff9e472f861f0d888cb6608e3ed03df8"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":522,"context_line":"                         resp.headers)"},{"line_number":523,"context_line":"        self.assertEqual(b\u0027stuff\u0027, resp.body)"},{"line_number":524,"context_line":"        self.assertEqual(1, swift.call_count)"},{"line_number":525,"context_line":"        self.assertEqual((\u0027GET\u0027, \u0027/v1/a/c/o\u0027), swift.calls[-1])"},{"line_number":526,"context_line":"        self.assertEqual((\u0027GET\u0027, \u0027/v1/a/c/o\u0027,"},{"line_number":527,"context_line":"                          {\u0027Host\u0027: \u0027localhost:80\u0027}),  # from swob"},{"line_number":528,"context_line":"                         swift.calls_with_headers[-1])"}],"source_content_type":"text/x-python","patch_set":14,"id":"41a8b956_e576e754","line":525,"updated":"2023-11-13 20:09:24.000000000","message":"seeing as how we just asserted swift.call_count \u003d\u003d 1 I think I\u0027d find [0] more idiomatic","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":false,"context_lines":[{"line_number":522,"context_line":"                         resp.headers)"},{"line_number":523,"context_line":"        self.assertEqual(b\u0027stuff\u0027, resp.body)"},{"line_number":524,"context_line":"        self.assertEqual(1, swift.call_count)"},{"line_number":525,"context_line":"        self.assertEqual((\u0027GET\u0027, \u0027/v1/a/c/o\u0027), swift.calls[-1])"},{"line_number":526,"context_line":"        self.assertEqual((\u0027GET\u0027, \u0027/v1/a/c/o\u0027,"},{"line_number":527,"context_line":"                          {\u0027Host\u0027: \u0027localhost:80\u0027}),  # from swob"},{"line_number":528,"context_line":"                         swift.calls_with_headers[-1])"}],"source_content_type":"text/x-python","patch_set":14,"id":"d8e3307f_74a9dac9","line":525,"in_reply_to":"41a8b956_e576e754","updated":"2023-11-14 13:01:22.000000000","message":"yeah that\u0027s dumb, I expect I copied something :shame:","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":528,"context_line":"                         swift.calls_with_headers[-1])"},{"line_number":529,"context_line":"        # default storage policy is applied..."},{"line_number":530,"context_line":"        self.assertEqual("},{"line_number":531,"context_line":"            \u00270\u0027, req.headers.get(\u0027X-Backend-Storage-Policy-Index\u0027))"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"        # register a container with storage policy 99..."},{"line_number":534,"context_line":"        swift.register(\u0027HEAD\u0027, \u0027/v1/a/c\u0027, HTTPOk,"}],"source_content_type":"text/x-python","patch_set":14,"id":"4429b672_28cecae2","line":531,"updated":"2023-11-13 20:09:24.000000000","message":"0 is typically the default","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":false,"context_lines":[{"line_number":528,"context_line":"                         swift.calls_with_headers[-1])"},{"line_number":529,"context_line":"        # default storage policy is applied..."},{"line_number":530,"context_line":"        self.assertEqual("},{"line_number":531,"context_line":"            \u00270\u0027, req.headers.get(\u0027X-Backend-Storage-Policy-Index\u0027))"},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"        # register a container with storage policy 99..."},{"line_number":534,"context_line":"        swift.register(\u0027HEAD\u0027, \u0027/v1/a/c\u0027, HTTPOk,"}],"source_content_type":"text/x-python","patch_set":14,"id":"6470b3ac_f26ff190","line":531,"in_reply_to":"4429b672_28cecae2","updated":"2023-11-14 13:01:22.000000000","message":"I\u0027ll tighten that up","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4ffcc25b8092ac7690ea8c3795ade1a4ac3db688","unresolved":true,"context_lines":[{"line_number":548,"context_line":"                          {\u0027Host\u0027: \u0027localhost:80\u0027}),  # from swob"},{"line_number":549,"context_line":"                         swift.calls_with_headers[-1])"},{"line_number":550,"context_line":"        self.assertEqual("},{"line_number":551,"context_line":"            \u002799\u0027, req.headers.get(\u0027X-Backend-Storage-Policy-Index\u0027))"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"class TestFakeSwiftMultipleResponses(unittest.TestCase):"}],"source_content_type":"text/x-python","patch_set":14,"id":"ec080d64_bf2183fd","line":551,"updated":"2023-11-13 20:09:24.000000000","message":"no requirements on the policy[99] being defined.","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"09924f4d64561ad95a5af42740f0be18303e8c50","unresolved":false,"context_lines":[{"line_number":548,"context_line":"                          {\u0027Host\u0027: \u0027localhost:80\u0027}),  # from swob"},{"line_number":549,"context_line":"                         swift.calls_with_headers[-1])"},{"line_number":550,"context_line":"        self.assertEqual("},{"line_number":551,"context_line":"            \u002799\u0027, req.headers.get(\u0027X-Backend-Storage-Policy-Index\u0027))"},{"line_number":552,"context_line":""},{"line_number":553,"context_line":""},{"line_number":554,"context_line":"class TestFakeSwiftMultipleResponses(unittest.TestCase):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9a6e6a7b_ea995e63","line":551,"in_reply_to":"ec080d64_bf2183fd","updated":"2023-11-14 13:01:22.000000000","message":"Ack","commit_id":"fb01d276171c52bcb08d291c35e77eff317643cc"}],"test/unit/common/middleware/test_slo.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"1241cfa9e21e84e4f165bd7406251c07b0b14069","unresolved":true,"context_lines":[{"line_number":1364,"context_line":"              \u0027Range\u0027: \u0027bytes\u003d-1\u0027,"},{"line_number":1365,"context_line":"              \u0027X-Backend-Ignore-Range-If-Metadata-Present\u0027:"},{"line_number":1366,"context_line":"              \u0027X-Static-Large-Object\u0027,"},{"line_number":1367,"context_line":"              \u0027X-Backend-Storage-Policy-Index\u0027: \u00272\u0027,"},{"line_number":1368,"context_line":"              \u0027Content-Length\u0027: \u00270\u0027}),"},{"line_number":1369,"context_line":"            (\u0027GET\u0027,"},{"line_number":1370,"context_line":"             \u0027/v1/AUTH_test/deltest/man-all-there?multipart-manifest\u003dget\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"8a6d097b_5d7ac64d","side":"PARENT","line":1367,"updated":"2023-10-12 17:22:58.000000000","message":"this headers was added by FakeSwift","commit_id":"d31a54a65c186550a99bb985f056c071690a3939"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":1364,"context_line":"              \u0027Range\u0027: \u0027bytes\u003d-1\u0027,"},{"line_number":1365,"context_line":"              \u0027X-Backend-Ignore-Range-If-Metadata-Present\u0027:"},{"line_number":1366,"context_line":"              \u0027X-Static-Large-Object\u0027,"},{"line_number":1367,"context_line":"              \u0027X-Backend-Storage-Policy-Index\u0027: \u00272\u0027,"},{"line_number":1368,"context_line":"              \u0027Content-Length\u0027: \u00270\u0027}),"},{"line_number":1369,"context_line":"            (\u0027GET\u0027,"},{"line_number":1370,"context_line":"             \u0027/v1/AUTH_test/deltest/man-all-there?multipart-manifest\u003dget\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"b610da6a_b249ca50","side":"PARENT","line":1367,"in_reply_to":"8a6d097b_5d7ac64d","updated":"2023-11-13 18:52:29.000000000","message":"Ack","commit_id":"d31a54a65c186550a99bb985f056c071690a3939"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"bb286a4c834b363810fec4699c0125f37adf32d6","unresolved":false,"context_lines":[{"line_number":1364,"context_line":"              \u0027Range\u0027: \u0027bytes\u003d-1\u0027,"},{"line_number":1365,"context_line":"              \u0027X-Backend-Ignore-Range-If-Metadata-Present\u0027:"},{"line_number":1366,"context_line":"              \u0027X-Static-Large-Object\u0027,"},{"line_number":1367,"context_line":"              \u0027X-Backend-Storage-Policy-Index\u0027: \u00272\u0027,"},{"line_number":1368,"context_line":"              \u0027Content-Length\u0027: \u00270\u0027}),"},{"line_number":1369,"context_line":"            (\u0027GET\u0027,"},{"line_number":1370,"context_line":"             \u0027/v1/AUTH_test/deltest/man-all-there?multipart-manifest\u003dget\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"c4feffdf_0b3d4d1c","side":"PARENT","line":1367,"in_reply_to":"8a6d097b_5d7ac64d","updated":"2023-11-13 18:52:29.000000000","message":"Ack","commit_id":"d31a54a65c186550a99bb985f056c071690a3939"}]}
