)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"611a4e361cbe2fdce6be04dc802138aa353ded8f","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Next steps are to work on tests which were skipped for now."},{"line_number":15,"context_line":"I was looking to get an early feedback and will work on"},{"line_number":16,"context_line":"tests next."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Ie899290b3312e201979eafefb253d1a60b65b837"},{"line_number":19,"context_line":"Signed-off-by: Thiago da Silva \u003cthiago@redhat.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5a890539_a5d9e023","line":16,"updated":"2014-11-14 09:31:19.000000000","message":"Add DocImpact tag","commit_id":"5a98347c801afc43226b355828809abb7fb0719f"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"26eecaa625813cdf7ecce51523a97bd54d4b6a0b","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Next steps are to work on tests which were skipped for now."},{"line_number":15,"context_line":"I was looking to get an early feedback and will work on"},{"line_number":16,"context_line":"tests next."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Ie899290b3312e201979eafefb253d1a60b65b837"},{"line_number":19,"context_line":"Signed-off-by: Thiago da Silva \u003cthiago@redhat.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5a890539_db5b0cf4","line":16,"in_reply_to":"5a890539_a5d9e023","updated":"2014-11-15 21:28:10.000000000","message":"Done","commit_id":"5a98347c801afc43226b355828809abb7fb0719f"}],"doc/saio/swift/proxy-server.conf":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"5d56db2273e3b683231a5875bc52c342c7a7e5d5","unresolved":false,"context_lines":[{"line_number":9,"context_line":"[pipeline:main]"},{"line_number":10,"context_line":"# Yes, proxy-logging appears twice. This is so that"},{"line_number":11,"context_line":"# middleware-originated requests get logged too."},{"line_number":12,"context_line":"pipeline \u003d catch_errors gatekeeper healthcheck proxy-logging cache bulk tempurl ratelimit crossdomain tempauth staticweb versioned_writes container-quotas account-quotas slo dlo proxy-logging proxy-server"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"[filter:catch_errors]"},{"line_number":15,"context_line":"use \u003d egg:swift#catch_errors"}],"source_content_type":"text/plain","patch_set":38,"id":"3a50d1a3_76c08650","line":12,"updated":"2015-07-23 06:10:00.000000000","message":"Having the versioned_writes on the left side of the slo middleware means that when issuing \u0027?multipart-manifest\u003ddelete\u0027 on an SLO that has it\u0027s members versioned, the last version of the members wont be restored.","commit_id":"0d70a6d0d0e327c9ecfed629e0490d69ec5df320"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"de1efa16736bd84ca9fb347bfa70721053557164","unresolved":false,"context_lines":[{"line_number":9,"context_line":"[pipeline:main]"},{"line_number":10,"context_line":"# Yes, proxy-logging appears twice. This is so that"},{"line_number":11,"context_line":"# middleware-originated requests get logged too."},{"line_number":12,"context_line":"pipeline \u003d catch_errors gatekeeper healthcheck proxy-logging cache bulk tempurl ratelimit crossdomain tempauth staticweb versioned_writes container-quotas account-quotas slo dlo proxy-logging proxy-server"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"[filter:catch_errors]"},{"line_number":15,"context_line":"use \u003d egg:swift#catch_errors"}],"source_content_type":"text/plain","patch_set":38,"id":"3a50d1a3_52516b61","line":12,"in_reply_to":"3a50d1a3_76c08650","updated":"2015-07-28 17:45:25.000000000","message":"Done","commit_id":"0d70a6d0d0e327c9ecfed629e0490d69ec5df320"}],"etc/proxy-server.conf-sample":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"c12836ba5bd7d8eda37eed9c416ccf3c2c88a864","unresolved":false,"context_lines":[{"line_number":704,"context_line":"# WARNING: Setting this option bypasses the \"allow_versions\" option"},{"line_number":705,"context_line":"# in the container configuration file, which will be eventually"},{"line_number":706,"context_line":"# deprecated."},{"line_number":707,"context_line":"allow_versioned_writes \u003d true"}],"source_content_type":"application/octet-stream","patch_set":30,"id":"3acd31a7_6bc322ee","line":707,"updated":"2015-05-05 03:18:05.000000000","message":"This is not commeted, so I cannot deduce the default.","commit_id":"ee153ef3851dbd26db544f7707c75563e6b33912"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"c8dd2d18cdab32c64b466e5aab825644e88c25bf","unresolved":false,"context_lines":[{"line_number":704,"context_line":"# WARNING: Setting this option bypasses the \"allow_versions\" option"},{"line_number":705,"context_line":"# in the container configuration file, which will be eventually"},{"line_number":706,"context_line":"# deprecated."},{"line_number":707,"context_line":"allow_versioned_writes \u003d true"}],"source_content_type":"application/octet-stream","patch_set":30,"id":"3acd31a7_7d23d6a7","line":707,"in_reply_to":"3acd31a7_6bc322ee","updated":"2015-05-05 12:45:13.000000000","message":"Done","commit_id":"ee153ef3851dbd26db544f7707c75563e6b33912"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"5d56db2273e3b683231a5875bc52c342c7a7e5d5","unresolved":false,"context_lines":[{"line_number":77,"context_line":"# eventlet_debug \u003d false"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"[pipeline:main]"},{"line_number":80,"context_line":"pipeline \u003d catch_errors gatekeeper healthcheck proxy-logging cache container_sync bulk tempurl ratelimit tempauth versioned_writes container-quotas account-quotas slo dlo proxy-logging proxy-server"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"[app:proxy-server]"},{"line_number":83,"context_line":"use \u003d egg:swift#proxy"}],"source_content_type":"application/octet-stream","patch_set":38,"id":"3a50d1a3_792cf998","line":80,"updated":"2015-07-23 06:10:00.000000000","message":"Should we move slo to after slo here as well:\n\n  pipeline: ... slo dlo versioned_writes proxy-logging proxy-server","commit_id":"0d70a6d0d0e327c9ecfed629e0490d69ec5df320"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"de1efa16736bd84ca9fb347bfa70721053557164","unresolved":false,"context_lines":[{"line_number":77,"context_line":"# eventlet_debug \u003d false"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"[pipeline:main]"},{"line_number":80,"context_line":"pipeline \u003d catch_errors gatekeeper healthcheck proxy-logging cache container_sync bulk tempurl ratelimit tempauth versioned_writes container-quotas account-quotas slo dlo proxy-logging proxy-server"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"[app:proxy-server]"},{"line_number":83,"context_line":"use \u003d egg:swift#proxy"}],"source_content_type":"application/octet-stream","patch_set":38,"id":"3a50d1a3_d2cb3b1d","line":80,"in_reply_to":"3a50d1a3_792cf998","updated":"2015-07-28 17:45:25.000000000","message":"Done","commit_id":"0d70a6d0d0e327c9ecfed629e0490d69ec5df320"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"7fbd484bd00991f0045027bb61af47a8d408a949","unresolved":false,"context_lines":[{"line_number":705,"context_line":"# unwind \u003d false"},{"line_number":706,"context_line":""},{"line_number":707,"context_line":"# Note: Put after auth in the pipeline."},{"line_number":708,"context_line":"# If you don\u0027t put it in the pipeline, it will be inserted for you."},{"line_number":709,"context_line":"[filter:versioned_writes]"},{"line_number":710,"context_line":"use \u003d egg:swift#versioned_writes"},{"line_number":711,"context_line":"# Enables using versioned writes middleware and exposing configuration"}],"source_content_type":"application/octet-stream","patch_set":39,"id":"3a50d1a3_314c12c8","line":708,"updated":"2015-07-30 07:35:40.000000000","message":"(nits) inserted automatically.","commit_id":"c441a4e3e879de7110629055dc42349d0f01c481"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"faa37ccfd229f48673a6ebf93cbbc81dd037579f","unresolved":false,"context_lines":[{"line_number":705,"context_line":"# unwind \u003d false"},{"line_number":706,"context_line":""},{"line_number":707,"context_line":"# Note: Put after auth in the pipeline."},{"line_number":708,"context_line":"# If you don\u0027t put it in the pipeline, it will be inserted for you."},{"line_number":709,"context_line":"[filter:versioned_writes]"},{"line_number":710,"context_line":"use \u003d egg:swift#versioned_writes"},{"line_number":711,"context_line":"# Enables using versioned writes middleware and exposing configuration"}],"source_content_type":"application/octet-stream","patch_set":39,"id":"3a50d1a3_cab95817","line":708,"in_reply_to":"3a50d1a3_314c12c8","updated":"2015-07-30 19:13:14.000000000","message":"Done","commit_id":"c441a4e3e879de7110629055dc42349d0f01c481"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"7fbd484bd00991f0045027bb61af47a8d408a949","unresolved":false,"context_lines":[{"line_number":712,"context_line":"# settings via HTTP GET /info."},{"line_number":713,"context_line":"# WARNING: Setting this option bypasses the \"allow_versions\" option"},{"line_number":714,"context_line":"# in the container configuration file, which will be eventually"},{"line_number":715,"context_line":"# deprecated."},{"line_number":716,"context_line":"# allow_versioned_writes \u003d true"}],"source_content_type":"application/octet-stream","patch_set":39,"id":"3a50d1a3_114d5699","line":715,"updated":"2015-07-30 07:35:40.000000000","message":"I\u0027m not sure but I want to say more clearly for this. I\u0027m not getting whole of the constraints so I wanna make sure that fist. Note that in following matrix, allow_versions is an option at CONTAINER config and allow_versions_writes is what you added here.\n\n [configuration state] : [versioning feature] \n allow_versions \u003d false: disabled\n allow_versions \u003d True, allow_versioned_writes \u003d false: disabled\n allow_versions \u003d True, allow_versioned_writes \u003d true: enabled\n\nIs that true? If so, I am wondering why we need the allow_versioned_writes option even though versioned_write middleware will be inserted to pipeline automatically?\n\nSo, on this patch, maybe we have a couple of way to disable versioned_write. One is setting false in CONTAINER config and the other is setting false at middleware option in PROXY config. That seems really confusable to users which config actuall enabled.\n\nIf we could go a way to remove allow_versions option from CONTAINER config. It should be easy/obvious that we can turn on/off the versioned_writes only at PROXY config, though it will need more changes moving the header handling from container/server.py into versioned_writes middleware.","commit_id":"c441a4e3e879de7110629055dc42349d0f01c481"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"d9e421b1ac619f4d4c895af928c18f1ced318574","unresolved":false,"context_lines":[{"line_number":712,"context_line":"# settings via HTTP GET /info."},{"line_number":713,"context_line":"# WARNING: Setting this option bypasses the \"allow_versions\" option"},{"line_number":714,"context_line":"# in the container configuration file, which will be eventually"},{"line_number":715,"context_line":"# deprecated."},{"line_number":716,"context_line":"# allow_versioned_writes \u003d true"}],"source_content_type":"application/octet-stream","patch_set":39,"id":"3a50d1a3_4229c488","line":715,"in_reply_to":"3a50d1a3_114d5699","updated":"2015-07-30 09:48:23.000000000","message":"you can\u0027t just remove the config from the container server I don\u0027t think.\n\nI would like the cluster to behave the same after you upgrade even if you don\u0027t change your on disk configs.\n\nSo if your container servers are off - no versions.\nIf your container servers are on - versions.\n\nThiago did a bunch of work to make the upgrade path smooth.","commit_id":"c441a4e3e879de7110629055dc42349d0f01c481"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"faa37ccfd229f48673a6ebf93cbbc81dd037579f","unresolved":false,"context_lines":[{"line_number":712,"context_line":"# settings via HTTP GET /info."},{"line_number":713,"context_line":"# WARNING: Setting this option bypasses the \"allow_versions\" option"},{"line_number":714,"context_line":"# in the container configuration file, which will be eventually"},{"line_number":715,"context_line":"# deprecated."},{"line_number":716,"context_line":"# allow_versioned_writes \u003d true"}],"source_content_type":"application/octet-stream","patch_set":39,"id":"3a50d1a3_aabc0c07","line":715,"in_reply_to":"3a50d1a3_4229c488","updated":"2015-07-30 19:13:14.000000000","message":"changed the default to false and added a note recommending ops to remove \u0027allow_versions\u0027 flag from container config files when enabling this option.","commit_id":"c441a4e3e879de7110629055dc42349d0f01c481"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"fcc825ec9a94cf0a5b128623a4ea0000b1ce08e7","unresolved":false,"context_lines":[{"line_number":714,"context_line":"# in the container configuration file, which will be eventually"},{"line_number":715,"context_line":"# deprecated. "},{"line_number":716,"context_line":"# When enabling this option, you should also remove the \"allow_versions\""},{"line_number":717,"context_line":"# option in the container configuration files."},{"line_number":718,"context_line":"# allow_versioned_writes \u003d false"}],"source_content_type":"application/octet-stream","patch_set":40,"id":"3a50d1a3_2df7a48d","line":717,"updated":"2015-07-31 11:06:27.000000000","message":"I\u0027m not sure but once I was walking through a following procedure, existing container with \u0027X-Versions-Location\u0027 became not to work well after setting allow_versioned_writes to true. \n\n # prep\n- Create setting allow_versions\u003dtrue in CONTAINER config and no config for versioned_writes middleware\n- Create a container named as \"versioning\"\n- Create a versioning container named as \"source\" with \"X-Versions-Location: versioning\"\n\n # sanity\n- Put an object into \"source\" container as \"object\"\n- Update the object in \"source\"\n- new versioned object appeared in \"versioning\" container  # this is good\n\n # and then, change config\n- Drop setting allow_versions from CONTAINER config\n- Add allow_versioned_writes\u003dTrue to PROXY config\n- Restart proxy/container server\n\n # expected exisiting container still be versioned but not\n- Update the object in \"source\"\n- No new versioned object appeared in \"versioning\" container\n\nIs this really expected behavior? If so, users must re-PUT \u0027X-Versions-Location\u0027 to existing versioned containers if setting allow_versioned_writes\u003dtrue, is this right?\n\nI wish we had a probe for such an upgrading scenario but I\u0027m mind because it would make this hard to land so quickly :(\n\nSo sorry.","commit_id":"98f6bd296beee9003cb2ae69ac46bd8912d18d77"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"6fd6511eba6591ae274e6691b40f8c350c510a0f","unresolved":false,"context_lines":[{"line_number":714,"context_line":"# in the container configuration file, which will be eventually"},{"line_number":715,"context_line":"# deprecated. "},{"line_number":716,"context_line":"# When enabling this option, you should also remove the \"allow_versions\""},{"line_number":717,"context_line":"# option in the container configuration files."},{"line_number":718,"context_line":"# allow_versioned_writes \u003d false"}],"source_content_type":"application/octet-stream","patch_set":40,"id":"3a50d1a3_bed2d532","line":717,"in_reply_to":"3a50d1a3_2df7a48d","updated":"2015-07-31 17:21:52.000000000","message":"Kota, great catch! my mistake. The issue is that when removing the \u0027allow_versions\u0027 flag, the container_info will no longer return the old configured X-Versions-Location setting, so the user would have to PUT \u0027X-Versions-Location\u0027 again.\n\nI\u0027ve updated the documentation to give better detailed information on upgrade considerations. I don\u0027t think code changes are necessary, but I agree that it is a little bit of a messy business. Then again, keeping backwards compatibility is always messy :(\n\nIf you have different suggestions, I\u0027m open to ideas...","commit_id":"98f6bd296beee9003cb2ae69ac46bd8912d18d77"}],"swift/common/constraints.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"754fd84fab627dd7333ec6f9e452118b26fe140e","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                             \u0027\u003ccontainer name\u003e/\u003cobject name\u003e\u0027)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"def check_name_format(req, name, target_type):"},{"line_number":381,"context_line":"    \"\"\""},{"line_number":382,"context_line":"    Validate that the header contains valid account or container name."},{"line_number":383,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"da86d52c_94affce2","line":380,"updated":"2015-02-03 05:41:31.000000000","message":"Nitpic: To make it more backwards compatible should we have some default for target_type? Based on its past, and the fact that all uses but one uses \u0027Account\u0027 how about we do something like:\n\n  target_type\u003d\u0027Account\u0027","commit_id":"0112b1bd98783c3149a92c2e8bc0fff0554fa846"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"aa5df28d0ab3c0683299f8044c7d9848e5b259aa","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                             \u0027\u003ccontainer name\u003e/\u003cobject name\u003e\u0027)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"def check_name_format(req, name, target_type):"},{"line_number":381,"context_line":"    \"\"\""},{"line_number":382,"context_line":"    Validate that the header contains valid account or container name."},{"line_number":383,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"da86d52c_a0d4f947","line":380,"updated":"2015-02-07 21:09:05.000000000","message":"Yeah, but that isn\u0027t what it does now is it.. that\u0027s why I made it a nit :)\n\nSet a default as most cases are account to allow us all to be a little bit fatter and lazier :P","commit_id":"0112b1bd98783c3149a92c2e8bc0fff0554fa846"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"9b0a5c90610666b71e0d540bebc023409a41794e","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                             \u0027\u003ccontainer name\u003e/\u003cobject name\u003e\u0027)"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"def check_name_format(req, name, target_type):"},{"line_number":381,"context_line":"    \"\"\""},{"line_number":382,"context_line":"    Validate that the header contains valid account or container name."},{"line_number":383,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"da86d52c_3c3d49df","line":380,"in_reply_to":"da86d52c_94affce2","updated":"2015-02-03 12:47:11.000000000","message":"Done\n@Matthew, just to be clear, did you also propose to change the name of the method back to check_account_format?","commit_id":"0112b1bd98783c3149a92c2e8bc0fff0554fa846"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"7fbd484bd00991f0045027bb61af47a8d408a949","unresolved":false,"context_lines":[{"line_number":410,"context_line":"    \"\"\""},{"line_number":411,"context_line":"    Validate that the header contains valid account or container name."},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"    :param req: HTTP request object"},{"line_number":414,"context_line":"    :returns: A properly encoded account name or container name"},{"line_number":415,"context_line":"    :raise: HTTPPreconditionFailed if account header"},{"line_number":416,"context_line":"            is not well formatted."}],"source_content_type":"text/x-python","patch_set":39,"id":"3a50d1a3_5953043a","line":413,"updated":"2015-07-30 07:35:40.000000000","message":"(Nits) I will be happy if you add docs for new arguments. (name and target_type)","commit_id":"c441a4e3e879de7110629055dc42349d0f01c481"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"faa37ccfd229f48673a6ebf93cbbc81dd037579f","unresolved":false,"context_lines":[{"line_number":410,"context_line":"    \"\"\""},{"line_number":411,"context_line":"    Validate that the header contains valid account or container name."},{"line_number":412,"context_line":""},{"line_number":413,"context_line":"    :param req: HTTP request object"},{"line_number":414,"context_line":"    :returns: A properly encoded account name or container name"},{"line_number":415,"context_line":"    :raise: HTTPPreconditionFailed if account header"},{"line_number":416,"context_line":"            is not well formatted."}],"source_content_type":"text/x-python","patch_set":39,"id":"3a50d1a3_2aaebc81","line":413,"in_reply_to":"3a50d1a3_5953043a","updated":"2015-07-30 19:13:14.000000000","message":"Done","commit_id":"c441a4e3e879de7110629055dc42349d0f01c481"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"7fbd484bd00991f0045027bb61af47a8d408a949","unresolved":false,"context_lines":[{"line_number":430,"context_line":"check_account_format \u003d functools.partial(check_name_format,"},{"line_number":431,"context_line":"                                         target_type\u003d\u0027Account\u0027)"},{"line_number":432,"context_line":"check_container_format \u003d functools.partial(check_name_format,"},{"line_number":433,"context_line":"                                           target_type\u003d\u0027Container\u0027)"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"def valid_api_version(version):"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a50d1a3_3c1b8675","line":433,"updated":"2015-07-30 07:35:40.000000000","message":"I like a kind of these refactor, nice!","commit_id":"c441a4e3e879de7110629055dc42349d0f01c481"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"faa37ccfd229f48673a6ebf93cbbc81dd037579f","unresolved":false,"context_lines":[{"line_number":430,"context_line":"check_account_format \u003d functools.partial(check_name_format,"},{"line_number":431,"context_line":"                                         target_type\u003d\u0027Account\u0027)"},{"line_number":432,"context_line":"check_container_format \u003d functools.partial(check_name_format,"},{"line_number":433,"context_line":"                                           target_type\u003d\u0027Container\u0027)"},{"line_number":434,"context_line":""},{"line_number":435,"context_line":""},{"line_number":436,"context_line":"def valid_api_version(version):"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a50d1a3_0ac66049","line":433,"in_reply_to":"3a50d1a3_3c1b8675","updated":"2015-07-30 19:13:14.000000000","message":"me too! Clay\u0027s idea!","commit_id":"c441a4e3e879de7110629055dc42349d0f01c481"}],"swift/common/middleware/obj_versions.py":[{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"5147b31681775aea7821847ea6898d0d97a616f6","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from swift.common.swob import HTTPPreconditionFailed, HTTPServiceUnavailable"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class ObjectVersionsContext(WSGIContext):"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def __init__(self, wsgi_app):"},{"line_number":29,"context_line":"        WSGIContext.__init__(self, wsgi_app)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_d16a44ed","line":26,"updated":"2014-11-13 20:18:39.000000000","message":"It is not clear that a whole WSGIContext object is necessary for this.  Can handle_obj_versions just be a simple method call?","commit_id":"7d69a634935fa5636d0a7b6b2d1f94d9d0f001ef"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"048c7016ba6eb434cb9bd428afc9fcaf59708f0b","unresolved":false,"context_lines":[{"line_number":23,"context_line":"from swift.common.swob import HTTPPreconditionFailed, HTTPServiceUnavailable"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class ObjectVersionsContext(WSGIContext):"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def __init__(self, wsgi_app):"},{"line_number":29,"context_line":"        WSGIContext.__init__(self, wsgi_app)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_8c509fd5","line":26,"in_reply_to":"5a890539_d16a44ed","updated":"2014-11-13 20:33:28.000000000","message":"I decided to a WSGIContext based on a conversation I had with JD about this topic: http://eavesdrop.openstack.org/irclogs/%23openstack-swift/%23openstack-swift.2014-09-05.log\n\nBasically because we make a HEAD and COPY request and act on the reponses of those requests, it seemed correct to use WSGIContext. am I understanding this incorrectly? Thanks!","commit_id":"7d69a634935fa5636d0a7b6b2d1f94d9d0f001ef"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"5147b31681775aea7821847ea6898d0d97a616f6","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            (version, account, container, obj) \u003d req.split_path(3, 4, True)"},{"line_number":83,"context_line":"        except ValueError:"},{"line_number":84,"context_line":"            return self.app(env, start_response)"},{"line_number":85,"context_line":"        if account and container and obj and req.method in [\u0027PUT\u0027, \u0027COPY\u0027]:"},{"line_number":86,"context_line":"            object_name \u003d unquote(obj)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"            container_info \u003d get_container_info(env, self.app)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_91f7dc58","line":85,"updated":"2014-11-13 20:18:39.000000000","message":"You might want to escape before even trying to get a/c/o after the request, so that GETs are not burdened by the building of the request object or the processing of the path.","commit_id":"7d69a634935fa5636d0a7b6b2d1f94d9d0f001ef"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"5147b31681775aea7821847ea6898d0d97a616f6","unresolved":false,"context_lines":[{"line_number":88,"context_line":"            container_info \u003d get_container_info(env, self.app)"},{"line_number":89,"context_line":"            object_versions \u003d container_info[\u0027versions\u0027]"},{"line_number":90,"context_line":"            policy_index \u003d req.headers.get(\u0027X-Backend-Storage-Policy-Index\u0027,"},{"line_number":91,"context_line":"                                           container_info[\u0027storage_policy\u0027])"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"            if object_versions and not req.environ.get(\u0027swift_versioned_copy\u0027):"},{"line_number":94,"context_line":"                obj_ctx \u003d ObjectVersionsContext(self.app)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_11876cd8","line":91,"updated":"2014-11-13 20:18:39.000000000","message":"Perhaps fetch the policy index only if we are going to call handle_obj_versions?","commit_id":"7d69a634935fa5636d0a7b6b2d1f94d9d0f001ef"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"5147b31681775aea7821847ea6898d0d97a616f6","unresolved":false,"context_lines":[{"line_number":90,"context_line":"            policy_index \u003d req.headers.get(\u0027X-Backend-Storage-Policy-Index\u0027,"},{"line_number":91,"context_line":"                                           container_info[\u0027storage_policy\u0027])"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"            if object_versions and not req.environ.get(\u0027swift_versioned_copy\u0027):"},{"line_number":94,"context_line":"                obj_ctx \u003d ObjectVersionsContext(self.app)"},{"line_number":95,"context_line":"                ret \u003d obj_ctx.handle_obj_versions(policy_index, req,"},{"line_number":96,"context_line":"                                                  object_versions, object_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_91e0bc97","line":93,"updated":"2014-11-13 20:18:39.000000000","message":"You might want to consider checking for \"swift_versioned_copy\" before getting a request object, since if that is false, none of the work to get the other information will be useful.\n\nWe want to keep this middleware lean and mean since it will apply to all requests, account, container, obj.","commit_id":"7d69a634935fa5636d0a7b6b2d1f94d9d0f001ef"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"b8fea90d494df6a36ed8a2bd1193cfdca50c093b","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            (version, account, container, obj) \u003d req.split_path(3, 4, True)"},{"line_number":83,"context_line":"        except ValueError:"},{"line_number":84,"context_line":"            return self.app(env, start_response)"},{"line_number":85,"context_line":"        if account and container and obj and req.method in [\u0027PUT\u0027, \u0027COPY\u0027]:"},{"line_number":86,"context_line":"            object_name \u003d unquote(obj)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"            container_info \u003d get_container_info(env, self.app)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_72ab4e75","line":85,"updated":"2014-11-13 21:51:27.000000000","message":"I think if obj is defined account and container are defined too - so it could be written as\n\n if obj and req.method...\n\nOr am I wrong? But this is just a very minor nitpick.","commit_id":"5a98347c801afc43226b355828809abb7fb0719f"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"26eecaa625813cdf7ecce51523a97bd54d4b6a0b","unresolved":false,"context_lines":[{"line_number":82,"context_line":"            (version, account, container, obj) \u003d req.split_path(3, 4, True)"},{"line_number":83,"context_line":"        except ValueError:"},{"line_number":84,"context_line":"            return self.app(env, start_response)"},{"line_number":85,"context_line":"        if account and container and obj and req.method in [\u0027PUT\u0027, \u0027COPY\u0027]:"},{"line_number":86,"context_line":"            object_name \u003d unquote(obj)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"            container_info \u003d get_container_info(env, self.app)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_1bc3d489","line":85,"in_reply_to":"5a890539_72ab4e75","updated":"2014-11-15 21:28:10.000000000","message":"Done","commit_id":"5a98347c801afc43226b355828809abb7fb0719f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"611a4e361cbe2fdce6be04dc802138aa353ded8f","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":"            container_info \u003d get_container_info(env, self.app)"},{"line_number":89,"context_line":"            object_versions \u003d container_info[\u0027versions\u0027]"},{"line_number":90,"context_line":"            policy_index \u003d req.headers.get(\u0027X-Backend-Storage-Policy-Index\u0027,"},{"line_number":91,"context_line":"                                           container_info[\u0027storage_policy\u0027])"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"            if object_versions and not req.environ.get(\u0027swift_versioned_copy\u0027):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_25409006","line":90,"updated":"2014-11-14 09:31:19.000000000","message":"Is X-Backend-Storage-Policy-Index the right header? i.e. is the -Backend- part right here?\n\nI expect I am missing something - when will the object request have a policy index header?","commit_id":"5a98347c801afc43226b355828809abb7fb0719f"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"26eecaa625813cdf7ecce51523a97bd54d4b6a0b","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":"            container_info \u003d get_container_info(env, self.app)"},{"line_number":89,"context_line":"            object_versions \u003d container_info[\u0027versions\u0027]"},{"line_number":90,"context_line":"            policy_index \u003d req.headers.get(\u0027X-Backend-Storage-Policy-Index\u0027,"},{"line_number":91,"context_line":"                                           container_info[\u0027storage_policy\u0027])"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"            if object_versions and not req.environ.get(\u0027swift_versioned_copy\u0027):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_fbc5288e","line":90,"in_reply_to":"5a890539_25409006","updated":"2014-11-15 21:28:10.000000000","message":"removed it, it is no longer needed here, it was code from the object controller","commit_id":"5a98347c801afc43226b355828809abb7fb0719f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"611a4e361cbe2fdce6be04dc802138aa353ded8f","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"def filter_factory(global_conf, **local_conf):"},{"line_number":104,"context_line":"    conf \u003d global_conf.copy()"},{"line_number":105,"context_line":"    conf.update(local_conf)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def obj_versions_filter(app):"},{"line_number":108,"context_line":"        return ObjectVersionsMiddleware(app, conf)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_a5e56039","line":105,"updated":"2014-11-14 09:31:19.000000000","message":"you could add:\n\n register_swift_info(\u0027object_versions\u0027)\n\nsee e.g. containersync middleware","commit_id":"5a98347c801afc43226b355828809abb7fb0719f"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"26eecaa625813cdf7ecce51523a97bd54d4b6a0b","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"def filter_factory(global_conf, **local_conf):"},{"line_number":104,"context_line":"    conf \u003d global_conf.copy()"},{"line_number":105,"context_line":"    conf.update(local_conf)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def obj_versions_filter(app):"},{"line_number":108,"context_line":"        return ObjectVersionsMiddleware(app, conf)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_dbcdccb8","line":105,"in_reply_to":"5a890539_a5e56039","updated":"2014-11-15 21:28:10.000000000","message":"Done","commit_id":"5a98347c801afc43226b355828809abb7fb0719f"}],"swift/common/middleware/versioned_writes.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"7c653a46f8547e626ae62d59e9d8e0bd9bb3c94a","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            copy_headers \u003d {"},{"line_number":101,"context_line":"                \u0027Destination\u0027: \u0027%s/%s\u0027 % (lcontainer, vers_obj_name)}"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"            copy_environ \u003d self._get_new_env(req, \u0027COPY\u0027)"},{"line_number":104,"context_line":"            copy_resp \u003d Request.blank("},{"line_number":105,"context_line":"                req.path_info, headers\u003dcopy_headers,"},{"line_number":106,"context_line":"                environ\u003dcopy_environ).get_response(self.app)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_5179992d","line":103,"updated":"2014-11-25 19:04:56.000000000","message":"this environment needs to be cleaned up a lot more I think... the COPY is getting the content-type used in the original PUT.","commit_id":"48505cce8d8bed7ab8eec49e63b026543368dbe4"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"7c653a46f8547e626ae62d59e9d8e0bd9bb3c94a","unresolved":false,"context_lines":[{"line_number":212,"context_line":""},{"line_number":213,"context_line":"            if not container_info or not is_success(container_info[\u0027status\u0027]):"},{"line_number":214,"context_line":"                # this will hopefully return 400 or 404 later"},{"line_number":215,"context_line":"                return self.app(env, start_response)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"            object_versions \u003d container_info[\u0027versions\u0027]"},{"line_number":218,"context_line":"            if object_versions:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_ae3efc88","line":215,"updated":"2014-11-25 19:04:56.000000000","message":"I think this would be fine as long as you use the same env that made the original container_info check because the get_info caching in the environ.  Otherwise seems subject to a sub-optimal race.  I could be wrong on both counts.","commit_id":"48505cce8d8bed7ab8eec49e63b026543368dbe4"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"1ceb2547ed3bf43f4f611110d7db5ccb26650946","unresolved":false,"context_lines":[{"line_number":212,"context_line":""},{"line_number":213,"context_line":"            if not container_info or not is_success(container_info[\u0027status\u0027]):"},{"line_number":214,"context_line":"                # this will hopefully return 400 or 404 later"},{"line_number":215,"context_line":"                return self.app(env, start_response)"},{"line_number":216,"context_line":""},{"line_number":217,"context_line":"            object_versions \u003d container_info[\u0027versions\u0027]"},{"line_number":218,"context_line":"            if object_versions:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a890539_a2a6e8be","line":215,"in_reply_to":"5a890539_ae3efc88","updated":"2014-11-25 21:04:30.000000000","message":"I need to test this. I would expect that even in the case of the COPY request, the original env will eventually fail if getting container_info for the target container is failing","commit_id":"48505cce8d8bed7ab8eec49e63b026543368dbe4"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"fa6017272416d68c2e56a55c9737d02e5f7f673c","unresolved":false,"context_lines":[{"line_number":333,"context_line":"            # location could be stored as sysmeta or not, need to check both"},{"line_number":334,"context_line":"            # until"},{"line_number":335,"context_line":"            object_versions \u003d container_info[\u0027versions\u0027]"},{"line_number":336,"context_line":"            if not object_versions:"},{"line_number":337,"context_line":"                object_versions \u003d container_info.get("},{"line_number":338,"context_line":"                    \u0027sysmeta\u0027, {}).get(\u0027version-location\u0027)"},{"line_number":339,"context_line":"                if object_versions and isinstance(object_versions, unicode):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_711d0abe","line":336,"updated":"2014-12-19 00:23:11.000000000","message":"I think the sysmeta would take precedence?  If I have a container with versions, then I upgrade, then I want to change the version location (write new value to sysmeta) - will the old metadata value get unset, and will the last write take precedence?","commit_id":"fc19ae2eb25c28910c7c08fb3eb2494a622884fe"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"f7f5d27e2b9bb5d19b2e82c53c9f3d5c14f109ad","unresolved":false,"context_lines":[{"line_number":333,"context_line":"            # location could be stored as sysmeta or not, need to check both"},{"line_number":334,"context_line":"            # until"},{"line_number":335,"context_line":"            object_versions \u003d container_info[\u0027versions\u0027]"},{"line_number":336,"context_line":"            if not object_versions:"},{"line_number":337,"context_line":"                object_versions \u003d container_info.get("},{"line_number":338,"context_line":"                    \u0027sysmeta\u0027, {}).get(\u0027version-location\u0027)"},{"line_number":339,"context_line":"                if object_versions and isinstance(object_versions, unicode):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a961159_d648fb5d","line":336,"in_reply_to":"3a961159_711d0abe","updated":"2014-12-24 18:59:49.000000000","message":"@Clay, I changed the code in the latest patch so that sysmeta takes precendence. For now, the old metadata value is not getting unset, but if there\u0027s new value set as sysmeta, that\u0027s the value that will be used.","commit_id":"fc19ae2eb25c28910c7c08fb3eb2494a622884fe"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"754fd84fab627dd7333ec6f9e452118b26fe140e","unresolved":false,"context_lines":[{"line_number":40,"context_line":"object 5 times to completely remove the object."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"Note: A large object manifest file cannot be versioned, but a large object"},{"line_number":43,"context_line":"manifest may point to versioned segments."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"--------------------------------------------------"},{"line_number":46,"context_line":"How to Enable Object Versioning in a Swift Cluster"}],"source_content_type":"text/x-python","patch_set":17,"id":"da86d52c_39bac9c0","line":43,"updated":"2015-02-03 05:41:31.000000000","message":"In your commit message you say dlo and slo manifests can be versioned now.","commit_id":"0112b1bd98783c3149a92c2e8bc0fff0554fa846"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"9b0a5c90610666b71e0d540bebc023409a41794e","unresolved":false,"context_lines":[{"line_number":40,"context_line":"object 5 times to completely remove the object."},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"Note: A large object manifest file cannot be versioned, but a large object"},{"line_number":43,"context_line":"manifest may point to versioned segments."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"--------------------------------------------------"},{"line_number":46,"context_line":"How to Enable Object Versioning in a Swift Cluster"}],"source_content_type":"text/x-python","patch_set":17,"id":"da86d52c_bc07791b","line":43,"in_reply_to":"da86d52c_39bac9c0","updated":"2015-02-03 12:47:11.000000000","message":"Done.\nGood catch!","commit_id":"0112b1bd98783c3149a92c2e8bc0fff0554fa846"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"754fd84fab627dd7333ec6f9e452118b26fe140e","unresolved":false,"context_lines":[{"line_number":301,"context_line":"        except ValueError:"},{"line_number":302,"context_line":"            return self.app(env, start_response)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"        if config_true_value(self.conf.get(\u0027allow_versioned_writes\u0027, \u0027f\u0027)) \\"},{"line_number":305,"context_line":"                and container and not obj:"},{"line_number":306,"context_line":"            if req.method in (\u0027PUT\u0027, \u0027POST\u0027):"},{"line_number":307,"context_line":"                # set version location header as sysmeta"}],"source_content_type":"text/x-python","patch_set":17,"id":"da86d52c_f944b1b8","line":304,"updated":"2015-02-03 05:41:31.000000000","message":"You don\u0027t need to define a default here as config_true_value(None) \u003d\u003d False","commit_id":"0112b1bd98783c3149a92c2e8bc0fff0554fa846"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"9b0a5c90610666b71e0d540bebc023409a41794e","unresolved":false,"context_lines":[{"line_number":301,"context_line":"        except ValueError:"},{"line_number":302,"context_line":"            return self.app(env, start_response)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"        if config_true_value(self.conf.get(\u0027allow_versioned_writes\u0027, \u0027f\u0027)) \\"},{"line_number":305,"context_line":"                and container and not obj:"},{"line_number":306,"context_line":"            if req.method in (\u0027PUT\u0027, \u0027POST\u0027):"},{"line_number":307,"context_line":"                # set version location header as sysmeta"}],"source_content_type":"text/x-python","patch_set":17,"id":"da86d52c_27045214","line":304,"in_reply_to":"da86d52c_f944b1b8","updated":"2015-02-03 12:47:11.000000000","message":"Done","commit_id":"0112b1bd98783c3149a92c2e8bc0fff0554fa846"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"754fd84fab627dd7333ec6f9e452118b26fe140e","unresolved":false,"context_lines":[{"line_number":383,"context_line":"def filter_factory(global_conf, **local_conf):"},{"line_number":384,"context_line":"    conf \u003d global_conf.copy()"},{"line_number":385,"context_line":"    conf.update(local_conf)"},{"line_number":386,"context_line":"    if config_true_value(conf.get(\u0027allow_versioned_writes\u0027, \u0027f\u0027)):"},{"line_number":387,"context_line":"        register_swift_info(\u0027versioned_writes\u0027)"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"    def obj_versions_filter(app):"}],"source_content_type":"text/x-python","patch_set":17,"id":"da86d52c_39080991","line":386,"updated":"2015-02-03 05:41:31.000000000","message":"Does the default have to be an \u0027f\u0027, config_true_value returns False for None so this could just be:\n\n  if config_true_value(conf.get(\u0027allow_versioned_writes\u0027)):","commit_id":"0112b1bd98783c3149a92c2e8bc0fff0554fa846"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"9b0a5c90610666b71e0d540bebc023409a41794e","unresolved":false,"context_lines":[{"line_number":383,"context_line":"def filter_factory(global_conf, **local_conf):"},{"line_number":384,"context_line":"    conf \u003d global_conf.copy()"},{"line_number":385,"context_line":"    conf.update(local_conf)"},{"line_number":386,"context_line":"    if config_true_value(conf.get(\u0027allow_versioned_writes\u0027, \u0027f\u0027)):"},{"line_number":387,"context_line":"        register_swift_info(\u0027versioned_writes\u0027)"},{"line_number":388,"context_line":""},{"line_number":389,"context_line":"    def obj_versions_filter(app):"}],"source_content_type":"text/x-python","patch_set":17,"id":"da86d52c_87141e45","line":386,"in_reply_to":"da86d52c_39080991","updated":"2015-02-03 12:47:11.000000000","message":"Done","commit_id":"0112b1bd98783c3149a92c2e8bc0fff0554fa846"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"88690249d07ae6cfc0c08b9bb2977ab83fbd8c6c","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            if lresp.status_int \u003d\u003d HTTP_NOT_FOUND:"},{"line_number":144,"context_line":"                raise ListingIterNotFound()"},{"line_number":145,"context_line":"            elif not is_success(lresp.status_int):"},{"line_number":146,"context_line":"                raise ListingIterError()"},{"line_number":147,"context_line":"            if not lresp.body:"},{"line_number":148,"context_line":"                break"},{"line_number":149,"context_line":"            sublisting \u003d json.loads(lresp.body)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_1344d419","line":146,"updated":"2015-02-11 17:26:07.000000000","message":"i bet I\u0027ll have some complaint about this if I thought about it hard enough, i\u0027m not sure why I get hung up on \"dangling elif\" - redbo has told me before that it\u0027s a weird hangup.","commit_id":"fc41bc603a41e61bad469401d7f7f4288b89fae7"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"e6e5b3c8a6fabf50aeea518c32f66134ba5e00e9","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            if lresp.status_int \u003d\u003d HTTP_NOT_FOUND:"},{"line_number":144,"context_line":"                raise ListingIterNotFound()"},{"line_number":145,"context_line":"            elif not is_success(lresp.status_int):"},{"line_number":146,"context_line":"                raise ListingIterError()"},{"line_number":147,"context_line":"            if not lresp.body:"},{"line_number":148,"context_line":"                break"},{"line_number":149,"context_line":"            sublisting \u003d json.loads(lresp.body)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_b32ce84b","line":146,"in_reply_to":"da86d52c_1344d419","updated":"2015-02-17 21:12:39.000000000","message":"Done: changed it to if/else as suggested below","commit_id":"fc41bc603a41e61bad469401d7f7f4288b89fae7"},{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"5c443f2477d427f4e133114769db9b256d64ac12","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"            copy_req \u003d make_subrequest("},{"line_number":188,"context_line":"                req.environ, path\u003dreq.path_info,"},{"line_number":189,"context_line":"                headers\u003dcopy_headers, method\u003d\u0027COPY\u0027, swift_source\u003d\u0027VW\u0027)"},{"line_number":190,"context_line":"            copy_resp \u003d copy_req.get_response(self.app)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"            if is_client_error(copy_resp.status_int):"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_931444ea","line":189,"updated":"2015-02-10 22:54:16.000000000","message":"This is a new \"swift_source\". Please update the logs doc. http://docs.openstack.org/developer/swift/logs.html#swift-source","commit_id":"fc41bc603a41e61bad469401d7f7f4288b89fae7"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"e6e5b3c8a6fabf50aeea518c32f66134ba5e00e9","unresolved":false,"context_lines":[{"line_number":186,"context_line":""},{"line_number":187,"context_line":"            copy_req \u003d make_subrequest("},{"line_number":188,"context_line":"                req.environ, path\u003dreq.path_info,"},{"line_number":189,"context_line":"                headers\u003dcopy_headers, method\u003d\u0027COPY\u0027, swift_source\u003d\u0027VW\u0027)"},{"line_number":190,"context_line":"            copy_resp \u003d copy_req.get_response(self.app)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"            if is_client_error(copy_resp.status_int):"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_26cfaa57","line":189,"in_reply_to":"da86d52c_931444ea","updated":"2015-02-17 21:12:39.000000000","message":"Done","commit_id":"fc41bc603a41e61bad469401d7f7f4288b89fae7"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e86c5eefb071ed00ab3ed0b7fe3b4f2eb466924c","unresolved":false,"context_lines":[{"line_number":192,"context_line":"            if is_client_error(copy_resp.status_int):"},{"line_number":193,"context_line":"                # missing container or bad permissions"},{"line_number":194,"context_line":"                return HTTPPreconditionFailed(request\u003dreq)"},{"line_number":195,"context_line":"            elif not is_success(copy_resp.status_int):"},{"line_number":196,"context_line":"                # could not copy the data, bail"},{"line_number":197,"context_line":"                return HTTPServiceUnavailable(request\u003dreq)"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_93e1a42c","line":195,"updated":"2015-02-10 22:51:31.000000000","message":"just if - it\u0027s after return","commit_id":"fc41bc603a41e61bad469401d7f7f4288b89fae7"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"e6e5b3c8a6fabf50aeea518c32f66134ba5e00e9","unresolved":false,"context_lines":[{"line_number":192,"context_line":"            if is_client_error(copy_resp.status_int):"},{"line_number":193,"context_line":"                # missing container or bad permissions"},{"line_number":194,"context_line":"                return HTTPPreconditionFailed(request\u003dreq)"},{"line_number":195,"context_line":"            elif not is_success(copy_resp.status_int):"},{"line_number":196,"context_line":"                # could not copy the data, bail"},{"line_number":197,"context_line":"                return HTTPServiceUnavailable(request\u003dreq)"},{"line_number":198,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_e6003268","line":195,"in_reply_to":"da86d52c_93e1a42c","updated":"2015-02-17 21:12:39.000000000","message":"Done","commit_id":"fc41bc603a41e61bad469401d7f7f4288b89fae7"},{"author":{"_account_id":12193,"name":"Hisashi Osanai","email":"osanai.hisashi@jp.fujitsu.com","username":"ho"},"change_message_id":"658036781b134fa097852a303cdbe9adbaaf3f19","unresolved":false,"context_lines":[{"line_number":213,"context_line":"            # no worries, last_item is None"},{"line_number":214,"context_line":"            pass"},{"line_number":215,"context_line":"        except ListingIterNotAuthorized as err:"},{"line_number":216,"context_line":"            return err.aresp"},{"line_number":217,"context_line":"        except ListingIterError:"},{"line_number":218,"context_line":"            return HTTPServerError(request\u003dreq)"},{"line_number":219,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_1b292f9b","line":216,"updated":"2015-02-11 15:46:35.000000000","message":"this exception is not possible to catch here because you removed container acl check in _listing_pages_iter().","commit_id":"fc41bc603a41e61bad469401d7f7f4288b89fae7"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"e6e5b3c8a6fabf50aeea518c32f66134ba5e00e9","unresolved":false,"context_lines":[{"line_number":213,"context_line":"            # no worries, last_item is None"},{"line_number":214,"context_line":"            pass"},{"line_number":215,"context_line":"        except ListingIterNotAuthorized as err:"},{"line_number":216,"context_line":"            return err.aresp"},{"line_number":217,"context_line":"        except ListingIterError:"},{"line_number":218,"context_line":"            return HTTPServerError(request\u003dreq)"},{"line_number":219,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_93136400","line":216,"in_reply_to":"da86d52c_1b292f9b","updated":"2015-02-17 21:12:39.000000000","message":"Done","commit_id":"fc41bc603a41e61bad469401d7f7f4288b89fae7"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"88690249d07ae6cfc0c08b9bb2977ab83fbd8c6c","unresolved":false,"context_lines":[{"line_number":247,"context_line":"                return HTTPPreconditionFailed(request\u003dreq)"},{"line_number":248,"context_line":"            elif not is_success(copy_resp.status_int):"},{"line_number":249,"context_line":"                # could not copy the data, bail"},{"line_number":250,"context_line":"                return HTTPServiceUnavailable(request\u003dreq)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"            # reset these because the COPY changed them"},{"line_number":253,"context_line":"            new_del_req \u003d Request.blank(copy_path, environ\u003dreq.environ)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_f3f020ff","line":250,"updated":"2015-02-11 17:26:07.000000000","message":"nit: I would prefer\n\n    if not is_success():\n        if is_client_error():\n            return client_error\n        else:  # server error\n            return server_error","commit_id":"fc41bc603a41e61bad469401d7f7f4288b89fae7"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"e6e5b3c8a6fabf50aeea518c32f66134ba5e00e9","unresolved":false,"context_lines":[{"line_number":247,"context_line":"                return HTTPPreconditionFailed(request\u003dreq)"},{"line_number":248,"context_line":"            elif not is_success(copy_resp.status_int):"},{"line_number":249,"context_line":"                # could not copy the data, bail"},{"line_number":250,"context_line":"                return HTTPServiceUnavailable(request\u003dreq)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"            # reset these because the COPY changed them"},{"line_number":253,"context_line":"            new_del_req \u003d Request.blank(copy_path, environ\u003dreq.environ)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_c6e40ee2","line":250,"in_reply_to":"da86d52c_f3f020ff","updated":"2015-02-17 21:12:39.000000000","message":"Done","commit_id":"fc41bc603a41e61bad469401d7f7f4288b89fae7"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e86c5eefb071ed00ab3ed0b7fe3b4f2eb466924c","unresolved":false,"context_lines":[{"line_number":324,"context_line":"            elif req.method in (\u0027GET\u0027, \u0027HEAD\u0027):"},{"line_number":325,"context_line":"                vw_ctx \u003d VersionedWritesContext(self.app, self.logger)"},{"line_number":326,"context_line":"                return vw_ctx.handle_cont_GETorHEAD(env, start_response)"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        elif obj and req.method in (\u0027PUT\u0027, \u0027COPY\u0027, \u0027DELETE\u0027):"},{"line_number":329,"context_line":"            account_name \u003d unquote(account)"},{"line_number":330,"context_line":"            container_name \u003d unquote(container)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_934fe433","line":327,"updated":"2015-02-10 22:51:31.000000000","message":"and if req.method is something like DELETE, then what","commit_id":"fc41bc603a41e61bad469401d7f7f4288b89fae7"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"e6e5b3c8a6fabf50aeea518c32f66134ba5e00e9","unresolved":false,"context_lines":[{"line_number":324,"context_line":"            elif req.method in (\u0027GET\u0027, \u0027HEAD\u0027):"},{"line_number":325,"context_line":"                vw_ctx \u003d VersionedWritesContext(self.app, self.logger)"},{"line_number":326,"context_line":"                return vw_ctx.handle_cont_GETorHEAD(env, start_response)"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        elif obj and req.method in (\u0027PUT\u0027, \u0027COPY\u0027, \u0027DELETE\u0027):"},{"line_number":329,"context_line":"            account_name \u003d unquote(account)"},{"line_number":330,"context_line":"            container_name \u003d unquote(container)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_89b787d7","line":327,"in_reply_to":"da86d52c_934fe433","updated":"2015-02-17 21:12:39.000000000","message":"DELETE of container is not handled by object versioning middleware. added a comment to call that out.","commit_id":"fc41bc603a41e61bad469401d7f7f4288b89fae7"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"88690249d07ae6cfc0c08b9bb2977ab83fbd8c6c","unresolved":false,"context_lines":[{"line_number":367,"context_line":"                        container_info[\u0027storage_policy\u0027])"},{"line_number":368,"context_line":"                    ret \u003d vw_ctx.handle_obj_versions_put("},{"line_number":369,"context_line":"                        req, object_versions, object_name, policy_idx)"},{"line_number":370,"context_line":"                elif req.method \u003d\u003d \u0027DELETE\u0027:"},{"line_number":371,"context_line":"                    ret \u003d vw_ctx.handle_obj_versions_delete("},{"line_number":372,"context_line":"                        req, object_versions, account_name,"},{"line_number":373,"context_line":"                        container_name, object_name)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_33147843","line":370,"updated":"2015-02-11 17:26:07.000000000","message":"I would prefer:\n\n    else:  # req.method must be DELETE\n\nor:\n\n    elif req.method \u003d\u003d \u0027DELETE\u0027:\n        ...\n    else:\n        # this should not happen\n        return 405  # method not allowed","commit_id":"fc41bc603a41e61bad469401d7f7f4288b89fae7"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"6311add6e3381b198deb12ebd3f43cc59f24c0e6","unresolved":false,"context_lines":[{"line_number":367,"context_line":"                        container_info[\u0027storage_policy\u0027])"},{"line_number":368,"context_line":"                    ret \u003d vw_ctx.handle_obj_versions_put("},{"line_number":369,"context_line":"                        req, object_versions, object_name, policy_idx)"},{"line_number":370,"context_line":"                elif req.method \u003d\u003d \u0027DELETE\u0027:"},{"line_number":371,"context_line":"                    ret \u003d vw_ctx.handle_obj_versions_delete("},{"line_number":372,"context_line":"                        req, object_versions, account_name,"},{"line_number":373,"context_line":"                        container_name, object_name)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_8dadd89d","line":370,"in_reply_to":"da86d52c_33147843","updated":"2015-02-11 17:36:44.000000000","message":"You don\u0027t wanna 405 here; let OPTIONS and any other weirdos get through.","commit_id":"fc41bc603a41e61bad469401d7f7f4288b89fae7"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"e6e5b3c8a6fabf50aeea518c32f66134ba5e00e9","unresolved":false,"context_lines":[{"line_number":367,"context_line":"                        container_info[\u0027storage_policy\u0027])"},{"line_number":368,"context_line":"                    ret \u003d vw_ctx.handle_obj_versions_put("},{"line_number":369,"context_line":"                        req, object_versions, object_name, policy_idx)"},{"line_number":370,"context_line":"                elif req.method \u003d\u003d \u0027DELETE\u0027:"},{"line_number":371,"context_line":"                    ret \u003d vw_ctx.handle_obj_versions_delete("},{"line_number":372,"context_line":"                        req, object_versions, account_name,"},{"line_number":373,"context_line":"                        container_name, object_name)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_c6e5eea4","line":370,"in_reply_to":"da86d52c_8dadd89d","updated":"2015-02-17 21:12:39.000000000","message":"going with the else to handle DELETE option","commit_id":"fc41bc603a41e61bad469401d7f7f4288b89fae7"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"88690249d07ae6cfc0c08b9bb2977ab83fbd8c6c","unresolved":false,"context_lines":[{"line_number":371,"context_line":"                    ret \u003d vw_ctx.handle_obj_versions_delete("},{"line_number":372,"context_line":"                        req, object_versions, account_name,"},{"line_number":373,"context_line":"                        container_name, object_name)"},{"line_number":374,"context_line":"                if ret:"},{"line_number":375,"context_line":"                    return ret(env, start_response)"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"        return self.app(env, start_response)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_b34ea86d","line":374,"updated":"2015-02-11 17:26:07.000000000","message":"probably better to call this value \"err_response\" to highlight that our handle functions return None on success.","commit_id":"fc41bc603a41e61bad469401d7f7f4288b89fae7"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"e6e5b3c8a6fabf50aeea518c32f66134ba5e00e9","unresolved":false,"context_lines":[{"line_number":371,"context_line":"                    ret \u003d vw_ctx.handle_obj_versions_delete("},{"line_number":372,"context_line":"                        req, object_versions, account_name,"},{"line_number":373,"context_line":"                        container_name, object_name)"},{"line_number":374,"context_line":"                if ret:"},{"line_number":375,"context_line":"                    return ret(env, start_response)"},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"        return self.app(env, start_response)"}],"source_content_type":"text/x-python","patch_set":19,"id":"da86d52c_a92c4b9a","line":374,"in_reply_to":"da86d52c_b34ea86d","updated":"2015-02-17 21:12:39.000000000","message":"in the case of handle_obj_versions_delete the request is executed inside the method and the response is returned (could be success or error)","commit_id":"fc41bc603a41e61bad469401d7f7f4288b89fae7"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                    \u0027x-auth-token\u0027: req.headers.get(\u0027x-auth-token\u0027)}"},{"line_number":164,"context_line":"        head_req \u003d make_pre_authed_request("},{"line_number":165,"context_line":"            req.environ, path\u003dreq.path_info,"},{"line_number":166,"context_line":"            headers\u003d_headers, method\u003d\u0027HEAD\u0027, swift_source\u003d\u0027VW\u0027)"},{"line_number":167,"context_line":"        hresp \u003d head_req.get_response(self.app)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        # if there\u0027s an existing object, then copy it to"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_00ca2c6e","line":166,"updated":"2015-02-27 07:48:51.000000000","message":"this is a preauth\u0027d HEAD request to the object we\u0027re about to PUT - but this is before we even know if they have permissions to PUT the object here?\n\nMaybe it\u0027s ok, as long as we don\u0027t ever return the hresp to the client...","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"de4080d3a5cd5a80fdbcf782ddde418bfa4ec08a","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                    \u0027x-auth-token\u0027: req.headers.get(\u0027x-auth-token\u0027)}"},{"line_number":164,"context_line":"        head_req \u003d make_pre_authed_request("},{"line_number":165,"context_line":"            req.environ, path\u003dreq.path_info,"},{"line_number":166,"context_line":"            headers\u003d_headers, method\u003d\u0027HEAD\u0027, swift_source\u003d\u0027VW\u0027)"},{"line_number":167,"context_line":"        hresp \u003d head_req.get_response(self.app)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        # if there\u0027s an existing object, then copy it to"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_47dc0f75","line":166,"in_reply_to":"ba7be1f8_00ca2c6e","updated":"2015-02-27 22:26:51.000000000","message":"The reason for this is that the user might have write permission to the container but not read. The use case seems weird to me, but it was allowed in the previous version, so I tried not to change it.\n\nFor now I\u0027m adding a comment to explain this, unless we want to change the behavior.","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            lcontainer \u003d object_versions.split(\u0027/\u0027)[0]"},{"line_number":173,"context_line":"            prefix_len \u003d \u0027%03x\u0027 % len(object_name)"},{"line_number":174,"context_line":"            lprefix \u003d prefix_len + object_name + \u0027/\u0027"},{"line_number":175,"context_line":"            ts_source \u003d hresp.environ.get(\u0027swift_x_timestamp\u0027)"},{"line_number":176,"context_line":"            if ts_source is None:"},{"line_number":177,"context_line":"                ts_source \u003d time.mktime(time.strptime("},{"line_number":178,"context_line":"                                        hresp.headers[\u0027last-modified\u0027],"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_a30ecae3","line":175,"updated":"2015-02-27 07:48:51.000000000","message":"i wonder why this is better than just using the headers directly - I honestly didn\u0027t even know that we added this to the environment in GetOrHeadHandler...\n\nOh how funny, there\u0027s a comment from way back when that references gholt added swift_x_timestamp for container sync (which makes sense  that\u0027s when all the x-timestamp is public stuff happened) - but sometime before redbo\u0027s proxy/controller refactoring de4d23c2 came along and stuck two lines in-between the comment and the relevant code.  lol.  The comment was eventually just lost in bc60cc1.","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            if config_true_value("},{"line_number":188,"context_line":"                hresp.headers.get(\u0027X-Static-Large-Object\u0027)) or \\"},{"line_number":189,"context_line":"                    \u0027X-Object-Manifest\u0027 in hresp.headers:"},{"line_number":190,"context_line":"                req.environ[\u0027QUERY_STRING\u0027] \u003d \u0027multipart-manifest\u003dget\u0027"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"            copy_req \u003d make_pre_authed_request("},{"line_number":193,"context_line":"                req.environ, path\u003dreq.path_info,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_89af277d","line":190,"updated":"2015-02-27 07:48:51.000000000","message":"do we really go through all that extra head request just to decide if we should add a multipart-manifest\u003dget on there?  What\u0027s the harm?\n\nDid we already need the head request because of the swift_x_timestamp manipulation?  Because I think that\u0027d be an interesting middleware callback hook for COPY requests (hey here the response from the GET part of your COPY request, and the req I\u0027m building up for the PUT part - wanna make any changes?).  Actually SLO and DLO probably already do exactly that right?  Except instead of something complicated like gluing sub-requests together we just need to change a timestamp.","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"0793f2e789cc5ceb21ac3d97db79305240f9983e","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            if config_true_value("},{"line_number":188,"context_line":"                hresp.headers.get(\u0027X-Static-Large-Object\u0027)) or \\"},{"line_number":189,"context_line":"                    \u0027X-Object-Manifest\u0027 in hresp.headers:"},{"line_number":190,"context_line":"                req.environ[\u0027QUERY_STRING\u0027] \u003d \u0027multipart-manifest\u003dget\u0027"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"            copy_req \u003d make_pre_authed_request("},{"line_number":193,"context_line":"                req.environ, path\u003dreq.path_info,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_676d5e99","line":190,"in_reply_to":"ba7be1f8_225f0974","updated":"2015-03-03 16:40:50.000000000","message":"got it! great idea! I will look into introducing the callback hook and see how that works. If we can reduce one call, that will be great.\n\n----\n\nRan into an issue with adding the copy_hook. I have to provide a temporary name for the destination of the original COPY request, this name would be eventually changed in the copy_hook with the timestamp. The problem is that the PUT method gets the nodes and partition from the obj. ring before all the copy handling, so some changes would be needed there too. For now, I have created a new function here for you to see and comment.","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"70ca2c13252876c8d492d7bed466ec0d8f95f405","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            if config_true_value("},{"line_number":188,"context_line":"                hresp.headers.get(\u0027X-Static-Large-Object\u0027)) or \\"},{"line_number":189,"context_line":"                    \u0027X-Object-Manifest\u0027 in hresp.headers:"},{"line_number":190,"context_line":"                req.environ[\u0027QUERY_STRING\u0027] \u003d \u0027multipart-manifest\u003dget\u0027"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"            copy_req \u003d make_pre_authed_request("},{"line_number":193,"context_line":"                req.environ, path\u003dreq.path_info,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_225f0974","line":190,"in_reply_to":"ba7be1f8_87c7e763","updated":"2015-02-27 22:39:32.000000000","message":"just that we could just do the COPY without the preflight HEAD request (if we could somehow hook in the updates we want to go along with it ahead of time) and swallow the 404 if there\u0027s nothing to COPY?","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"de4080d3a5cd5a80fdbcf782ddde418bfa4ec08a","unresolved":false,"context_lines":[{"line_number":187,"context_line":"            if config_true_value("},{"line_number":188,"context_line":"                hresp.headers.get(\u0027X-Static-Large-Object\u0027)) or \\"},{"line_number":189,"context_line":"                    \u0027X-Object-Manifest\u0027 in hresp.headers:"},{"line_number":190,"context_line":"                req.environ[\u0027QUERY_STRING\u0027] \u003d \u0027multipart-manifest\u003dget\u0027"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"            copy_req \u003d make_pre_authed_request("},{"line_number":193,"context_line":"                req.environ, path\u003dreq.path_info,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_87c7e763","line":190,"in_reply_to":"ba7be1f8_89af277d","updated":"2015-02-27 22:26:51.000000000","message":"p1. agreed, changed it to just add multipart-manifest\u003dget, no harm. was already doing that in the delete path anyway...\n\np2. Not sure I completely understand your comment, but the main reason for doing the HEAD request is to find out if we need to copy an existing object, otherwise we would n\u0027t even be inside this if statement. what am i missing or not understanding?","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":191,"context_line":""},{"line_number":192,"context_line":"            copy_req \u003d make_pre_authed_request("},{"line_number":193,"context_line":"                req.environ, path\u003dreq.path_info,"},{"line_number":194,"context_line":"                headers\u003dcopy_headers, method\u003d\u0027COPY\u0027, swift_source\u003d\u0027VW\u0027)"},{"line_number":195,"context_line":"            copy_resp \u003d copy_req.get_response(self.app)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"            if not is_success(copy_resp.status_int):"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_40e18499","line":194,"updated":"2015-02-27 07:48:51.000000000","message":"I think my mind would hurt less if we just just did a PUT with an X-Copy-From\n\nThis is also the case where we can write an object that\u0027s already in a container, to a container we might not normally be able to write to otherwise, and as long as we don\u0027t let someone put metadata on the container...\n\nidk, I like the use case, but I feel like there\u0027s a big scary gotcha if someone ever wanted to somehow make a policy that allows a user to set metadata on container without necessarily giving them admin access to the whole account.  If such a situation, having the ability to write metadata onto a container might mean the ability to place an object into any container in the account.  God help us if we ever implement cross-account-versions :\\\n\nAnyway it\u0027s covered in functional tests under TestObjectVersioning.test_versioning_container_acl and it works this way on master...","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                    return HTTPServiceUnavailable(request\u003dreq)"},{"line_number":204,"context_line":"        elif hresp.status_int !\u003d HTTP_NOT_FOUND:"},{"line_number":205,"context_line":"            # if error was other than HTTP_NOT_FOUND, return error immediately"},{"line_number":206,"context_line":"            return hresp"},{"line_number":207,"context_line":"        else:"},{"line_number":208,"context_line":"            # make clay happy :P"},{"line_number":209,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_031cf612","line":206,"updated":"2015-02-27 07:48:51.000000000","message":"hrmmm... well here we return the preauthed hresp - what\u0027s the implication?\n\nIt\u0027s never a 2XX, that\u0027s good - i wonder what client errors might get caught by this block.","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            return hresp"},{"line_number":207,"context_line":"        else:"},{"line_number":208,"context_line":"            # make clay happy :P"},{"line_number":209,"context_line":"            pass"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        # return None and let caller handle original request"},{"line_number":212,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_60a048a6","line":209,"updated":"2015-02-27 07:48:51.000000000","message":"BURN!  It\u0027s ok, I can take the heat.  :D\n\nso you want:\n\n    if success:\n        do good stuff\n    else:\n        if not 404:\n            return server_or_client_error\n        else:\n            return None\n\n^ not unreasonable!\n\nbut you *wrote*\n\n    if success:\n        do good stuff\n    elif not 404:\n        return server_or_client_error\n    return None\n\n^meh\n\nYeah I\u0027d probably use the guard pattern:\n\n    if not success:\n        if 404:\n            return None\n        else:\n            return server_or_client_error\n    good stuff\n\nI *do* see that there is a common return for either the 404 case or COPY success case (now return None and just let the PUT go through) - but... well... I guess I don\u0027t think that matters?  You can have two exits from a function that have the same value if it groups the logic in a more maintainable way.","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"de4080d3a5cd5a80fdbcf782ddde418bfa4ec08a","unresolved":false,"context_lines":[{"line_number":206,"context_line":"            return hresp"},{"line_number":207,"context_line":"        else:"},{"line_number":208,"context_line":"            # make clay happy :P"},{"line_number":209,"context_line":"            pass"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        # return None and let caller handle original request"},{"line_number":212,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_87a9a726","line":209,"in_reply_to":"ba7be1f8_60a048a6","updated":"2015-02-27 22:26:51.000000000","message":"he, I liked the first suggestion better and changed it all to have just one return statement, please check it out and let me know what you think.","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            # make clay happy :P"},{"line_number":209,"context_line":"            pass"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        # return None and let caller handle original request"},{"line_number":212,"context_line":"        return None"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def handle_obj_versions_delete(self, req, object_versions,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_00786c2a","line":211,"updated":"2015-02-27 07:48:51.000000000","message":"this comment doesn\u0027t really explain why this is the right thing to do for the 404 case and I find myself skeptical.  In the COPY success case it\u0027s probably sufficiently obvious with or with-out the comment - so maybe this comment was that *that* way to hit this line?","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"de4080d3a5cd5a80fdbcf782ddde418bfa4ec08a","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            # make clay happy :P"},{"line_number":209,"context_line":"            pass"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        # return None and let caller handle original request"},{"line_number":212,"context_line":"        return None"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def handle_obj_versions_delete(self, req, object_versions,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_623661e9","line":211,"in_reply_to":"ba7be1f8_00786c2a","updated":"2015-02-27 22:26:51.000000000","message":"I think the cleanup I did based on the comment above will clarify the code a bit, please let me know what you think...","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":"            copy_req \u003d make_subrequest("},{"line_number":249,"context_line":"                req.environ, path\u003dcopy_path,"},{"line_number":250,"context_line":"                headers\u003dcopy_headers, method\u003d\u0027COPY\u0027, swift_source\u003d\u0027VW\u0027)"},{"line_number":251,"context_line":"            copy_resp \u003d copy_req.get_response(self.app)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"            # if the version isn\u0027t there, keep trying with previous version"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_c9cf5f56","line":250,"updated":"2015-02-27 07:48:51.000000000","message":"why doesn\u0027t this have to be preauthed - you need to have read access to the version location to DELETE an object, but not write access to PUT?\n\nI think the functional test test_versioning_container_acl could cover the expected behavior here...","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"de4080d3a5cd5a80fdbcf782ddde418bfa4ec08a","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":"            copy_req \u003d make_subrequest("},{"line_number":249,"context_line":"                req.environ, path\u003dcopy_path,"},{"line_number":250,"context_line":"                headers\u003dcopy_headers, method\u003d\u0027COPY\u0027, swift_source\u003d\u0027VW\u0027)"},{"line_number":251,"context_line":"            copy_resp \u003d copy_req.get_response(self.app)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"            # if the version isn\u0027t there, keep trying with previous version"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_22aaa9d4","line":250,"in_reply_to":"ba7be1f8_c9cf5f56","updated":"2015-02-27 22:26:51.000000000","message":"probably a mistake on my part, will test again and add func. tests as needed","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":305,"context_line":"    def __call__(self, env, start_response):"},{"line_number":306,"context_line":"        # making a duplicate, because if this is a COPY request, we will"},{"line_number":307,"context_line":"        # modify the PATH_INFO"},{"line_number":308,"context_line":"        req \u003d Request(env.copy())"},{"line_number":309,"context_line":"        try:"},{"line_number":310,"context_line":"            (version, account, container, obj) \u003d req.split_path(3, 4, True)"},{"line_number":311,"context_line":"        except ValueError:"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_09a97724","line":308,"updated":"2015-02-27 07:48:51.000000000","message":"we do what now?  why?","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"de4080d3a5cd5a80fdbcf782ddde418bfa4ec08a","unresolved":false,"context_lines":[{"line_number":305,"context_line":"    def __call__(self, env, start_response):"},{"line_number":306,"context_line":"        # making a duplicate, because if this is a COPY request, we will"},{"line_number":307,"context_line":"        # modify the PATH_INFO"},{"line_number":308,"context_line":"        req \u003d Request(env.copy())"},{"line_number":309,"context_line":"        try:"},{"line_number":310,"context_line":"            (version, account, container, obj) \u003d req.split_path(3, 4, True)"},{"line_number":311,"context_line":"        except ValueError:"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_42c31d8a","line":308,"in_reply_to":"ba7be1f8_09a97724","updated":"2015-02-27 22:26:51.000000000","message":"In the case of a COPY, we modify the PATH_INFO of this duplicated req object, so that we can check for existing objects in the \u0027Destination\u0027 and not on the original PATH_INFO.","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":327,"context_line":"                if val:"},{"line_number":328,"context_line":"                    location \u003d check_name_format(req, val, \u0027Container\u0027)"},{"line_number":329,"context_line":"                    sysmeta_version_hdr \u003d get_sys_meta_prefix(\u0027container\u0027) + \\"},{"line_number":330,"context_line":"                        \u0027versions-location\u0027"},{"line_number":331,"context_line":"                    req.headers[sysmeta_version_hdr] \u003d location"},{"line_number":332,"context_line":"                    del req.headers[\u0027X-Versions-Location\u0027]"},{"line_number":333,"context_line":"                    return self.app(req.environ, start_response)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_292b9b95","line":330,"updated":"2015-02-27 07:48:51.000000000","message":"everytime I see this it bugs me - I hate this interface - call a method to get part of a string and then concat another string into it.\n\nMan I wish dfg would have let me merge\n\n    container_sys_meta_header \u003d lambda header: get_sys_meta_prefix(\u0027container\u0027) + header\n\n... back when I was trying to refactor and cleanup account acls\n\ncause then you\u0027d just say:\n\n    req.headers[container_sys_meta_header(\u0027versions-location\u0027)] \u003d location\n\noh well...","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":340,"context_line":"                    req.headers.update({sysmeta_version_hdr: \u0027\u0027})"},{"line_number":341,"context_line":"                    req.headers.update({\u0027X-Versions-Location\u0027: \u0027\u0027})"},{"line_number":342,"context_line":"                    del req.headers[\u0027X-Remove-Versions-Location\u0027]"},{"line_number":343,"context_line":"                    return self.app(req.environ, start_response)"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"            elif req.method in (\u0027GET\u0027, \u0027HEAD\u0027):"},{"line_number":346,"context_line":"                vw_ctx \u003d VersionedWritesContext(self.app, self.logger)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_34304ee8","line":343,"updated":"2015-02-27 07:48:51.000000000","message":"It\u0027s not clear to me if the precedence of X-Versions-Location and X-Remove-Versions-Location is on purpose.  Do we have a test that validates the behavior when both are present?\n\nIt seems like these blocks could share a return path:\n\n    if x-version-location:\n        # translate to sysmeta\n    if x-remove-versions-location:\n        # translate to sysmeta\n    self.app(updated_request_with_correct_sysmeta)\n\n... and FWIW I don\u0027t think it would hurt anything if a GET request that had these headers set moved them into to sysmeta...","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"de4080d3a5cd5a80fdbcf782ddde418bfa4ec08a","unresolved":false,"context_lines":[{"line_number":340,"context_line":"                    req.headers.update({sysmeta_version_hdr: \u0027\u0027})"},{"line_number":341,"context_line":"                    req.headers.update({\u0027X-Versions-Location\u0027: \u0027\u0027})"},{"line_number":342,"context_line":"                    del req.headers[\u0027X-Remove-Versions-Location\u0027]"},{"line_number":343,"context_line":"                    return self.app(req.environ, start_response)"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"            elif req.method in (\u0027GET\u0027, \u0027HEAD\u0027):"},{"line_number":346,"context_line":"                vw_ctx \u003d VersionedWritesContext(self.app, self.logger)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_62c6614b","line":343,"in_reply_to":"ba7be1f8_34304ee8","updated":"2015-02-27 22:26:51.000000000","message":"hmm...looking at this code now: http://git.io/xmbK makes me think I have it inverted here. Will add some tests and change accordingly.","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"0793f2e789cc5ceb21ac3d97db79305240f9983e","unresolved":false,"context_lines":[{"line_number":340,"context_line":"                    req.headers.update({sysmeta_version_hdr: \u0027\u0027})"},{"line_number":341,"context_line":"                    req.headers.update({\u0027X-Versions-Location\u0027: \u0027\u0027})"},{"line_number":342,"context_line":"                    del req.headers[\u0027X-Remove-Versions-Location\u0027]"},{"line_number":343,"context_line":"                    return self.app(req.environ, start_response)"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"            elif req.method in (\u0027GET\u0027, \u0027HEAD\u0027):"},{"line_number":346,"context_line":"                vw_ctx \u003d VersionedWritesContext(self.app, self.logger)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_285ed245","line":343,"in_reply_to":"ba7be1f8_62c6614b","updated":"2015-03-03 16:40:50.000000000","message":"Done","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":344,"context_line":""},{"line_number":345,"context_line":"            elif req.method in (\u0027GET\u0027, \u0027HEAD\u0027):"},{"line_number":346,"context_line":"                vw_ctx \u003d VersionedWritesContext(self.app, self.logger)"},{"line_number":347,"context_line":"                return vw_ctx.handle_cont_GETorHEAD(env, start_response)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"        elif obj and req.method in (\u0027PUT\u0027, \u0027COPY\u0027, \u0027DELETE\u0027):"},{"line_number":350,"context_line":"            account_name \u003d unquote(account)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_34476e4d","line":347,"updated":"2015-02-27 07:48:51.000000000","message":"Something about if method in GET or HEAD followed directly by Versioned*WRITES*Context sure doesn\u0027t look right?\n\nAlso probably not worth anything, but if a PUT or POST ever *did* return a sysmeta version location - wouldn\u0027t hurt anything to translate it out for the user.\n\nI\u0027m just saying this because the only job on the container path is to translate sysmeta.\n\nSo if the router just said:\n\n   if is container request:\n       # translate public headers from request to sysmeta\n       ...\n       # make request to app\n       ...\n       # translate sysmeta headers from response\n       ...\n\nIt probably wouldn\u0027t even have to care about the method...","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"0793f2e789cc5ceb21ac3d97db79305240f9983e","unresolved":false,"context_lines":[{"line_number":344,"context_line":""},{"line_number":345,"context_line":"            elif req.method in (\u0027GET\u0027, \u0027HEAD\u0027):"},{"line_number":346,"context_line":"                vw_ctx \u003d VersionedWritesContext(self.app, self.logger)"},{"line_number":347,"context_line":"                return vw_ctx.handle_cont_GETorHEAD(env, start_response)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"        elif obj and req.method in (\u0027PUT\u0027, \u0027COPY\u0027, \u0027DELETE\u0027):"},{"line_number":350,"context_line":"            account_name \u003d unquote(account)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_3e8448b0","line":347,"in_reply_to":"ba7be1f8_34476e4d","updated":"2015-03-03 16:40:50.000000000","message":"Done","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            if req.method in (\u0027PUT\u0027, \u0027DELETE\u0027):"},{"line_number":355,"context_line":"                container_info \u003d get_container_info("},{"line_number":356,"context_line":"                    req.environ, self.app)"},{"line_number":357,"context_line":"            elif req.method \u003d\u003d \u0027COPY\u0027 and \u0027Destination\u0027 in req.headers:"},{"line_number":358,"context_line":"                if \u0027Destination-Account\u0027 in req.headers:"},{"line_number":359,"context_line":"                    account_name \u003d req.headers.get(\u0027Destination-Account\u0027)"},{"line_number":360,"context_line":"                    account_name \u003d check_name_format(req, account_name,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_e9ab431c","line":357,"updated":"2015-02-27 07:48:51.000000000","message":"So if we pulled the COPY method (the method where it re-writes COPY as PUT + X-Copy-From - not the part where it does the GET-\u003ePUT) how would that effect the slo/dlo/version pipeline?\n\nI rather only have to think about COPY passing through this code in one form or the other.","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"0793f2e789cc5ceb21ac3d97db79305240f9983e","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            if req.method in (\u0027PUT\u0027, \u0027DELETE\u0027):"},{"line_number":355,"context_line":"                container_info \u003d get_container_info("},{"line_number":356,"context_line":"                    req.environ, self.app)"},{"line_number":357,"context_line":"            elif req.method \u003d\u003d \u0027COPY\u0027 and \u0027Destination\u0027 in req.headers:"},{"line_number":358,"context_line":"                if \u0027Destination-Account\u0027 in req.headers:"},{"line_number":359,"context_line":"                    account_name \u003d req.headers.get(\u0027Destination-Account\u0027)"},{"line_number":360,"context_line":"                    account_name \u003d check_name_format(req, account_name,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_fe155049","line":357,"in_reply_to":"ba7be1f8_e9ab431c","updated":"2015-03-03 16:40:50.000000000","message":"do you mean pull COPY into its own middleware (i.e., https://review.openstack.org/#/c/156923/)? I\u0027d expect it to come after slo/dlo/version in the pipeline...","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":367,"context_line":""},{"line_number":368,"context_line":"            if not container_info or not is_success(container_info[\u0027status\u0027]):"},{"line_number":369,"context_line":"                # this will hopefully return 400 or 404 later"},{"line_number":370,"context_line":"                return self.app(env, start_response)"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"            # to maintain backwards compatibility, container version"},{"line_number":373,"context_line":"            # location could be stored as sysmeta or not, need to check both"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_542b0233","line":370,"updated":"2015-02-27 07:48:51.000000000","message":"do we have to handle this case explicitly, how about move this under the object_version backward-compat shims\n\nand then just:\n\n    if not object_versions:\n        return self.app()\n\nIt\u0027ll either 4XX or it won\u0027t - doesn\u0027t really matter to us, an object request who\u0027s container can\u0027t tell us it\u0027s versions-location is dead to us - doesn\u0027t really matter if it\u0027s cause the container doesn\u0027t exist or some other crazy error - point is we can\u0027t do anything.","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"0793f2e789cc5ceb21ac3d97db79305240f9983e","unresolved":false,"context_lines":[{"line_number":367,"context_line":""},{"line_number":368,"context_line":"            if not container_info or not is_success(container_info[\u0027status\u0027]):"},{"line_number":369,"context_line":"                # this will hopefully return 400 or 404 later"},{"line_number":370,"context_line":"                return self.app(env, start_response)"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"            # to maintain backwards compatibility, container version"},{"line_number":373,"context_line":"            # location could be stored as sysmeta or not, need to check both"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_992c6e4c","line":370,"in_reply_to":"ba7be1f8_542b0233","updated":"2015-03-03 16:40:50.000000000","message":"for now I had to keep the first check (i.e., if not container_info). There\u0027s a scenario in a COPY request without a destination header, where the request would make all the way to here, so we need to check and return at that point.\n\nSee test.functional.tests:TestFile.testCopyNoDestinationHeader","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":374,"context_line":"            object_versions \u003d container_info.get("},{"line_number":375,"context_line":"                \u0027sysmeta\u0027, {}).get(\u0027versions-location\u0027)"},{"line_number":376,"context_line":"            if object_versions and isinstance(object_versions, unicode):"},{"line_number":377,"context_line":"                object_versions \u003d object_versions.encode(\u0027utf-8\u0027)"},{"line_number":378,"context_line":"            elif not object_versions:"},{"line_number":379,"context_line":"                object_versions \u003d container_info.get(\u0027versions\u0027)"},{"line_number":380,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_697d93e7","line":377,"updated":"2015-02-27 07:48:51.000000000","message":"wait when is sysmeta unicode?","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":376,"context_line":"            if object_versions and isinstance(object_versions, unicode):"},{"line_number":377,"context_line":"                object_versions \u003d object_versions.encode(\u0027utf-8\u0027)"},{"line_number":378,"context_line":"            elif not object_versions:"},{"line_number":379,"context_line":"                object_versions \u003d container_info.get(\u0027versions\u0027)"},{"line_number":380,"context_line":""},{"line_number":381,"context_line":"            if object_versions:"},{"line_number":382,"context_line":"                object_versions \u003d unquote(object_versions)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_890ba77c","line":379,"updated":"2015-02-27 07:48:51.000000000","message":"is this one already utf-8 decoded?","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":396,"context_line":"                if ret:"},{"line_number":397,"context_line":"                    return ret(env, start_response)"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        return self.app(env, start_response)"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"def filter_factory(global_conf, **local_conf):"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_ef3c23c2","line":399,"updated":"2015-02-27 07:48:51.000000000","message":"I think this method is fairly complex - KUDOS extracting what you have so far, but there\u0027s a few things I\u0027m having trouble keeping in my head.\n\nSpecifically, I count 7 return statements in this method.\n\n 1. split path error\n 2. container update with x-version-location\n 3. container update with x-remove-version-location\n 4. container read (all of them if the middleware is explicitly enabled)\n 5. get_info fails\n 6. either obj put or obj del (shared return point)\n 7. catch all\n  * account requests\n  * OPTION\n  * container DELETE\n  * obj GET \n  * obj request put/copy/delete that doesn\u0027t have version location set\n  * whatever might cause obj put or obj del to *not* return a response (wait, that\u0027s the happy path right?  if the handle methods return a resp it\u0027s normally an error?)\n  * everything else...\n\nI\u0027m not sure what that means (aside from the obvious - i\u0027m too dumb to review this)... maybe this method is mixing in routing and error handling too much, maybe try to start with some really cut down like:\n\n    if is container request:\n        resp \u003d handle_container_request\n    elif is object request:\n        resp \u003d handle_object_request\n    if ret:\n        return resp\n    return self.app\n\nAnd then it might be worth it to add some guards on the methods:\n\n    def handle_object_request():\n        if method not in (methods i care about):\n            return\n        # get version location from container\n        ...\n        if not object_versions:\n            return\n        # anything after this will return a response\n\nOr maybe do the method checking earlier:\n\n    if is container request and method I care about:\n        return handle_container_request\n    elif is object_request and method I care about:\n        return handle_object_request\n    return self.app\n\n... knowing that handle_object_request may in some cases just have to return self.app - no bigz","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"0793f2e789cc5ceb21ac3d97db79305240f9983e","unresolved":false,"context_lines":[{"line_number":396,"context_line":"                if ret:"},{"line_number":397,"context_line":"                    return ret(env, start_response)"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        return self.app(env, start_response)"},{"line_number":400,"context_line":""},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"def filter_factory(global_conf, **local_conf):"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_ea702ade","line":399,"in_reply_to":"ba7be1f8_ef3c23c2","updated":"2015-03-03 16:40:50.000000000","message":"Done","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"4987c6c9ac5018ad27e45ae4d12dd2d647e04bc3","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            return inner_hook(source_req, source_resp, sink_req)"},{"line_number":172,"context_line":"        return dlo_copy_hook"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def handle_obj_versions_put2(self, req, object_versions,"},{"line_number":175,"context_line":"                                 object_name, policy_index):"},{"line_number":176,"context_line":"        \"\"\""},{"line_number":177,"context_line":"        This function attempts to remove the HEAD request"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba7be1f8_0cf9e97f","line":174,"updated":"2015-03-03 16:50:32.000000000","message":"This function is not used in this patchset, it\u0027s only here for a quick-review of the approach I\u0027m taking to remove the HEAD request from the original handle_obj_versions_put.","commit_id":"fb4e865828f48d9f3ab509fcc1b4c19d2ad80c2e"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"aa4a7dbd4081287968c0a3d3992610455101f82a","unresolved":false,"context_lines":[{"line_number":44,"context_line":"--------------------------------------------------"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Add this middleware to the proxy pipeline after the authentication"},{"line_number":47,"context_line":"middleware."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"Set ``allow_versioned_writes`` to ``True`` in the middleware options"},{"line_number":50,"context_line":"to enable information about this middleware to be returned in a /info"}],"source_content_type":"text/x-python","patch_set":24,"id":"9a80dd14_c6e100d2","line":47,"updated":"2015-03-11 06:48:36.000000000","message":"does it matter if it\u0027s before/after slo/dlo?","commit_id":"bee24adfcba0319b953b4a76513b75704be4e45d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"aa4a7dbd4081287968c0a3d3992610455101f82a","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                ret \u003d None"},{"line_number":220,"context_line":"            else:"},{"line_number":221,"context_line":"                # if not HTTP_NOT_FOUND, return error immediately"},{"line_number":222,"context_line":"                ret \u003d hresp"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        return ret"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"9a80dd14_236c8e36","line":222,"updated":"2015-03-11 06:48:36.000000000","message":"i still don\u0027t know what\u0027s in this response - i just know\n\n 1. the user has never been authorized to make this HEAD request\n 2. it\u0027s not success, and not 404\n\nI can not seem to take those two facts and turn it into \"it\u0027s safe to return to the user\" - the existing code doesn\u0027t seem to ever return hresp, although it also doesn\u0027t seem to check is_success either :\\","commit_id":"bee24adfcba0319b953b4a76513b75704be4e45d"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"25d3fede7e39aa36315c4b8b2c3ab612f5b6aaf8","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                ret \u003d None"},{"line_number":220,"context_line":"            else:"},{"line_number":221,"context_line":"                # if not HTTP_NOT_FOUND, return error immediately"},{"line_number":222,"context_line":"                ret \u003d hresp"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        return ret"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"7a016987_baa712bb","line":222,"in_reply_to":"9a80dd14_236c8e36","updated":"2015-06-01 12:02:47.000000000","message":"In the case of the user not being authorized, don\u0027t we want to return that error to the user?","commit_id":"bee24adfcba0319b953b4a76513b75704be4e45d"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"d271b3f74e43771d3170ca30099acc3d294ae88a","unresolved":false,"context_lines":[{"line_number":43,"context_line":"How to Enable Object Versioning in a Swift Cluster"},{"line_number":44,"context_line":"--------------------------------------------------"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Add this middleware to the proxy pipeline after the authentication"},{"line_number":47,"context_line":"middleware."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"Set ``allow_versioned_writes`` to ``True`` in the middleware options"}],"source_content_type":"text/x-python","patch_set":28,"id":"baa041b7_ac19658a","line":46,"updated":"2015-04-05 16:27:10.000000000","message":"re. Pai\u0027s comment, this paragraph could be dropped too, since the middleware is auto-added.","commit_id":"9a4bdcfe88505b35bbb42ba638304a68b652c135"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"51d9fd6c0844628092d6dd952b25644a83521c33","unresolved":false,"context_lines":[{"line_number":43,"context_line":"How to Enable Object Versioning in a Swift Cluster"},{"line_number":44,"context_line":"--------------------------------------------------"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Add this middleware to the proxy pipeline after the authentication"},{"line_number":47,"context_line":"middleware."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"Set ``allow_versioned_writes`` to ``True`` in the middleware options"}],"source_content_type":"text/x-python","patch_set":28,"id":"3ab451fb_c993d4a2","line":46,"in_reply_to":"baa041b7_ac19658a","updated":"2015-04-21 10:02:19.000000000","message":"Done","commit_id":"9a4bdcfe88505b35bbb42ba638304a68b652c135"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"fd7ade678873332eab0b29eeaed33b0f3fa5c32e","unresolved":false,"context_lines":[{"line_number":91,"context_line":"---------------------------------------------------"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"If you want to disable all functionality, remove this middleware from"},{"line_number":94,"context_line":"the proxy pipeline."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"Disable versioning a versioned container (x is any value except empty)::"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6ced46_bb61293b","line":94,"updated":"2015-03-25 09:34:47.000000000","message":"Is this possible ? If removed from pipeline, wouldn\u0027t it be auto-inserted ?","commit_id":"9a4bdcfe88505b35bbb42ba638304a68b652c135"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"d271b3f74e43771d3170ca30099acc3d294ae88a","unresolved":false,"context_lines":[{"line_number":91,"context_line":"---------------------------------------------------"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"If you want to disable all functionality, remove this middleware from"},{"line_number":94,"context_line":"the proxy pipeline."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"Disable versioning a versioned container (x is any value except empty)::"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"baa041b7_6c459d6e","line":94,"in_reply_to":"1a6ced46_bb61293b","updated":"2015-04-05 16:27:10.000000000","message":"Good catch. The right way to disable is to set \"allow_versioned_writes\u003dFalse\" in the middleware\u0027s section.","commit_id":"9a4bdcfe88505b35bbb42ba638304a68b652c135"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"51d9fd6c0844628092d6dd952b25644a83521c33","unresolved":false,"context_lines":[{"line_number":91,"context_line":"---------------------------------------------------"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"If you want to disable all functionality, remove this middleware from"},{"line_number":94,"context_line":"the proxy pipeline."},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"Disable versioning a versioned container (x is any value except empty)::"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"3ab451fb_89e4ac3b","line":94,"in_reply_to":"baa041b7_6c459d6e","updated":"2015-04-21 10:02:19.000000000","message":"Done","commit_id":"9a4bdcfe88505b35bbb42ba638304a68b652c135"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"fd7ade678873332eab0b29eeaed33b0f3fa5c32e","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            vers_obj_name \u003d lprefix + new_ts"},{"line_number":189,"context_line":"            copy_headers \u003d {"},{"line_number":190,"context_line":"                \u0027Destination\u0027: \u0027%s/%s\u0027 % (lcontainer, vers_obj_name),"},{"line_number":191,"context_line":"                \u0027x-auth-token\u0027: req.headers.get(\u0027x-auth-token\u0027)}"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"            # handle slo and dlo manifest versioning"},{"line_number":194,"context_line":"            # add query string in case it is a manifest file"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6ced46_2dfa5ebd","line":191,"updated":"2015-03-25 09:34:47.000000000","message":"would it be a good idea to include \u0027X-Newest\u0027 set to True ?","commit_id":"9a4bdcfe88505b35bbb42ba638304a68b652c135"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"51d9fd6c0844628092d6dd952b25644a83521c33","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            vers_obj_name \u003d lprefix + new_ts"},{"line_number":189,"context_line":"            copy_headers \u003d {"},{"line_number":190,"context_line":"                \u0027Destination\u0027: \u0027%s/%s\u0027 % (lcontainer, vers_obj_name),"},{"line_number":191,"context_line":"                \u0027x-auth-token\u0027: req.headers.get(\u0027x-auth-token\u0027)}"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"            # handle slo and dlo manifest versioning"},{"line_number":194,"context_line":"            # add query string in case it is a manifest file"}],"source_content_type":"text/x-python","patch_set":28,"id":"3ab451fb_498d8430","line":191,"in_reply_to":"1a6ced46_2dfa5ebd","updated":"2015-04-21 10:02:19.000000000","message":"My bad. This is already taken care internally in COPY implementation.","commit_id":"9a4bdcfe88505b35bbb42ba638304a68b652c135"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"fd7ade678873332eab0b29eeaed33b0f3fa5c32e","unresolved":false,"context_lines":[{"line_number":207,"context_line":"            else:"},{"line_number":208,"context_line":"                if is_client_error(copy_resp.status_int):"},{"line_number":209,"context_line":"                    # missing container or bad permissions"},{"line_number":210,"context_line":"                    ret \u003d HTTPPreconditionFailed(request\u003dreq)"},{"line_number":211,"context_line":"                else:"},{"line_number":212,"context_line":"                    # could not copy the data, bail"},{"line_number":213,"context_line":"                    ret \u003d HTTPServiceUnavailable(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6ced46_edcbe6a2","line":210,"updated":"2015-03-25 09:34:47.000000000","message":"Please provide a text body referring to original copy response status. An operator can go through the logs, but a client won\u0027t know why it failed.","commit_id":"9a4bdcfe88505b35bbb42ba638304a68b652c135"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"a64cffbfe958320dd7c616f260bc97d8bda7d1a9","unresolved":false,"context_lines":[{"line_number":234,"context_line":"                                            req.environ):"},{"line_number":235,"context_line":"                item_list.append(_item)"},{"line_number":236,"context_line":"        except ListingIterNotFound:"},{"line_number":237,"context_line":"            # no worries, last_item is None"},{"line_number":238,"context_line":"            pass"},{"line_number":239,"context_line":"        except HTTPPreconditionFailed:"},{"line_number":240,"context_line":"            return HTTPPreconditionFailed(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":28,"id":"9aa53dc9_005ba488","line":237,"updated":"2015-04-08 00:56:33.000000000","message":"This comment needs to be deleted. Apparently, Yuan forgot to kill it in change I17f049ea3ef62723effae8086ec427f6e151cd9c. I noticed that this patch does changes to the moved code, so it\u0027s appropriate, I think.","commit_id":"9a4bdcfe88505b35bbb42ba638304a68b652c135"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"51d9fd6c0844628092d6dd952b25644a83521c33","unresolved":false,"context_lines":[{"line_number":234,"context_line":"                                            req.environ):"},{"line_number":235,"context_line":"                item_list.append(_item)"},{"line_number":236,"context_line":"        except ListingIterNotFound:"},{"line_number":237,"context_line":"            # no worries, last_item is None"},{"line_number":238,"context_line":"            pass"},{"line_number":239,"context_line":"        except HTTPPreconditionFailed:"},{"line_number":240,"context_line":"            return HTTPPreconditionFailed(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":28,"id":"3ab451fb_693720b1","line":237,"in_reply_to":"9aa53dc9_005ba488","updated":"2015-04-21 10:02:19.000000000","message":"Done","commit_id":"9a4bdcfe88505b35bbb42ba638304a68b652c135"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"fd7ade678873332eab0b29eeaed33b0f3fa5c32e","unresolved":false,"context_lines":[{"line_number":347,"context_line":"        val \u003d req.headers.get(\u0027X-Remove-Versions-Location\u0027)"},{"line_number":348,"context_line":"        if val:"},{"line_number":349,"context_line":"            sysmeta_version_hdr \u003d get_sys_meta_prefix(\u0027container\u0027) + \\"},{"line_number":350,"context_line":"                \u0027versions-location\u0027"},{"line_number":351,"context_line":"            req.headers.update({sysmeta_version_hdr: \u0027\u0027})"},{"line_number":352,"context_line":"            req.headers.update({\u0027X-Versions-Location\u0027: \u0027\u0027})"},{"line_number":353,"context_line":"            del req.headers[\u0027X-Remove-Versions-Location\u0027]"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6ced46_bb32090e","line":350,"updated":"2015-03-25 09:34:47.000000000","message":"nit: also done in line 336 previously.","commit_id":"9a4bdcfe88505b35bbb42ba638304a68b652c135"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"51d9fd6c0844628092d6dd952b25644a83521c33","unresolved":false,"context_lines":[{"line_number":347,"context_line":"        val \u003d req.headers.get(\u0027X-Remove-Versions-Location\u0027)"},{"line_number":348,"context_line":"        if val:"},{"line_number":349,"context_line":"            sysmeta_version_hdr \u003d get_sys_meta_prefix(\u0027container\u0027) + \\"},{"line_number":350,"context_line":"                \u0027versions-location\u0027"},{"line_number":351,"context_line":"            req.headers.update({sysmeta_version_hdr: \u0027\u0027})"},{"line_number":352,"context_line":"            req.headers.update({\u0027X-Versions-Location\u0027: \u0027\u0027})"},{"line_number":353,"context_line":"            del req.headers[\u0027X-Remove-Versions-Location\u0027]"}],"source_content_type":"text/x-python","patch_set":28,"id":"3ab451fb_a993e8f9","line":350,"in_reply_to":"1a6ced46_bb32090e","updated":"2015-04-21 10:02:19.000000000","message":"Done","commit_id":"9a4bdcfe88505b35bbb42ba638304a68b652c135"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"fd7ade678873332eab0b29eeaed33b0f3fa5c32e","unresolved":false,"context_lines":[{"line_number":372,"context_line":"            container_name, object_name \u003d check_destination_header(req)"},{"line_number":373,"context_line":"            req.environ[\u0027PATH_INFO\u0027] \u003d \"/%s/%s/%s/%s\" % ("},{"line_number":374,"context_line":"                version, account_name, container_name, object_name)"},{"line_number":375,"context_line":"            container_info \u003d get_container_info("},{"line_number":376,"context_line":"                req.environ, self.app)"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"        if not container_info:"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6ced46_ca6290ac","line":375,"updated":"2015-03-25 09:34:47.000000000","message":"nit: you can move line 375 outside if-elif block and get rid of first if block","commit_id":"9a4bdcfe88505b35bbb42ba638304a68b652c135"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"dbaf386ec4b7a9e0c775f1c4c43e8890b8d1be01","unresolved":false,"context_lines":[{"line_number":372,"context_line":"            container_name, object_name \u003d check_destination_header(req)"},{"line_number":373,"context_line":"            req.environ[\u0027PATH_INFO\u0027] \u003d \"/%s/%s/%s/%s\" % ("},{"line_number":374,"context_line":"                version, account_name, container_name, object_name)"},{"line_number":375,"context_line":"            container_info \u003d get_container_info("},{"line_number":376,"context_line":"                req.environ, self.app)"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"        if not container_info:"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a016987_9ca7ab4f","line":375,"in_reply_to":"1a6ced46_ca6290ac","updated":"2015-06-01 12:02:36.000000000","message":"no, because in the case of copy req.environ is modified, so it could actually return container info for a different container","commit_id":"9a4bdcfe88505b35bbb42ba638304a68b652c135"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"a8ace9792ee771e2c843031356fc1cda1c9b0d73","unresolved":false,"context_lines":[{"line_number":372,"context_line":"            container_name, object_name \u003d check_destination_header(req)"},{"line_number":373,"context_line":"            req.environ[\u0027PATH_INFO\u0027] \u003d \"/%s/%s/%s/%s\" % ("},{"line_number":374,"context_line":"                version, account_name, container_name, object_name)"},{"line_number":375,"context_line":"            container_info \u003d get_container_info("},{"line_number":376,"context_line":"                req.environ, self.app)"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"        if not container_info:"}],"source_content_type":"text/x-python","patch_set":28,"id":"5afe65bd_3f872463","line":375,"in_reply_to":"7a016987_9ca7ab4f","updated":"2015-06-02 05:17:03.000000000","message":"Hmmm, the \"variable part\" here is req.environ which is only modified in the elif part. The call to get_container_info() is the same, either with original req.environ or the modified one. object_request() method is only invoked when the method is PUT/DELETE/COPY.\n\nThe code looks clean and explicit as it is right now. It was nitpick, so never mind.","commit_id":"9a4bdcfe88505b35bbb42ba638304a68b652c135"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"fd7ade678873332eab0b29eeaed33b0f3fa5c32e","unresolved":false,"context_lines":[{"line_number":380,"context_line":""},{"line_number":381,"context_line":"        # to maintain backwards compatibility, container version"},{"line_number":382,"context_line":"        # location could be stored as sysmeta or not, need to check both"},{"line_number":383,"context_line":"        object_versions \u003d container_info.get("},{"line_number":384,"context_line":"            \u0027sysmeta\u0027, {}).get(\u0027versions-location\u0027)"},{"line_number":385,"context_line":"        if object_versions and isinstance(object_versions, unicode):"},{"line_number":386,"context_line":"            object_versions \u003d object_versions.encode(\u0027utf-8\u0027)"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6ced46_6adc3c13","line":383,"updated":"2015-03-25 09:34:47.000000000","message":"nit: I was initially confused with this variable name when I was going through \"handle_obj_versions_put\" and \"handle_obj_versions_delete\" methods. May be \"versions_container_location\" or a different better name having resemblance to the actual header/metadata would be good ?","commit_id":"9a4bdcfe88505b35bbb42ba638304a68b652c135"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"fd7ade678873332eab0b29eeaed33b0f3fa5c32e","unresolved":false,"context_lines":[{"line_number":434,"context_line":"def filter_factory(global_conf, **local_conf):"},{"line_number":435,"context_line":"    conf \u003d global_conf.copy()"},{"line_number":436,"context_line":"    conf.update(local_conf)"},{"line_number":437,"context_line":"    if config_true_value(conf.get(\u0027allow_versioned_writes\u0027)):"},{"line_number":438,"context_line":"        register_swift_info(\u0027versioned_writes\u0027)"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"    def obj_versions_filter(app):"}],"source_content_type":"text/x-python","patch_set":28,"id":"1a6ced46_563d6cba","line":437,"updated":"2015-03-25 09:34:47.000000000","message":"The middle-ware doesn\u0027t show up in /info request response if auto-inserted in pipeline.","commit_id":"9a4bdcfe88505b35bbb42ba638304a68b652c135"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"dbaf386ec4b7a9e0c775f1c4c43e8890b8d1be01","unresolved":false,"context_lines":[{"line_number":434,"context_line":"def filter_factory(global_conf, **local_conf):"},{"line_number":435,"context_line":"    conf \u003d global_conf.copy()"},{"line_number":436,"context_line":"    conf.update(local_conf)"},{"line_number":437,"context_line":"    if config_true_value(conf.get(\u0027allow_versioned_writes\u0027)):"},{"line_number":438,"context_line":"        register_swift_info(\u0027versioned_writes\u0027)"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"    def obj_versions_filter(app):"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a016987_dc5f633f","line":437,"in_reply_to":"1a6ced46_563d6cba","updated":"2015-06-01 12:02:36.000000000","message":"correct, this is done on purpose to maintain backwards compatibility.","commit_id":"9a4bdcfe88505b35bbb42ba638304a68b652c135"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"a8ace9792ee771e2c843031356fc1cda1c9b0d73","unresolved":false,"context_lines":[{"line_number":434,"context_line":"def filter_factory(global_conf, **local_conf):"},{"line_number":435,"context_line":"    conf \u003d global_conf.copy()"},{"line_number":436,"context_line":"    conf.update(local_conf)"},{"line_number":437,"context_line":"    if config_true_value(conf.get(\u0027allow_versioned_writes\u0027)):"},{"line_number":438,"context_line":"        register_swift_info(\u0027versioned_writes\u0027)"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"    def obj_versions_filter(app):"}],"source_content_type":"text/x-python","patch_set":28,"id":"5afe65bd_5f74209b","line":437,"in_reply_to":"7a016987_dc5f633f","updated":"2015-06-02 05:17:03.000000000","message":"Ah, I see.","commit_id":"9a4bdcfe88505b35bbb42ba638304a68b652c135"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"c12836ba5bd7d8eda37eed9c416ccf3c2c88a864","unresolved":false,"context_lines":[{"line_number":374,"context_line":"                req.environ, self.app)"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        if not container_info:"},{"line_number":377,"context_line":"            return self.app"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"        # to maintain backwards compatibility, container version"},{"line_number":380,"context_line":"        # location could be stored as sysmeta or not, need to check both"}],"source_content_type":"text/x-python","patch_set":30,"id":"3acd31a7_c19d7567","line":377,"updated":"2015-05-05 03:18:05.000000000","message":"I don\u0027t understand how this is supposed to work. You return the app...?","commit_id":"ee153ef3851dbd26db544f7707c75563e6b33912"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"c8dd2d18cdab32c64b466e5aab825644e88c25bf","unresolved":false,"context_lines":[{"line_number":374,"context_line":"                req.environ, self.app)"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        if not container_info:"},{"line_number":377,"context_line":"            return self.app"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"        # to maintain backwards compatibility, container version"},{"line_number":380,"context_line":"        # location could be stored as sysmeta or not, need to check both"}],"source_content_type":"text/x-python","patch_set":30,"id":"3acd31a7_8b678f4c","line":377,"in_reply_to":"3acd31a7_c19d7567","updated":"2015-05-05 12:45:13.000000000","message":"If the container does not exist, we let the request pass through as is. This will err out in 404 later in proxy\u0027s object controller.","commit_id":"ee153ef3851dbd26db544f7707c75563e6b33912"},{"author":{"_account_id":8542,"name":"Prashanth Pai","email":"ppai@redhat.com","username":"pai"},"change_message_id":"bb9d726fa7a1ea5c7fe481dd18ce1a5ed7b49417","unresolved":false,"context_lines":[{"line_number":222,"context_line":"            else:"},{"line_number":223,"context_line":"                if is_client_error(copy_resp.status_int):"},{"line_number":224,"context_line":"                    # missing container or bad permissions"},{"line_number":225,"context_line":"                    ret \u003d HTTPPreconditionFailed(request\u003dreq)"},{"line_number":226,"context_line":"                else:"},{"line_number":227,"context_line":"                    # could not copy the data, bail"},{"line_number":228,"context_line":"                    ret \u003d HTTPServiceUnavailable(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":33,"id":"5afe65bd_bf1d5411","line":225,"updated":"2015-06-02 05:23:29.000000000","message":"Ideally, I would have returned the actual error back to client so that he can go fix it. However, if done so, it will deviate from existing behavior. So, this is okay.","commit_id":"0edf2ff46e0ff3dca183c7183acfbcf6f5f99b8c"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"601dea91cafa6cd2d97dda924e43a4acc44af86e","unresolved":false,"context_lines":[{"line_number":447,"context_line":"        # If set, check if enabled when actually trying to set container"},{"line_number":448,"context_line":"        # header. If not set, let request be handled by container server"},{"line_number":449,"context_line":"        # for backwards compatibility."},{"line_number":450,"context_line":"        enabled \u003d self.conf.get(\u0027allow_versioned_writes\u0027)"},{"line_number":451,"context_line":"        if enabled and container and not obj:"},{"line_number":452,"context_line":"            return self.container_request(req, start_response, enabled)"},{"line_number":453,"context_line":"        elif obj and req.method in (\u0027PUT\u0027, \u0027COPY\u0027, \u0027DELETE\u0027):"}],"source_content_type":"text/x-python","patch_set":33,"id":"7a016987_825ce019","line":450,"updated":"2015-05-29 20:08:00.000000000","message":"I think you may want config_true_value(self.conf.get(\u0027allow_versioned_writes\u0027)) right here instead of shipping it down to container_request() because there\u0027s a use of it right below","commit_id":"0edf2ff46e0ff3dca183c7183acfbcf6f5f99b8c"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"3fd20a15182b1ea098bc44d1414290a43ab360ff","unresolved":false,"context_lines":[{"line_number":447,"context_line":"        # If set, check if enabled when actually trying to set container"},{"line_number":448,"context_line":"        # header. If not set, let request be handled by container server"},{"line_number":449,"context_line":"        # for backwards compatibility."},{"line_number":450,"context_line":"        enabled \u003d self.conf.get(\u0027allow_versioned_writes\u0027)"},{"line_number":451,"context_line":"        if enabled and container and not obj:"},{"line_number":452,"context_line":"            return self.container_request(req, start_response, enabled)"},{"line_number":453,"context_line":"        elif obj and req.method in (\u0027PUT\u0027, \u0027COPY\u0027, \u0027DELETE\u0027):"}],"source_content_type":"text/x-python","patch_set":33,"id":"7a016987_93a095f5","line":450,"in_reply_to":"7a016987_825ce019","updated":"2015-06-01 12:01:41.000000000","message":"This was actually done on purpose, first I wanted to check if the option was set or not, meaning it could be also None. If it is not set then I let the container server handle the request because it will check \u0027allow_versions\u0027 in the container-server.conf file.\n\nIf the option is set (either True or False), then self.container_request will check with config_true_value(enabled)\n\nhope that makes sense....","commit_id":"0edf2ff46e0ff3dca183c7183acfbcf6f5f99b8c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"d08f0edcb1eb8baaba4e038e8291c5c1defd1bae","unresolved":false,"context_lines":[{"line_number":360,"context_line":""},{"line_number":361,"context_line":"                location \u003d check_container_format(req, val)"},{"line_number":362,"context_line":"                req.headers[sysmeta_version_hdr] \u003d location"},{"line_number":363,"context_line":"                del req.headers[\u0027X-Versions-Location\u0027]"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"                # if both headers are in the same request"},{"line_number":366,"context_line":"                # adding location takes precendence over removing"}],"source_content_type":"text/x-python","patch_set":38,"id":"3a50d1a3_7012985a","line":363,"updated":"2015-07-23 21:19:11.000000000","message":"maybe we should let this pass through and the container server can either use it or ignore it per it\u0027s preference?","commit_id":"0d70a6d0d0e327c9ecfed629e0490d69ec5df320"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"de1efa16736bd84ca9fb347bfa70721053557164","unresolved":false,"context_lines":[{"line_number":360,"context_line":""},{"line_number":361,"context_line":"                location \u003d check_container_format(req, val)"},{"line_number":362,"context_line":"                req.headers[sysmeta_version_hdr] \u003d location"},{"line_number":363,"context_line":"                del req.headers[\u0027X-Versions-Location\u0027]"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"                # if both headers are in the same request"},{"line_number":366,"context_line":"                # adding location takes precendence over removing"}],"source_content_type":"text/x-python","patch_set":38,"id":"3a50d1a3_88eca690","line":363,"in_reply_to":"3a50d1a3_7012985a","updated":"2015-07-28 17:45:25.000000000","message":"sounds good, this way we would never get in the case where x-version-location is set to a/b and x-container-sysmeta-version-location is set to a/c","commit_id":"0d70a6d0d0e327c9ecfed629e0490d69ec5df320"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"7fbd484bd00991f0045027bb61af47a8d408a949","unresolved":false,"context_lines":[{"line_number":324,"context_line":"                location \u003d val"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        if location:"},{"line_number":327,"context_line":"            self._response_headers.extend([(\u0027X-Versions-Location\u0027, location)])"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        start_response(self._response_status,"},{"line_number":330,"context_line":"                       self._response_headers,"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a50d1a3_77f7e759","line":327,"updated":"2015-07-30 07:35:40.000000000","message":"Oh yes, whole requests for container want these header translation. That makes me sense.","commit_id":"c441a4e3e879de7110629055dc42349d0f01c481"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"7fbd484bd00991f0045027bb61af47a8d408a949","unresolved":false,"context_lines":[{"line_number":353,"context_line":"                if not config_true_value(enabled):"},{"line_number":354,"context_line":"                    raise HTTPPreconditionFailed("},{"line_number":355,"context_line":"                        request\u003dreq, content_type\u003d\u0027text/plain\u0027,"},{"line_number":356,"context_line":"                        body\u003d\u0027Versioned Writes is disabled\u0027)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"                location \u003d check_container_format(req, val)"},{"line_number":359,"context_line":"                req.headers[sysmeta_version_hdr] \u003d location"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a50d1a3_bc9c760f","line":356,"updated":"2015-07-30 07:35:40.000000000","message":"Maybe you need this patch, http://paste.openstack.org/show/406341/ ?\n\nThe reason I recommended above is that container_request won\u0027t be called when \"allow_versioned_write\"\u003dFalse.","commit_id":"c441a4e3e879de7110629055dc42349d0f01c481"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"d9e421b1ac619f4d4c895af928c18f1ced318574","unresolved":false,"context_lines":[{"line_number":353,"context_line":"                if not config_true_value(enabled):"},{"line_number":354,"context_line":"                    raise HTTPPreconditionFailed("},{"line_number":355,"context_line":"                        request\u003dreq, content_type\u003d\u0027text/plain\u0027,"},{"line_number":356,"context_line":"                        body\u003d\u0027Versioned Writes is disabled\u0027)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"                location \u003d check_container_format(req, val)"},{"line_number":359,"context_line":"                req.headers[sysmeta_version_hdr] \u003d location"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a50d1a3_02cdfcb6","line":356,"in_reply_to":"3a50d1a3_6eef11ea","updated":"2015-07-30 09:48:23.000000000","message":"yes, I believe the default should be documented as off?  even thought the middleware is automatically injected - if the container server has the option turned off (again the default?) nothing will happen.","commit_id":"c441a4e3e879de7110629055dc42349d0f01c481"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"54e37cee07165d2ea9a7656a960f40e8ddb4e317","unresolved":false,"context_lines":[{"line_number":353,"context_line":"                if not config_true_value(enabled):"},{"line_number":354,"context_line":"                    raise HTTPPreconditionFailed("},{"line_number":355,"context_line":"                        request\u003dreq, content_type\u003d\u0027text/plain\u0027,"},{"line_number":356,"context_line":"                        body\u003d\u0027Versioned Writes is disabled\u0027)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"                location \u003d check_container_format(req, val)"},{"line_number":359,"context_line":"                req.headers[sysmeta_version_hdr] \u003d location"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a50d1a3_6eef11ea","line":356,"in_reply_to":"3a50d1a3_bc9c760f","updated":"2015-07-30 08:26:11.000000000","message":"Oh, i might misread around for backword compatibility.\n\nallow_versioned_write is just a str before calling config_true_value. Maybe i didn\u0027t get all the following reasons yet:\n\n- this middleware will be automtically inserted to pipeline\n- but default value, comment outed allow_versioned_write\u003dtrue, doesn\u0027t affect new incoming requests for container creation.\n\nIn default, just moving stuffs from proxy app to middleware, and then allow_versioned_writes\u003dtrue will make proxy to use sysmeta as improvement. Am I right?","commit_id":"c441a4e3e879de7110629055dc42349d0f01c481"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"7fbd484bd00991f0045027bb61af47a8d408a949","unresolved":false,"context_lines":[{"line_number":364,"context_line":"                    del req.headers[\u0027X-Remove-Versions-Location\u0027]"},{"line_number":365,"context_line":"            else:"},{"line_number":366,"context_line":"                # empty value is the same as X-Remove-Versions-Location"},{"line_number":367,"context_line":"                req.headers[\u0027X-Remove-Versions-Location\u0027] \u003d \u0027x\u0027"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"        # handle removing versions container"},{"line_number":370,"context_line":"        val \u003d req.headers.get(\u0027X-Remove-Versions-Location\u0027)"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a50d1a3_52b7593a","line":367,"updated":"2015-07-30 07:35:40.000000000","message":"This is needed to set a couple of headers for versions-location (sysmeta_version_hdr and X-Versions-Location) but weird a bit because X-Remove-Versions-Location will be removed at L374.\n\nI know X-Remove-Versions-Location header is needed to kick the translation, yes we need this, but... though I don\u0027t have a good idea yet.","commit_id":"c441a4e3e879de7110629055dc42349d0f01c481"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"faa37ccfd229f48673a6ebf93cbbc81dd037579f","unresolved":false,"context_lines":[{"line_number":364,"context_line":"                    del req.headers[\u0027X-Remove-Versions-Location\u0027]"},{"line_number":365,"context_line":"            else:"},{"line_number":366,"context_line":"                # empty value is the same as X-Remove-Versions-Location"},{"line_number":367,"context_line":"                req.headers[\u0027X-Remove-Versions-Location\u0027] \u003d \u0027x\u0027"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"        # handle removing versions container"},{"line_number":370,"context_line":"        val \u003d req.headers.get(\u0027X-Remove-Versions-Location\u0027)"}],"source_content_type":"text/x-python","patch_set":39,"id":"3a50d1a3_87634941","line":367,"in_reply_to":"3a50d1a3_52b7593a","updated":"2015-07-30 19:13:14.000000000","message":"The idea here is that there are actually two ways to disable versioning for a container. The user can either send X-Version-Location: \"\" or X-Remove-Versions-Location: \"anyvalue\". So in the else statement I was just trying to handle the empty value for X-Version-Location","commit_id":"c441a4e3e879de7110629055dc42349d0f01c481"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"fcc825ec9a94cf0a5b128623a4ea0000b1ce08e7","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        if val:"},{"line_number":372,"context_line":"            req.headers.update({sysmeta_version_hdr: \u0027\u0027})"},{"line_number":373,"context_line":"            req.headers.update({\u0027X-Versions-Location\u0027: \u0027\u0027})"},{"line_number":374,"context_line":"            del req.headers[\u0027X-Remove-Versions-Location\u0027]"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        # send request and translate sysmeta headers from response"},{"line_number":377,"context_line":"        vw_ctx \u003d VersionedWritesContext(self.app, self.logger)"}],"source_content_type":"text/x-python","patch_set":40,"id":"3a50d1a3_8ff1fe97","line":374,"updated":"2015-07-31 11:06:27.000000000","message":"Looking at around here, when allow_versioned_write\u003dTrue, users seems able to use both existing (using old x-versions-location) containers and new containers using sysmeta.\n\nHowever if allow_versions is removed from container config, it won\u0027t be applied because the default config (allow_versions\u003dfalse) doesn\u0027t add x-versions-location to save_headers.","commit_id":"98f6bd296beee9003cb2ae69ac46bd8912d18d77"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"6fd6511eba6591ae274e6691b40f8c350c510a0f","unresolved":false,"context_lines":[{"line_number":371,"context_line":"        if val:"},{"line_number":372,"context_line":"            req.headers.update({sysmeta_version_hdr: \u0027\u0027})"},{"line_number":373,"context_line":"            req.headers.update({\u0027X-Versions-Location\u0027: \u0027\u0027})"},{"line_number":374,"context_line":"            del req.headers[\u0027X-Remove-Versions-Location\u0027]"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"        # send request and translate sysmeta headers from response"},{"line_number":377,"context_line":"        vw_ctx \u003d VersionedWritesContext(self.app, self.logger)"}],"source_content_type":"text/x-python","patch_set":40,"id":"3a50d1a3_a6cbb549","line":374,"in_reply_to":"3a50d1a3_8ff1fe97","updated":"2015-07-31 17:21:52.000000000","message":"when allow_versioned_write is set to True, the sysmeta value becomes the value that takes precendence to determine the location of the versioned objects. We only set the old header (x-versions-location) to keep things consistent, but it should not make a difference.\n\nIt only gets messy if users enable allow_versioned_write and then disable it again while doing the opposite with the container configuration. This is why we suggested they actually remove the flag from the container configuration (and never touch it again)\n\nThoughts?","commit_id":"98f6bd296beee9003cb2ae69ac46bd8912d18d77"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"530d6d02278d5fbfe0f0d933890b53f9c370ca90","unresolved":false,"context_lines":[{"line_number":62,"context_line":"server configuration files untouched. If you decide to disable or remove the"},{"line_number":63,"context_line":"``allow_versions`` flag, you must re-set any existing containers that had"},{"line_number":64,"context_line":"the \u0027X-Versions-Location\u0027 flag configured so that it can now be tracked by the"},{"line_number":65,"context_line":"versioned_writes middleware."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"-----------------------"},{"line_number":68,"context_line":"Examples Using ``curl``"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_c9d4a6ea","line":65,"updated":"2015-08-03 11:37:19.000000000","message":"Yeah, that totally makes me sense. Users have to consider the option change *REALLY CAREFULLY*. If someone serves a Swift storage with versioning as public storage service, it might change customers container state. Currently, we shouldn\u0027t recommend allow_versioned_writes\u003dTrue and removing allow_versions from container config IMO.\n\nAs the solution for such a upgrading scenario, it might be possible that we could pass the proxy-config state (i.e. allow_versione_write) via something (e.g. header?) to container-server could be able to handle X-Versions-Location header but I\u0027m not sure which way is better for the upgrade/maintenance and it absolutely need more time to discuss so that I agreed we can go this way leaving current implementation as it is with well documentation.\n\nAnd then, we should consider them in the future.\n\n\nIn addition, should we describe aboute the state \"allow_versioned_writes\u003dFalse\", \"allow_versions\"\u003dTrue?\nIt will behave that no new versioned container creation available but existing containers with \"X-Versions-Location\" still enabled as versioned and we can disable them with \"X-Remove-Versions-Location\".\n\nLike as (?):\n\nNote that even if ``allow_versioned_writes`` is set to False, Swift still allows to use existing container versioning until user removes X-Versions-Location header from the container unless ``allow_versions`` is set to False.","commit_id":"236a6363e8a6e61dd9715f351bee57bc3086f579"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"741f50ecd84f44a68f3673db61d2f7e3e449c445","unresolved":false,"context_lines":[{"line_number":62,"context_line":"server configuration files untouched. If you decide to disable or remove the"},{"line_number":63,"context_line":"``allow_versions`` flag, you must re-set any existing containers that had"},{"line_number":64,"context_line":"the \u0027X-Versions-Location\u0027 flag configured so that it can now be tracked by the"},{"line_number":65,"context_line":"versioned_writes middleware."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"-----------------------"},{"line_number":68,"context_line":"Examples Using ``curl``"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a4dcd0f_a57e8bac","line":65,"in_reply_to":"1a4dcd0f_2104b87c","updated":"2015-08-04 02:47:35.000000000","message":"Good table to understand, nice. I was talking about GH-1314 (i.e. container-server config on, middleware config off)\n\nI wrote a quick unit test [1] for that but failed :(\n\nI have an idea to fix this and will push it up asap\n\n1: http://paste.openstack.org/show/406813/","commit_id":"236a6363e8a6e61dd9715f351bee57bc3086f579"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"ca842f6da3288c91f45de2ad1256bdbf6e0a8baf","unresolved":false,"context_lines":[{"line_number":62,"context_line":"server configuration files untouched. If you decide to disable or remove the"},{"line_number":63,"context_line":"``allow_versions`` flag, you must re-set any existing containers that had"},{"line_number":64,"context_line":"the \u0027X-Versions-Location\u0027 flag configured so that it can now be tracked by the"},{"line_number":65,"context_line":"versioned_writes middleware."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"-----------------------"},{"line_number":68,"context_line":"Examples Using ``curl``"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a4dcd0f_c7b6ff89","line":65,"in_reply_to":"1a4dcd0f_a57e8bac","updated":"2015-08-04 22:15:08.000000000","message":"Sorry for the confusion. Yesterday I updated the value of GH-1314 to what is displaying there now while making the change to the latest patchset. So, you are correct, pathset 41 does not work as is displayed on the spreadsheet, but patchset 42 should.\n\nThanks for the test, I have incorporated into patchset 42.","commit_id":"236a6363e8a6e61dd9715f351bee57bc3086f579"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"17ad4617ea1af3899d5270266c95235922f481be","unresolved":false,"context_lines":[{"line_number":62,"context_line":"server configuration files untouched. If you decide to disable or remove the"},{"line_number":63,"context_line":"``allow_versions`` flag, you must re-set any existing containers that had"},{"line_number":64,"context_line":"the \u0027X-Versions-Location\u0027 flag configured so that it can now be tracked by the"},{"line_number":65,"context_line":"versioned_writes middleware."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"-----------------------"},{"line_number":68,"context_line":"Examples Using ``curl``"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a4dcd0f_2104b87c","line":65,"in_reply_to":"3a50d1a3_c9d4a6ea","updated":"2015-08-03 20:31:46.000000000","message":"Kota, re: your last comment, I am making a small fix as I think that would also be wrong. Ultimately, ``allow_versioned_writes`` should have the last word on whether the feature is enabled or not. If it is not configured, then ``allow_versions`` should be checked to maintain backwards compatibility, but if ``allow_versioned_writes`` is set (either True or False) then the feature should be enabled (or disabled) based on that.\n\nTo summarize: \nIf ``allow_versioned_writes`` is not set, check ``allow_versions`` in container config.\nif ``allow_versioned_writes`` is set to False, nothing gets versioned.\nif ``alow_versioned_writes`` is set to True, versioning is enabled\n\n\nHopefully I\u0027m not missing anything...thanks for catching all these different scenarios. I\u0027ve updated the spreadsheet: https://docs.google.com/spreadsheets/d/1hyo3Q7SS70kG0ZCR3NvXJZ6ikeqqQ04RcRYjOLb44m8/edit?usp\u003dsharing","commit_id":"236a6363e8a6e61dd9715f351bee57bc3086f579"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"530d6d02278d5fbfe0f0d933890b53f9c370ca90","unresolved":false,"context_lines":[{"line_number":320,"context_line":"        location \u003d \u0027\u0027"},{"line_number":321,"context_line":"        for key, val in self._response_headers:"},{"line_number":322,"context_line":"            if key.lower() \u003d\u003d sysmeta_version_hdr:"},{"line_number":323,"context_line":"                location \u003d val"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"        if location:"},{"line_number":326,"context_line":"            self._response_headers.extend([(\u0027X-Versions-Location\u0027, location)])"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_c251dbda","line":323,"updated":"2015-08-03 11:37:19.000000000","message":"I guess using self._response_header_value instead of for-loop would be better. Just as:\n\n location \u003d self._response_header_value(sysmeta_version_hdr)","commit_id":"236a6363e8a6e61dd9715f351bee57bc3086f579"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"530d6d02278d5fbfe0f0d933890b53f9c370ca90","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                location \u003d val"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"        if location:"},{"line_number":326,"context_line":"            self._response_headers.extend([(\u0027X-Versions-Location\u0027, location)])"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        start_response(self._response_status,"},{"line_number":329,"context_line":"                       self._response_headers,"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_c24a3bad","line":326,"updated":"2015-08-03 11:37:19.000000000","message":"When there is a duplicated key in the self._response_headers (i.e. \u0027X-Versions-Location\u0027 twice there), is that ensured to apply the last one?\n\ne.g.:\n self._response_headers \u003d [(\u0027X-Versions-Location\u0027, \u0027old\u0027), (\u0027X-Versions-Location\u0027, \u0027new\u0027)]\n\n(\u0027old\u0027 is old X-Versions-Location and \u0027new\u0027 is new one set from \u0027X-Container-Sysmeta-Versions-Location\u0027)\n\nOnce I wrote a test for this, this seems to work well so I hope it would be true, but not sure. For safety, I like that swift attempt to remove old one if sysmeta is set though.","commit_id":"236a6363e8a6e61dd9715f351bee57bc3086f579"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"530d6d02278d5fbfe0f0d933890b53f9c370ca90","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        if location:"},{"line_number":326,"context_line":"            self._response_headers.extend([(\u0027X-Versions-Location\u0027, location)])"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        start_response(self._response_status,"},{"line_number":329,"context_line":"                       self._response_headers,"},{"line_number":330,"context_line":"                       self._response_exc_info)"},{"line_number":331,"context_line":"        return app_resp"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_dbe21ad5","line":328,"updated":"2015-08-03 11:37:19.000000000","message":"I wrote down my idea for 2 above things as a fixup patch, here https://review.openstack.org/#/c/208439/\n\nI wonder if you could check it out and consider about it.","commit_id":"236a6363e8a6e61dd9715f351bee57bc3086f579"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"17ad4617ea1af3899d5270266c95235922f481be","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        if location:"},{"line_number":326,"context_line":"            self._response_headers.extend([(\u0027X-Versions-Location\u0027, location)])"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        start_response(self._response_status,"},{"line_number":329,"context_line":"                       self._response_headers,"},{"line_number":330,"context_line":"                       self._response_exc_info)"},{"line_number":331,"context_line":"        return app_resp"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a4dcd0f_814b4cb0","line":328,"in_reply_to":"3a50d1a3_dbe21ad5","updated":"2015-08-03 20:31:46.000000000","message":"sure, I will check it out and would be glad to squash into next patchset...","commit_id":"236a6363e8a6e61dd9715f351bee57bc3086f579"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"ca3b9a037dae0cee53b4da23c5fe77aec577899c","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                location \u003d val"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"        if location:"},{"line_number":326,"context_line":"            self._response_headers.extend([(\u0027X-Versions-Location\u0027, location)])"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        start_response(self._response_status,"},{"line_number":329,"context_line":"                       self._response_headers,"}],"source_content_type":"text/x-python","patch_set":42,"id":"1a4dcd0f_60cb47a6","line":326,"updated":"2015-08-05 05:47:24.000000000","message":"I noticed this extension causes duplicated X-Versions-Location header when both X-Versions-Location and X-Container-Sysmeta-Versions-Location are in the response.\n\nTo reproduce:\n- Create versioning container (e.g. X-Versions-Location: target) with old container config on.\n- Enable versioned_writes middleware with old container config still on.\n- Update versions-location (e.g. X-Versions-Location: target2) on the container \n- HEAD (or GET) the container response shows 2 X-Versions-Location headers, one is target and the other is target2.\n\nI know that situation is *NOT RECOMMENDED*, because document describes we should turn off the old container config when enabling versioned_writes middleware.\n\nIn addition, my follow up patch [1] fixes the problem so this is *JUST NOTE* and I\u0027d like to give you a chance to know/consider about that, here. I think you can leave this as it is and wait my patch merged if you like.\n\n1: https://review.openstack.org/#/c/209315/","commit_id":"a4aa3be1210aab9ace70df12681f56e8b9db901f"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"bea889772498e1bba97b83a1760e193e128d01f3","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                location \u003d val"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"        if location:"},{"line_number":326,"context_line":"            self._response_headers.extend([(\u0027X-Versions-Location\u0027, location)])"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        start_response(self._response_status,"},{"line_number":329,"context_line":"                       self._response_headers,"}],"source_content_type":"text/x-python","patch_set":42,"id":"1a4dcd0f_197736d4","line":326,"in_reply_to":"1a4dcd0f_60cb47a6","updated":"2015-08-05 18:40:43.000000000","message":"@Kota, I think this bug is important enough to warrant a fix here. I\u0027m taking a bit of a different approach by actually removing the container configuration when the sysmeta is set. This way we can never have two headers with Versions Location. I think that just helps keep things simpler. Checkout the next patchset and let me know what you think...","commit_id":"a4aa3be1210aab9ace70df12681f56e8b9db901f"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"ca3b9a037dae0cee53b4da23c5fe77aec577899c","unresolved":false,"context_lines":[{"line_number":415,"context_line":"            # if allow_versioned_writes is not set in the configuration files"},{"line_number":416,"context_line":"            # but \u0027versions\u0027 is configured, enable feature to maintain"},{"line_number":417,"context_line":"            # backwards compatibility"},{"line_number":418,"context_line":"            if not allow_versioned_writes and object_versions:"},{"line_number":419,"context_line":"                is_enabled \u003d True"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"        if is_enabled and object_versions:"}],"source_content_type":"text/x-python","patch_set":42,"id":"1a4dcd0f_fd07031a","line":418,"updated":"2015-08-05 05:47:24.000000000","message":"(memo) allow_versioned_writes means configured or not. i.e. is_enabled will be True when no config in middleware but there is in container.","commit_id":"a4aa3be1210aab9ace70df12681f56e8b9db901f"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"ca3b9a037dae0cee53b4da23c5fe77aec577899c","unresolved":false,"context_lines":[{"line_number":462,"context_line":"        # If set, check if enabled when checking versions container in"},{"line_number":463,"context_line":"        # sysmeta property. If it is not set check \u0027versions\u0027 property in"},{"line_number":464,"context_line":"        # container_info"},{"line_number":465,"context_line":"        allow_versioned_writes \u003d self.conf.get(\u0027allow_versioned_writes\u0027)"},{"line_number":466,"context_line":"        if allow_versioned_writes and container and not obj:"},{"line_number":467,"context_line":"            return self.container_request(req, start_response,"},{"line_number":468,"context_line":"                                          allow_versioned_writes)"}],"source_content_type":"text/x-python","patch_set":42,"id":"1a4dcd0f_5dff1734","line":465,"updated":"2015-08-05 05:47:24.000000000","message":"(memo) allow_versioned_writes is None or str.","commit_id":"a4aa3be1210aab9ace70df12681f56e8b9db901f"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"ca3b9a037dae0cee53b4da23c5fe77aec577899c","unresolved":false,"context_lines":[{"line_number":463,"context_line":"        # sysmeta property. If it is not set check \u0027versions\u0027 property in"},{"line_number":464,"context_line":"        # container_info"},{"line_number":465,"context_line":"        allow_versioned_writes \u003d self.conf.get(\u0027allow_versioned_writes\u0027)"},{"line_number":466,"context_line":"        if allow_versioned_writes and container and not obj:"},{"line_number":467,"context_line":"            return self.container_request(req, start_response,"},{"line_number":468,"context_line":"                                          allow_versioned_writes)"},{"line_number":469,"context_line":"        elif obj and req.method in (\u0027PUT\u0027, \u0027COPY\u0027, \u0027DELETE\u0027):"}],"source_content_type":"text/x-python","patch_set":42,"id":"1a4dcd0f_1d90afeb","line":466,"updated":"2015-08-05 05:47:24.000000000","message":"(memo) container_request is called only when allow_versioned_writes configured.","commit_id":"a4aa3be1210aab9ace70df12681f56e8b9db901f"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"ca3b9a037dae0cee53b4da23c5fe77aec577899c","unresolved":false,"context_lines":[{"line_number":466,"context_line":"        if allow_versioned_writes and container and not obj:"},{"line_number":467,"context_line":"            return self.container_request(req, start_response,"},{"line_number":468,"context_line":"                                          allow_versioned_writes)"},{"line_number":469,"context_line":"        elif obj and req.method in (\u0027PUT\u0027, \u0027COPY\u0027, \u0027DELETE\u0027):"},{"line_number":470,"context_line":"            return self.object_request("},{"line_number":471,"context_line":"                req, version, account, container, obj,"},{"line_number":472,"context_line":"                allow_versioned_writes)(env, start_response)"}],"source_content_type":"text/x-python","patch_set":42,"id":"1a4dcd0f_5dadd72f","line":469,"updated":"2015-08-05 05:47:24.000000000","message":"(memo) object_request is always called if the request method matches \u0027PUT\u0027, \u0027COPY\u0027, \u0027DELETE\u0027","commit_id":"a4aa3be1210aab9ace70df12681f56e8b9db901f"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"4e1026247104767b72ef0ea265212530f9e14447","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                # reset original header to maintain sanity"},{"line_number":362,"context_line":"                # now only sysmeta is source of Versions Location"},{"line_number":363,"context_line":"                req.headers[\u0027X-Versions-Location\u0027] \u003d \u0027\u0027"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"                # if both headers are in the same request"},{"line_number":366,"context_line":"                # adding location takes precendence over removing"},{"line_number":367,"context_line":"                if \u0027X-Remove-Versions-Location\u0027 in req.headers:"}],"source_content_type":"text/x-python","patch_set":43,"id":"1a4dcd0f_893f6e86","line":364,"updated":"2015-08-05 21:46:05.000000000","message":"No, this doesn\u0027t fix the bug I mentioned in patch set 42. The bug is related to response headers (not request headers) so we need to fix the duplication on the response header.\n\nI pasted a unit test for this bug, here http://paste.openstack.org/show/409722/\n\nYou have to write a code to be able to pass it if you want to fix it here but current code doesn\u0027t yet.","commit_id":"27e381149f50288f51e20909967ec141819fba95"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"c5d8fc292a5be030d742f5c098e7362880f8283c","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                # reset original header to maintain sanity"},{"line_number":362,"context_line":"                # now only sysmeta is source of Versions Location"},{"line_number":363,"context_line":"                req.headers[\u0027X-Versions-Location\u0027] \u003d \u0027\u0027"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"                # if both headers are in the same request"},{"line_number":366,"context_line":"                # adding location takes precendence over removing"},{"line_number":367,"context_line":"                if \u0027X-Remove-Versions-Location\u0027 in req.headers:"}],"source_content_type":"text/x-python","patch_set":43,"id":"1a4dcd0f_dc89b276","line":364,"in_reply_to":"1a4dcd0f_091fdeb7","updated":"2015-08-05 22:15:56.000000000","message":"Oh, I was missing you mean *different approach*. You fixed that middleware sets empty string to remove old X-Versions-Location.\n\nTBH, I don\u0027t have a big fun to go a way like this because it is depends on container config whether the old X-Versions-Location deletion is acceptable or not. (I hope operator doesn\u0027t on again after allow_versions off in container config but I\u0027m not sure) And considering Swift employing eventual consistency, we should always consider there might be 2 different states in Swift, IMHO.\n\nHow do you think about?","commit_id":"27e381149f50288f51e20909967ec141819fba95"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"70776a7cc47eabd0266e34cf8b7a19410c67b944","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                # reset original header to maintain sanity"},{"line_number":362,"context_line":"                # now only sysmeta is source of Versions Location"},{"line_number":363,"context_line":"                req.headers[\u0027X-Versions-Location\u0027] \u003d \u0027\u0027"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"                # if both headers are in the same request"},{"line_number":366,"context_line":"                # adding location takes precendence over removing"},{"line_number":367,"context_line":"                if \u0027X-Remove-Versions-Location\u0027 in req.headers:"}],"source_content_type":"text/x-python","patch_set":43,"id":"1a4dcd0f_cb67a64b","line":364,"in_reply_to":"1a4dcd0f_6b80d2f7","updated":"2015-08-06 02:11:18.000000000","message":"@Kota, yes, I agree with both issues! thanks!","commit_id":"27e381149f50288f51e20909967ec141819fba95"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"ee8f57854680d2948b8874e368ce32ac4552b233","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                # reset original header to maintain sanity"},{"line_number":362,"context_line":"                # now only sysmeta is source of Versions Location"},{"line_number":363,"context_line":"                req.headers[\u0027X-Versions-Location\u0027] \u003d \u0027\u0027"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"                # if both headers are in the same request"},{"line_number":366,"context_line":"                # adding location takes precendence over removing"},{"line_number":367,"context_line":"                if \u0027X-Remove-Versions-Location\u0027 in req.headers:"}],"source_content_type":"text/x-python","patch_set":43,"id":"1a4dcd0f_6b80d2f7","line":364,"in_reply_to":"1a4dcd0f_7acf3e29","updated":"2015-08-06 02:04:35.000000000","message":"@Thiago\n\nI don\u0027t think this approach doesn\u0027t conflict wit mine. Your approach is great to prevent to create invalid condition (there are both X-Versions-Location and X-Container-Sysmeta-Versions-Location) in Swift. My patch will make it safer if such a situation happened.\n\nOn the eventual consistency, I might confuse the situation like above miss configuration. I thought like...a handoff node has an old X-Versions-Location header.\n\n*HOWEVER* I am realizing it will happen just only on the miss configuration case because X-Versions-Location: \u0027\u0027 and X-Container-Sysmeta-Versions-Locaton: \u0027somewhere\u0027 with the newest timestamp will be propageted among replicas and GETorHEAD will use just one possible source of them so I might be wrong.\n\nAnyways, following patch will be able to also to prevent the incorrect config.\n\nOK, let\u0027s land this as it is.","commit_id":"27e381149f50288f51e20909967ec141819fba95"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"5ad8b7a049751508427ce78b337fa7b794372f37","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                # reset original header to maintain sanity"},{"line_number":362,"context_line":"                # now only sysmeta is source of Versions Location"},{"line_number":363,"context_line":"                req.headers[\u0027X-Versions-Location\u0027] \u003d \u0027\u0027"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"                # if both headers are in the same request"},{"line_number":366,"context_line":"                # adding location takes precendence over removing"},{"line_number":367,"context_line":"                if \u0027X-Remove-Versions-Location\u0027 in req.headers:"}],"source_content_type":"text/x-python","patch_set":43,"id":"1a4dcd0f_091fdeb7","line":364,"in_reply_to":"1a4dcd0f_893f6e86","updated":"2015-08-05 21:51:40.000000000","message":"@Kota, what I tried to fix the issue from a different approach. ie., not allowing there to be a duplicate header. I wasn\u0027t happy with the fact that we could have duplicates X-Version-Location header, so patchset 43 makes sure it can\u0027t happen.","commit_id":"27e381149f50288f51e20909967ec141819fba95"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"5ecca86aa463b7faf46d9df0d27b2fafb3ba893f","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                # reset original header to maintain sanity"},{"line_number":362,"context_line":"                # now only sysmeta is source of Versions Location"},{"line_number":363,"context_line":"                req.headers[\u0027X-Versions-Location\u0027] \u003d \u0027\u0027"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"                # if both headers are in the same request"},{"line_number":366,"context_line":"                # adding location takes precendence over removing"},{"line_number":367,"context_line":"                if \u0027X-Remove-Versions-Location\u0027 in req.headers:"}],"source_content_type":"text/x-python","patch_set":43,"id":"1a4dcd0f_7acf3e29","line":364,"in_reply_to":"1a4dcd0f_dc89b276","updated":"2015-08-06 00:49:34.000000000","message":"@Kota, I think those are good concerns. \n\nConsidering the question of users going back to old configuration, we tried to document that they should not do that. Once they set the middleware configuration, they should not modify container configuration again. If we keep the code as it is and they change configurations back, then they have basically disabled the feature, because old header is now empty. IMO, I still prefer this behavior then having two different flags with two different values and we choose one to show.\n\nOn the issue of eventual consistency, I think this latest fix makes sure that you would still not have two headers returned. It is possible that an old value is returned, but not two values from the same db. Am I missing something?","commit_id":"27e381149f50288f51e20909967ec141819fba95"}],"swift/proxy/server.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"5d56db2273e3b683231a5875bc52c342c7a7e5d5","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                               else [])},"},{"line_number":66,"context_line":"    {\u0027name\u0027: \u0027versioned_writes\u0027, \u0027after_fn\u0027: lambda _junk: ["},{"line_number":67,"context_line":"        \u0027staticweb\u0027, \u0027tempauth\u0027, \u0027keystoneauth\u0027,"},{"line_number":68,"context_line":"        \u0027catch_errors\u0027, \u0027gatekeeper\u0027, \u0027proxy_logging\u0027]},"},{"line_number":69,"context_line":"    {\u0027name\u0027: \u0027dlo\u0027, \u0027after_fn\u0027: lambda _junk: ["},{"line_number":70,"context_line":"        \u0027staticweb\u0027, \u0027tempauth\u0027, \u0027keystoneauth\u0027,"},{"line_number":71,"context_line":"        \u0027catch_errors\u0027, \u0027gatekeeper\u0027, \u0027proxy_logging\u0027]}]"}],"source_content_type":"text/x-python","patch_set":38,"id":"3a50d1a3_5698ea1b","line":68,"updated":"2015-07-23 06:10:00.000000000","message":"Do we want to make sure versioned_writes is after slo? or will moving it beyond break something I haven\u0027t thought about?","commit_id":"0d70a6d0d0e327c9ecfed629e0490d69ec5df320"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"3233ceb93604137f2632c619e792c905aa408496","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                               else [])},"},{"line_number":66,"context_line":"    {\u0027name\u0027: \u0027versioned_writes\u0027, \u0027after_fn\u0027: lambda _junk: ["},{"line_number":67,"context_line":"        \u0027staticweb\u0027, \u0027tempauth\u0027, \u0027keystoneauth\u0027,"},{"line_number":68,"context_line":"        \u0027catch_errors\u0027, \u0027gatekeeper\u0027, \u0027proxy_logging\u0027]},"},{"line_number":69,"context_line":"    {\u0027name\u0027: \u0027dlo\u0027, \u0027after_fn\u0027: lambda _junk: ["},{"line_number":70,"context_line":"        \u0027staticweb\u0027, \u0027tempauth\u0027, \u0027keystoneauth\u0027,"},{"line_number":71,"context_line":"        \u0027catch_errors\u0027, \u0027gatekeeper\u0027, \u0027proxy_logging\u0027]}]"}],"source_content_type":"text/x-python","patch_set":38,"id":"3a50d1a3_b46c8637","line":68,"in_reply_to":"3a50d1a3_5698ea1b","updated":"2015-07-24 05:47:51.000000000","message":"how about we just set it after dlo since we know that will be in the pipeline?","commit_id":"0d70a6d0d0e327c9ecfed629e0490d69ec5df320"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"de1efa16736bd84ca9fb347bfa70721053557164","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                               else [])},"},{"line_number":66,"context_line":"    {\u0027name\u0027: \u0027versioned_writes\u0027, \u0027after_fn\u0027: lambda _junk: ["},{"line_number":67,"context_line":"        \u0027staticweb\u0027, \u0027tempauth\u0027, \u0027keystoneauth\u0027,"},{"line_number":68,"context_line":"        \u0027catch_errors\u0027, \u0027gatekeeper\u0027, \u0027proxy_logging\u0027]},"},{"line_number":69,"context_line":"    {\u0027name\u0027: \u0027dlo\u0027, \u0027after_fn\u0027: lambda _junk: ["},{"line_number":70,"context_line":"        \u0027staticweb\u0027, \u0027tempauth\u0027, \u0027keystoneauth\u0027,"},{"line_number":71,"context_line":"        \u0027catch_errors\u0027, \u0027gatekeeper\u0027, \u0027proxy_logging\u0027]}]"}],"source_content_type":"text/x-python","patch_set":38,"id":"3a50d1a3_1784b808","line":68,"in_reply_to":"3a50d1a3_b46c8637","updated":"2015-07-28 17:45:25.000000000","message":"Done","commit_id":"0d70a6d0d0e327c9ecfed629e0490d69ec5df320"}],"test/functional/tests.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"611a4e361cbe2fdce6be04dc802138aa353ded8f","unresolved":false,"context_lines":[{"line_number":2485,"context_line":"                (self.env.versioning_enabled,))"},{"line_number":2486,"context_line":""},{"line_number":2487,"context_line":"    def test_overwriting(self):"},{"line_number":2488,"context_line":"        raise SkipTest"},{"line_number":2489,"context_line":"        container \u003d self.env.container"},{"line_number":2490,"context_line":"        versions_container \u003d self.env.versions_container"},{"line_number":2491,"context_line":"        obj_name \u003d Utils.create_name()"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_25e6d0e8","line":2488,"updated":"2014-11-14 09:31:19.000000000","message":"what you might want to do is define a new decorator @requires_versions that initially could raise SkipTest but eventually would test cluster_info for versions middleware and conditionally skip the test.\n\nI *think* there is a similar pattern for the account ACLs tests.\n\nThat said, that might be overkill if this is the only test !","commit_id":"5a98347c801afc43226b355828809abb7fb0719f"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"26eecaa625813cdf7ecce51523a97bd54d4b6a0b","unresolved":false,"context_lines":[{"line_number":2485,"context_line":"                (self.env.versioning_enabled,))"},{"line_number":2486,"context_line":""},{"line_number":2487,"context_line":"    def test_overwriting(self):"},{"line_number":2488,"context_line":"        raise SkipTest"},{"line_number":2489,"context_line":"        container \u003d self.env.container"},{"line_number":2490,"context_line":"        versions_container \u003d self.env.versions_container"},{"line_number":2491,"context_line":"        obj_name \u003d Utils.create_name()"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_3bbc1006","line":2488,"in_reply_to":"5a890539_25e6d0e8","updated":"2014-11-15 21:28:10.000000000","message":"removing the Skip for now, will look at ACLs tests to investigate adding new decorator","commit_id":"5a98347c801afc43226b355828809abb7fb0719f"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":2407,"context_line":"        if cls.versioning_enabled is None:"},{"line_number":2408,"context_line":"            cls.versioning_enabled \u003d \u0027versioned_writes\u0027 in cluster_info"},{"line_number":2409,"context_line":"            if not cls.versioning_enabled:"},{"line_number":2410,"context_line":"                return"},{"line_number":2411,"context_line":""},{"line_number":2412,"context_line":"        cls.account \u003d Account(cls.conn, tf.config.get(\u0027account\u0027,"},{"line_number":2413,"context_line":"                                                      tf.config[\u0027username\u0027]))"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_6e03d90d","line":2410,"updated":"2015-02-27 07:48:51.000000000","message":"there is a legacy situation where you *can* have versioning enabled, but not in cluster_info right?","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"0793f2e789cc5ceb21ac3d97db79305240f9983e","unresolved":false,"context_lines":[{"line_number":2407,"context_line":"        if cls.versioning_enabled is None:"},{"line_number":2408,"context_line":"            cls.versioning_enabled \u003d \u0027versioned_writes\u0027 in cluster_info"},{"line_number":2409,"context_line":"            if not cls.versioning_enabled:"},{"line_number":2410,"context_line":"                return"},{"line_number":2411,"context_line":""},{"line_number":2412,"context_line":"        cls.account \u003d Account(cls.conn, tf.config.get(\u0027account\u0027,"},{"line_number":2413,"context_line":"                                                      tf.config[\u0027username\u0027]))"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_5ef9f54c","line":2410,"in_reply_to":"ba7be1f8_6e03d90d","updated":"2015-03-03 16:40:50.000000000","message":"Done","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"}],"test/unit/common/middleware/helpers.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":60,"context_line":"            path +\u003d \u0027?\u0027 + env[\u0027QUERY_STRING\u0027]"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        if \u0027swift.authorize\u0027 in env:"},{"line_number":63,"context_line":"            resp \u003d env[\u0027swift.authorize\u0027](None)"},{"line_number":64,"context_line":"            if resp:"},{"line_number":65,"context_line":"                return resp(env, start_response)"},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_40e34433","line":63,"updated":"2015-02-27 07:48:51.000000000","message":"I guess no one ever used this guy to test a middleware that used make_pre_authed_env before?","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"}],"test/unit/common/test_wsgi.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":1151,"context_line":"                tempdir, policy.ring_name + \u0027.ring.gz\u0027)"},{"line_number":1152,"context_line":""},{"line_number":1153,"context_line":"        app \u003d wsgi.loadapp(conf_path)"},{"line_number":1154,"context_line":"        proxy_app \u003d app.app.app.app.app.app"},{"line_number":1155,"context_line":"        self.assertEqual(proxy_app.account_ring.serialized_path,"},{"line_number":1156,"context_line":"                         account_ring_path)"},{"line_number":1157,"context_line":"        self.assertEqual(proxy_app.container_ring.serialized_path,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_fd2061b2","line":1154,"updated":"2015-02-27 07:48:51.000000000","message":"lol","commit_id":"4831edda714f4101abf87d6243cea808d3b1c825"}],"test/unit/proxy/test_server.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":1570,"context_line":"        exp \u003d \u0027HTTP/1.1 200\u0027"},{"line_number":1571,"context_line":"        self.assertEqual(headers[:len(exp)], exp)"},{"line_number":1572,"context_line":""},{"line_number":1573,"context_line":"    def test_expirer_DELETE_on_versioned_object(self):"},{"line_number":1574,"context_line":"        test_errors \u003d []"},{"line_number":1575,"context_line":""},{"line_number":1576,"context_line":"        def test_connect(ipaddr, port, device, partition, method, path,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_c05bb42c","side":"PARENT","line":1573,"updated":"2015-02-27 07:48:51.000000000","message":"i can\u0027t find this one","commit_id":"bf0e01c488ec1e16e1d9c99d637cc6ff8ab73d26"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"0793f2e789cc5ceb21ac3d97db79305240f9983e","unresolved":false,"context_lines":[{"line_number":1570,"context_line":"        exp \u003d \u0027HTTP/1.1 200\u0027"},{"line_number":1571,"context_line":"        self.assertEqual(headers[:len(exp)], exp)"},{"line_number":1572,"context_line":""},{"line_number":1573,"context_line":"    def test_expirer_DELETE_on_versioned_object(self):"},{"line_number":1574,"context_line":"        test_errors \u003d []"},{"line_number":1575,"context_line":""},{"line_number":1576,"context_line":"        def test_connect(ipaddr, port, device, partition, method, path,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_41f758d3","side":"PARENT","line":1573,"in_reply_to":"ba7be1f8_c05bb42c","updated":"2015-03-03 16:40:50.000000000","message":"this became test_delete_latest_version_success in the middleware tests.","commit_id":"bf0e01c488ec1e16e1d9c99d637cc6ff8ab73d26"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":1607,"context_line":"        StoragePolicy(0, \u0027zero\u0027, False, object_ring\u003dFakeRing()),"},{"line_number":1608,"context_line":"        StoragePolicy(1, \u0027one\u0027, True, object_ring\u003dFakeRing())"},{"line_number":1609,"context_line":"    ])"},{"line_number":1610,"context_line":"    def test_DELETE_on_expired_versioned_object(self):"},{"line_number":1611,"context_line":"        methods \u003d set()"},{"line_number":1612,"context_line":""},{"line_number":1613,"context_line":"        def test_connect(ipaddr, port, device, partition, method, path,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_8051bc10","side":"PARENT","line":1610,"updated":"2015-02-27 07:48:51.000000000","message":"this moved to middleware tests","commit_id":"bf0e01c488ec1e16e1d9c99d637cc6ff8ab73d26"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":4063,"context_line":"        self.assertEquals(body, \u0027oh hai123456789abcdef\u0027)"},{"line_number":4064,"context_line":""},{"line_number":4065,"context_line":"    @unpatch_policies"},{"line_number":4066,"context_line":"    def test_version_manifest(self, oc\u003d\u0027versions\u0027, vc\u003d\u0027vers\u0027, o\u003d\u0027name\u0027):"},{"line_number":4067,"context_line":"        versions_to_create \u003d 3"},{"line_number":4068,"context_line":"        # Create a container for our versioned object testing"},{"line_number":4069,"context_line":"        (prolis, acc1lis, acc2lis, con1lis, con2lis, obj1lis,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_003dccbb","side":"PARENT","line":4066,"updated":"2015-02-27 07:48:51.000000000","message":"this moved to the socket tests","commit_id":"bf0e01c488ec1e16e1d9c99d637cc6ff8ab73d26"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":4681,"context_line":"        StoragePolicy(0, \u0027zero\u0027, False, object_ring\u003dFakeRing()),"},{"line_number":4682,"context_line":"        StoragePolicy(1, \u0027one\u0027, True, object_ring\u003dFakeRing())"},{"line_number":4683,"context_line":"    ])"},{"line_number":4684,"context_line":"    def test_PUT_versioning_with_nonzero_default_policy(self):"},{"line_number":4685,"context_line":""},{"line_number":4686,"context_line":"        def test_connect(ipaddr, port, device, partition, method, path,"},{"line_number":4687,"context_line":"                         headers\u003dNone, query_string\u003dNone):"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_6073e8b4","side":"PARENT","line":4684,"updated":"2015-02-27 07:48:51.000000000","message":"this moved to middleware tests","commit_id":"bf0e01c488ec1e16e1d9c99d637cc6ff8ab73d26"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"78896550911176d7aec9668795283e6b91d1b6e8","unresolved":false,"context_lines":[{"line_number":4728,"context_line":"        StoragePolicy(0, \u0027zero\u0027, False, object_ring\u003dFakeRing()),"},{"line_number":4729,"context_line":"        StoragePolicy(1, \u0027one\u0027, True, object_ring\u003dFakeRing())"},{"line_number":4730,"context_line":"    ])"},{"line_number":4731,"context_line":"    def test_cross_policy_DELETE_versioning(self):"},{"line_number":4732,"context_line":"        requests \u003d []"},{"line_number":4733,"context_line":""},{"line_number":4734,"context_line":"        def capture_requests(ipaddr, port, device, partition, method, path,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_a06de0ce","side":"PARENT","line":4731,"updated":"2015-02-27 07:48:51.000000000","message":"i can\u0027t find this one","commit_id":"bf0e01c488ec1e16e1d9c99d637cc6ff8ab73d26"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"0793f2e789cc5ceb21ac3d97db79305240f9983e","unresolved":false,"context_lines":[{"line_number":4728,"context_line":"        StoragePolicy(0, \u0027zero\u0027, False, object_ring\u003dFakeRing()),"},{"line_number":4729,"context_line":"        StoragePolicy(1, \u0027one\u0027, True, object_ring\u003dFakeRing())"},{"line_number":4730,"context_line":"    ])"},{"line_number":4731,"context_line":"    def test_cross_policy_DELETE_versioning(self):"},{"line_number":4732,"context_line":"        requests \u003d []"},{"line_number":4733,"context_line":""},{"line_number":4734,"context_line":"        def capture_requests(ipaddr, port, device, partition, method, path,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba7be1f8_a98e0f2c","side":"PARENT","line":4731,"in_reply_to":"ba7be1f8_a06de0ce","updated":"2015-03-03 16:40:50.000000000","message":"missing, will add in a follow-up patchset","commit_id":"bf0e01c488ec1e16e1d9c99d637cc6ff8ab73d26"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"530d6d02278d5fbfe0f0d933890b53f9c370ca90","unresolved":false,"context_lines":[{"line_number":8643,"context_line":"        self.assertEquals(headers[:len(exp)], exp)"},{"line_number":8644,"context_line":""},{"line_number":8645,"context_line":"        # Create the object versions"},{"line_number":8646,"context_line":"        for version in xrange(1, versions_to_create):"},{"line_number":8647,"context_line":"            sleep(.01)  # guarantee that the timestamp changes"},{"line_number":8648,"context_line":"            headers \u003d put(version)"},{"line_number":8649,"context_line":"            exp \u003d \u0027HTTP/1.1 201\u0027"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_850e733b","line":8646,"updated":"2015-08-03 11:37:19.000000000","message":"We should use \"range\" instead of \"xrange\" for python3 compatibility in the future if the range is small enough and no reason to use that.","commit_id":"236a6363e8a6e61dd9715f351bee57bc3086f579"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"530d6d02278d5fbfe0f0d933890b53f9c370ca90","unresolved":false,"context_lines":[{"line_number":8747,"context_line":"        self.assertEquals(headers[:len(exp)], exp)"},{"line_number":8748,"context_line":""},{"line_number":8749,"context_line":"        # Delete the object versions"},{"line_number":8750,"context_line":"        for segment in xrange(versions_to_create - 1, 0, -1):"},{"line_number":8751,"context_line":""},{"line_number":8752,"context_line":"            headers \u003d delete()"},{"line_number":8753,"context_line":"            exp \u003d \u0027HTTP/1.1 2\u0027  # 2xx series response"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_8878ca7f","line":8750,"updated":"2015-08-03 11:37:19.000000000","message":"Same as above.","commit_id":"236a6363e8a6e61dd9715f351bee57bc3086f579"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"530d6d02278d5fbfe0f0d933890b53f9c370ca90","unresolved":false,"context_lines":[{"line_number":8832,"context_line":"        # fd.flush()"},{"line_number":8833,"context_line":"        # headers \u003d readuntil2crlfs(fd)"},{"line_number":8834,"context_line":"        # exp \u003d \u0027http/1.1 200 ok\u0027"},{"line_number":8835,"context_line":"        # self.assertequals(headers[:len(exp)], exp)"},{"line_number":8836,"context_line":""},{"line_number":8837,"context_line":"        # DELETE v1/a/c/obj shouldn\u0027t delete v1/a/c/obj/sub versions"},{"line_number":8838,"context_line":"        sock \u003d connect_tcp((\u0027localhost\u0027, prolis.getsockname()[1]))"}],"source_content_type":"text/x-python","patch_set":41,"id":"3a50d1a3_a85906ff","line":8835,"updated":"2015-08-03 11:37:19.000000000","message":"Is this still working?\n\nOnce I was walking through the code, manifest seems not to get versioned.","commit_id":"236a6363e8a6e61dd9715f351bee57bc3086f579"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"741f50ecd84f44a68f3673db61d2f7e3e449c445","unresolved":false,"context_lines":[{"line_number":8832,"context_line":"        # fd.flush()"},{"line_number":8833,"context_line":"        # headers \u003d readuntil2crlfs(fd)"},{"line_number":8834,"context_line":"        # exp \u003d \u0027http/1.1 200 ok\u0027"},{"line_number":8835,"context_line":"        # self.assertequals(headers[:len(exp)], exp)"},{"line_number":8836,"context_line":""},{"line_number":8837,"context_line":"        # DELETE v1/a/c/obj shouldn\u0027t delete v1/a/c/obj/sub versions"},{"line_number":8838,"context_line":"        sock \u003d connect_tcp((\u0027localhost\u0027, prolis.getsockname()[1]))"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a4dcd0f_bbd1c8fd","line":8835,"in_reply_to":"1a4dcd0f_81f90c50","updated":"2015-08-04 02:47:35.000000000","message":"You\u0027re welcome :)\n\nhttps://review.openstack.org/#/c/208439/ includes also fixes around here.","commit_id":"236a6363e8a6e61dd9715f351bee57bc3086f579"},{"author":{"_account_id":9625,"name":"Thiago da Silva","email":"thiagodasilva@gmail.com","username":"thiago"},"change_message_id":"17ad4617ea1af3899d5270266c95235922f481be","unresolved":false,"context_lines":[{"line_number":8832,"context_line":"        # fd.flush()"},{"line_number":8833,"context_line":"        # headers \u003d readuntil2crlfs(fd)"},{"line_number":8834,"context_line":"        # exp \u003d \u0027http/1.1 200 ok\u0027"},{"line_number":8835,"context_line":"        # self.assertequals(headers[:len(exp)], exp)"},{"line_number":8836,"context_line":""},{"line_number":8837,"context_line":"        # DELETE v1/a/c/obj shouldn\u0027t delete v1/a/c/obj/sub versions"},{"line_number":8838,"context_line":"        sock \u003d connect_tcp((\u0027localhost\u0027, prolis.getsockname()[1]))"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a4dcd0f_81f90c50","line":8835,"in_reply_to":"3a50d1a3_a85906ff","updated":"2015-08-03 20:31:46.000000000","message":"dlo manifest are not getting versioned anymore, forgot to remove commented out code, good catch, thanks!","commit_id":"236a6363e8a6e61dd9715f351bee57bc3086f579"}]}
