)]}'
{"glance_store/multi_backend.py":[{"author":{"_account_id":28595,"name":"Victor Coutellier","email":"victor.coutellier@gmail.com","username":"alistarle"},"change_message_id":"89d8b91052776ad3927453f20e10e263fe36f580","unresolved":false,"context_lines":[{"line_number":517,"context_line":"        try:"},{"line_number":518,"context_line":"            if not url.startswith(backends[backend]):"},{"line_number":519,"context_line":"                continue"},{"line_number":520,"context_line":"            location.get_location_from_uri_and_backend(url, backend, conf\u003dconf)"},{"line_number":521,"context_line":"            return backend"},{"line_number":522,"context_line":"        except (exceptions.UnknownScheme):"},{"line_number":523,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_da742d9c","line":520,"updated":"2019-05-05 12:23:23.000000000","message":"This function will only verify the scheme of the backend, not if the file is really present, this would lead to an error if you use multiple backend of the same type (ex: 2 rbd backend), and the file is on the second backend, so the first one will be returned by your function, and glance will still trigger a 400 Invalid location when trying to effectively check the file later in the process.\n\nI recommend to use :\n\"get_size_from_uri_and_backend(url, backend)\" instead, as it would really check the size of the file in the backend, and trigger an error is not found","commit_id":"bf54b0e42f68507e2bb8bbc9294859a657034015"},{"author":{"_account_id":28595,"name":"Victor Coutellier","email":"victor.coutellier@gmail.com","username":"alistarle"},"change_message_id":"89d8b91052776ad3927453f20e10e263fe36f580","unresolved":false,"context_lines":[{"line_number":519,"context_line":"                continue"},{"line_number":520,"context_line":"            location.get_location_from_uri_and_backend(url, backend, conf\u003dconf)"},{"line_number":521,"context_line":"            return backend"},{"line_number":522,"context_line":"        except (exceptions.UnknownScheme):"},{"line_number":523,"context_line":"            continue"},{"line_number":524,"context_line":"    raise exceptions.UnknownScheme(_(\"URL cannot be handled by any \""},{"line_number":525,"context_line":"                                     \"configured backend\"))"}],"source_content_type":"text/x-python","patch_set":2,"id":"dfbec78f_9aab15d5","line":522,"updated":"2019-05-05 12:23:23.000000000","message":"Following by first comment, you need to check more error, not only the \"UnknownScheme\" one.\n\nI tried at least with the following, regarding to the currently implemented drivers :\nexcept (exceptions.UnknownScheme, exceptions.NotFound, exceptions.BadStoreUri):","commit_id":"bf54b0e42f68507e2bb8bbc9294859a657034015"}],"glance_store/tests/unit/test_multistore.py":[{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"560f2b06d780394d538998932c7dfda1cc31ea08","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from glance_store.tests import base"},{"line_number":22,"context_line":"from glance_store.tests.unit import test_store_capabilities"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from oslo_config import cfg"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class TestMultiStore(base.MultiStoreBaseTest,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_a8c85854","line":24,"updated":"2019-02-15 13:13:54.000000000","message":"nit: This import is a third party import so it should be grouped with the fixtures import above the local import grouping.","commit_id":"bf54b0e42f68507e2bb8bbc9294859a657034015"}]}
