)]}'
{"glanceclient/common/http.py":[{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"d220ad0c99d7f1cd29dc501d260831c90db221b3","unresolved":false,"context_lines":[{"line_number":323,"context_line":"        if len([v for (k, v) in encoded_headers.items()"},{"line_number":324,"context_line":"                if k \u003d\u003d b\"Content-Type\""},{"line_number":325,"context_line":"                or k \u003d\u003d \"Content-Type\"]) \u003e 1:"},{"line_number":326,"context_line":"            raise exc.CommandError(message\u003d\"Improper handling of Content-Type \""},{"line_number":327,"context_line":"                                   \"headers resulted in duplicates: %s\" %"},{"line_number":328,"context_line":"                                   (encoded_headers))"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        try:"},{"line_number":331,"context_line":"            resp \u003d super(SessionClient, self).request(url,"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba5201f7_acb0e78c","line":328,"range":{"start_line":326,"start_character":12,"end_line":328,"end_character":53},"updated":"2016-12-30 17:55:25.000000000","message":"Not sure if we want to raise and exception here. I think a debug message would do. Or we can just stick to what we have to do: ensure that the call to encode_headers is delayed to the time the request() method is called.\nIn this PS, i do not see the request method being passed with the encoded header.","commit_id":"8f45aee129e83868e5677931aae92f7bb57fe222"},{"author":{"_account_id":21722,"name":"Dharini Chandrasekar","email":"dharini.chandrasekar@intel.com","username":"dharinic"},"change_message_id":"f65781a3618405f36fb4d45d1e418916603a8b46","unresolved":false,"context_lines":[{"line_number":323,"context_line":"        if len([v for (k, v) in encoded_headers.items()"},{"line_number":324,"context_line":"                if k \u003d\u003d b\"Content-Type\""},{"line_number":325,"context_line":"                or k \u003d\u003d \"Content-Type\"]) \u003e 1:"},{"line_number":326,"context_line":"            raise exc.CommandError(message\u003d\"Improper handling of Content-Type \""},{"line_number":327,"context_line":"                                   \"headers resulted in duplicates: %s\" %"},{"line_number":328,"context_line":"                                   (encoded_headers))"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        try:"},{"line_number":331,"context_line":"            resp \u003d super(SessionClient, self).request(url,"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba5201f7_cf227db9","line":328,"range":{"start_line":326,"start_character":12,"end_line":328,"end_character":53},"in_reply_to":"ba5201f7_8f81554d","updated":"2016-12-30 21:13:36.000000000","message":"Agreed with both your points. What I pointed out was that, you were passing the header as it is to the request() method and using the encoding only to raise an error, which again I felt was not necessary. We should not be raising exceptions here is what I feel. The solution to the bug is to simply delay the encoding. your solution in PS 13 looks good to me. It just needs a proper test coverage.","commit_id":"8f45aee129e83868e5677931aae92f7bb57fe222"},{"author":{"_account_id":23636,"name":"Carlos Konstanski","email":"ckonstanski@pippiandcarlos.com","username":"ckonstanski"},"change_message_id":"27a6e8f1dd495bd3ec486c2b83fdf8fc5b038f32","unresolved":false,"context_lines":[{"line_number":323,"context_line":"        if len([v for (k, v) in encoded_headers.items()"},{"line_number":324,"context_line":"                if k \u003d\u003d b\"Content-Type\""},{"line_number":325,"context_line":"                or k \u003d\u003d \"Content-Type\"]) \u003e 1:"},{"line_number":326,"context_line":"            raise exc.CommandError(message\u003d\"Improper handling of Content-Type \""},{"line_number":327,"context_line":"                                   \"headers resulted in duplicates: %s\" %"},{"line_number":328,"context_line":"                                   (encoded_headers))"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        try:"},{"line_number":331,"context_line":"            resp \u003d super(SessionClient, self).request(url,"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba5201f7_8f81554d","line":328,"range":{"start_line":326,"start_character":12,"end_line":328,"end_character":53},"in_reply_to":"ba5201f7_acb0e78c","updated":"2016-12-30 18:21:27.000000000","message":"Two points that need a reply:\n\n- The request() method is not being passed an encoded header. Instead, the request() method is itself encoding the headers when it calls encode_headers(). The encoded headers don\u0027t play nice when _set_common_request_kwargs() is called, also from within the Request() method. The central theme of this bug fix is to make sure that _set_common_request_kwargs() is called before encode_headers(). The bug was entirely withing the implementation of request(); nothing bad is being passed in.\n\n- There is no way to detect the header problem unless it\u0027s done inside request(). This is because the headers are removed from kwargs with pop(). They are no longer available for inspection after request() exits. The only other option would be to NOT pop() the headers. That would result in a major refactroring and lots of opportunity for new bugs. All code that calls request() would be affected.","commit_id":"8f45aee129e83868e5677931aae92f7bb57fe222"},{"author":{"_account_id":23636,"name":"Carlos Konstanski","email":"ckonstanski@pippiandcarlos.com","username":"ckonstanski"},"change_message_id":"27a6e8f1dd495bd3ec486c2b83fdf8fc5b038f32","unresolved":false,"context_lines":[{"line_number":330,"context_line":"        try:"},{"line_number":331,"context_line":"            resp \u003d super(SessionClient, self).request(url,"},{"line_number":332,"context_line":"                                                      method,"},{"line_number":333,"context_line":"                                                      headers\u003dheaders,"},{"line_number":334,"context_line":"                                                      data\u003ddata,"},{"line_number":335,"context_line":"                                                      **kwargs)"},{"line_number":336,"context_line":"        except ksa_exc.ConnectTimeout as e:"}],"source_content_type":"text/x-python","patch_set":16,"id":"ba5201f7_af961992","line":333,"updated":"2016-12-30 18:21:27.000000000","message":"I see that I forgot to change this to read headers\u003dencoded_headers. I\u0027ll do it in a subsequent changeset. I want stevelle to have a chance to see the current round of comments.","commit_id":"8f45aee129e83868e5677931aae92f7bb57fe222"},{"author":{"_account_id":23636,"name":"Carlos Konstanski","email":"ckonstanski@pippiandcarlos.com","username":"ckonstanski"},"change_message_id":"2d7531c767375af7d3e3ec971ef5f8801e0f5ce4","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        headers \u003d kwargs.pop(\u0027headers\u0027, {})"},{"line_number":320,"context_line":"        kwargs[\u0027raise_exc\u0027] \u003d False"},{"line_number":321,"context_line":"        data \u003d self._set_common_request_kwargs(headers, kwargs)"},{"line_number":322,"context_line":"        headers \u003d encode_headers(headers)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        try:"},{"line_number":325,"context_line":"            resp \u003d super(SessionClient, self).request(url,"}],"source_content_type":"text/x-python","patch_set":18,"id":"dfeb2761_d0a61754","line":322,"updated":"2017-04-03 13:13:52.000000000","message":"I would suggest moving encode_headers(headers) to line 327. This will ensure that no future change can ever reintroduce the bug. Any modification of headers after the call to encode_headers is bad. I only offer this as a suggestion; no downvote.","commit_id":"e1b79156d5f1cfdede981272b1f73d0603dc42d9"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"b7bd5148d89ad4c68235511e656eb83a0bb9e9fe","unresolved":false,"context_lines":[{"line_number":319,"context_line":"        headers \u003d kwargs.pop(\u0027headers\u0027, {})"},{"line_number":320,"context_line":"        kwargs[\u0027raise_exc\u0027] \u003d False"},{"line_number":321,"context_line":"        data \u003d self._set_common_request_kwargs(headers, kwargs)"},{"line_number":322,"context_line":"        headers \u003d encode_headers(headers)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        try:"},{"line_number":325,"context_line":"            resp \u003d super(SessionClient, self).request(url,"}],"source_content_type":"text/x-python","patch_set":18,"id":"dfeb2761_0a60bb31","line":322,"in_reply_to":"dfeb2761_d0a61754","updated":"2017-04-03 18:50:15.000000000","message":"I think this is a good idea.  Probably also worth adding a comment after line 324, something like  \"to avoid bug #1641239, no modification of headers should be allowed after encode_headers is called.  we ensure this by applying encode_headers in the argument list below\"","commit_id":"e1b79156d5f1cfdede981272b1f73d0603dc42d9"}],"glanceclient/tests/functional/base.py":[{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"622d4b5c91aeec4db0a64b1662aa11b6b5e2993b","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                project_name\u003dproject_name)"},{"line_number":78,"context_line":"            self.session \u003d session.Session(auth\u003dauth)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    class Glance(object):"},{"line_number":81,"context_line":"        def __init__(self, keystone):"},{"line_number":82,"context_line":"            self.glance \u003d glanceclient.Client("},{"line_number":83,"context_line":"                \"2\","}],"source_content_type":"text/x-python","patch_set":12,"id":"1a6eadb0_b71ece09","line":80,"updated":"2016-12-16 10:22:12.000000000","message":"shouldn\u0027t we initialize this with glance method in client test base or I miss something?\nIn this case we will get real glance client and don\u0027t need to invent additional methods.","commit_id":"ad261fdf6c5c00282c8fbea3edc3564716405ede"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"458c2feae55f39bae8d7dd983c5a54c7bc63c847","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                project_name\u003dproject_name)"},{"line_number":78,"context_line":"            self.session \u003d session.Session(auth\u003dauth)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    class Glance(object):"},{"line_number":81,"context_line":"        def __init__(self, keystone):"},{"line_number":82,"context_line":"            self.glance \u003d glanceclient.Client("},{"line_number":83,"context_line":"                \"2\","}],"source_content_type":"text/x-python","patch_set":12,"id":"1a6eadb0_503804d3","line":80,"in_reply_to":"1a6eadb0_35dc6c45","updated":"2016-12-16 23:20:13.000000000","message":"With the CLI \"swallowing\" the error I\u0027m not sure there that using CLIClient is the right way to test this anyway. I\u0027d prefer to rely on the existing glance client code (such as _get_versioned_client in shell.py) to create the Client object but it isn\u0027t currently factored in a way to make that work. This doesn\u0027t duplicate much of that code, and seems well factored enough.","commit_id":"ad261fdf6c5c00282c8fbea3edc3564716405ede"},{"author":{"_account_id":23636,"name":"Carlos Konstanski","email":"ckonstanski@pippiandcarlos.com","username":"ckonstanski"},"change_message_id":"fa2a3e14565fb05bc574a7e4f03c5a2e7f863199","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                project_name\u003dproject_name)"},{"line_number":78,"context_line":"            self.session \u003d session.Session(auth\u003dauth)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    class Glance(object):"},{"line_number":81,"context_line":"        def __init__(self, keystone):"},{"line_number":82,"context_line":"            self.glance \u003d glanceclient.Client("},{"line_number":83,"context_line":"                \"2\","}],"source_content_type":"text/x-python","patch_set":12,"id":"1a6eadb0_35dc6c45","line":80,"in_reply_to":"1a6eadb0_b71ece09","updated":"2016-12-16 14:23:52.000000000","message":"Still learning. I didn\u0027t have any luck getting the CLIClient to work with non-CLI functions, but maybe I was doing it wrong.","commit_id":"ad261fdf6c5c00282c8fbea3edc3564716405ede"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"c89f7092f5e615a70906988daf5e440c1aa3ad2d","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                                   **kwargs)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def glance_pyclient(self):"},{"line_number":67,"context_line":"        keystoneclient \u003d self.Keystone("},{"line_number":68,"context_line":"            auth_url\u003dself.creds[\"auth_url\"],"},{"line_number":69,"context_line":"            username\u003dself.creds[\"username\"],"},{"line_number":70,"context_line":"            password\u003dself.creds[\"password\"],"},{"line_number":71,"context_line":"            project_name\u003dself.creds[\"project_name\"])"},{"line_number":72,"context_line":"        return self.Glance(keystoneclient)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    class Keystone(object):"}],"source_content_type":"text/x-python","patch_set":20,"id":"bff0334d_45a415ba","line":71,"range":{"start_line":67,"start_character":39,"end_line":71,"end_character":51},"updated":"2017-04-11 17:16:13.000000000","message":"this could just be a dictionary of literals, which would allow you to simplify stuff below, and make it easier for later tests to use alternate credentials.","commit_id":"52c26fa6e5e249bf2d1626c9cbd725e4d249f564"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e8d9538f1486dce4b6357ac186f68f6b526b2734","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                                   **kwargs)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def glance_pyclient(self):"},{"line_number":67,"context_line":"        keystoneclient \u003d self.Keystone("},{"line_number":68,"context_line":"            auth_url\u003dself.creds[\"auth_url\"],"},{"line_number":69,"context_line":"            username\u003dself.creds[\"username\"],"},{"line_number":70,"context_line":"            password\u003dself.creds[\"password\"],"},{"line_number":71,"context_line":"            project_name\u003dself.creds[\"project_name\"])"},{"line_number":72,"context_line":"        return self.Glance(keystoneclient)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    class Keystone(object):"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_04ea2574","line":71,"range":{"start_line":67,"start_character":39,"end_line":71,"end_character":51},"in_reply_to":"bff0334d_45a415ba","updated":"2017-05-18 22:33:35.000000000","message":"Not completely sure what you mean here.","commit_id":"52c26fa6e5e249bf2d1626c9cbd725e4d249f564"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"9914d17b49b6c6324feae3b8a9c8610c61e73237","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                                   **kwargs)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def glance_pyclient(self):"},{"line_number":67,"context_line":"        keystoneclient \u003d self.Keystone("},{"line_number":68,"context_line":"            auth_url\u003dself.creds[\"auth_url\"],"},{"line_number":69,"context_line":"            username\u003dself.creds[\"username\"],"},{"line_number":70,"context_line":"            password\u003dself.creds[\"password\"],"},{"line_number":71,"context_line":"            project_name\u003dself.creds[\"project_name\"])"},{"line_number":72,"context_line":"        return self.Glance(keystoneclient)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    class Keystone(object):"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_1287e0d9","line":71,"range":{"start_line":67,"start_character":39,"end_line":71,"end_character":51},"in_reply_to":"ff0f0b1f_04ea2574","updated":"2017-05-20 00:25:41.000000000","message":"I mean something like this:\n\n    creds \u003d {\u0027auth_url\u0027: self.creds[\"auth_url\"],\n             \u0027username\u0027: self.creds[\"username\"],\n             \u0027password\u0027: self.creds[\"password\"],\n             \u0027project_name\u0027: self.creds[\"project_name\"]}\n    keystoneclient \u003d self.Keystone(**creds)\n\n\nthen below:\n\n    def __init__(self, **kwargs):\n        loader \u003d loading.get_plugin_loader(\"password\")\n        auth \u003d loader.load_from_options(**kwargs)\n        self.session \u003d session.Session(auth\u003dauth)","commit_id":"52c26fa6e5e249bf2d1626c9cbd725e4d249f564"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3ea609d96e81384b30d78a0b5b2f50f6e9d72be2","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                                   **kwargs)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def glance_pyclient(self):"},{"line_number":67,"context_line":"        keystoneclient \u003d self.Keystone("},{"line_number":68,"context_line":"            auth_url\u003dself.creds[\"auth_url\"],"},{"line_number":69,"context_line":"            username\u003dself.creds[\"username\"],"},{"line_number":70,"context_line":"            password\u003dself.creds[\"password\"],"},{"line_number":71,"context_line":"            project_name\u003dself.creds[\"project_name\"])"},{"line_number":72,"context_line":"        return self.Glance(keystoneclient)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    class Keystone(object):"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_7e148944","line":71,"range":{"start_line":67,"start_character":39,"end_line":71,"end_character":51},"in_reply_to":"ff0f0b1f_1287e0d9","updated":"2017-05-22 12:54:08.000000000","message":"Okay, cool.  That\u0027s (more or less) what I did in PS21.  Thanks!","commit_id":"52c26fa6e5e249bf2d1626c9cbd725e4d249f564"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"c89f7092f5e615a70906988daf5e440c1aa3ad2d","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        return self.Glance(keystoneclient)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    class Keystone(object):"},{"line_number":75,"context_line":"        def __init__(self,"},{"line_number":76,"context_line":"                     auth_url,"},{"line_number":77,"context_line":"                     username,"},{"line_number":78,"context_line":"                     password,"},{"line_number":79,"context_line":"                     project_name):"},{"line_number":80,"context_line":"            loader \u003d loading.get_plugin_loader(\"password\")"},{"line_number":81,"context_line":"            auth \u003d loader.load_from_options("},{"line_number":82,"context_line":"                auth_url\u003dauth_url,"}],"source_content_type":"text/x-python","patch_set":20,"id":"bff0334d_e5de893c","line":79,"range":{"start_line":75,"start_character":26,"end_line":79,"end_character":33},"updated":"2017-04-11 17:16:13.000000000","message":"would prefer use of **kwargs here","commit_id":"52c26fa6e5e249bf2d1626c9cbd725e4d249f564"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e8d9538f1486dce4b6357ac186f68f6b526b2734","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        return self.Glance(keystoneclient)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    class Keystone(object):"},{"line_number":75,"context_line":"        def __init__(self,"},{"line_number":76,"context_line":"                     auth_url,"},{"line_number":77,"context_line":"                     username,"},{"line_number":78,"context_line":"                     password,"},{"line_number":79,"context_line":"                     project_name):"},{"line_number":80,"context_line":"            loader \u003d loading.get_plugin_loader(\"password\")"},{"line_number":81,"context_line":"            auth \u003d loader.load_from_options("},{"line_number":82,"context_line":"                auth_url\u003dauth_url,"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_e4ee1187","line":79,"range":{"start_line":75,"start_character":26,"end_line":79,"end_character":33},"in_reply_to":"bff0334d_e5de893c","updated":"2017-05-18 22:33:35.000000000","message":"Done","commit_id":"52c26fa6e5e249bf2d1626c9cbd725e4d249f564"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"c89f7092f5e615a70906988daf5e440c1aa3ad2d","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                     password,"},{"line_number":79,"context_line":"                     project_name):"},{"line_number":80,"context_line":"            loader \u003d loading.get_plugin_loader(\"password\")"},{"line_number":81,"context_line":"            auth \u003d loader.load_from_options("},{"line_number":82,"context_line":"                auth_url\u003dauth_url,"},{"line_number":83,"context_line":"                username\u003dusername,"},{"line_number":84,"context_line":"                password\u003dpassword,"},{"line_number":85,"context_line":"                project_name\u003dproject_name)"},{"line_number":86,"context_line":"            self.session \u003d session.Session(auth\u003dauth)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    class Glance(object):"}],"source_content_type":"text/x-python","patch_set":20,"id":"bff0334d_a5e4010e","line":85,"range":{"start_line":81,"start_character":44,"end_line":85,"end_character":41},"updated":"2017-04-11 17:16:13.000000000","message":"would prefer use of **kwargs here too","commit_id":"52c26fa6e5e249bf2d1626c9cbd725e4d249f564"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e8d9538f1486dce4b6357ac186f68f6b526b2734","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                     password,"},{"line_number":79,"context_line":"                     project_name):"},{"line_number":80,"context_line":"            loader \u003d loading.get_plugin_loader(\"password\")"},{"line_number":81,"context_line":"            auth \u003d loader.load_from_options("},{"line_number":82,"context_line":"                auth_url\u003dauth_url,"},{"line_number":83,"context_line":"                username\u003dusername,"},{"line_number":84,"context_line":"                password\u003dpassword,"},{"line_number":85,"context_line":"                project_name\u003dproject_name)"},{"line_number":86,"context_line":"            self.session \u003d session.Session(auth\u003dauth)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    class Glance(object):"}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_a4001936","line":85,"range":{"start_line":81,"start_character":44,"end_line":85,"end_character":41},"in_reply_to":"bff0334d_a5e4010e","updated":"2017-05-18 22:33:35.000000000","message":"Done","commit_id":"52c26fa6e5e249bf2d1626c9cbd725e4d249f564"},{"author":{"_account_id":2537,"name":"Nikhil Komawar","email":"nik.komawar@gmail.com","username":"nikhil-komawar"},"change_message_id":"a8babde0160dcae1e1a991fcd1e6978f02188281","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import glanceclient"},{"line_number":14,"context_line":"from keystoneauth1 import loading"},{"line_number":15,"context_line":"from keystoneauth1 import session"},{"line_number":16,"context_line":"import os"},{"line_number":17,"context_line":"import os_client_config"},{"line_number":18,"context_line":"from tempest.lib.cli import base"}],"source_content_type":"text/x-python","patch_set":22,"id":"ff0f0b1f_b77b068a","line":15,"range":{"start_line":13,"start_character":0,"end_line":15,"end_character":33},"updated":"2017-05-24 20:33:22.000000000","message":"these lines should be after line #17 ideally","commit_id":"03900522d4816fe5dc2958fa1eb30ab447cc8ee5"}],"glanceclient/tests/functional/test_http_headers.py":[{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"458c2feae55f39bae8d7dd983c5a54c7bc63c847","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"class HttpHeadersTest(base.ClientTestBase):"},{"line_number":24,"context_line":"    \"\"\"Test proper handling of Content-Type headers."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    encode_headers() must be called as late as possible before a request"},{"line_number":27,"context_line":"    is sent. If this principle is violated, and if any changes are"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a6eadb0_35429aae","line":24,"updated":"2016-12-16 23:20:13.000000000","message":"consider doc on the method rather than the class so that the class could more easily be expanded in the future with additional tests if needed.","commit_id":"ad261fdf6c5c00282c8fbea3edc3564716405ede"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"458c2feae55f39bae8d7dd983c5a54c7bc63c847","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    plus application/octet-stream). The request will go out the door"},{"line_number":34,"context_line":"    with only one of them chosen seemingly at random. This test uses"},{"line_number":35,"context_line":"    a call to update() because it sets the following header:"},{"line_number":36,"context_line":"    Content-Type: application/openstack-images-v2.1-json-patch."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    This situation only occurs in python3. This test will never fail in"},{"line_number":39,"context_line":"    python2. Even in python3 it is intermittent because of the random"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a6eadb0_908a9c62","line":36,"range":{"start_line":36,"start_character":18,"end_line":36,"end_character":62},"updated":"2016-12-16 23:20:13.000000000","message":"This seems like a value which will vary over time, leading the doc to be out of date due. Am I right about that? If so, reword to use this as an example rather than an expectation.","commit_id":"ad261fdf6c5c00282c8fbea3edc3564716405ede"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"458c2feae55f39bae8d7dd983c5a54c7bc63c847","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    There is no test against the CLI because it swallows the error."},{"line_number":43,"context_line":"    \"\"\""},{"line_number":44,"context_line":"    def test_encode_headers_python(self):"},{"line_number":45,"context_line":"        keystoneclient \u003d base.ClientTestBase.Keystone("},{"line_number":46,"context_line":"            auth_url\u003dself.creds[\"auth_url\"],"},{"line_number":47,"context_line":"            username\u003dself.creds[\"username\"],"},{"line_number":48,"context_line":"            password\u003dself.creds[\"password\"],"},{"line_number":49,"context_line":"            project_name\u003dself.creds[\"project_name\"])"},{"line_number":50,"context_line":"        glanceclient \u003d base.ClientTestBase.Glance(keystoneclient)"},{"line_number":51,"context_line":"        image \u003d glanceclient.find(IMAGE[\"name\"])"},{"line_number":52,"context_line":"        if image:"},{"line_number":53,"context_line":"            print(\"deleting\")"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a6eadb0_951a8ec4","line":50,"range":{"start_line":45,"start_character":0,"end_line":50,"end_character":65},"updated":"2016-12-16 23:20:13.000000000","message":"all of this seems like it should be available in a convenience function/method in base.py","commit_id":"ad261fdf6c5c00282c8fbea3edc3564716405ede"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"458c2feae55f39bae8d7dd983c5a54c7bc63c847","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        glanceclient \u003d base.ClientTestBase.Glance(keystoneclient)"},{"line_number":51,"context_line":"        image \u003d glanceclient.find(IMAGE[\"name\"])"},{"line_number":52,"context_line":"        if image:"},{"line_number":53,"context_line":"            print(\"deleting\")"},{"line_number":54,"context_line":"            glanceclient.glance.images.delete(image.id)"},{"line_number":55,"context_line":"        image \u003d glanceclient.glance.images.create(name\u003dIMAGE[\"name\"])"},{"line_number":56,"context_line":"        self.assertTrue(image.status \u003d\u003d \"queued\")"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a6eadb0_f58102c4","line":53,"updated":"2016-12-16 23:20:13.000000000","message":"we don\u0027t want a print statement in the test","commit_id":"ad261fdf6c5c00282c8fbea3edc3564716405ede"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"458c2feae55f39bae8d7dd983c5a54c7bc63c847","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            glanceclient.glance.images.delete(image.id)"},{"line_number":55,"context_line":"        image \u003d glanceclient.glance.images.create(name\u003dIMAGE[\"name\"])"},{"line_number":56,"context_line":"        self.assertTrue(image.status \u003d\u003d \"queued\")"},{"line_number":57,"context_line":"        try:"},{"line_number":58,"context_line":"            image \u003d glanceclient.glance.images.update(image.id,"},{"line_number":59,"context_line":"                                                      disk_format\u003d\"qcow2\")"},{"line_number":60,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a6eadb0_90661cb9","line":57,"updated":"2016-12-16 23:20:13.000000000","message":"With this being intermittent behavior due to conflicting headers I might suggest multiple attempts, maybe 6, to ensure we have a fair chance of having the problem caught.","commit_id":"ad261fdf6c5c00282c8fbea3edc3564716405ede"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"140c75056c181be775988b94313ff9395479bc0b","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        There is no test against the CLI because it swallows the error."},{"line_number":47,"context_line":"        \"\"\""},{"line_number":48,"context_line":"        # the failure is intermittent - try up to 6 times"},{"line_number":49,"context_line":"        for attempt in range(0, 6):"},{"line_number":50,"context_line":"            glanceclient \u003d self.glance_pyclient()"},{"line_number":51,"context_line":"            image \u003d glanceclient.find(IMAGE[\"name\"])"},{"line_number":52,"context_line":"            if image:"}],"source_content_type":"text/x-python","patch_set":13,"id":"1a6eadb0_7c600436","line":49,"updated":"2016-12-20 17:02:23.000000000","message":"I was expecting that the Update operation could be retried without resorting to either a sleep, nor repeating the rest of the work. Is that not the case?","commit_id":"d17d9617e0c324683e2eb149d318584b5b65234d"}],"glanceclient/tests/unit/test_http.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"de5ce2d1e21a13d480b16a45046af5221ee14cd6","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        data \u003d \u0027[{\"value\": \"qcow2\", \"path\": \"/disk_format\", \"op\": \"replace\"}]\u0027"},{"line_number":230,"context_line":"        self.mock.patch(self.endpoint + path)"},{"line_number":231,"context_line":"        sess_http_client \u003d self._create_session_client()"},{"line_number":232,"context_line":"        sess_http_client.patch(path, headers\u003dheaders, data\u003ddata)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def test_raw_request(self):"},{"line_number":235,"context_line":"        \"\"\"Verify the path being used for HTTP requests reflects accurately.\"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"bff0334d_b4804a8d","line":232,"updated":"2017-04-06 12:54:04.000000000","message":"This is kind of a weird test because it doesn\u0027t contain any assertions.  I take it you\u0027re counting on the patch call throwing an exception if the Content-Type you set here is replaced by some other header?  I think it may be a good idea to do something like the test on line 303, where you make the patch call in a try and unconditionally fail with an appropriate message if you get the exception you expect.  That way we can distinguish a failure due to what this test is looking for vs. an exception that occurred for some other reason.","commit_id":"52c26fa6e5e249bf2d1626c9cbd725e4d249f564"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e8d9538f1486dce4b6357ac186f68f6b526b2734","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        data \u003d \u0027[{\"value\": \"qcow2\", \"path\": \"/disk_format\", \"op\": \"replace\"}]\u0027"},{"line_number":230,"context_line":"        self.mock.patch(self.endpoint + path)"},{"line_number":231,"context_line":"        sess_http_client \u003d self._create_session_client()"},{"line_number":232,"context_line":"        sess_http_client.patch(path, headers\u003dheaders, data\u003ddata)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def test_raw_request(self):"},{"line_number":235,"context_line":"        \"\"\"Verify the path being used for HTTP requests reflects accurately.\"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"ff0f0b1f_faaa2c83","line":232,"in_reply_to":"bff0334d_a5f7618b","updated":"2017-05-18 22:33:35.000000000","message":"Also turns out this test still passed without the fix.\n\nChanged to validate the request headers as they\u0027re leaving glanceclient.","commit_id":"52c26fa6e5e249bf2d1626c9cbd725e4d249f564"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"c89f7092f5e615a70906988daf5e440c1aa3ad2d","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        data \u003d \u0027[{\"value\": \"qcow2\", \"path\": \"/disk_format\", \"op\": \"replace\"}]\u0027"},{"line_number":230,"context_line":"        self.mock.patch(self.endpoint + path)"},{"line_number":231,"context_line":"        sess_http_client \u003d self._create_session_client()"},{"line_number":232,"context_line":"        sess_http_client.patch(path, headers\u003dheaders, data\u003ddata)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def test_raw_request(self):"},{"line_number":235,"context_line":"        \"\"\"Verify the path being used for HTTP requests reflects accurately.\"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"bff0334d_a5f7618b","line":232,"in_reply_to":"bff0334d_b4804a8d","updated":"2017-04-11 17:16:13.000000000","message":"+1","commit_id":"52c26fa6e5e249bf2d1626c9cbd725e4d249f564"}]}
