)]}'
{"swiftclient/client.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"2e181466823451ac6da9ae2ab745f7b933bf7408","unresolved":false,"context_lines":[{"line_number":1260,"context_line":"                    raise"},{"line_number":1261,"context_line":"                if err.http_status \u003d\u003d 401:"},{"line_number":1262,"context_line":"                    self.url \u003d self.token \u003d \\"},{"line_number":1263,"context_line":"                        self.os_options[\u0027object_storage_url\u0027] \u003d \\"},{"line_number":1264,"context_line":"                        self.os_options[\u0027auth_token\u0027] \u003d None"},{"line_number":1265,"context_line":"                    if retried_auth or not all((self.authurl,"},{"line_number":1266,"context_line":"                                                self.user,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9aa7fdbe_32989c77","line":1263,"updated":"2014-10-27 16:45:58.000000000","message":"not sure I agree with nulling object_storage_url - we could end up returning a different object to the one the caller intended, without the caller knowing.","commit_id":"8545ef99b573e088ac5f95579a46b5babcf3d5e8"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"27d57629cedb8735b60e09cfa259282e6b60a413","unresolved":false,"context_lines":[{"line_number":380,"context_line":"        if (os_options.get(\u0027object_storage_url\u0027) and"},{"line_number":381,"context_line":"                os_options.get(\u0027auth_token\u0027)):"},{"line_number":382,"context_line":"            return (os_options.get(\u0027object_storage_url\u0027),"},{"line_number":383,"context_line":"                    os_options.get(\u0027auth_token\u0027))"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"        # We are handling a special use case here where the user argument"},{"line_number":386,"context_line":"        # specifies both the user name and tenant name in the form tenant:user"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_7a82d7c8","side":"PARENT","line":383,"updated":"2014-10-28 17:57:34.000000000","message":"ok if we are satisfied that nothing calls get_auth direct and may have expected this behavior? but one call I can see is from get_capabilities","commit_id":"025da14326d29051119fff50424748e41bf4be42"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a304ce113f7b616929b0536fc5b321fc87931816","unresolved":false,"context_lines":[{"line_number":380,"context_line":"        if (os_options.get(\u0027object_storage_url\u0027) and"},{"line_number":381,"context_line":"                os_options.get(\u0027auth_token\u0027)):"},{"line_number":382,"context_line":"            return (os_options.get(\u0027object_storage_url\u0027),"},{"line_number":383,"context_line":"                    os_options.get(\u0027auth_token\u0027))"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"        # We are handling a special use case here where the user argument"},{"line_number":386,"context_line":"        # specifies both the user name and tenant name in the form tenant:user"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_ae27a4c8","side":"PARENT","line":383,"in_reply_to":"9aa7fdbe_7a82d7c8","updated":"2014-10-28 18:20:49.000000000","message":"I don\u0027t really think the behavior of returning the pre-cached token on a subsequent call to get_auth after a 401 is reasonable.  Much more likely to be a source of bugs than an expected behavior.\n\ni had reasoned that since the return at the bottom always sends back the os_options\u0027 object_storage_url that the early bail was not necessary.  I think this early exit was one of the biggest sources of confusion for the code paths related to these options and I\u0027ll be very glad to see it go.\n\nI don\u0027t think that get_capabilities was \"relying\" on this as much as exposing the unexpected behavior of this combination of parameters allowed *get*_auth to \"succeed\" even in the face of an incomplete set of auth params, maybe if the function was named get_auth_or_pretend_to_auth_in_the_v2_case_trolololo.  Improving get_capabilities to skip a call to auth if it already has a storage_url is quite reasonable and probably within scope for this patch.","commit_id":"025da14326d29051119fff50424748e41bf4be42"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"27d57629cedb8735b60e09cfa259282e6b60a413","unresolved":false,"context_lines":[{"line_number":1273,"context_line":"                        raise"},{"line_number":1274,"context_line":"                    retried_auth \u003d True"},{"line_number":1275,"context_line":"                    # TODO: can we lift reset_func here so we can continue"},{"line_number":1276,"context_line":"                    # without a sleep?"},{"line_number":1277,"context_line":"                elif err.http_status \u003d\u003d 408:"},{"line_number":1278,"context_line":"                    self.http_conn \u003d None"},{"line_number":1279,"context_line":"                elif 500 \u003c\u003d err.http_status \u003c\u003d 599:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_dfce5559","line":1276,"updated":"2014-10-28 17:57:34.000000000","message":"if you mean than when reset _func is going to raise exception, then don\u0027t sleep first, - that makes sense, but don\u0027t we need to call reset_func for other status codes too?","commit_id":"83f89958909fa170f2d8d8937998cc8c0c4bd19c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a304ce113f7b616929b0536fc5b321fc87931816","unresolved":false,"context_lines":[{"line_number":1273,"context_line":"                        raise"},{"line_number":1274,"context_line":"                    retried_auth \u003d True"},{"line_number":1275,"context_line":"                    # TODO: can we lift reset_func here so we can continue"},{"line_number":1276,"context_line":"                    # without a sleep?"},{"line_number":1277,"context_line":"                elif err.http_status \u003d\u003d 408:"},{"line_number":1278,"context_line":"                    self.http_conn \u003d None"},{"line_number":1279,"context_line":"                elif 500 \u003c\u003d err.http_status \u003c\u003d 599:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_2e2e54fb","line":1276,"in_reply_to":"9aa7fdbe_dfce5559","updated":"2014-10-28 18:20:49.000000000","message":"I ment the only thing we get by falling out of the loop instead of a continue is currently the reset function - which is needed for the retry.  I was suggesting we could do that hear and then continue without having to sleep on reauth (no need to back off on reauth I think?).\n\nAnother approach would be to set a flag to skip sleep and then check it again at the bottom of the loop (and reset it before we roll over).\n\ni don\u0027t want to drag it into this patch, but I think it\u0027s worth the mention.  I\u0027ll try to clean up the comment.","commit_id":"83f89958909fa170f2d8d8937998cc8c0c4bd19c"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"27d57629cedb8735b60e09cfa259282e6b60a413","unresolved":false,"context_lines":[{"line_number":1282,"context_line":"                    pass"},{"line_number":1283,"context_line":"                else:"},{"line_number":1284,"context_line":"                    logger.exception(err)"},{"line_number":1285,"context_line":"                    raise"},{"line_number":1286,"context_line":"            sleep(backoff)"},{"line_number":1287,"context_line":"            backoff \u003d min(backoff * 2, self.max_backoff)"},{"line_number":1288,"context_line":"            if reset_func:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_1fec5dba","line":1285,"updated":"2014-10-28 17:57:34.000000000","message":"could reset_func be moved ahead of the sleep here?","commit_id":"83f89958909fa170f2d8d8937998cc8c0c4bd19c"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"a304ce113f7b616929b0536fc5b321fc87931816","unresolved":false,"context_lines":[{"line_number":1282,"context_line":"                    pass"},{"line_number":1283,"context_line":"                else:"},{"line_number":1284,"context_line":"                    logger.exception(err)"},{"line_number":1285,"context_line":"                    raise"},{"line_number":1286,"context_line":"            sleep(backoff)"},{"line_number":1287,"context_line":"            backoff \u003d min(backoff * 2, self.max_backoff)"},{"line_number":1288,"context_line":"            if reset_func:"}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa7fdbe_4e7f18e0","line":1285,"in_reply_to":"9aa7fdbe_1fec5dba","updated":"2014-10-28 18:20:49.000000000","message":"I don\u0027t think the order matters, when i was writing tests that hit the reauth path the sleep was both unexpected and annoying.  The fix for the todo is to remove the call to sleep on the reauth case, but keep it on other status codes.  maybe just checking the err.http_status before calling sleep?  Again, not appropriate for this patch - maybe a bug report would be better than the TODO.","commit_id":"83f89958909fa170f2d8d8937998cc8c0c4bd19c"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"e849c3654b686350f5c23db79b8f639b7aeeef79","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"    :returns: a tuple, (storage_url, token)"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"    N.B. if the optional os_options paramater includes an non-empty"},{"line_number":366,"context_line":"    \u0027object_storage_url\u0027 key it will override the the default storage url"},{"line_number":367,"context_line":"    returned by the auth service."},{"line_number":368,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_b2c9b87b","line":365,"updated":"2014-12-15 17:55:33.000000000","message":"latin?","commit_id":"be8304f6549c22e5f96b25ab542c3d025a3b53b9"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"e849c3654b686350f5c23db79b8f639b7aeeef79","unresolved":false,"context_lines":[{"line_number":1203,"context_line":"                and len(self.http_conn) \u003e 1:"},{"line_number":1204,"context_line":"            conn \u003d self.http_conn[1]"},{"line_number":1205,"context_line":"            if hasattr(conn, \u0027close\u0027) and callable(conn.close):"},{"line_number":1206,"context_line":"                # XXX: Our HTTPConnection object has no close, should be"},{"line_number":1207,"context_line":"                # trying to close the requests.Session here?"},{"line_number":1208,"context_line":"                conn.close()"},{"line_number":1209,"context_line":"                self.http_conn \u003d None"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a961159_12d28c34","line":1206,"updated":"2014-12-15 17:55:33.000000000","message":"cleanup?","commit_id":"be8304f6549c22e5f96b25ab542c3d025a3b53b9"}],"tests/unit/test_shell.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"11c4894a30eba051c73de4ccf4b48dd40254fede","unresolved":false,"context_lines":[{"line_number":1134,"context_line":"                argv \u003d [\u0027\u0027, \u0027stat\u0027]"},{"line_number":1135,"context_line":"                swiftclient.shell.main(argv)"},{"line_number":1136,"context_line":"        self.assertRequests(["},{"line_number":1137,"context_line":"            (\u0027HEAD\u0027, url),"},{"line_number":1138,"context_line":"        ])"},{"line_number":1139,"context_line":""},{"line_number":1140,"context_line":"        # and again with re-auth"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_8dafebe2","line":1137,"updated":"2014-11-12 16:33:29.000000000","message":"include x-auth-token header in assertion, same as line 1180","commit_id":"40a4b4acc61f855f2975d2b008828d13460b27cd"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"11c4894a30eba051c73de4ccf4b48dd40254fede","unresolved":false,"context_lines":[{"line_number":1142,"context_line":"        pre_auth_env[\u0027OS_AUTH_TOKEN\u0027] \u003d \u0027expired\u0027"},{"line_number":1143,"context_line":"        fake_conn \u003d self.fake_http_connection(401, 200, 200, headers\u003d{"},{"line_number":1144,"context_line":"            \u0027x-auth-token\u0027: token,"},{"line_number":1145,"context_line":"            \u0027x-storage-url\u0027: url,"},{"line_number":1146,"context_line":"        })"},{"line_number":1147,"context_line":"        with mock.patch.multiple(\u0027swiftclient.client\u0027,"},{"line_number":1148,"context_line":"                                 http_connection\u003dfake_conn,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_4d7d036e","line":1145,"updated":"2014-11-12 16:33:29.000000000","message":"make \u0027x-storage-url\u0027 different from url to verify that it is NOT used","commit_id":"40a4b4acc61f855f2975d2b008828d13460b27cd"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"11c4894a30eba051c73de4ccf4b48dd40254fede","unresolved":false,"context_lines":[{"line_number":1182,"context_line":""},{"line_number":1183,"context_line":"        # and again with re-auth"},{"line_number":1184,"context_line":"        os_environ \u003d {"},{"line_number":1185,"context_line":"            \u0027OS_IDENTITY_API_VERSION\u0027: \u00272.0\u0027,"},{"line_number":1186,"context_line":"            \u0027OS_AUTH_URL\u0027: \u0027https://keystone.example.com/v2.0/\u0027,"},{"line_number":1187,"context_line":"            \u0027OS_TENANT_NAME\u0027: \u0027demo\u0027,"},{"line_number":1188,"context_line":"            \u0027OS_USERNAME\u0027: \u0027demo\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_6dce3fb6","line":1185,"updated":"2014-11-12 16:33:29.000000000","message":"should be OS_AUTH_VERSION (although its not required which is why test passes anyway)","commit_id":"40a4b4acc61f855f2975d2b008828d13460b27cd"}],"tests/unit/test_swiftclient.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"11c4894a30eba051c73de4ccf4b48dd40254fede","unresolved":false,"context_lines":[{"line_number":1258,"context_line":"            (\u0027HEAD\u0027, \u0027/v1/AUTH_user\u0027, \u0027\u0027, {\u0027x-auth-token\u0027: \u0027token\u0027}),"},{"line_number":1259,"context_line":"        ])"},{"line_number":1260,"context_line":""},{"line_number":1261,"context_line":"    def test_preauth_url_trumps_auth_url(self):"},{"line_number":1262,"context_line":"        storage_url \u003d \u0027http://storage.example.com/v1/AUTH_pre_url\u0027"},{"line_number":1263,"context_line":"        conn \u003d c.Connection("},{"line_number":1264,"context_line":"            \u0027http://auth.example.com\u0027, \u0027user\u0027, \u0027password\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_f9fe79ad","line":1261,"updated":"2014-11-12 16:33:29.000000000","message":"seems unnecessary: verifies a subset of test_reauth_preauth","commit_id":"40a4b4acc61f855f2975d2b008828d13460b27cd"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"11c4894a30eba051c73de4ccf4b48dd40254fede","unresolved":false,"context_lines":[{"line_number":1279,"context_line":"            (\u0027HEAD\u0027, \u0027/v1/AUTH_pre_url\u0027, \u0027\u0027, {\u0027x-auth-token\u0027: \u0027post_token\u0027}),"},{"line_number":1280,"context_line":"        ])"},{"line_number":1281,"context_line":""},{"line_number":1282,"context_line":"    def test_os_preauth_url_trumps_auth_url(self):"},{"line_number":1283,"context_line":"        storage_url \u003d \u0027http://storage.example.com/v1/AUTH_pre_url\u0027"},{"line_number":1284,"context_line":"        os_preauth_options \u003d {"},{"line_number":1285,"context_line":"            \u0027tenant_name\u0027: \u0027demo\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_d9037db6","line":1282,"updated":"2014-11-12 16:33:29.000000000","message":"seems unnecessary: verifies a subset of test_reauth_os_preauth","commit_id":"40a4b4acc61f855f2975d2b008828d13460b27cd"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"11c4894a30eba051c73de4ccf4b48dd40254fede","unresolved":false,"context_lines":[{"line_number":1287,"context_line":"        }"},{"line_number":1288,"context_line":"        conn \u003d c.Connection(\u0027http://auth.example.com\u0027, \u0027user\u0027, \u0027password\u0027,"},{"line_number":1289,"context_line":"                            os_options\u003dos_preauth_options, auth_version\u003d2)"},{"line_number":1290,"context_line":"        storage_url \u003d \u0027http://storage.example.com/v1/AUTH_user\u0027"},{"line_number":1291,"context_line":"        fake_keystone \u003d fake_get_auth_keystone("},{"line_number":1292,"context_line":"            storage_url\u003d\u0027http://storage.example.com/v1/AUTH_post_url\u0027,"},{"line_number":1293,"context_line":"            token\u003d\u0027post_token\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a890539_1906e5ce","line":1290,"updated":"2014-11-12 16:33:29.000000000","message":"storage_url is unused after this assignment","commit_id":"40a4b4acc61f855f2975d2b008828d13460b27cd"}]}
