)]}'
{"tempest/api/compute/test_versions.py":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"d79a5713d73c2f312d02205af263e05b9344802b","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"        \"\"\""},{"line_number":32,"context_line":"        result \u003d self.versions_client.list_versions()"},{"line_number":33,"context_line":"        self.assertIn(\u0027versions\u0027, result)"},{"line_number":34,"context_line":"        versions \u003d result[\u0027versions\u0027]"},{"line_number":35,"context_line":"        # NOTE(sdague): at a later point we may want to loosen this"},{"line_number":36,"context_line":"        # up, but for now this should be true of all Novas deployed."}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_51019669","line":33,"updated":"2016-10-18 22:36:05.000000000","message":"This is already checked in JSON-Schema..\n\nhttps://github.com/openstack/tempest/blob/master/tempest/lib/api_schema/response/compute/v2_1/versions.py#L64","commit_id":"5c2ab33b2d915691031f6413a3e6bc6b56d95ce6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d7be056e6a63c93d140ed471002717cf713b9791","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"        \"\"\""},{"line_number":32,"context_line":"        result \u003d self.versions_client.list_versions()"},{"line_number":33,"context_line":"        self.assertIn(\u0027versions\u0027, result)"},{"line_number":34,"context_line":"        versions \u003d result[\u0027versions\u0027]"},{"line_number":35,"context_line":"        # NOTE(sdague): at a later point we may want to loosen this"},{"line_number":36,"context_line":"        # up, but for now this should be true of all Novas deployed."}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_9e92414a","line":33,"in_reply_to":"fa6399be_51019669","updated":"2016-10-19 12:48:03.000000000","message":"I wasn\u0027t getting that, I was getting a KeyError, are you sure the jsonschema there is used?","commit_id":"5c2ab33b2d915691031f6413a3e6bc6b56d95ce6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"79da1c9acc01a1bbe602d453947cafaa9e56a2dd","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"        \"\"\""},{"line_number":32,"context_line":"        result \u003d self.versions_client.list_versions()"},{"line_number":33,"context_line":"        self.assertIn(\u0027versions\u0027, result)"},{"line_number":34,"context_line":"        versions \u003d result[\u0027versions\u0027]"},{"line_number":35,"context_line":"        # NOTE(sdague): at a later point we may want to loosen this"},{"line_number":36,"context_line":"        # up, but for now this should be true of all Novas deployed."}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_c141380d","line":33,"in_reply_to":"fa6399be_7eee4d8c","updated":"2016-10-19 12:55:25.000000000","message":"I see the issue:\n\nhttps://github.com/openstack/tempest/blob/13.0.0/tempest/lib/common/rest_client.py#L885\n\n^ only checks the response if it\u0027s a success response. If you get a 401 back it doesn\u0027t fail at all, or check the status code against the expected response in the schema. That looks like a bug.","commit_id":"5c2ab33b2d915691031f6413a3e6bc6b56d95ce6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"47bc00ee5622c1c52a2bcec5c9741275ea86ae26","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"        \"\"\""},{"line_number":32,"context_line":"        result \u003d self.versions_client.list_versions()"},{"line_number":33,"context_line":"        self.assertIn(\u0027versions\u0027, result)"},{"line_number":34,"context_line":"        versions \u003d result[\u0027versions\u0027]"},{"line_number":35,"context_line":"        # NOTE(sdague): at a later point we may want to loosen this"},{"line_number":36,"context_line":"        # up, but for now this should be true of all Novas deployed."}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_7eee4d8c","line":33,"in_reply_to":"fa6399be_9e92414a","updated":"2016-10-19 12:51:44.000000000","message":"I guess it should hit it right here:\n\nhttps://github.com/openstack/tempest/blob/13.0.0/tempest/lib/services/compute/versions_client.py#L44\n\nOh now I remember what the problem was. So our compute endpoint required a token, so the raw GET request failed with a 401. I\u0027m not sure how we got through validate_response, but we did and eventually got here where we\u0027d get the KeyError because we never got the versions back.\n\nThat seems like a separate issue for the validation. I can drop this though if necessary, I was able to workaround it by running tempest with debug\u003dTrue.","commit_id":"5c2ab33b2d915691031f6413a3e6bc6b56d95ce6"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"9201f86b342a96d4cb7591dcc6cc139821ded9e0","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"        \"\"\""},{"line_number":32,"context_line":"        result \u003d self.versions_client.list_versions()"},{"line_number":33,"context_line":"        self.assertIn(\u0027versions\u0027, result)"},{"line_number":34,"context_line":"        versions \u003d result[\u0027versions\u0027]"},{"line_number":35,"context_line":"        # NOTE(sdague): at a later point we may want to loosen this"},{"line_number":36,"context_line":"        # up, but for now this should be true of all Novas deployed."}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_ea77e8d1","line":33,"in_reply_to":"fa6399be_c141380d","updated":"2016-10-19 17:17:30.000000000","message":"Ah, I got the point.\n\nMost clients use requrest() which calls _error_checker() and the _error_checker() translates an error status code to the corresponding exception(like 401 -\u003e exceptions.Unauthorized).\n\nHowever, list_versions() uses raw_request() instead of request() and the above translation doesn\u0027t happen.\nSo I guess a root problem here is lack of the error translation.","commit_id":"5c2ab33b2d915691031f6413a3e6bc6b56d95ce6"}]}
