)]}'
{"swift/common/middleware/versioned_writes.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c097a94753bebf3e25dcb80ae58505e2fe7abbfa","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                elif is_client_error(lresp.status_int):"},{"line_number":345,"context_line":"                    self.logger.debug("},{"line_number":346,"context_line":"                        \u0027Got an error while listing versioned objects\u0027"},{"line_number":347,"context_line":"                        \u0027by paging\u0027)"},{"line_number":348,"context_line":"                    raise HTTPPreconditionFailed()"},{"line_number":349,"context_line":"                else:"},{"line_number":350,"context_line":"                    raise ListingIterError()"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_c4006a05","line":347,"updated":"2018-05-21 18:32:50.000000000","message":"If we\u0027re going to keep the debugging, I feel like we ought to at least include lresp.status_int","commit_id":"82975f1769a3735a2a746ba4a9689a29b7218042"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c097a94753bebf3e25dcb80ae58505e2fe7abbfa","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        close_if_possible(resp.app_iter)"},{"line_number":410,"context_line":"        self.logger.debug("},{"line_number":411,"context_line":"            \u0027Got error response %s: %s with %s %s\u0027 %"},{"line_number":412,"context_line":"            (resp.status_int, resp.body, req.method, req.path_info))"},{"line_number":413,"context_line":"        if is_client_error(resp.status_int):"},{"line_number":414,"context_line":"            # missing container or bad permissions"},{"line_number":415,"context_line":"            raise HTTPPreconditionFailed(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_073e64b7","line":412,"range":{"start_line":412,"start_character":35,"end_line":412,"end_character":39},"updated":"2018-05-21 18:32:50.000000000","message":"Does this work well when we\u0027ve already tried to close the app_iter?\n\nMaybe, since we\u0027ve already got https://github.com/openstack/swift/blob/2.17.0/swift/common/swob.py#L307-L314 and we trust error responses to be reasonably short, we could do something like\n\n resp.body  # consume and close app_iter\n\nin place of the close_if_possible call above?","commit_id":"82975f1769a3735a2a746ba4a9689a29b7218042"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"d7b3c2c78ba06d436cf6857e3a38f775373e83a6","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        close_if_possible(resp.app_iter)"},{"line_number":410,"context_line":"        self.logger.debug("},{"line_number":411,"context_line":"            \u0027Got error response %s: %s with %s %s\u0027 %"},{"line_number":412,"context_line":"            (resp.status_int, resp.body, req.method, req.path_info))"},{"line_number":413,"context_line":"        if is_client_error(resp.status_int):"},{"line_number":414,"context_line":"            # missing container or bad permissions"},{"line_number":415,"context_line":"            raise HTTPPreconditionFailed(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_8177063b","line":412,"range":{"start_line":412,"start_character":35,"end_line":412,"end_character":39},"in_reply_to":"bf659307_073e64b7","updated":"2018-05-22 19:08:00.000000000","message":"Good call. I think I did the debug with those additional debug messages but no idea how it was useful because more than one month is past after i did it. I\u0027ll delete the additional debugging lines from here to avoid the risks to enbug something.","commit_id":"82975f1769a3735a2a746ba4a9689a29b7218042"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"d7b3c2c78ba06d436cf6857e3a38f775373e83a6","unresolved":false,"context_lines":[{"line_number":443,"context_line":"        if get_resp.status_int \u003d\u003d HTTP_NOT_FOUND:"},{"line_number":444,"context_line":"            self.logger.info("},{"line_number":445,"context_line":"                \u0027No exisiting object for %s. Skipping the copy to the \u0027"},{"line_number":446,"context_line":"                \u0027versioned container\u0027 % req.path_info)"},{"line_number":447,"context_line":"            # nothing to version, proceed with original request"},{"line_number":448,"context_line":"            close_if_possible(get_resp.app_iter)"},{"line_number":449,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_a199e279","line":446,"updated":"2018-05-22 19:08:00.000000000","message":"This might be annoying for operators because that could happen easily so will delete.","commit_id":"82975f1769a3735a2a746ba4a9689a29b7218042"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7821bda6ba1422aedbdd8731cf499522919aec09","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        while True:"},{"line_number":328,"context_line":"            lreq \u003d make_pre_authed_request("},{"line_number":329,"context_line":"                env, method\u003d\u0027GET\u0027, swift_source\u003d\u0027VW\u0027,"},{"line_number":330,"context_line":"                path\u003d\u0027/v1/%s/%s\u0027 % (account_name, lcontainer))"},{"line_number":331,"context_line":"            lreq.environ[\u0027QUERY_STRING\u0027] \u003d \\"},{"line_number":332,"context_line":"                \u0027prefix\u003d%s\u0026marker\u003d%s\u0027 % (quote(lprefix), quote(marker))"},{"line_number":333,"context_line":"            if end_marker:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_7dc0307d","line":330,"range":{"start_line":330,"start_character":16,"end_line":330,"end_character":20},"updated":"2018-05-24 20:09:14.000000000","message":"So why *don\u0027t* we need to quote this one?","commit_id":"0e3e7b9b0953baaf7a0686881fd2348fde7d1e59"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"7388284eaa0bf1724002a3be48bb2bdbb1a01f3e","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        while True:"},{"line_number":328,"context_line":"            lreq \u003d make_pre_authed_request("},{"line_number":329,"context_line":"                env, method\u003d\u0027GET\u0027, swift_source\u003d\u0027VW\u0027,"},{"line_number":330,"context_line":"                path\u003d\u0027/v1/%s/%s\u0027 % (account_name, lcontainer))"},{"line_number":331,"context_line":"            lreq.environ[\u0027QUERY_STRING\u0027] \u003d \\"},{"line_number":332,"context_line":"                \u0027prefix\u003d%s\u0026marker\u003d%s\u0027 % (quote(lprefix), quote(marker))"},{"line_number":333,"context_line":"            if end_marker:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_ba31bb0d","line":330,"range":{"start_line":330,"start_character":16,"end_line":330,"end_character":20},"in_reply_to":"5f7c97a3_7dc0307d","updated":"2018-05-29 20:50:30.000000000","message":"In the WSGI environment, env[\"PATH_INFO\"] is not quoted. The call chain here looks something like:\n\n    _listing_pages_iter()\n    wsgi.make_pre_authed_request(path\u003dP)\n    wsgi.make_subrequest(path\u003dP)\n    wsgi.make_env(path\u003dP)\n\nwhich says:\n\n    if path:\n        newenv[\u0027PATH_INFO\u0027] \u003d path\n\nSo, yeah, this looks weird to me too. Why are the other call sites in here quoting things that go into env[\u0027PATH_INFO\u0027]?","commit_id":"0e3e7b9b0953baaf7a0686881fd2348fde7d1e59"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"0a80943fd955dfd01cb778ef59e3a41f1114eb72","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        while True:"},{"line_number":328,"context_line":"            lreq \u003d make_pre_authed_request("},{"line_number":329,"context_line":"                env, method\u003d\u0027GET\u0027, swift_source\u003d\u0027VW\u0027,"},{"line_number":330,"context_line":"                path\u003d\u0027/v1/%s/%s\u0027 % (account_name, lcontainer))"},{"line_number":331,"context_line":"            lreq.environ[\u0027QUERY_STRING\u0027] \u003d \\"},{"line_number":332,"context_line":"                \u0027prefix\u003d%s\u0026marker\u003d%s\u0027 % (quote(lprefix), quote(marker))"},{"line_number":333,"context_line":"            if end_marker:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_1dc30959","line":330,"range":{"start_line":330,"start_character":16,"end_line":330,"end_character":20},"in_reply_to":"5f7c97a3_9d7159ab","updated":"2018-05-29 21:10:30.000000000","message":"Fixed in https://review.openstack.org/#/c/570436/, but looks like you saw that :-)","commit_id":"0e3e7b9b0953baaf7a0686881fd2348fde7d1e59"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"5aad979ce9f1629685c167a501af943dc380aa10","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        while True:"},{"line_number":328,"context_line":"            lreq \u003d make_pre_authed_request("},{"line_number":329,"context_line":"                env, method\u003d\u0027GET\u0027, swift_source\u003d\u0027VW\u0027,"},{"line_number":330,"context_line":"                path\u003d\u0027/v1/%s/%s\u0027 % (account_name, lcontainer))"},{"line_number":331,"context_line":"            lreq.environ[\u0027QUERY_STRING\u0027] \u003d \\"},{"line_number":332,"context_line":"                \u0027prefix\u003d%s\u0026marker\u003d%s\u0027 % (quote(lprefix), quote(marker))"},{"line_number":333,"context_line":"            if end_marker:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_9d7159ab","line":330,"range":{"start_line":330,"start_character":16,"end_line":330,"end_character":20},"in_reply_to":"5f7c97a3_ba31bb0d","updated":"2018-05-29 20:52:38.000000000","message":"Oops, I missed a spot. Looks like it\u0027s \n\n    _listing_pages_iter()\n    wsgi.make_pre_authed_request(path\u003dP)\n    wsgi.make_subrequest(path\u003dP)\n    wsgi.make_env(path\u003dunquote(P))\n\nso that the other call sites make sense^W^Ware passing quoted values to make_pre_authed_env, like it expects.\n\nIt\u0027s probably good to quote this one too.","commit_id":"0e3e7b9b0953baaf7a0686881fd2348fde7d1e59"}],"test/functional/test_versioned_writes.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c097a94753bebf3e25dcb80ae58505e2fe7abbfa","unresolved":false,"context_lines":[{"line_number":373,"context_line":""},{"line_number":374,"context_line":"    def test_overwriting_with_url_encoded_object_name(self):"},{"line_number":375,"context_line":"        versions_container \u003d self.env.versions_container"},{"line_number":376,"context_line":"        obj_name \u003d Utils.create_name() + \u0027%25ff\u0027"},{"line_number":377,"context_line":"        versioned_obj, expected_headers, expected_content_types \u003d \\"},{"line_number":378,"context_line":"            self._test_overwriting_setup(obj_name)"},{"line_number":379,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_2724c85f","line":376,"range":{"start_line":376,"start_character":41,"end_line":376,"end_character":48},"updated":"2018-05-21 18:32:50.000000000","message":"So is the expectation that names are url-encoded, or not? Looking at https://github.com/openstack/swift/blob/2.17.0/test/functional/tests.py#L66-L67 I thought they weren\u0027t encoded...","commit_id":"82975f1769a3735a2a746ba4a9689a29b7218042"},{"author":{"_account_id":4608,"name":"Kota Tsuyuzaki","email":"bloodeagle40234@gmail.com","username":"tsuyuzaki-kota"},"change_message_id":"d7b3c2c78ba06d436cf6857e3a38f775373e83a6","unresolved":false,"context_lines":[{"line_number":373,"context_line":""},{"line_number":374,"context_line":"    def test_overwriting_with_url_encoded_object_name(self):"},{"line_number":375,"context_line":"        versions_container \u003d self.env.versions_container"},{"line_number":376,"context_line":"        obj_name \u003d Utils.create_name() + \u0027%25ff\u0027"},{"line_number":377,"context_line":"        versioned_obj, expected_headers, expected_content_types \u003d \\"},{"line_number":378,"context_line":"            self._test_overwriting_setup(obj_name)"},{"line_number":379,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_e1ca7a6c","line":376,"range":{"start_line":376,"start_character":41,"end_line":376,"end_character":48},"in_reply_to":"bf659307_2724c85f","updated":"2018-05-22 19:08:00.000000000","message":"I think the Utils.create_name() returns just an ascii string by default.\nI menat %25ff is an url-encoded value of %f so the test method name might be confusable but no better idea exists to me right now.\n\nWhat I can tell you is this is a functional test so we should think of how eventlet handles the string. IIRC, eventlet unquotes the path once before it feeds the path info into Swift middleware stream so I expected it will be \"%ff\" when the path reach out the versioned_writes middeware as well as unit testing.","commit_id":"82975f1769a3735a2a746ba4a9689a29b7218042"}]}
