)]}'
{"swift/proxy/controllers/base.py":[{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"aa16fb6367a1afdb2733a6d00998805432f53246","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        \u0027sync_key\u0027: headers.get(\u0027x-container-sync-key\u0027),"},{"line_number":165,"context_line":"        \u0027object_count\u0027: headers.get(\u0027x-container-object-count\u0027),"},{"line_number":166,"context_line":"        \u0027bytes\u0027: headers.get(\u0027x-container-bytes-used\u0027),"},{"line_number":167,"context_line":"        \u0027versions\u0027: sysmeta.get(\u0027versions-location\u0027),"},{"line_number":168,"context_line":"        \u0027storage_policy\u0027: headers.get(\u0027x-backend-storage-policy-index\u0027, \u00270\u0027),"},{"line_number":169,"context_line":"        \u0027cors\u0027: {"},{"line_number":170,"context_line":"            \u0027allow_origin\u0027: meta.get(\u0027access-control-allow-origin\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a3905b3_a462dd3b","line":167,"updated":"2017-01-24 16:30:19.000000000","message":"Correct me if I am wrong, but if this is from sysmeta, then you could get get_container_info()[\u0027sysmeta\u0027][\u0027versions-location\u0027].","commit_id":"fe10f60b3293849453c3708fb5bc03ec5650571e"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"775a8c23cab9ed4263b97ade83b39c984b9a2dca","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        \u0027sync_key\u0027: headers.get(\u0027x-container-sync-key\u0027),"},{"line_number":165,"context_line":"        \u0027object_count\u0027: headers.get(\u0027x-container-object-count\u0027),"},{"line_number":166,"context_line":"        \u0027bytes\u0027: headers.get(\u0027x-container-bytes-used\u0027),"},{"line_number":167,"context_line":"        \u0027versions\u0027: sysmeta.get(\u0027versions-location\u0027),"},{"line_number":168,"context_line":"        \u0027storage_policy\u0027: headers.get(\u0027x-backend-storage-policy-index\u0027, \u00270\u0027),"},{"line_number":169,"context_line":"        \u0027cors\u0027: {"},{"line_number":170,"context_line":"            \u0027allow_origin\u0027: meta.get(\u0027access-control-allow-origin\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a3905b3_653621e9","line":167,"range":{"start_line":167,"start_character":20,"end_line":167,"end_character":31},"updated":"2017-01-24 21:51:11.000000000","message":"this is incorrect, in line 175 we already get all the sysmeta for the container.\n\nThe x-versions-location is maintained here for backwards compatibility.","commit_id":"fe10f60b3293849453c3708fb5bc03ec5650571e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f174214fcc8a70db55e1ff1bed22f19954d47563","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        \u0027sync_key\u0027: headers.get(\u0027x-container-sync-key\u0027),"},{"line_number":165,"context_line":"        \u0027object_count\u0027: headers.get(\u0027x-container-object-count\u0027),"},{"line_number":166,"context_line":"        \u0027bytes\u0027: headers.get(\u0027x-container-bytes-used\u0027),"},{"line_number":167,"context_line":"        \u0027versions\u0027: sysmeta.get(\u0027versions-location\u0027),"},{"line_number":168,"context_line":"        \u0027storage_policy\u0027: headers.get(\u0027x-backend-storage-policy-index\u0027, \u00270\u0027),"},{"line_number":169,"context_line":"        \u0027cors\u0027: {"},{"line_number":170,"context_line":"            \u0027allow_origin\u0027: meta.get(\u0027access-control-allow-origin\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a3905b3_7c1c05c2","line":167,"in_reply_to":"5a3905b3_1a3dcac3","updated":"2017-01-24 19:13:44.000000000","message":"It used to actually be stored as X-Versions-Location, prior to us pulling versioned_writes out of the proxy-server as middleware [1]. As a result, we may have the versions location stored in either header. (Hopefully not both?)\n\nI think we probably want something like\n\n headers.get(\u0027x-versions-location\u0027,\n             sysmeta.get(\u0027versions-location\u0027))\n\n...although I should double-check the precedence and think more how the caller\u0027s place in the pipeline affects matters.\n\n[1] https://review.openstack.org/#/c/134347/","commit_id":"fe10f60b3293849453c3708fb5bc03ec5650571e"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"f143f48b38ad71d8decd060ef06006b1d3e568b2","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        \u0027sync_key\u0027: headers.get(\u0027x-container-sync-key\u0027),"},{"line_number":165,"context_line":"        \u0027object_count\u0027: headers.get(\u0027x-container-object-count\u0027),"},{"line_number":166,"context_line":"        \u0027bytes\u0027: headers.get(\u0027x-container-bytes-used\u0027),"},{"line_number":167,"context_line":"        \u0027versions\u0027: sysmeta.get(\u0027versions-location\u0027),"},{"line_number":168,"context_line":"        \u0027storage_policy\u0027: headers.get(\u0027x-backend-storage-policy-index\u0027, \u00270\u0027),"},{"line_number":169,"context_line":"        \u0027cors\u0027: {"},{"line_number":170,"context_line":"            \u0027allow_origin\u0027: meta.get(\u0027access-control-allow-origin\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a3905b3_e57cd1ed","line":167,"range":{"start_line":167,"start_character":20,"end_line":167,"end_character":31},"in_reply_to":"5a3905b3_653621e9","updated":"2017-01-24 22:05:16.000000000","message":"yes, that was my first reaction as well.  Then I thought about her case where \u0027versions\u0027 was not returning the correct value.  If we say this is backwards compatible, then should it be correct even if only sysmeta exists (like in Tim\u0027s example above - check for either one)?\n\nIt has been awhile since I have thought about history mode, but our change to allow the use of only X-History-Location may have been when we introduced a case where the container-info[\u0027versions\u0027] would sometimes not be set (when versioning exists).","commit_id":"fe10f60b3293849453c3708fb5bc03ec5650571e"},{"author":{"_account_id":23861,"name":"Karen Chan","email":"karen@karen-chan.com","username":"karenc"},"change_message_id":"2fd33db2bb402f213285d728088f66577eac0d81","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        \u0027sync_key\u0027: headers.get(\u0027x-container-sync-key\u0027),"},{"line_number":165,"context_line":"        \u0027object_count\u0027: headers.get(\u0027x-container-object-count\u0027),"},{"line_number":166,"context_line":"        \u0027bytes\u0027: headers.get(\u0027x-container-bytes-used\u0027),"},{"line_number":167,"context_line":"        \u0027versions\u0027: sysmeta.get(\u0027versions-location\u0027),"},{"line_number":168,"context_line":"        \u0027storage_policy\u0027: headers.get(\u0027x-backend-storage-policy-index\u0027, \u00270\u0027),"},{"line_number":169,"context_line":"        \u0027cors\u0027: {"},{"line_number":170,"context_line":"            \u0027allow_origin\u0027: meta.get(\u0027access-control-allow-origin\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a3905b3_a7773607","line":167,"in_reply_to":"5a3905b3_7c1c05c2","updated":"2017-01-24 19:31:40.000000000","message":"I\u0027m not entirely happy with this patch...  I was hoping to write a functional test that uses get_container_info (to show that it\u0027s not working) but I couldn\u0027t figure out how.  I only found this bug while working on swift3.","commit_id":"fe10f60b3293849453c3708fb5bc03ec5650571e"},{"author":{"_account_id":23861,"name":"Karen Chan","email":"karen@karen-chan.com","username":"karenc"},"change_message_id":"c0cb7308780dc4c2afecf09e05fd819218ae2656","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        \u0027sync_key\u0027: headers.get(\u0027x-container-sync-key\u0027),"},{"line_number":165,"context_line":"        \u0027object_count\u0027: headers.get(\u0027x-container-object-count\u0027),"},{"line_number":166,"context_line":"        \u0027bytes\u0027: headers.get(\u0027x-container-bytes-used\u0027),"},{"line_number":167,"context_line":"        \u0027versions\u0027: sysmeta.get(\u0027versions-location\u0027),"},{"line_number":168,"context_line":"        \u0027storage_policy\u0027: headers.get(\u0027x-backend-storage-policy-index\u0027, \u00270\u0027),"},{"line_number":169,"context_line":"        \u0027cors\u0027: {"},{"line_number":170,"context_line":"            \u0027allow_origin\u0027: meta.get(\u0027access-control-allow-origin\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a3905b3_e410655b","line":167,"in_reply_to":"5a3905b3_a462dd3b","updated":"2017-01-24 16:32:48.000000000","message":"Yes I can do that.  The existing \"versions\" field should be removed in that case?","commit_id":"fe10f60b3293849453c3708fb5bc03ec5650571e"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"15739887ef88398251eaba378e9a1b2864e02de0","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        \u0027sync_key\u0027: headers.get(\u0027x-container-sync-key\u0027),"},{"line_number":165,"context_line":"        \u0027object_count\u0027: headers.get(\u0027x-container-object-count\u0027),"},{"line_number":166,"context_line":"        \u0027bytes\u0027: headers.get(\u0027x-container-bytes-used\u0027),"},{"line_number":167,"context_line":"        \u0027versions\u0027: sysmeta.get(\u0027versions-location\u0027),"},{"line_number":168,"context_line":"        \u0027storage_policy\u0027: headers.get(\u0027x-backend-storage-policy-index\u0027, \u00270\u0027),"},{"line_number":169,"context_line":"        \u0027cors\u0027: {"},{"line_number":170,"context_line":"            \u0027allow_origin\u0027: meta.get(\u0027access-control-allow-origin\u0027),"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a3905b3_1a3dcac3","line":167,"in_reply_to":"5a3905b3_e410655b","updated":"2017-01-24 16:46:16.000000000","message":"oops - i looked at the diff too quickly and thought \u0027versions\u0027 was an addition made here.  Let me dig into the differences between using the \"x-\" header and sysmeta so that I can hopefully understand why the \"x-\" is used currently.","commit_id":"fe10f60b3293849453c3708fb5bc03ec5650571e"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"775a8c23cab9ed4263b97ade83b39c984b9a2dca","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            \u0027max_age\u0027: meta.get(\u0027access-control-max-age\u0027)"},{"line_number":173,"context_line":"        },"},{"line_number":174,"context_line":"        \u0027meta\u0027: meta,"},{"line_number":175,"context_line":"        \u0027sysmeta\u0027: sysmeta,"},{"line_number":176,"context_line":"    }"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5a3905b3_a53009ea","line":175,"range":{"start_line":175,"start_character":9,"end_line":175,"end_character":27},"updated":"2017-01-24 21:51:11.000000000","message":"sysmeta is added here","commit_id":"fe10f60b3293849453c3708fb5bc03ec5650571e"}],"test/unit/common/middleware/test_versioned_writes.py":[{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"775a8c23cab9ed4263b97ade83b39c984b9a2dca","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        self.assertRequestEqual(req, self.authorized[0])"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        headers \u003d ["},{"line_number":138,"context_line":"            (\u0027X-Versions-Location\u0027, \u0027ver_cont\u0027),"},{"line_number":139,"context_line":"            (\u0027X-Container-Sysmeta-Versions-Mode\u0027, \u0027stack\u0027),"},{"line_number":140,"context_line":"            (\u0027X-Container-Sysmeta-Versions-Location\u0027, \u0027ver_cont\u0027)]"},{"line_number":141,"context_line":"        self.app.register(\u0027HEAD\u0027, \u0027/v1/a/c\u0027, swob.HTTPOk, dict(headers), \u0027\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a3905b3_6a08ae2e","line":138,"range":{"start_line":138,"start_character":12,"end_line":138,"end_character":48},"updated":"2017-01-24 21:51:11.000000000","message":"IIRC this situation should never happen, if a user sets a new location with the new vw middleware, then we \u0027erase\u0027 the container header[1]\n\nSo you should never have this situation, but even if you did then the sysmeta value is the one ultimately used by vw middleware\n\n\n[1] - https://github.com/openstack/swift/blob/master/swift/common/middleware/versioned_writes.py#L724","commit_id":"fe10f60b3293849453c3708fb5bc03ec5650571e"}]}
