)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"d44c1ad03c5fc19b7f6bc8bdb9f5b3b8c81c0713","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Janie Richling \u003cjrichli@us.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-03-11 15:28:35 -0600"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Log the correct request type of a subrequest downstream of copy mw"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Before this change, subrequests made while servicing a copy would"},{"line_number":10,"context_line":"result in logging the request type from the copy PUT/GET request"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a1ff146_10a59a03","line":7,"updated":"2017-03-14 23:35:51.000000000","message":"What is \"mw\"? I suspect it may be a slang for \"middleware\", but it\u0027s not immediately obvious.","commit_id":"e14e9a24c9e6fc501582edaf4da086f3cf85e3e4"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"cbd02c6689c6ae49715fea76eedaaf8c3a004135","unresolved":false,"context_lines":[{"line_number":18,"context_line":"In addition, subrequest environments will no longer inherit the"},{"line_number":19,"context_line":"swift.log_info from the enclosing request.  That inheritance had"},{"line_number":20,"context_line":"been added at Ic96a92e938589a2f6add35a40741fd062f1c29eb"},{"line_number":21,"context_line":"along with swift.orig_req_method."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: I1ccb2665b6cd2887659e548e55a26aa00de879e3"},{"line_number":24,"context_line":"Closes-Bug: #1657246"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"1a1ced50_7019f9d6","line":21,"updated":"2017-03-21 11:42:05.000000000","message":"nit: maybe why swift.log_info will no longer be in subrequests?","commit_id":"108501a8c130f4b013c75603b0263f585f6ba535"}],"swift/common/middleware/copy.py":[{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"8766d55cf9a4afa530aa181e96b449926ddf1cf7","unresolved":false,"context_lines":[{"line_number":328,"context_line":"                # Save off original request method since it gets mutated"},{"line_number":329,"context_line":"                # into PUT during handling. This way logging can display the"},{"line_number":330,"context_line":"                # method the client actually sent."},{"line_number":331,"context_line":"                req.environ[\u0027swift.orig_req_method\u0027] \u003d req.method"},{"line_number":332,"context_line":"                return self.handle_COPY(req, start_response)"},{"line_number":333,"context_line":"            elif req.method \u003d\u003d \u0027POST\u0027 and self.object_post_as_copy:"},{"line_number":334,"context_line":"                # Save off original request method since it gets mutated"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a22e58a_c2b503d1","line":331,"updated":"2017-03-14 11:22:50.000000000","message":"If I comment this out, no test fails","commit_id":"e14e9a24c9e6fc501582edaf4da086f3cf85e3e4"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"c903ad347c8e0c846b167dfe301c60f7518274d6","unresolved":false,"context_lines":[{"line_number":328,"context_line":"                # Save off original request method since it gets mutated"},{"line_number":329,"context_line":"                # into PUT during handling. This way logging can display the"},{"line_number":330,"context_line":"                # method the client actually sent."},{"line_number":331,"context_line":"                req.environ[\u0027swift.orig_req_method\u0027] \u003d req.method"},{"line_number":332,"context_line":"                return self.handle_COPY(req, start_response)"},{"line_number":333,"context_line":"            elif req.method \u003d\u003d \u0027POST\u0027 and self.object_post_as_copy:"},{"line_number":334,"context_line":"                # Save off original request method since it gets mutated"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a1ff146_ed867d12","line":331,"in_reply_to":"5a22e58a_c2b503d1","updated":"2017-03-14 15:05:55.000000000","message":"Oh, I see.  I think the other change in wsgi fixed the issue that I knew about.  I will ask Tim why this change is needed in addition.  It might be only as a safeguard to make the copy mw handle this particular header better (in case the wsgi did use this for something later).  I might add a copy unit test that simply checks the value of orig_req_method.","commit_id":"e14e9a24c9e6fc501582edaf4da086f3cf85e3e4"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"8766d55cf9a4afa530aa181e96b449926ddf1cf7","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                # Save off original request method since it gets mutated"},{"line_number":335,"context_line":"                # into PUT during handling. This way logging can display the"},{"line_number":336,"context_line":"                # method the client actually sent."},{"line_number":337,"context_line":"                req.environ[\u0027swift.orig_req_method\u0027] \u003d req.method"},{"line_number":338,"context_line":"                return self.handle_object_post_as_copy(req, start_response)"},{"line_number":339,"context_line":"            elif req.method \u003d\u003d \u0027OPTIONS\u0027:"},{"line_number":340,"context_line":"                # Does not interfere with OPTIONS response from"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a22e58a_02b0fbdc","line":337,"updated":"2017-03-14 11:22:50.000000000","message":"ditto: If I comment this out, no test fails","commit_id":"e14e9a24c9e6fc501582edaf4da086f3cf85e3e4"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c24ac30fde54b84cb910896619f5258b277c6467","unresolved":false,"context_lines":[{"line_number":347,"context_line":"        return self.app(env, start_response)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    def handle_object_post_as_copy(self, req, start_response):"},{"line_number":350,"context_line":"        req.method \u003d \u0027PUT\u0027"},{"line_number":351,"context_line":"        req.path_info \u003d \u0027/v1/%s/%s/%s\u0027 % ("},{"line_number":352,"context_line":"            self.account_name, self.container_name, self.object_name)"},{"line_number":353,"context_line":"        req.headers[\u0027Content-Length\u0027] \u003d 0"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a1ff146_91098934","line":350,"updated":"2017-03-15 04:44:12.000000000","message":"I think this was originally the reason for orig_req_method - we were turning a POST into a PUT and didn\u0027t want to suddenly throw off the logs.\n\nI think maybe this is close enough to the fix - or make it\u0027d be less spooky action at a distance to add the extra environ here right next to where we break it?","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"41b74299c62a98f4eb0b2def7faa2f0ea17c9798","unresolved":false,"context_lines":[{"line_number":347,"context_line":"        return self.app(env, start_response)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    def handle_object_post_as_copy(self, req, start_response):"},{"line_number":350,"context_line":"        req.method \u003d \u0027PUT\u0027"},{"line_number":351,"context_line":"        req.path_info \u003d \u0027/v1/%s/%s/%s\u0027 % ("},{"line_number":352,"context_line":"            self.account_name, self.container_name, self.object_name)"},{"line_number":353,"context_line":"        req.headers[\u0027Content-Length\u0027] \u003d 0"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_0581e94a","line":350,"in_reply_to":"3a1ff146_547526f7","updated":"2017-03-16 21:19:07.000000000","message":"Changing to set orig_req_method here would mean that the value would not be set for the \u0027COPY\u0027 case, so the behavior results would be different.  I would like to get agreement on what this value should be set to out of copy middleware before settling on a fix.  Also, I just implemented the tests to assert the current behavior.  I forgot about this possible change before doing that. :-)","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"08a1ec9576b0b0a1bfe50e9a261b7993fa47a7ca","unresolved":false,"context_lines":[{"line_number":347,"context_line":"        return self.app(env, start_response)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    def handle_object_post_as_copy(self, req, start_response):"},{"line_number":350,"context_line":"        req.method \u003d \u0027PUT\u0027"},{"line_number":351,"context_line":"        req.path_info \u003d \u0027/v1/%s/%s/%s\u0027 % ("},{"line_number":352,"context_line":"            self.account_name, self.container_name, self.object_name)"},{"line_number":353,"context_line":"        req.headers[\u0027Content-Length\u0027] \u003d 0"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a1ff146_547526f7","line":350,"in_reply_to":"3a1ff146_91098934","updated":"2017-03-15 15:00:21.000000000","message":"I will look into that, makes sense.","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c24ac30fde54b84cb910896619f5258b277c6467","unresolved":false,"context_lines":[{"line_number":378,"context_line":"        self.container_name \u003d dest_container"},{"line_number":379,"context_line":"        self.object_name \u003d dest_object"},{"line_number":380,"context_line":"        # re-write the existing request as a PUT instead of creating a new one"},{"line_number":381,"context_line":"        req.method \u003d \u0027PUT\u0027"},{"line_number":382,"context_line":"        # As this the path info is updated with destination container,"},{"line_number":383,"context_line":"        # the proxy server app will use the right object controller"},{"line_number":384,"context_line":"        # implementation corresponding to the container\u0027s policy type."}],"source_content_type":"text/x-python","patch_set":4,"id":"3a1ff146_b1584558","line":381,"updated":"2017-03-15 04:44:12.000000000","message":"I\u0027d wager if we go back to *before* COPY was a middleware that we previously never had COPY verbs int he logs...\n\nI remember a conversation with ops once talking about log auditing that was roughly:\n\n   \"I spent 4 days grepping all logs since the begining of time - I can\u0027t find the PUT for this object; I don\u0027t know where it came it from\"\n\n    \"Did you check for COPY?\"\n\n   \"Jesus how many ways can you spell create!?\"\n\n   \"Umm.. at least that many, maybe, or maybe others?\"\n\nThe point being it\u0027s nice to think about creating objects as being PUT\u0027s - and maybe no one cares that much about COPY?  Might still be a good idea to keep logging COPY going forward... assuming peoples log processing know how to bill the bytes correctly - which they probably already did wrong if it was a PUT.  Hrm...","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"08a1ec9576b0b0a1bfe50e9a261b7993fa47a7ca","unresolved":false,"context_lines":[{"line_number":378,"context_line":"        self.container_name \u003d dest_container"},{"line_number":379,"context_line":"        self.object_name \u003d dest_object"},{"line_number":380,"context_line":"        # re-write the existing request as a PUT instead of creating a new one"},{"line_number":381,"context_line":"        req.method \u003d \u0027PUT\u0027"},{"line_number":382,"context_line":"        # As this the path info is updated with destination container,"},{"line_number":383,"context_line":"        # the proxy server app will use the right object controller"},{"line_number":384,"context_line":"        # implementation corresponding to the container\u0027s policy type."}],"source_content_type":"text/x-python","patch_set":4,"id":"3a1ff146_34f34aa0","line":381,"in_reply_to":"3a1ff146_5dbc7105","updated":"2017-03-15 15:00:21.000000000","message":"I agree that it seems like allowing the COPY verb to make it to logs may have been a mistake.  And Mahati makes a good point - having it leads to the same type of inconsistency mentioned in the bug.  And yet, it has been that way for awhile, so like Clay was saying, operators have probably adjusted their billing tools to look for that now.  A change back would cause them to change yet again.  I\u0027m game if we get feedback that it would be welcomed.","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"935636c542f32be648e98d252b2bfae486d48b62","unresolved":false,"context_lines":[{"line_number":378,"context_line":"        self.container_name \u003d dest_container"},{"line_number":379,"context_line":"        self.object_name \u003d dest_object"},{"line_number":380,"context_line":"        # re-write the existing request as a PUT instead of creating a new one"},{"line_number":381,"context_line":"        req.method \u003d \u0027PUT\u0027"},{"line_number":382,"context_line":"        # As this the path info is updated with destination container,"},{"line_number":383,"context_line":"        # the proxy server app will use the right object controller"},{"line_number":384,"context_line":"        # implementation corresponding to the container\u0027s policy type."}],"source_content_type":"text/x-python","patch_set":4,"id":"3a1ff146_5dbc7105","line":381,"in_reply_to":"3a1ff146_b1584558","updated":"2017-03-15 13:16:40.000000000","message":"COPY subrequests seems to log COPY for proxy-server logging.  and PUT for object-server. Is this something that would be nice to correct?","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"}],"swift/common/wsgi.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c24ac30fde54b84cb910896619f5258b277c6467","unresolved":false,"context_lines":[{"line_number":1111,"context_line":"                 \u0027SERVER_PROTOCOL\u0027, \u0027swift.cache\u0027, \u0027swift.source\u0027,"},{"line_number":1112,"context_line":"                 \u0027swift.trans_id\u0027, \u0027swift.authorize_override\u0027,"},{"line_number":1113,"context_line":"                 \u0027swift.authorize\u0027, \u0027HTTP_X_USER_ID\u0027, \u0027HTTP_X_PROJECT_ID\u0027,"},{"line_number":1114,"context_line":"                 \u0027HTTP_REFERER\u0027, \u0027swift.log_info\u0027, \u0027swift.infocache\u0027):"},{"line_number":1115,"context_line":"        if name in env:"},{"line_number":1116,"context_line":"            newenv[name] \u003d env[name]"},{"line_number":1117,"context_line":"    if method:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a1ff146_0c790294","line":1114,"updated":"2017-03-15 04:44:12.000000000","message":"so going back to Ic96a92e938589a2f6add35a40741fd062f1c29eb we also add the swift.log_info at the same time - was *that* a good idea?  adding orig_req_method obviously was not.  But it must have been intentional?   Why did we think that was the right thing to do?","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"e3afca5f71da0a01cdc0770d3fcfc9477a97c3b0","unresolved":false,"context_lines":[{"line_number":1111,"context_line":"                 \u0027SERVER_PROTOCOL\u0027, \u0027swift.cache\u0027, \u0027swift.source\u0027,"},{"line_number":1112,"context_line":"                 \u0027swift.trans_id\u0027, \u0027swift.authorize_override\u0027,"},{"line_number":1113,"context_line":"                 \u0027swift.authorize\u0027, \u0027HTTP_X_USER_ID\u0027, \u0027HTTP_X_PROJECT_ID\u0027,"},{"line_number":1114,"context_line":"                 \u0027HTTP_REFERER\u0027, \u0027swift.log_info\u0027, \u0027swift.infocache\u0027):"},{"line_number":1115,"context_line":"        if name in env:"},{"line_number":1116,"context_line":"            newenv[name] \u003d env[name]"},{"line_number":1117,"context_line":"    if method:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_5b72d97d","line":1114,"in_reply_to":"1a1ced50_45da017a","updated":"2017-03-17 02:06:08.000000000","message":"Well, nevermind.  I did write a test that fails without carrying the swift.log_info through to the subrequest env.  (I hadn\u0027t re-run my unit tests properly after making that last modification.)  so, I think it has to stay for the client POST request case.  Without this, no request type is logged in that case.","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"f713cd6b85afc1e9431021b72111f5f3cc506e7a","unresolved":false,"context_lines":[{"line_number":1111,"context_line":"                 \u0027SERVER_PROTOCOL\u0027, \u0027swift.cache\u0027, \u0027swift.source\u0027,"},{"line_number":1112,"context_line":"                 \u0027swift.trans_id\u0027, \u0027swift.authorize_override\u0027,"},{"line_number":1113,"context_line":"                 \u0027swift.authorize\u0027, \u0027HTTP_X_USER_ID\u0027, \u0027HTTP_X_PROJECT_ID\u0027,"},{"line_number":1114,"context_line":"                 \u0027HTTP_REFERER\u0027, \u0027swift.log_info\u0027, \u0027swift.infocache\u0027):"},{"line_number":1115,"context_line":"        if name in env:"},{"line_number":1116,"context_line":"            newenv[name] \u003d env[name]"},{"line_number":1117,"context_line":"    if method:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_935ee343","line":1114,"in_reply_to":"1a1ced50_5b72d97d","updated":"2017-03-17 15:43:41.000000000","message":"Actually, I am not sure if that was the issue with the first unit test failure on this patch.  But, I do see that swift.log_info is used in container_sync.  I will poke around to learn more about it still.","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"32d14cb903e74b993e7beb865faba3ca0e6b70fb","unresolved":false,"context_lines":[{"line_number":1111,"context_line":"                 \u0027SERVER_PROTOCOL\u0027, \u0027swift.cache\u0027, \u0027swift.source\u0027,"},{"line_number":1112,"context_line":"                 \u0027swift.trans_id\u0027, \u0027swift.authorize_override\u0027,"},{"line_number":1113,"context_line":"                 \u0027swift.authorize\u0027, \u0027HTTP_X_USER_ID\u0027, \u0027HTTP_X_PROJECT_ID\u0027,"},{"line_number":1114,"context_line":"                 \u0027HTTP_REFERER\u0027, \u0027swift.log_info\u0027, \u0027swift.infocache\u0027):"},{"line_number":1115,"context_line":"        if name in env:"},{"line_number":1116,"context_line":"            newenv[name] \u003d env[name]"},{"line_number":1117,"context_line":"    if method:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_f4b601db","line":1114,"in_reply_to":"1a1ced50_935ee343","updated":"2017-03-19 18:14:24.000000000","message":"I see swift.log_info is not consumed anywhere in the system.  It seems to only be used for some stats logging in container-sync.","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"08a1ec9576b0b0a1bfe50e9a261b7993fa47a7ca","unresolved":false,"context_lines":[{"line_number":1111,"context_line":"                 \u0027SERVER_PROTOCOL\u0027, \u0027swift.cache\u0027, \u0027swift.source\u0027,"},{"line_number":1112,"context_line":"                 \u0027swift.trans_id\u0027, \u0027swift.authorize_override\u0027,"},{"line_number":1113,"context_line":"                 \u0027swift.authorize\u0027, \u0027HTTP_X_USER_ID\u0027, \u0027HTTP_X_PROJECT_ID\u0027,"},{"line_number":1114,"context_line":"                 \u0027HTTP_REFERER\u0027, \u0027swift.log_info\u0027, \u0027swift.infocache\u0027):"},{"line_number":1115,"context_line":"        if name in env:"},{"line_number":1116,"context_line":"            newenv[name] \u003d env[name]"},{"line_number":1117,"context_line":"    if method:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a1ff146_1452ce67","line":1114,"in_reply_to":"3a1ff146_0c790294","updated":"2017-03-15 15:00:21.000000000","message":"Will take a look.","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"41b74299c62a98f4eb0b2def7faa2f0ea17c9798","unresolved":false,"context_lines":[{"line_number":1111,"context_line":"                 \u0027SERVER_PROTOCOL\u0027, \u0027swift.cache\u0027, \u0027swift.source\u0027,"},{"line_number":1112,"context_line":"                 \u0027swift.trans_id\u0027, \u0027swift.authorize_override\u0027,"},{"line_number":1113,"context_line":"                 \u0027swift.authorize\u0027, \u0027HTTP_X_USER_ID\u0027, \u0027HTTP_X_PROJECT_ID\u0027,"},{"line_number":1114,"context_line":"                 \u0027HTTP_REFERER\u0027, \u0027swift.log_info\u0027, \u0027swift.infocache\u0027):"},{"line_number":1115,"context_line":"        if name in env:"},{"line_number":1116,"context_line":"            newenv[name] \u003d env[name]"},{"line_number":1117,"context_line":"    if method:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_45da017a","line":1114,"in_reply_to":"3a1ff146_1452ce67","updated":"2017-03-16 21:19:07.000000000","message":"tests pass without including swift.log_info here, so I am taking it out in the next patchset.  But I still want to look deeper to understand whether this *should* be breaking a test.","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"06157762ac4ba0aaf78eb59e369dffe72a148f1c","unresolved":false,"context_lines":[{"line_number":1111,"context_line":"                 \u0027SERVER_PROTOCOL\u0027, \u0027swift.cache\u0027, \u0027swift.source\u0027,"},{"line_number":1112,"context_line":"                 \u0027swift.trans_id\u0027, \u0027swift.authorize_override\u0027,"},{"line_number":1113,"context_line":"                 \u0027swift.authorize\u0027, \u0027HTTP_X_USER_ID\u0027, \u0027HTTP_X_PROJECT_ID\u0027,"},{"line_number":1114,"context_line":"                 \u0027HTTP_REFERER\u0027, \u0027swift.infocache\u0027):"},{"line_number":1115,"context_line":"        if name in env:"},{"line_number":1116,"context_line":"            newenv[name] \u003d env[name]"},{"line_number":1117,"context_line":"    if method:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a1ced50_c724d5b0","line":1114,"updated":"2017-03-20 20:43:08.000000000","message":"Why\u0027d we drop swift.log_info?\n\nI guess I see where Clay was asking whether or not it\u0027s a good idea... but I\u0027m still not sure. I\u0027ll grant that this shouldn\u0027t change anything for existing in-tree code. (container_sync only ever sets it before returning an error, and the only middleware we expect between proxy-logging and container_sync is cache, which shouldn\u0027t make subrequests. The only other place we use it is in the proxy object controller, which shouldn\u0027t be making subrequests anymore.)\n\nBut did we have any expectation that third-party middlewares might use it? I suppose that while we mention the log_info field in [1], we never actually document how to use it as a middleware developer. It seems like it might be a useful feature for third-parties -- but I\u0027m also not sure what the *expected* behavior ought to be with subrequests.\n\nCan we at least have some mention of the removal in the commit message so we don\u0027t have to come back to this review and go digging through comments to figure out that yes, there was a conscious decision to remove it?\n\n[1] https://docs.openstack.org/developer/swift/logs.html","commit_id":"0570cae29f984e344f6148aeb9e872f0a985d89e"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"a41c82ae9e7e0b531588f421236964a11619aa97","unresolved":false,"context_lines":[{"line_number":1111,"context_line":"                 \u0027SERVER_PROTOCOL\u0027, \u0027swift.cache\u0027, \u0027swift.source\u0027,"},{"line_number":1112,"context_line":"                 \u0027swift.trans_id\u0027, \u0027swift.authorize_override\u0027,"},{"line_number":1113,"context_line":"                 \u0027swift.authorize\u0027, \u0027HTTP_X_USER_ID\u0027, \u0027HTTP_X_PROJECT_ID\u0027,"},{"line_number":1114,"context_line":"                 \u0027HTTP_REFERER\u0027, \u0027swift.infocache\u0027):"},{"line_number":1115,"context_line":"        if name in env:"},{"line_number":1116,"context_line":"            newenv[name] \u003d env[name]"},{"line_number":1117,"context_line":"    if method:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a1ced50_4d355af5","line":1114,"in_reply_to":"1a1ced50_c724d5b0","updated":"2017-03-21 03:08:47.000000000","message":"I agree that we have not really defined in docs whether or not the log_info would carry through to subrequests.  I see where re-using the user_id, authorization, and cache should be copied over, but log_info seems like a very request specific thing to me.  For the reasons you have noted above, it seems like a safe gamble to change that behavior.  I\u0027ll call it out in the commit message.","commit_id":"0570cae29f984e344f6148aeb9e872f0a985d89e"}],"test/unit/common/middleware/test_copy.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c24ac30fde54b84cb910896619f5258b277c6467","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        self.assertEqual(status, \u0027202 Accepted\u0027)"},{"line_number":167,"context_line":"        self.assertEqual(req.environ[\u0027swift.orig_req_method\u0027], \u0027POST\u0027)"},{"line_number":168,"context_line":"        self.assertEqual(len(self.authorized), 1)"},{"line_number":169,"context_line":"        # JLR TODO - verify \"copying\" is not logged"},{"line_number":170,"context_line":"        self.assertRequestEqual(req, self.authorized[0])"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def test_POST_as_COPY_201_return_202(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a1ff146_6c68b6bb","line":169,"updated":"2017-03-15 04:44:12.000000000","message":"so is this still change still WIP?\n\nIt seems like it would require the proxy-logging middleware to wrap your self.app if you want to test this behavior further.","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"41b74299c62a98f4eb0b2def7faa2f0ea17c9798","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        self.assertEqual(status, \u0027202 Accepted\u0027)"},{"line_number":167,"context_line":"        self.assertEqual(req.environ[\u0027swift.orig_req_method\u0027], \u0027POST\u0027)"},{"line_number":168,"context_line":"        self.assertEqual(len(self.authorized), 1)"},{"line_number":169,"context_line":"        # JLR TODO - verify \"copying\" is not logged"},{"line_number":170,"context_line":"        self.assertRequestEqual(req, self.authorized[0])"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def test_POST_as_COPY_201_return_202(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_45c12180","line":169,"in_reply_to":"3a1ff146_276df704","updated":"2017-03-16 21:19:07.000000000","message":"This was easy to add to the new unit test file, so it will now be covered in the next patchset.","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"08a1ec9576b0b0a1bfe50e9a261b7993fa47a7ca","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        self.assertEqual(status, \u0027202 Accepted\u0027)"},{"line_number":167,"context_line":"        self.assertEqual(req.environ[\u0027swift.orig_req_method\u0027], \u0027POST\u0027)"},{"line_number":168,"context_line":"        self.assertEqual(len(self.authorized), 1)"},{"line_number":169,"context_line":"        # JLR TODO - verify \"copying\" is not logged"},{"line_number":170,"context_line":"        self.assertRequestEqual(req, self.authorized[0])"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def test_POST_as_COPY_201_return_202(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a1ff146_276df704","line":169,"in_reply_to":"3a1ff146_6c68b6bb","updated":"2017-03-15 15:00:21.000000000","message":"I forgot to remove this line before uploading :/\n\nI was thinking I\u0027d add some verification for the \"copying X\" log that happens for all requests except POST, since it uses the orig_req_method and wasn\u0027t tested as of yet.  that is just logging in this middleware, so it should be simple to add (like Mahati said - using get_lines with FakeLogger).  but its not completely related to this change - more like a drive by.","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"935636c542f32be648e98d252b2bfae486d48b62","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        self.assertEqual(status, \u0027202 Accepted\u0027)"},{"line_number":167,"context_line":"        self.assertEqual(req.environ[\u0027swift.orig_req_method\u0027], \u0027POST\u0027)"},{"line_number":168,"context_line":"        self.assertEqual(len(self.authorized), 1)"},{"line_number":169,"context_line":"        # JLR TODO - verify \"copying\" is not logged"},{"line_number":170,"context_line":"        self.assertRequestEqual(req, self.authorized[0])"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def test_POST_as_COPY_201_return_202(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a1ff146_ba12cb60","line":169,"in_reply_to":"3a1ff146_6c68b6bb","updated":"2017-03-15 13:16:40.000000000","message":"or use get_lines_for_level(\u0027info\u0027) either in this or a different test?","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c24ac30fde54b84cb910896619f5258b277c6467","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        req \u003d Request.blank(\u0027/v1/a/c/o\u0027, method\u003d\u0027POST\u0027)"},{"line_number":176,"context_line":"        status, headers, body \u003d self.call_ssc(req)"},{"line_number":177,"context_line":"        self.assertEqual(status, \u0027202 Accepted\u0027)"},{"line_number":178,"context_line":"        self.assertEqual(req.environ[\u0027swift.orig_req_method\u0027], \u0027POST\u0027)"},{"line_number":179,"context_line":"        self.assertEqual(len(self.authorized), 1)"},{"line_number":180,"context_line":"        self.assertRequestEqual(req, self.authorized[0])"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a1ff146_ecd2e633","line":178,"updated":"2017-03-15 04:44:12.000000000","message":"self.assertEqual(req.method, \u0027PUT\u0027)?  or self.assertNotEqual?\n\nAll seems a little on the nose, testing the code does what it says it does instead of has the behavior we find desirable.\n\nIf for some reason down the road we find a good reason to change this implementation - how many tests do we need to break in this module to alert us of this consumer of the interface?\n\nMaybe we only need four tests\n\n    test_PUT_x_copy_from_does_not_set_orig_req_method\n    test_COPY_sets_orig_req_method\n    test_POST_sets_orig_req_method\n    test_OPTIONS_does_not_set_orig_req_method\n    test_TEAPOT_does_not_set_orig_request_method\n\n???","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"f103b5beb2ec0a8de05840e72f4e896c17e51646","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        req \u003d Request.blank(\u0027/v1/a/c/o\u0027, method\u003d\u0027POST\u0027)"},{"line_number":176,"context_line":"        status, headers, body \u003d self.call_ssc(req)"},{"line_number":177,"context_line":"        self.assertEqual(status, \u0027202 Accepted\u0027)"},{"line_number":178,"context_line":"        self.assertEqual(req.environ[\u0027swift.orig_req_method\u0027], \u0027POST\u0027)"},{"line_number":179,"context_line":"        self.assertEqual(len(self.authorized), 1)"},{"line_number":180,"context_line":"        self.assertRequestEqual(req, self.authorized[0])"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_5cc1dde3","line":178,"in_reply_to":"1a1ced50_e94e5f95","updated":"2017-03-17 14:46:37.000000000","message":"Yes, I had considered that as well.  I thought maybe it was nice, though, to point out that we are needing to cover that case - it may be confusing to only have it sometimes.  So, in the next patchset, I have done what you suggested, and also added a comment to explain that and point out the particular case. I agree, fewer tests is better in this case.","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"e3afca5f71da0a01cdc0770d3fcfc9477a97c3b0","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        req \u003d Request.blank(\u0027/v1/a/c/o\u0027, method\u003d\u0027POST\u0027)"},{"line_number":176,"context_line":"        status, headers, body \u003d self.call_ssc(req)"},{"line_number":177,"context_line":"        self.assertEqual(status, \u0027202 Accepted\u0027)"},{"line_number":178,"context_line":"        self.assertEqual(req.environ[\u0027swift.orig_req_method\u0027], \u0027POST\u0027)"},{"line_number":179,"context_line":"        self.assertEqual(len(self.authorized), 1)"},{"line_number":180,"context_line":"        self.assertRequestEqual(req, self.authorized[0])"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_5bf9f9c7","line":178,"in_reply_to":"3a1ff146_273b37ed","updated":"2017-03-17 02:06:08.000000000","message":"Oh, and I forgot to mention on the previous set of replies:\nAs much as I would have liked to use TEAPOT for a method :-), there is an error unless the method is in\nALLOWED_METHODS \u003d [\u0027PUT\u0027, \u0027POST\u0027, \u0027DELETE\u0027, \u0027GET\u0027, \u0027HEAD\u0027, \u0027OPTIONS\u0027, \u0027REPLICATE\u0027]","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"5bf30cc58d33428e53ec084d39e62cf7108a4b8a","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        req \u003d Request.blank(\u0027/v1/a/c/o\u0027, method\u003d\u0027POST\u0027)"},{"line_number":176,"context_line":"        status, headers, body \u003d self.call_ssc(req)"},{"line_number":177,"context_line":"        self.assertEqual(status, \u0027202 Accepted\u0027)"},{"line_number":178,"context_line":"        self.assertEqual(req.environ[\u0027swift.orig_req_method\u0027], \u0027POST\u0027)"},{"line_number":179,"context_line":"        self.assertEqual(len(self.authorized), 1)"},{"line_number":180,"context_line":"        self.assertRequestEqual(req, self.authorized[0])"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_e94e5f95","line":178,"in_reply_to":"3a1ff146_ecd2e633","updated":"2017-03-17 13:09:50.000000000","message":"The new patchset adds the above four new tests. How about just adding the assertion part to the corresponding 4 tests. For eg: adding assertion to \u0027test_basic_put_with_x_copy_from\u0027 instead of creating \u0027test_PUT_x_copy_does_not_set_orig_req_method\u0027?\n\nThat way we still break only 4 tests, with minimal code.","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"08a1ec9576b0b0a1bfe50e9a261b7993fa47a7ca","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        req \u003d Request.blank(\u0027/v1/a/c/o\u0027, method\u003d\u0027POST\u0027)"},{"line_number":176,"context_line":"        status, headers, body \u003d self.call_ssc(req)"},{"line_number":177,"context_line":"        self.assertEqual(status, \u0027202 Accepted\u0027)"},{"line_number":178,"context_line":"        self.assertEqual(req.environ[\u0027swift.orig_req_method\u0027], \u0027POST\u0027)"},{"line_number":179,"context_line":"        self.assertEqual(len(self.authorized), 1)"},{"line_number":180,"context_line":"        self.assertRequestEqual(req, self.authorized[0])"},{"line_number":181,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a1ff146_273b37ed","line":178,"in_reply_to":"3a1ff146_ecd2e633","updated":"2017-03-15 15:00:21.000000000","message":"good idea","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"9e4ca8e87e61586571034b5267555cad48df4ead","unresolved":false,"context_lines":[{"line_number":156,"context_line":"            req \u003d Request.blank(\u0027/v1/a/c/o\u0027, method\u003dmethod)"},{"line_number":157,"context_line":"            status, headers, body \u003d self.call_ssc(req)"},{"line_number":158,"context_line":"            self.assertEqual(status, \u0027200 OK\u0027)"},{"line_number":159,"context_line":"            self.assertTrue(\u0027swift.orig_req_method\u0027 not in req.environ)"},{"line_number":160,"context_line":"            self.assertEqual(len(self.authorized), 1)"},{"line_number":161,"context_line":"            self.assertRequestEqual(req, self.authorized[0])"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1a1ced50_e41cc679","line":159,"updated":"2017-03-17 05:40:26.000000000","message":"someone is going to complain about assertIn(), I\u0027m sure","commit_id":"97800a48d5caac92e59c4b4d505a2593337e08a4"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"5a49d71bbf9d4fb8b85e1af30713200de2aaaa5e","unresolved":false,"context_lines":[{"line_number":156,"context_line":"            req \u003d Request.blank(\u0027/v1/a/c/o\u0027, method\u003dmethod)"},{"line_number":157,"context_line":"            status, headers, body \u003d self.call_ssc(req)"},{"line_number":158,"context_line":"            self.assertEqual(status, \u0027200 OK\u0027)"},{"line_number":159,"context_line":"            self.assertTrue(\u0027swift.orig_req_method\u0027 not in req.environ)"},{"line_number":160,"context_line":"            self.assertEqual(len(self.authorized), 1)"},{"line_number":161,"context_line":"            self.assertRequestEqual(req, self.authorized[0])"},{"line_number":162,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1a1ced50_81d132d0","line":159,"in_reply_to":"1a1ced50_e41cc679","updated":"2017-03-17 14:44:22.000000000","message":"Done","commit_id":"97800a48d5caac92e59c4b4d505a2593337e08a4"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"06157762ac4ba0aaf78eb59e369dffe72a148f1c","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        self.assertEqual(status, \u0027202 Accepted\u0027)"},{"line_number":169,"context_line":"        self.assertEqual(len(self.authorized), 1)"},{"line_number":170,"context_line":"        self.assertRequestEqual(req, self.authorized[0])"},{"line_number":171,"context_line":"        # Assert orig_req_method is set - just once for the basic test"},{"line_number":172,"context_line":"        self.assertEqual(req.environ[\u0027swift.orig_req_method\u0027], \u0027POST\u0027)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def test_POST_as_COPY_201_return_202(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a1ced50_07c18d80","line":171,"updated":"2017-03-20 20:43:08.000000000","message":"I\u0027m not sure what the second half of this comment means... did I miss where we make this sort of assertion more than once?","commit_id":"0570cae29f984e344f6148aeb9e872f0a985d89e"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"a41c82ae9e7e0b531588f421236964a11619aa97","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        self.assertEqual(status, \u0027202 Accepted\u0027)"},{"line_number":169,"context_line":"        self.assertEqual(len(self.authorized), 1)"},{"line_number":170,"context_line":"        self.assertRequestEqual(req, self.authorized[0])"},{"line_number":171,"context_line":"        # Assert orig_req_method is set - just once for the basic test"},{"line_number":172,"context_line":"        self.assertEqual(req.environ[\u0027swift.orig_req_method\u0027], \u0027POST\u0027)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def test_POST_as_COPY_201_return_202(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a1ced50_4d1c7a77","line":171,"in_reply_to":"1a1ced50_07c18d80","updated":"2017-03-21 03:08:47.000000000","message":"Ill do a little rewording.","commit_id":"0570cae29f984e344f6148aeb9e872f0a985d89e"}],"test/unit/common/middleware/test_subrequest_logging.py":[{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"8766d55cf9a4afa530aa181e96b449926ddf1cf7","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        return self.body"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"class TestSubRequestLogging(unittest.TestCase):"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def setUp(self):"},{"line_number":58,"context_line":"        self.path \u003d \u0027/v1/a/c/o\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a22e58a_a29007ee","line":55,"updated":"2017-03-14 11:22:50.000000000","message":"Does not cover tests for SLO segment validation requests, DELETE requests on versioned containers - issues with both of these are mentioned on the launchpad bug","commit_id":"e14e9a24c9e6fc501582edaf4da086f3cf85e3e4"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"c903ad347c8e0c846b167dfe301c60f7518274d6","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        return self.body"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"class TestSubRequestLogging(unittest.TestCase):"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def setUp(self):"},{"line_number":58,"context_line":"        self.path \u003d \u0027/v1/a/c/o\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a1ff146_ed875dd5","line":55,"in_reply_to":"5a22e58a_a29007ee","updated":"2017-03-14 15:05:55.000000000","message":"Well, I was taking a generic approach, so that *any* middleware performing a subrequest was covered.  But, it wouldn\u0027t hurt to cover the 2 specific ones we have in tree.  Thanks!","commit_id":"e14e9a24c9e6fc501582edaf4da086f3cf85e3e4"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"8766d55cf9a4afa530aa181e96b449926ddf1cf7","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        req \u003d Request.blank(self.path, method\u003d\u0027PUT\u0027, headers\u003dhdrs)"},{"line_number":75,"context_line":"        app.register(\u0027PUT\u0027, self.path, HTTPOk, headers\u003dhdrs)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        types \u003d [\u0027HEAD\u0027, \u0027GET\u0027, \u0027POST\u0027, \u0027PUT\u0027]"},{"line_number":78,"context_line":"        for subrequest_type in types:"},{"line_number":79,"context_line":"            logger \u003d FakeLogger()"},{"line_number":80,"context_line":"            copy_app \u003d self._setup_copy_app(subrequest_type, app, logger,"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a22e58a_225fb773","line":77,"updated":"2017-03-14 11:22:50.000000000","message":"There is no test for server side COPY request","commit_id":"e14e9a24c9e6fc501582edaf4da086f3cf85e3e4"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"c903ad347c8e0c846b167dfe301c60f7518274d6","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        req \u003d Request.blank(self.path, method\u003d\u0027PUT\u0027, headers\u003dhdrs)"},{"line_number":75,"context_line":"        app.register(\u0027PUT\u0027, self.path, HTTPOk, headers\u003dhdrs)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        types \u003d [\u0027HEAD\u0027, \u0027GET\u0027, \u0027POST\u0027, \u0027PUT\u0027]"},{"line_number":78,"context_line":"        for subrequest_type in types:"},{"line_number":79,"context_line":"            logger \u003d FakeLogger()"},{"line_number":80,"context_line":"            copy_app \u003d self._setup_copy_app(subrequest_type, app, logger,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a1ff146_6d7e0db0","line":77,"in_reply_to":"5a22e58a_225fb773","updated":"2017-03-14 15:05:55.000000000","message":"I don\u0027t think a mw COPY subrequest is valid if the mw is placed to the right of COPY in the pipeline.","commit_id":"e14e9a24c9e6fc501582edaf4da086f3cf85e3e4"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"c24ac30fde54b84cb910896619f5258b277c6467","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                        headers\u003dhdrs)"},{"line_number":43,"context_line":"        proxy_logging_app \u003d proxy_logging.ProxyLoggingMiddleware(fs_app, {})"},{"line_number":44,"context_line":"        proxy_logging_app.access_logger \u003d self.logger"},{"line_number":45,"context_line":"        sub_req.get_response(proxy_logging_app)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        self.app(env, start_response)"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a1ff146_ac4e2ebf","line":45,"updated":"2017-03-15 04:44:12.000000000","message":"it feels very strange to me that *this* application is completely disconnected from the __call__ of the copy_app.\n\nTypically I think of there being only one pipeline:\n\n    proxy-logging[0] copy fake_middleware proxy-logging[1] fake_app\n\ncopy should be able to set environ.orig_req_method, and fake_middleware should be able to *use* that environ to make a subrequest that gets logged by proxy-logging[1] with *it\u0027s* correct verb while also processing the original request modified by copy and verify it gets logged correctly in proxy-logging[1]\n\nI think it would either make sense to use:\n\n    proxy-logging copy versioned_writes proxy-logging fake_app\n\n*or*\n\n    proxy-logging fake_orig_req_modifying_mw fake_subrequest_making_mw proxy-logging fake_app\n\nBut mabye not mix fake\u0027s and reals in the pipeline (except the fake_app at the end)","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"41b74299c62a98f4eb0b2def7faa2f0ea17c9798","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                        headers\u003dhdrs)"},{"line_number":43,"context_line":"        proxy_logging_app \u003d proxy_logging.ProxyLoggingMiddleware(fs_app, {})"},{"line_number":44,"context_line":"        proxy_logging_app.access_logger \u003d self.logger"},{"line_number":45,"context_line":"        sub_req.get_response(proxy_logging_app)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        self.app(env, start_response)"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_85bb190e","line":45,"in_reply_to":"3a1ff146_74bce26c","updated":"2017-03-16 21:19:07.000000000","message":"Done","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"08a1ec9576b0b0a1bfe50e9a261b7993fa47a7ca","unresolved":false,"context_lines":[{"line_number":42,"context_line":"                        headers\u003dhdrs)"},{"line_number":43,"context_line":"        proxy_logging_app \u003d proxy_logging.ProxyLoggingMiddleware(fs_app, {})"},{"line_number":44,"context_line":"        proxy_logging_app.access_logger \u003d self.logger"},{"line_number":45,"context_line":"        sub_req.get_response(proxy_logging_app)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        self.app(env, start_response)"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a1ff146_74bce26c","line":45,"in_reply_to":"3a1ff146_ac4e2ebf","updated":"2017-03-15 15:00:21.000000000","message":"Ok.  I will have to get deeper into this when doing re-work and see what I can come up with.","commit_id":"7d9789a73f110e4987ba945f4ad2bb9ce7904abd"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"a6842b1e32408ea73b53f0441a02e599e6e5b329","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.app(env, start_response)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        start_response(\u0027200 OK\u0027, [(\u0027Content-Type\u0027, \u0027text/plain\u0027)])"},{"line_number":53,"context_line":"        while env[\u0027wsgi.input\u0027].read(5):"},{"line_number":54,"context_line":"            pass"},{"line_number":55,"context_line":"        return self.body"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1a1ced50_96e25602","line":53,"range":{"start_line":53,"start_character":32,"end_line":53,"end_character":39},"updated":"2017-03-17 13:57:11.000000000","message":"why read(5)? just read() would do?","commit_id":"97800a48d5caac92e59c4b4d505a2593337e08a4"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"5a49d71bbf9d4fb8b85e1af30713200de2aaaa5e","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.app(env, start_response)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        start_response(\u0027200 OK\u0027, [(\u0027Content-Type\u0027, \u0027text/plain\u0027)])"},{"line_number":53,"context_line":"        while env[\u0027wsgi.input\u0027].read(5):"},{"line_number":54,"context_line":"            pass"},{"line_number":55,"context_line":"        return self.body"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1a1ced50_16fae642","line":53,"range":{"start_line":53,"start_character":32,"end_line":53,"end_character":39},"in_reply_to":"1a1ced50_96e25602","updated":"2017-03-17 14:44:22.000000000","message":"opps - that left from before when the body was 5 chars.  Done.","commit_id":"97800a48d5caac92e59c4b4d505a2593337e08a4"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"a6842b1e32408ea73b53f0441a02e599e6e5b329","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                app.access_logger \u003d self.fake_logger"},{"line_number":92,"context_line":"            self.first_app \u003d app"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _test_subrequest_logged(self, subrequst_type, post_as_copy\u003dFalse):"},{"line_number":95,"context_line":"        # Test that subrequests made downstream from a"},{"line_number":96,"context_line":"        # Copy PUT will be logged with the request type of"},{"line_number":97,"context_line":"        # the subrequest as opposed to the GET/PUT."}],"source_content_type":"text/x-python","patch_set":7,"id":"1a1ced50_b0775ad3","line":94,"range":{"start_line":94,"start_character":38,"end_line":94,"end_character":47},"updated":"2017-03-17 13:57:11.000000000","message":"s/subrequst/subrequest","commit_id":"97800a48d5caac92e59c4b4d505a2593337e08a4"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"5a49d71bbf9d4fb8b85e1af30713200de2aaaa5e","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                app.access_logger \u003d self.fake_logger"},{"line_number":92,"context_line":"            self.first_app \u003d app"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def _test_subrequest_logged(self, subrequst_type, post_as_copy\u003dFalse):"},{"line_number":95,"context_line":"        # Test that subrequests made downstream from a"},{"line_number":96,"context_line":"        # Copy PUT will be logged with the request type of"},{"line_number":97,"context_line":"        # the subrequest as opposed to the GET/PUT."}],"source_content_type":"text/x-python","patch_set":7,"id":"1a1ced50_a1ec6ec8","line":94,"range":{"start_line":94,"start_character":38,"end_line":94,"end_character":47},"in_reply_to":"1a1ced50_b0775ad3","updated":"2017-03-17 14:44:22.000000000","message":"Done","commit_id":"97800a48d5caac92e59c4b4d505a2593337e08a4"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"a6842b1e32408ea73b53f0441a02e599e6e5b329","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    def _test_subrequest_logged(self, subrequst_type, post_as_copy\u003dFalse):"},{"line_number":95,"context_line":"        # Test that subrequests made downstream from a"},{"line_number":96,"context_line":"        # Copy PUT will be logged with the request type of"},{"line_number":97,"context_line":"        # the subrequest as opposed to the GET/PUT."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        global fake_config"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1a1ced50_3b826b53","line":97,"updated":"2017-03-17 13:57:11.000000000","message":"This comment can be clubbed into two lines w/o exceeding 80 line constraint","commit_id":"97800a48d5caac92e59c4b4d505a2593337e08a4"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"5a49d71bbf9d4fb8b85e1af30713200de2aaaa5e","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    def _test_subrequest_logged(self, subrequst_type, post_as_copy\u003dFalse):"},{"line_number":95,"context_line":"        # Test that subrequests made downstream from a"},{"line_number":96,"context_line":"        # Copy PUT will be logged with the request type of"},{"line_number":97,"context_line":"        # the subrequest as opposed to the GET/PUT."},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        global fake_config"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1a1ced50_c1d16afd","line":97,"in_reply_to":"1a1ced50_3b826b53","updated":"2017-03-17 14:44:22.000000000","message":"Done","commit_id":"97800a48d5caac92e59c4b4d505a2593337e08a4"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"a6842b1e32408ea73b53f0441a02e599e6e5b329","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        info_log_lines \u003d self.fake_logger.get_lines_for_level(\u0027info\u0027)"},{"line_number":111,"context_line":"        self.assertEqual(len(info_log_lines), 4)"},{"line_number":112,"context_line":"        self.assertTrue(info_log_lines[0].startswith(\u0027Copying object\u0027))"},{"line_number":113,"context_line":"        subreq_get \u003d \u0027%s %s\u0027 % (fake_config[\u0027subrequest_type\u0027], SUB_GET_PATH)"},{"line_number":114,"context_line":"        subreq_put \u003d \u0027%s %s\u0027 % (fake_config[\u0027subrequest_type\u0027], SUB_PUT_PATH)"},{"line_number":115,"context_line":"        origreq \u003d \u0027PUT %s\u0027 % self.path"},{"line_number":116,"context_line":"        self.assertTrue(subreq_get in info_log_lines[1])"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a1ced50_706de203","line":113,"range":{"start_line":113,"start_character":32,"end_line":113,"end_character":62},"updated":"2017-03-17 13:57:11.000000000","message":"this can just be subrequest_type","commit_id":"97800a48d5caac92e59c4b4d505a2593337e08a4"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"5a49d71bbf9d4fb8b85e1af30713200de2aaaa5e","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        info_log_lines \u003d self.fake_logger.get_lines_for_level(\u0027info\u0027)"},{"line_number":111,"context_line":"        self.assertEqual(len(info_log_lines), 4)"},{"line_number":112,"context_line":"        self.assertTrue(info_log_lines[0].startswith(\u0027Copying object\u0027))"},{"line_number":113,"context_line":"        subreq_get \u003d \u0027%s %s\u0027 % (fake_config[\u0027subrequest_type\u0027], SUB_GET_PATH)"},{"line_number":114,"context_line":"        subreq_put \u003d \u0027%s %s\u0027 % (fake_config[\u0027subrequest_type\u0027], SUB_PUT_PATH)"},{"line_number":115,"context_line":"        origreq \u003d \u0027PUT %s\u0027 % self.path"},{"line_number":116,"context_line":"        self.assertTrue(subreq_get in info_log_lines[1])"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a1ced50_21d95e22","line":113,"range":{"start_line":113,"start_character":32,"end_line":113,"end_character":62},"in_reply_to":"1a1ced50_706de203","updated":"2017-03-17 14:44:22.000000000","message":"Done","commit_id":"97800a48d5caac92e59c4b4d505a2593337e08a4"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"a6842b1e32408ea73b53f0441a02e599e6e5b329","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        self.assertEqual(len(info_log_lines), 4)"},{"line_number":112,"context_line":"        self.assertTrue(info_log_lines[0].startswith(\u0027Copying object\u0027))"},{"line_number":113,"context_line":"        subreq_get \u003d \u0027%s %s\u0027 % (fake_config[\u0027subrequest_type\u0027], SUB_GET_PATH)"},{"line_number":114,"context_line":"        subreq_put \u003d \u0027%s %s\u0027 % (fake_config[\u0027subrequest_type\u0027], SUB_PUT_PATH)"},{"line_number":115,"context_line":"        origreq \u003d \u0027PUT %s\u0027 % self.path"},{"line_number":116,"context_line":"        self.assertTrue(subreq_get in info_log_lines[1])"},{"line_number":117,"context_line":"        self.assertTrue(subreq_put in info_log_lines[2])"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a1ced50_70440274","line":114,"range":{"start_line":114,"start_character":32,"end_line":114,"end_character":62},"updated":"2017-03-17 13:57:11.000000000","message":"This one as well and also references in L#151, L#152","commit_id":"97800a48d5caac92e59c4b4d505a2593337e08a4"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"5a49d71bbf9d4fb8b85e1af30713200de2aaaa5e","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        self.assertEqual(len(info_log_lines), 4)"},{"line_number":112,"context_line":"        self.assertTrue(info_log_lines[0].startswith(\u0027Copying object\u0027))"},{"line_number":113,"context_line":"        subreq_get \u003d \u0027%s %s\u0027 % (fake_config[\u0027subrequest_type\u0027], SUB_GET_PATH)"},{"line_number":114,"context_line":"        subreq_put \u003d \u0027%s %s\u0027 % (fake_config[\u0027subrequest_type\u0027], SUB_PUT_PATH)"},{"line_number":115,"context_line":"        origreq \u003d \u0027PUT %s\u0027 % self.path"},{"line_number":116,"context_line":"        self.assertTrue(subreq_get in info_log_lines[1])"},{"line_number":117,"context_line":"        self.assertTrue(subreq_put in info_log_lines[2])"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a1ced50_61099695","line":114,"range":{"start_line":114,"start_character":32,"end_line":114,"end_character":62},"in_reply_to":"1a1ced50_70440274","updated":"2017-03-17 14:44:22.000000000","message":"Done","commit_id":"97800a48d5caac92e59c4b4d505a2593337e08a4"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"a6842b1e32408ea73b53f0441a02e599e6e5b329","unresolved":false,"context_lines":[{"line_number":130,"context_line":"    def _test_subrequest_logged_POST(self, subrequst_type, post_as_copy\u003dFalse):"},{"line_number":131,"context_line":"        # Test that subrequests made downstream from a"},{"line_number":132,"context_line":"        # Copy POST will be logged with the request type of"},{"line_number":133,"context_line":"        # the subrequest as opposed to the GET/PUT."},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        global fake_config"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1a1ced50_db9317a2","line":133,"updated":"2017-03-17 13:57:11.000000000","message":"This can be clubbed into two lines as well.","commit_id":"97800a48d5caac92e59c4b4d505a2593337e08a4"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"5a49d71bbf9d4fb8b85e1af30713200de2aaaa5e","unresolved":false,"context_lines":[{"line_number":130,"context_line":"    def _test_subrequest_logged_POST(self, subrequst_type, post_as_copy\u003dFalse):"},{"line_number":131,"context_line":"        # Test that subrequests made downstream from a"},{"line_number":132,"context_line":"        # Copy POST will be logged with the request type of"},{"line_number":133,"context_line":"        # the subrequest as opposed to the GET/PUT."},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        global fake_config"},{"line_number":136,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1a1ced50_412bbaeb","line":133,"in_reply_to":"1a1ced50_db9317a2","updated":"2017-03-17 14:44:22.000000000","message":"Done","commit_id":"97800a48d5caac92e59c4b4d505a2593337e08a4"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"a6842b1e32408ea73b53f0441a02e599e6e5b329","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                            \u0027object_post_as_copy\u0027: post_as_copy})"},{"line_number":142,"context_line":"        FAKE_SWIFT.register(\u0027POST\u0027, self.path, HTTPOk, headers\u003dhdrs)"},{"line_number":143,"context_line":"        FAKE_SWIFT.register(\u0027GET\u0027,"},{"line_number":144,"context_line":"                            \u0027/v1/a/c/o?multipart-manifest\u003dget\u0026format\u003draw\u0027,"},{"line_number":145,"context_line":"                            HTTPOk, headers\u003dhdrs)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        req.get_response(self.first_app)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a1ced50_b6959241","line":144,"range":{"start_line":144,"start_character":38,"end_line":144,"end_character":72},"updated":"2017-03-17 13:57:11.000000000","message":"This doesn\u0027t seem to be doing anything, we\u0027re not testing anything particular to that.","commit_id":"97800a48d5caac92e59c4b4d505a2593337e08a4"},{"author":{"_account_id":12261,"name":"Mahati","email":"mahati.chamarthy@gmail.com","username":"Mahati"},"change_message_id":"85455a1d2d6d5667830e8f4ea08963c44ccdbcc2","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                            \u0027object_post_as_copy\u0027: post_as_copy})"},{"line_number":142,"context_line":"        FAKE_SWIFT.register(\u0027POST\u0027, self.path, HTTPOk, headers\u003dhdrs)"},{"line_number":143,"context_line":"        FAKE_SWIFT.register(\u0027GET\u0027,"},{"line_number":144,"context_line":"                            \u0027/v1/a/c/o?multipart-manifest\u003dget\u0026format\u003draw\u0027,"},{"line_number":145,"context_line":"                            HTTPOk, headers\u003dhdrs)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        req.get_response(self.first_app)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a1ced50_c04a24ac","line":144,"range":{"start_line":144,"start_character":38,"end_line":144,"end_character":72},"in_reply_to":"1a1ced50_a1254eac","updated":"2017-03-19 15:52:59.000000000","message":"Thanks Janie for the explanation. OMM this test passes w/o registering the parameters. Am I missing something?\n\nThis test also doesn\u0027t register it with parameters -\u003e https://github.com/openstack/swift/blob/master/test/unit/common/middleware/test_copy.py#L162","commit_id":"97800a48d5caac92e59c4b4d505a2593337e08a4"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"5a49d71bbf9d4fb8b85e1af30713200de2aaaa5e","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                            \u0027object_post_as_copy\u0027: post_as_copy})"},{"line_number":142,"context_line":"        FAKE_SWIFT.register(\u0027POST\u0027, self.path, HTTPOk, headers\u003dhdrs)"},{"line_number":143,"context_line":"        FAKE_SWIFT.register(\u0027GET\u0027,"},{"line_number":144,"context_line":"                            \u0027/v1/a/c/o?multipart-manifest\u003dget\u0026format\u003draw\u0027,"},{"line_number":145,"context_line":"                            HTTPOk, headers\u003dhdrs)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        req.get_response(self.first_app)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a1ced50_a1254eac","line":144,"range":{"start_line":144,"start_character":38,"end_line":144,"end_character":72},"in_reply_to":"1a1ced50_b6959241","updated":"2017-03-17 14:44:22.000000000","message":"That is the call that happens as a result of https://github.com/openstack/swift/blob/master/swift/common/middleware/copy.py#L356,L407 In copy (see beginning and end of that block), because the param is ignored if its not necessary, it is simply sent for every case.\n\nSo it must be registered that way, or it fails.\n\nBecause the parameters can swap the order, I have changed to also register the parameters in the other order (the reason unit tests failed on previous patch)","commit_id":"97800a48d5caac92e59c4b4d505a2593337e08a4"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"9df68b73e43c1d45bff7fe52a05c45be2a02eb04","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                            \u0027object_post_as_copy\u0027: post_as_copy})"},{"line_number":142,"context_line":"        FAKE_SWIFT.register(\u0027POST\u0027, self.path, HTTPOk, headers\u003dhdrs)"},{"line_number":143,"context_line":"        FAKE_SWIFT.register(\u0027GET\u0027,"},{"line_number":144,"context_line":"                            \u0027/v1/a/c/o?multipart-manifest\u003dget\u0026format\u003draw\u0027,"},{"line_number":145,"context_line":"                            HTTPOk, headers\u003dhdrs)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        req.get_response(self.first_app)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a1ced50_b4ae4983","line":144,"range":{"start_line":144,"start_character":38,"end_line":144,"end_character":72},"in_reply_to":"1a1ced50_c04a24ac","updated":"2017-03-19 18:14:37.000000000","message":"Thank you for mentioning this. In looking into that, I have realized a couple things:\n- running all these tests together with nosetest succeeds, a couple fail when run individually.\n- the case with POST and fast_post is incorrect in it\u0027s assertions altogether - the POST is pass-through in that case, and I am fixing it now.\nWhen I get all of that settled, then I will see whether the param is really required.  I expect given your testing, it is not *required*, but at some point I didn\u0027t have the GET registration correct, the failure reports there was no registration for the whole string with the param - and thus it was added that way.","commit_id":"97800a48d5caac92e59c4b4d505a2593337e08a4"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"06157762ac4ba0aaf78eb59e369dffe72a148f1c","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class FakeApp(object):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def __init__(self, app, conf):"},{"line_number":27,"context_line":"        self.body \u003d [\u0027FAKE MIDDLEWARE\u0027]"},{"line_number":28,"context_line":"        self.conf \u003d conf"},{"line_number":29,"context_line":"        self.app \u003d app"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a1ced50_0cfff234","line":26,"updated":"2017-03-20 20:43:08.000000000","message":"Seems like FakeFilter might be a better name if we\u0027re taking an app as an argument? Or maybe we just need to be better about having this encapsulate a single app...","commit_id":"0570cae29f984e344f6148aeb9e872f0a985d89e"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"a41c82ae9e7e0b531588f421236964a11619aa97","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class FakeApp(object):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def __init__(self, app, conf):"},{"line_number":27,"context_line":"        self.body \u003d [\u0027FAKE MIDDLEWARE\u0027]"},{"line_number":28,"context_line":"        self.conf \u003d conf"},{"line_number":29,"context_line":"        self.app \u003d app"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a1ced50_83456318","line":26,"in_reply_to":"1a1ced50_0cfff234","updated":"2017-03-21 03:08:47.000000000","message":"this and a few other suggestions were done as in the suggested paste.","commit_id":"0570cae29f984e344f6148aeb9e872f0a985d89e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"06157762ac4ba0aaf78eb59e369dffe72a148f1c","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                            path, HTTPOk,"},{"line_number":46,"context_line":"                            headers\u003dhdrs)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        sub_req.get_response(self.app)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        self.app(env, start_response)"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1a1ced50_07e42d0b","line":48,"updated":"2017-03-20 20:43:08.000000000","message":"Is it worth draining the iterator here?","commit_id":"0570cae29f984e344f6148aeb9e872f0a985d89e"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"a41c82ae9e7e0b531588f421236964a11619aa97","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                            path, HTTPOk,"},{"line_number":46,"context_line":"                            headers\u003dhdrs)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        sub_req.get_response(self.app)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        self.app(env, start_response)"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1a1ced50_8372c3ab","line":48,"in_reply_to":"1a1ced50_07e42d0b","updated":"2017-03-21 03:08:47.000000000","message":"is it enough to just close it?  that is what i added.","commit_id":"0570cae29f984e344f6148aeb9e872f0a985d89e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"06157762ac4ba0aaf78eb59e369dffe72a148f1c","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        self.app(env, start_response)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        start_response(\u0027200 OK\u0027, [(\u0027Content-Type\u0027, \u0027text/plain\u0027)])"},{"line_number":53,"context_line":"        while env[\u0027wsgi.input\u0027].read():"},{"line_number":54,"context_line":"            pass"},{"line_number":55,"context_line":"        return self.body"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a1ced50_fd3b1e36","line":52,"updated":"2017-03-20 20:43:08.000000000","message":"This isn\u0027t terribly representative of a WSGI filter -- there\u0027s the expectation that self.app may have called start_response above, but then we call it again here. I think if we were dealing with wsgiref\u0027s start_response, this would raise an AssertionError?","commit_id":"0570cae29f984e344f6148aeb9e872f0a985d89e"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"a41c82ae9e7e0b531588f421236964a11619aa97","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        self.app(env, start_response)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        start_response(\u0027200 OK\u0027, [(\u0027Content-Type\u0027, \u0027text/plain\u0027)])"},{"line_number":53,"context_line":"        while env[\u0027wsgi.input\u0027].read():"},{"line_number":54,"context_line":"            pass"},{"line_number":55,"context_line":"        return self.body"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a1ced50_00a7a94f","line":52,"in_reply_to":"1a1ced50_fd3b1e36","updated":"2017-03-21 03:08:47.000000000","message":"Done","commit_id":"0570cae29f984e344f6148aeb9e872f0a985d89e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"06157762ac4ba0aaf78eb59e369dffe72a148f1c","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.app(env, start_response)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        start_response(\u0027200 OK\u0027, [(\u0027Content-Type\u0027, \u0027text/plain\u0027)])"},{"line_number":53,"context_line":"        while env[\u0027wsgi.input\u0027].read():"},{"line_number":54,"context_line":"            pass"},{"line_number":55,"context_line":"        return self.body"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1a1ced50_0cc7f245","line":53,"updated":"2017-03-20 20:43:08.000000000","message":"I kinda woulda expected self.app(env, start_response) to do that? Is it that we haven\u0027t drained the iterator that\u0027s returned or something?","commit_id":"0570cae29f984e344f6148aeb9e872f0a985d89e"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"a41c82ae9e7e0b531588f421236964a11619aa97","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.app(env, start_response)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        start_response(\u0027200 OK\u0027, [(\u0027Content-Type\u0027, \u0027text/plain\u0027)])"},{"line_number":53,"context_line":"        while env[\u0027wsgi.input\u0027].read():"},{"line_number":54,"context_line":"            pass"},{"line_number":55,"context_line":"        return self.body"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1a1ced50_2064a520","line":53,"in_reply_to":"1a1ced50_0cc7f245","updated":"2017-03-21 03:08:47.000000000","message":"Done","commit_id":"0570cae29f984e344f6148aeb9e872f0a985d89e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"06157762ac4ba0aaf78eb59e369dffe72a148f1c","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        self.assertTrue(origreq in info_log_lines[3])"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def test_subrequest_logged_x_copy_from(self):"},{"line_number":122,"context_line":"        for type in [\u0027HEAD\u0027, \u0027GET\u0027, \u0027POST\u0027, \u0027PUT\u0027]:"},{"line_number":123,"context_line":"            self._test_subrequest_logged(type)"},{"line_number":124,"context_line":"            self.fake_logger.close()"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1a1ced50_0c3c522e","line":122,"updated":"2017-03-20 20:43:08.000000000","message":"We probably shouldn\u0027t shadow type().\n\nShould this also include DELETE?\n\nI might also be in favor of specifying each method individually, to help with tracking down failures. Like\n\n self._test_subrequest_logged(\u0027HEAD\u0027)\n self._test_subrequest_logged(\u0027GET\u0027)\n self._test_subrequest_logged(\u0027POST\u0027)\n self._test_subrequest_logged(\u0027PUT\u0027)\n self._test_subrequest_logged(\u0027DELETE\u0027)","commit_id":"0570cae29f984e344f6148aeb9e872f0a985d89e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"06157762ac4ba0aaf78eb59e369dffe72a148f1c","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    def test_subrequest_logged_x_copy_from(self):"},{"line_number":122,"context_line":"        for type in [\u0027HEAD\u0027, \u0027GET\u0027, \u0027POST\u0027, \u0027PUT\u0027]:"},{"line_number":123,"context_line":"            self._test_subrequest_logged(type)"},{"line_number":124,"context_line":"            self.fake_logger.close()"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def _test_subrequest_logged_POST(self, subrequest_type,"},{"line_number":127,"context_line":"                                     post_as_copy\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a1ced50_e297ff8d","line":124,"updated":"2017-03-20 20:43:08.000000000","message":"Is this just to keep the logger clean between different types?","commit_id":"0570cae29f984e344f6148aeb9e872f0a985d89e"},{"author":{"_account_id":12279,"name":"Janie Richling","email":"jrichli@us.ibm.com","username":"jrichli"},"change_message_id":"a41c82ae9e7e0b531588f421236964a11619aa97","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    def test_subrequest_logged_x_copy_from(self):"},{"line_number":122,"context_line":"        for type in [\u0027HEAD\u0027, \u0027GET\u0027, \u0027POST\u0027, \u0027PUT\u0027]:"},{"line_number":123,"context_line":"            self._test_subrequest_logged(type)"},{"line_number":124,"context_line":"            self.fake_logger.close()"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def _test_subrequest_logged_POST(self, subrequest_type,"},{"line_number":127,"context_line":"                                     post_as_copy\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":10,"id":"1a1ced50_43860b66","line":124,"in_reply_to":"1a1ced50_e297ff8d","updated":"2017-03-21 03:08:47.000000000","message":"at some point, i needed it to clear out the logger.  but the way you have changed things, that is no longer necessary.","commit_id":"0570cae29f984e344f6148aeb9e872f0a985d89e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"06157762ac4ba0aaf78eb59e369dffe72a148f1c","unresolved":false,"context_lines":[{"line_number":165,"context_line":"            self.assertTrue(origreq in info_log_lines[1])"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def test_subrequest_logged_post_as_copy_with_POST_fast_post(self):"},{"line_number":168,"context_line":"        for type in [\u0027HEAD\u0027, \u0027GET\u0027, \u0027POST\u0027, \u0027PUT\u0027]:"},{"line_number":169,"context_line":"            self._test_subrequest_logged_POST(type, post_as_copy\u003dFalse)"},{"line_number":170,"context_line":"            self.fake_logger.close()"},{"line_number":171,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1a1ced50_0c237206","line":168,"updated":"2017-03-20 20:43:08.000000000","message":"Similarly, should this include DELETE?","commit_id":"0570cae29f984e344f6148aeb9e872f0a985d89e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"06157762ac4ba0aaf78eb59e369dffe72a148f1c","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            self.fake_logger.close()"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def test_subrequest_logged_post_as_copy_with_POST(self):"},{"line_number":173,"context_line":"        for type in [\u0027HEAD\u0027, \u0027GET\u0027, \u0027POST\u0027, \u0027PUT\u0027]:"},{"line_number":174,"context_line":"            self._test_subrequest_logged_POST(type, post_as_copy\u003dTrue)"},{"line_number":175,"context_line":"            self.fake_logger.close()"},{"line_number":176,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"1a1ced50_ac841ed4","line":173,"updated":"2017-03-20 20:43:08.000000000","message":"...and here?","commit_id":"0570cae29f984e344f6148aeb9e872f0a985d89e"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"87682952f9f2fbf21ca9eac57ee62d7a847adcd5","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        resp \u003d sub_req.get_response(self.app)"},{"line_number":53,"context_line":"        close_if_possible(resp.app_iter)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        def _start_response(status, headers, exc_info\u003dNone):"},{"line_number":56,"context_line":"            return start_response(status, headers, exc_info)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        return self.app(env, start_response)"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a1ced50_ce7a0477","line":55,"updated":"2017-03-21 15:47:46.000000000","message":"Unused?","commit_id":"108501a8c130f4b013c75603b0263f585f6ba535"}]}
