)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cea9552c8232fc356f7ccb482d999de4a84efb65","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Gleb Stepanov \u003cgstepanov@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-06-07 19:18:45 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add versioning to response"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Some methods could have different response codes depending"},{"line_number":10,"context_line":"on version, like EvacuateController._evacuate should return"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3aaa91ec_e492b74a","line":7,"updated":"2016-06-22 17:39:34.000000000","message":"To which response? :)\n\nPerhaps a more descriptive summary of this patch might be:\n\n Pin HTTP response codes to API microversions","commit_id":"5718dd6a9bea5c4a42a8ed22fc738c89cb02ca6f"}],"nova/api/openstack/wsgi.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"7e068ec2b331aa51e50e45f959cf6b8217728469","unresolved":false,"context_lines":[{"line_number":313,"context_line":""},{"line_number":314,"context_line":"def response_versioned(code, min_version\u003dNone, max_version\u003dNone):"},{"line_number":315,"context_line":"    \"\"\"Attaches response code to a method"},{"line_number":316,"context_line":"    with with specific version."},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    :param code: HTTP response code"},{"line_number":319,"context_line":"    :param min_version: minimal version that should be supported"}],"source_content_type":"text/x-python","patch_set":2,"id":"9abb7d3a_2f29bc9e","line":316,"range":{"start_line":316,"start_character":9,"end_line":316,"end_character":13},"updated":"2016-06-01 13:05:34.000000000","message":"duplicate","commit_id":"87083c98e530cfc521b38b561a23918a401b33bd"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cea9552c8232fc356f7ccb482d999de4a84efb65","unresolved":false,"context_lines":[{"line_number":319,"context_line":"    with specific version."},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    :param code: HTTP response code"},{"line_number":322,"context_line":"    :param min_version: minimal version that should be supported"},{"line_number":323,"context_line":"    :param max_version: maximal version that should be supported"},{"line_number":324,"context_line":"    \"\"\""},{"line_number":325,"context_line":"    def decorator(func):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_249ddf59","line":322,"updated":"2016-06-22 17:39:34.000000000","message":"s/minimal/minimum/","commit_id":"5718dd6a9bea5c4a42a8ed22fc738c89cb02ca6f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cea9552c8232fc356f7ccb482d999de4a84efb65","unresolved":false,"context_lines":[{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    :param code: HTTP response code"},{"line_number":322,"context_line":"    :param min_version: minimal version that should be supported"},{"line_number":323,"context_line":"    :param max_version: maximal version that should be supported"},{"line_number":324,"context_line":"    \"\"\""},{"line_number":325,"context_line":"    def decorator(func):"},{"line_number":326,"context_line":"        @functools.wraps(func)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_84a493a6","line":323,"updated":"2016-06-22 17:39:34.000000000","message":"/maximal/maximum/","commit_id":"5718dd6a9bea5c4a42a8ed22fc738c89cb02ca6f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cea9552c8232fc356f7ccb482d999de4a84efb65","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                ver \u003d args[1].api_version_request"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"            if ver.matches(min_ver, max_ver):"},{"line_number":337,"context_line":"                wrapper.wsgi_code \u003d code"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"            return func(*args, **kwargs)"},{"line_number":340,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_649fe750","line":337,"updated":"2016-06-22 17:39:34.000000000","message":"@alaski: Well, we *should* be forcing a single *successful* HTTP response code for any tuple of (min_version, max_version), no?","commit_id":"5718dd6a9bea5c4a42a8ed22fc738c89cb02ca6f"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"8530392bcdae1b83530842b75f01e09f20eebe23","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                ver \u003d args[1].api_version_request"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"            if ver.matches(min_ver, max_ver):"},{"line_number":337,"context_line":"                wrapper.wsgi_code \u003d code"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"            return func(*args, **kwargs)"},{"line_number":340,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_1e80f545","line":337,"updated":"2016-06-22 16:01:50.000000000","message":"My only real concern with this is that it forces a single successful return code. I think that works for now, but does preclude using things like 2-06/206 response codes. However those may never be used anyways.","commit_id":"5718dd6a9bea5c4a42a8ed22fc738c89cb02ca6f"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"1a078f1990f502b0a765d933baacfb6340e7268d","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                ver \u003d args[1].api_version_request"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"            if ver.matches(min_ver, max_ver):"},{"line_number":337,"context_line":"                wrapper.wsgi_code \u003d code"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"            return func(*args, **kwargs)"},{"line_number":340,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_a5407435","line":337,"in_reply_to":"3aaa91ec_0e5a594f","updated":"2016-06-23 15:08:13.000000000","message":"Thanks, Andrew, i will think how to make response code variable.However right i\u0027m not sure how to make it inside decorator.","commit_id":"5718dd6a9bea5c4a42a8ed22fc738c89cb02ca6f"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"50edd9ce8340f556e89ae2a762032a0b54a57579","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                ver \u003d args[1].api_version_request"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"            if ver.matches(min_ver, max_ver):"},{"line_number":337,"context_line":"                wrapper.wsgi_code \u003d code"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"            return func(*args, **kwargs)"},{"line_number":340,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_0e5a594f","line":337,"in_reply_to":"3aaa91ec_649fe750","updated":"2016-06-23 12:05:16.000000000","message":"Somehow I messed up the responses I was trying to make a point with, it should have been 206/207. I definitely agree that we shouldn\u0027t be returning 200 or 202 or 204, but we may want to return 204 or 206. However we don\u0027t do that today so I was just pointing out that this limits the future. I\u0027m not -1 on it though.","commit_id":"5718dd6a9bea5c4a42a8ed22fc738c89cb02ca6f"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"a40bfc38bd61a7fa9a66ed8a79970fe5286fd14c","unresolved":false,"context_lines":[{"line_number":334,"context_line":"                ver \u003d args[1].api_version_request"},{"line_number":335,"context_line":""},{"line_number":336,"context_line":"            if ver.matches(min_ver, max_ver):"},{"line_number":337,"context_line":"                wrapper.wsgi_code \u003d code"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"            return func(*args, **kwargs)"},{"line_number":340,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_8581f8c5","line":337,"in_reply_to":"3aaa91ec_a5407435","updated":"2016-06-23 15:14:16.000000000","message":"Yeah, I\u0027m not sure it\u0027s really feasible to do it in a decorator. I don\u0027t think this patch needs to answer that question, I was just pointing out a limitation it creates. But like I said nothing today uses that so *shrug*.","commit_id":"5718dd6a9bea5c4a42a8ed22fc738c89cb02ca6f"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"9fc0de473044fd8867ed70a690d6db2c7637ea23","unresolved":false,"context_lines":[{"line_number":330,"context_line":"            if \u0027req\u0027 in kwargs:"},{"line_number":331,"context_line":"                ver \u003d kwargs[\u0027req\u0027].api_version_request"},{"line_number":332,"context_line":"            else:"},{"line_number":333,"context_line":"                ver \u003d args[1].api_version_request"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"            if ver.matches(min_ver, max_ver):"},{"line_number":336,"context_line":"                wrapper.wsgi_code \u003d code"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_747c40ec","line":333,"updated":"2016-06-24 15:12:53.000000000","message":"Sorry I didn\u0027t catch this earlier. As far as I can see the Nova wsgi module will always call these methods with (req\u003drequest, ...) so this else block should never be hit. Is there somewhere that doesn\u0027t use a kwarg, and can that just be fixed? I don\u0027t like seeing assumptions based on position.\n\nAnother way to do this would be to use a combination of safe_utils.get_wrapped_function and inspect.getcallargs to find the request object passed in no matter where it is. You can see an example in compute/utils.py wrap_instance_event().","commit_id":"3cf7d80c1adccbaf91930cd14ebc1c9a2f4d8638"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"7524af416537782e4559d47fc0588e758e29c53e","unresolved":false,"context_lines":[{"line_number":330,"context_line":"            if \u0027req\u0027 in kwargs:"},{"line_number":331,"context_line":"                ver \u003d kwargs[\u0027req\u0027].api_version_request"},{"line_number":332,"context_line":"            else:"},{"line_number":333,"context_line":"                ver \u003d args[1].api_version_request"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"            if ver.matches(min_ver, max_ver):"},{"line_number":336,"context_line":"                wrapper.wsgi_code \u003d code"}],"source_content_type":"text/x-python","patch_set":4,"id":"3aaa91ec_dba87fde","line":333,"in_reply_to":"3aaa91ec_747c40ec","updated":"2016-06-27 13:13:36.000000000","message":"Thanks, Andrew, i will check this out.","commit_id":"3cf7d80c1adccbaf91930cd14ebc1c9a2f4d8638"}],"nova/tests/unit/api/openstack/test_wsgi.py":[{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"6b19e7342a1ad6aa280fa429462a4d290e400f27","unresolved":false,"context_lines":[{"line_number":1186,"context_line":"        method1(None, req\u003drequest)"},{"line_number":1187,"context_line":""},{"line_number":1188,"context_line":"        self.assertEqual(code, method1.wsgi_code,"},{"line_number":1189,"context_line":"                         \"Response code is not equal to expected\")"},{"line_number":1190,"context_line":""},{"line_number":1191,"context_line":"        @wsgi.response_versioned(code\u003dcode, max_version\u003d\u00272.27\u0027)"},{"line_number":1192,"context_line":"        def method2(self, req):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_d30335b7","line":1189,"range":{"start_line":1189,"start_character":25,"end_line":1189,"end_character":65},"updated":"2016-04-15 20:25:03.000000000","message":"Might want to change this to specify what response code was expected for clarity.","commit_id":"2cbee8abaf3125dfa2204a3df46509c6d69cc6ce"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"8378dbff7c6bef7cbdc713e49837f410edf34e6a","unresolved":false,"context_lines":[{"line_number":1186,"context_line":"        method1(None, req\u003drequest)"},{"line_number":1187,"context_line":""},{"line_number":1188,"context_line":"        self.assertEqual(code, method1.wsgi_code,"},{"line_number":1189,"context_line":"                         \"Response code is not equal to expected\")"},{"line_number":1190,"context_line":""},{"line_number":1191,"context_line":"        @wsgi.response_versioned(code\u003dcode, max_version\u003d\u00272.27\u0027)"},{"line_number":1192,"context_line":"        def method2(self, req):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_02da0f17","line":1189,"range":{"start_line":1189,"start_character":25,"end_line":1189,"end_character":65},"in_reply_to":"1a122d0e_d30335b7","updated":"2016-04-19 14:11:58.000000000","message":"Yep, thanks","commit_id":"2cbee8abaf3125dfa2204a3df46509c6d69cc6ce"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"6b19e7342a1ad6aa280fa429462a4d290e400f27","unresolved":false,"context_lines":[{"line_number":1194,"context_line":""},{"line_number":1195,"context_line":"        method2(None, req\u003drequest)"},{"line_number":1196,"context_line":"        self.assertEqual(code, method2.wsgi_code,"},{"line_number":1197,"context_line":"                         \"Response code is not equal to expected\")"},{"line_number":1198,"context_line":""},{"line_number":1199,"context_line":"        request \u003d wsgi.Request(environ\u003d{})"},{"line_number":1200,"context_line":"        request.api_version_request \u003d api_version.\\"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_132c8d49","line":1197,"range":{"start_line":1197,"start_character":25,"end_line":1197,"end_character":65},"updated":"2016-04-15 20:25:03.000000000","message":"Same as above.","commit_id":"2cbee8abaf3125dfa2204a3df46509c6d69cc6ce"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"7e068ec2b331aa51e50e45f959cf6b8217728469","unresolved":false,"context_lines":[{"line_number":1166,"context_line":"    def test_response_decorator(self):"},{"line_number":1167,"context_line":"        code \u003d 200"},{"line_number":1168,"context_line":""},{"line_number":1169,"context_line":"        @wsgi.response(code\u003dcode)"},{"line_number":1170,"context_line":"        def method(self, req):"},{"line_number":1171,"context_line":"            pass"},{"line_number":1172,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9abb7d3a_4a498eb6","line":1169,"range":{"start_line":1169,"start_character":14,"end_line":1169,"end_character":22},"updated":"2016-06-01 13:05:34.000000000","message":"can we add a case to have both \n@wsgi.response and @wsgi.response_versioned?\nor it has conflict?","commit_id":"87083c98e530cfc521b38b561a23918a401b33bd"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"8530392bcdae1b83530842b75f01e09f20eebe23","unresolved":false,"context_lines":[{"line_number":1189,"context_line":""},{"line_number":1190,"context_line":"        self.assertEqual(method.wsgi_code, code)"},{"line_number":1191,"context_line":""},{"line_number":1192,"context_line":"    def test_response_versioned_decorator(self):"},{"line_number":1193,"context_line":"        code \u003d 202"},{"line_number":1194,"context_line":""},{"line_number":1195,"context_line":"        @wsgi.response_versioned(code\u003dcode, min_version\u003d\u00272.25\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_1e13d50e","line":1192,"updated":"2016-06-22 16:01:50.000000000","message":"This would be easier to read as three separate tests.","commit_id":"5718dd6a9bea5c4a42a8ed22fc738c89cb02ca6f"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"cea9552c8232fc356f7ccb482d999de4a84efb65","unresolved":false,"context_lines":[{"line_number":1189,"context_line":""},{"line_number":1190,"context_line":"        self.assertEqual(method.wsgi_code, code)"},{"line_number":1191,"context_line":""},{"line_number":1192,"context_line":"    def test_response_versioned_decorator(self):"},{"line_number":1193,"context_line":"        code \u003d 202"},{"line_number":1194,"context_line":""},{"line_number":1195,"context_line":"        @wsgi.response_versioned(code\u003dcode, min_version\u003d\u00272.25\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_449aab64","line":1192,"updated":"2016-06-22 17:39:34.000000000","message":"agreed with @alaski","commit_id":"5718dd6a9bea5c4a42a8ed22fc738c89cb02ca6f"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"1a078f1990f502b0a765d933baacfb6340e7268d","unresolved":false,"context_lines":[{"line_number":1189,"context_line":""},{"line_number":1190,"context_line":"        self.assertEqual(method.wsgi_code, code)"},{"line_number":1191,"context_line":""},{"line_number":1192,"context_line":"    def test_response_versioned_decorator(self):"},{"line_number":1193,"context_line":"        code \u003d 202"},{"line_number":1194,"context_line":""},{"line_number":1195,"context_line":"        @wsgi.response_versioned(code\u003dcode, min_version\u003d\u00272.25\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_c59820c3","line":1192,"in_reply_to":"3aaa91ec_449aab64","updated":"2016-06-23 15:08:13.000000000","message":"Ok, will be done.","commit_id":"5718dd6a9bea5c4a42a8ed22fc738c89cb02ca6f"}]}
