)]}'
{"marconi/proxy/transport/wsgi/queues.py":[{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"4c8a1cf924b9546534f085e4a142f2fe19fa3196","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        # scenario, the queue will be recreated on another partition,"},{"line_number":129,"context_line":"        # which is reasonable, since the user meant to both DELETE and"},{"line_number":130,"context_line":"        # PUT That queue."},{"line_number":131,"context_line":"        if self._catalogue.exists(project, queue):"},{"line_number":132,"context_line":"            response.status \u003d falcon.HTTP_204"},{"line_number":133,"context_line":"            return"},{"line_number":134,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAS3%2F%2FIeA%3D","line":131,"updated":"2013-10-03 19:00:56.000000000","message":"I can haz teh cache?","commit_id":"115d1dc6815ec63eef494da8d5a3df45bdb5521d"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"4c8a1cf924b9546534f085e4a142f2fe19fa3196","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        # which is reasonable, since the user meant to both DELETE and"},{"line_number":130,"context_line":"        # PUT That queue."},{"line_number":131,"context_line":"        if self._catalogue.exists(project, queue):"},{"line_number":132,"context_line":"            response.status \u003d falcon.HTTP_204"},{"line_number":133,"context_line":"            return"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        target \u003d partition.weighted_select(self._partitions.list())"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAS3%2F%2FIdo%3D","line":132,"updated":"2013-10-03 19:00:56.000000000","message":"Don\u0027t you also need to set the location header before returning?","commit_id":"115d1dc6815ec63eef494da8d5a3df45bdb5521d"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"e6df678e65a23ce07049f6f41b5da6cd8788fcab","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def on_delete(self, request, response, queue):"},{"line_number":155,"context_line":"        project \u003d helpers.get_project(request)"},{"line_number":156,"context_line":"        resp \u003d self.forward(request, response, queue)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        # avoid deleting a queue if the request is bad"},{"line_number":159,"context_line":"        if resp.ok:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAS3%2F%2FIIk%3D","line":156,"updated":"2013-10-03 20:50:11.000000000","message":"Hold on - no cache invalidation is going on. I need to fix that.","commit_id":"c6fc1eab745eb3ed188c9dd76c5b392ab99ba737"}],"marconi/proxy/utils/lookup.py":[{"author":{"_account_id":6943,"name":"Zhihao Yuan","email":"zhihao.yuan@rackspace.com","username":"zyuan"},"change_message_id":"c1f6bb2ad3b96dcfbe87e1e845b9d6a2f4245409","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def _entry_key(project, queue):"},{"line_number":22,"context_line":"    return \u0027q.\u0027 + project + \u0027/\u0027 + queue"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def _partition_key(name):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FGHw%3D","line":22,"updated":"2013-10-04 14:01:07.000000000","message":"How None is being handled?","commit_id":"32aa47c87ef9f3ef4e60b65a4ce5d091d2927dae"},{"author":{"_account_id":8083,"name":"Francesco Vollero","email":"fvollero@redhat.com","username":"fvollero"},"change_message_id":"243bb7c6a6443ead205577a61874c96cf2842c51","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def _entry_key(project, queue):"},{"line_number":22,"context_line":"    return \u0027q.\u0027 + project + \u0027/\u0027 + queue"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def _partition_key(name):"},{"line_number":26,"context_line":"    return \u0027p.\u0027 + name"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FGDM%3D","line":23,"updated":"2013-10-04 14:24:40.000000000","message":"I guess a better question is: who guarantee that project or queue are not None ?","commit_id":"32aa47c87ef9f3ef4e60b65a4ce5d091d2927dae"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"5f41830b2168cca7729c668b526a0bd11df8a99e","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def _entry_key(project, queue):"},{"line_number":22,"context_line":"    return \u0027q.\u0027 + project + \u0027/\u0027 + queue"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def _partition_key(name):"},{"line_number":26,"context_line":"    return \u0027p.\u0027 + name"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FFlk%3D","line":23,"in_reply_to":"AAAAS3%2F%2FFoM%3D","updated":"2013-10-04 16:14:38.000000000","message":"Done","commit_id":"32aa47c87ef9f3ef4e60b65a4ce5d091d2927dae"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"0a4f00b6a065d14d39f499154a5af4638df79b50","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"def _entry_key(project, queue):"},{"line_number":22,"context_line":"    return \u0027q.\u0027 + project + \u0027/\u0027 + queue"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def _partition_key(name):"},{"line_number":26,"context_line":"    return \u0027p.\u0027 + name"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FFoM%3D","line":23,"in_reply_to":"AAAAS3%2F%2FGDM%3D","updated":"2013-10-04 16:12:31.000000000","message":"The project is guaranteed to have a value by marconi.proxy.utlis.helpers:get_project.\n\nThe queue name is guaranteed to have a value by falcon.\n\nI can see your point here, though. Since this is a generic utility, I should at least be asserting here. +1","commit_id":"32aa47c87ef9f3ef4e60b65a4ce5d091d2927dae"},{"author":{"_account_id":6943,"name":"Zhihao Yuan","email":"zhihao.yuan@rackspace.com","username":"zyuan"},"change_message_id":"c1f6bb2ad3b96dcfbe87e1e845b9d6a2f4245409","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    :type catalogue_controller: marconi.proxy.storage.base:Catalogue*"},{"line_number":63,"context_line":"    :param cache: cache for catalogue - updated if lookup fails"},{"line_number":64,"context_line":"    :type cache: marconi.common.cache.backends:BaseCache"},{"line_number":65,"context_line":"    :returns: True or False"},{"line_number":66,"context_line":"    :rtype: bool"},{"line_number":67,"context_line":"    \"\"\""},{"line_number":68,"context_line":"    key \u003d _entry_key(project, queue)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FGHk%3D","line":65,"updated":"2013-10-04 14:01:07.000000000","message":"True if exists...","commit_id":"32aa47c87ef9f3ef4e60b65a4ce5d091d2927dae"},{"author":{"_account_id":6943,"name":"Zhihao Yuan","email":"zhihao.yuan@rackspace.com","username":"zyuan"},"change_message_id":"c1f6bb2ad3b96dcfbe87e1e845b9d6a2f4245409","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    :rtype: bool"},{"line_number":67,"context_line":"    \"\"\""},{"line_number":68,"context_line":"    key \u003d _entry_key(project, queue)"},{"line_number":69,"context_line":"    if not cache.has_key(key):  # flake8: noqa"},{"line_number":70,"context_line":"        return try_cache_entry(project, queue,"},{"line_number":71,"context_line":"                               catalogue_controller, cache) is not None"},{"line_number":72,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FGHg%3D","line":69,"updated":"2013-10-04 14:01:07.000000000","message":"Difference from `key in cache`?","commit_id":"32aa47c87ef9f3ef4e60b65a4ce5d091d2927dae"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"0a4f00b6a065d14d39f499154a5af4638df79b50","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    :rtype: bool"},{"line_number":67,"context_line":"    \"\"\""},{"line_number":68,"context_line":"    key \u003d _entry_key(project, queue)"},{"line_number":69,"context_line":"    if not cache.has_key(key):  # flake8: noqa"},{"line_number":70,"context_line":"        return try_cache_entry(project, queue,"},{"line_number":71,"context_line":"                               catalogue_controller, cache) is not None"},{"line_number":72,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FFog%3D","line":69,"in_reply_to":"AAAAS3%2F%2FGEE%3D","updated":"2013-10-04 16:12:31.000000000","message":"\u0027key in cache\u0027 won\u0027t work because oslo.cache does not implement __contains__() for backends.","commit_id":"32aa47c87ef9f3ef4e60b65a4ce5d091d2927dae"},{"author":{"_account_id":8083,"name":"Francesco Vollero","email":"fvollero@redhat.com","username":"fvollero"},"change_message_id":"243bb7c6a6443ead205577a61874c96cf2842c51","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    :rtype: bool"},{"line_number":67,"context_line":"    \"\"\""},{"line_number":68,"context_line":"    key \u003d _entry_key(project, queue)"},{"line_number":69,"context_line":"    if not cache.has_key(key):  # flake8: noqa"},{"line_number":70,"context_line":"        return try_cache_entry(project, queue,"},{"line_number":71,"context_line":"                               catalogue_controller, cache) is not None"},{"line_number":72,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FGEE%3D","line":69,"in_reply_to":"AAAAS3%2F%2FGHg%3D","updated":"2013-10-04 14:24:40.000000000","message":"Yeah, I agree, key in cache should do the trick and is python 3.x compatible.","commit_id":"32aa47c87ef9f3ef4e60b65a4ce5d091d2927dae"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"bf16a4a3db8fbb40d4609387b581d32a512549ea","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# implied."},{"line_number":13,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":14,"context_line":"# limitations under the License."},{"line_number":15,"context_line":"\"\"\"lookup: functions to handle caching/lookup of proxy details.\"\"\""},{"line_number":16,"context_line":"import msgpack"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from marconi.proxy.storage import exceptions"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAS3%2F%2FFAM%3D","line":15,"updated":"2013-10-04 19:11:58.000000000","message":"The module name, \"lookup\" is confusing to me; not sure if others think so as well. I guess I don\u0027t have a strong association in my mind between \"lookup\" and \"cache\". \n\nWhat about just calling it \"cache\" or \"proxy_cache\", and composing all of these functions into a class that is initialized with an oslo.cache instance. Then you pass this around rather than the oslo.cache instance.\n\nPing me in IRC to discuss.","commit_id":"ee377e08bf9afa1c5404cd775c6b2d87fa8c71e1"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"d9bb23d64d717c6f8783dea3fd3a338350353df6","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# implied."},{"line_number":13,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":14,"context_line":"# limitations under the License."},{"line_number":15,"context_line":"\"\"\"lookup: functions to handle caching/lookup of proxy details.\"\"\""},{"line_number":16,"context_line":"import msgpack"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from marconi.proxy.storage import exceptions"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAS3%2F%2FEvg%3D","line":15,"in_reply_to":"AAAAS3%2F%2FFAM%3D","updated":"2013-10-04 20:32:51.000000000","message":"Going with the class-based approach, my thoughts are to break this up into two classes:\n\n* proxy.cache.partitions:Cache\n* proxy.cache.catalogue:Cache\n\nEach class would live in its own module: cache/partitions.py, cache/catalogue.py\n\nIt\u0027s feasible that over time, we may want to handle more caching details, so I can see this refactoring making things much tidier.\n\nIt would take a few more changes than I think is appropriate to handle in this patch, but I\u0027m open to filing a bug report to make that refactoring happen.","commit_id":"ee377e08bf9afa1c5404cd775c6b2d87fa8c71e1"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"bf16a4a3db8fbb40d4609387b581d32a512549ea","unresolved":false,"context_lines":[{"line_number":21,"context_line":"def _entry_key(project, queue):"},{"line_number":22,"context_line":"    assert project is not None, \u0027Project must not be None\u0027"},{"line_number":23,"context_line":"    assert queue is not None, \u0027Queue must not be None\u0027"},{"line_number":24,"context_line":"    return \u0027q.\u0027 + project + \u0027/\u0027 + queue"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def _partition_key(name):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAS3%2F%2FFDk%3D","line":24,"updated":"2013-10-04 19:11:58.000000000","message":"nit, but how about using a char that is a little easier for the eye to scan if glancing through a list of these (perhaps diagnosing a cache issue).\n\nSome ideas here: http://paste.openstack.org/show/47973/","commit_id":"ee377e08bf9afa1c5404cd775c6b2d87fa8c71e1"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"d9bb23d64d717c6f8783dea3fd3a338350353df6","unresolved":false,"context_lines":[{"line_number":21,"context_line":"def _entry_key(project, queue):"},{"line_number":22,"context_line":"    assert project is not None, \u0027Project must not be None\u0027"},{"line_number":23,"context_line":"    assert queue is not None, \u0027Queue must not be None\u0027"},{"line_number":24,"context_line":"    return \u0027q.\u0027 + project + \u0027/\u0027 + queue"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def _partition_key(name):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAS3%2F%2FEzI%3D","line":24,"in_reply_to":"AAAAS3%2F%2FFDk%3D","updated":"2013-10-04 20:32:51.000000000","message":"I like \u0027:\u0027. I\u0027ll add this in for the next round.","commit_id":"ee377e08bf9afa1c5404cd775c6b2d87fa8c71e1"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"bf16a4a3db8fbb40d4609387b581d32a512549ea","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def _partition_key(name):"},{"line_number":28,"context_line":"    return \u0027p.\u0027 + name"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"def try_cache_entry(project, queue, catalogue_controller, cache):"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAS3%2F%2FFAA%3D","line":28,"updated":"2013-10-04 19:11:58.000000000","message":"See suggestion above.","commit_id":"ee377e08bf9afa1c5404cd775c6b2d87fa8c71e1"}],"tests/unit/proxy/test_queues.py":[{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"e6df678e65a23ce07049f6f41b5da6cd8788fcab","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        self.simulate_put(queue_uri)"},{"line_number":72,"context_line":"        expect \u003d getattr(falcon, \u0027HTTP_%s\u0027 % status)"},{"line_number":73,"context_line":"        self.assertEquals(self.srmock.status, expect)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def test_put_queue_creates_catalogue_entry(self):"},{"line_number":76,"context_line":"        queue_uri \u003d \u0027/v1/queues/create\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAS3%2F%2FIIM%3D","line":73,"updated":"2013-10-03 20:50:11.000000000","message":"httpretty - making unit testing easy for everyone.","commit_id":"c6fc1eab745eb3ed188c9dd76c5b392ab99ba737"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"bf16a4a3db8fbb40d4609387b581d32a512549ea","unresolved":false,"context_lines":[{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        self._mock_create_queue(queue_uri, status\u003d204)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        # is it in the catalogue?"},{"line_number":97,"context_line":"        self.simulate_get(catalogue_uri)"},{"line_number":98,"context_line":"        self.assertEquals(self.srmock.status, falcon.HTTP_404)"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAS3%2F%2FFGk%3D","line":96,"updated":"2013-10-04 19:11:58.000000000","message":"Seems like this test does not depend on L94 - maybe split this test method in two?","commit_id":"ee377e08bf9afa1c5404cd775c6b2d87fa8c71e1"},{"author":{"_account_id":6944,"name":"Allele Dev","email":"cpp.cabrera@gmail.com","username":"cpp-cabrera"},"change_message_id":"d9bb23d64d717c6f8783dea3fd3a338350353df6","unresolved":false,"context_lines":[{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        self._mock_create_queue(queue_uri, status\u003d204)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        # is it in the catalogue?"},{"line_number":97,"context_line":"        self.simulate_get(catalogue_uri)"},{"line_number":98,"context_line":"        self.assertEquals(self.srmock.status, falcon.HTTP_404)"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAS3%2F%2FEy8%3D","line":96,"in_reply_to":"AAAAS3%2F%2FFGk%3D","updated":"2013-10-04 20:32:51.000000000","message":"This test depends on L94 because it executes the proxy:/v1/queues path. If the logic for this resource is correct, then the catalogue will not be updated.","commit_id":"ee377e08bf9afa1c5404cd775c6b2d87fa8c71e1"}]}
