)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"aa5506900c26c173d683679d42fc6ce677bb3da1","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fetch limits from keystone"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Logic extracted for exiting patches to fetch limit information from"},{"line_number":10,"context_line":"keystone."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ia5ced4a46833b194f397ac936b99b0c9573b50d1"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3fa7e38b_bb396da3","line":9,"range":{"start_line":9,"start_character":20,"end_line":9,"end_character":27},"updated":"2019-11-25 15:08:17.000000000","message":"I think you want to mean: existing\n\nAlso, can be useful to point these patches to give more infos related to these changes.","commit_id":"69da5756ea8b3ba1bafa3a66e3678ec3da1e7b41"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"18079022c65dd2c45447bb5f37610fb21f98c9cc","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fetch limits from keystone"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Logic extracted for exiting patches to fetch limit information from"},{"line_number":10,"context_line":"keystone."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ia5ced4a46833b194f397ac936b99b0c9573b50d1"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3fa7e38b_8761b23b","line":9,"range":{"start_line":9,"start_character":20,"end_line":9,"end_character":27},"in_reply_to":"3fa7e38b_bb396da3","updated":"2019-11-25 18:15:22.000000000","message":"oops, yes.\n\nWe have a detailed spec in Nova, I wasn\u0027t sure what to point to one the keystone side. Ideas welcome on what gives you all best context in here.","commit_id":"69da5756ea8b3ba1bafa3a66e3678ec3da1e7b41"}],"oslo_limit/limit.py":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"f2c4b19c3ccb1472b408172f5f26258eb4ba9a4c","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"        :raises exception.LimitNotFound if no limit is found"},{"line_number":172,"context_line":"        \"\"\""},{"line_number":173,"context_line":"        # Using a list to preserver the resource_name order"},{"line_number":174,"context_line":"        project_limits \u003d []"},{"line_number":175,"context_line":"        for resource_name in resource_names:"},{"line_number":176,"context_line":"            limit \u003d self._get_limit(project_id, resource_name)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_e98c1136","line":173,"range":{"start_line":173,"start_character":34,"end_line":173,"end_character":35},"updated":"2019-11-22 20:00:49.000000000","message":"Nit: *preserve","commit_id":"b07d36cd721dfaf35a8e10209c975e77b45da5cf"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"aa5506900c26c173d683679d42fc6ce677bb3da1","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    \"\"\"Logic common used by multiple enforcers\"\"\""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def __init__(self, keystone_connection):"},{"line_number":153,"context_line":"        self.connection \u003d keystone_connection"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        # get and cache endpoint info"},{"line_number":156,"context_line":"        endpoint_id \u003d CONF.oslo_limit.endpoint_id"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_7b97753a","line":153,"range":{"start_line":153,"start_character":8,"end_line":153,"end_character":45},"updated":"2019-11-25 15:08:17.000000000","message":"Not sure to see if passing the connection via arguments is better than retrieving the connection.\n\nWhat\u0027s about retrieve the connection from scratch here?\nWith something like (cf. the `Enforcer` class):\n```\nself.connection \u003d _get_keystone_connection()\n```\n\nThis class is an utility so maybe it make more sense to pass the connection as an argument in this case rather than retrieve it like in `Enforce`...\n\nSome use cases in a live/production manner will help me to appreciate the needs here.","commit_id":"69da5756ea8b3ba1bafa3a66e3678ec3da1e7b41"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"f567150c3d564c864b388e46fa608f867916646e","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    \"\"\"Logic common used by multiple enforcers\"\"\""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def __init__(self, keystone_connection):"},{"line_number":153,"context_line":"        self.connection \u003d keystone_connection"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        # get and cache endpoint info"},{"line_number":156,"context_line":"        endpoint_id \u003d CONF.oslo_limit.endpoint_id"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_64634a1b","line":153,"range":{"start_line":153,"start_character":8,"end_line":153,"end_character":45},"in_reply_to":"3fa7e38b_678116c2","updated":"2019-11-26 09:47:45.000000000","message":"I\u0027m not against doing that, I just try to see if some benefits exist in this approach.\n\nInjection for unit tests purpose is a good point in favor of keep that here.","commit_id":"69da5756ea8b3ba1bafa3a66e3678ec3da1e7b41"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"18079022c65dd2c45447bb5f37610fb21f98c9cc","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    \"\"\"Logic common used by multiple enforcers\"\"\""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def __init__(self, keystone_connection):"},{"line_number":153,"context_line":"        self.connection \u003d keystone_connection"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        # get and cache endpoint info"},{"line_number":156,"context_line":"        endpoint_id \u003d CONF.oslo_limit.endpoint_id"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_678116c2","line":153,"range":{"start_line":153,"start_character":8,"end_line":153,"end_character":45},"in_reply_to":"3fa7e38b_7b97753a","updated":"2019-11-25 18:15:22.000000000","message":"My bad, that is actually what I do in the next patch, but I didn\u0027t bring that fix back into this patch.\n\nI only did it this was so the dependency injection pattern was nice and easiy in the unit tests, but that isn\u0027t overly pythonic.","commit_id":"69da5756ea8b3ba1bafa3a66e3678ec3da1e7b41"},{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"1d501c67e9c838e5c516237ecd39d4277a66e74a","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        self._region_id \u003d self._endpoint.region_id"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def get_project_limits(self, project_id, resource_names):"},{"line_number":164,"context_line":"        \"\"\"Get all the limits for given project a resource_name list"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        We will raise"},{"line_number":167,"context_line":"        :param project_id:"},{"line_number":168,"context_line":"        :param resource_names: list of resource_name strings"},{"line_number":169,"context_line":"        :return: list of (resource_name,limit) pairs"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_0cb8620f","line":166,"range":{"start_line":164,"start_character":11,"end_line":166,"end_character":21},"updated":"2019-11-27 17:59:28.000000000","message":"some unfinished thoughts here?","commit_id":"a044cd9d70bc723cd3b3a46a7aaca82f9a0c4ed9"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"b1088420fffc6262fc42cd4fb837ff534809ce59","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        self._region_id \u003d self._endpoint.region_id"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def get_project_limits(self, project_id, resource_names):"},{"line_number":164,"context_line":"        \"\"\"Get all the limits for given project a resource_name list"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        We will raise"},{"line_number":167,"context_line":"        :param project_id:"},{"line_number":168,"context_line":"        :param resource_names: list of resource_name strings"},{"line_number":169,"context_line":"        :return: list of (resource_name,limit) pairs"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_8284190d","line":166,"range":{"start_line":164,"start_character":11,"end_line":166,"end_character":21},"in_reply_to":"3fa7e38b_0cb8620f","updated":"2019-11-27 19:59:24.000000000","message":"Just for posterity, this comment was completed in the next commit.","commit_id":"a044cd9d70bc723cd3b3a46a7aaca82f9a0c4ed9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"65f33cc214c74158bd98dbed22429c6fd81f7a06","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        self._region_id \u003d self._endpoint.region_id"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def get_project_limits(self, project_id, resource_names):"},{"line_number":164,"context_line":"        \"\"\"Get all the limits for given project a resource_name list"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        We will raise"},{"line_number":167,"context_line":"        :param project_id:"},{"line_number":168,"context_line":"        :param resource_names: list of resource_name strings"},{"line_number":169,"context_line":"        :return: list of (resource_name,limit) pairs"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_4042760f","line":166,"range":{"start_line":164,"start_character":11,"end_line":166,"end_character":21},"in_reply_to":"3fa7e38b_8284190d","updated":"2019-12-02 10:07:18.000000000","message":"oops, yes, I fixed this in the next one.","commit_id":"a044cd9d70bc723cd3b3a46a7aaca82f9a0c4ed9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"6b5ed02052fd980c254afbe9a8629515d8fe3264","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        reg_limit \u003d self.connection.registered_limits("},{"line_number":206,"context_line":"            service_id\u003dself._service_id,"},{"line_number":207,"context_line":"            region_id\u003dself._region_id,"},{"line_number":208,"context_line":"            resource_name\u003dresource_name)"},{"line_number":209,"context_line":"        try:"},{"line_number":210,"context_line":"            return next(reg_limit)"},{"line_number":211,"context_line":"        except StopIteration:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_c7024a0c","line":208,"updated":"2019-11-25 18:34:50.000000000","message":"I guess it might be better to get limits for all resources, both per project and registered limits, then loop? But this is a starting point at least.","commit_id":"a044cd9d70bc723cd3b3a46a7aaca82f9a0c4ed9"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"4f7dcf4091913c5e1ab7be6dd5c0d3eedecd1462","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        reg_limit \u003d self.connection.registered_limits("},{"line_number":206,"context_line":"            service_id\u003dself._service_id,"},{"line_number":207,"context_line":"            region_id\u003dself._region_id,"},{"line_number":208,"context_line":"            resource_name\u003dresource_name)"},{"line_number":209,"context_line":"        try:"},{"line_number":210,"context_line":"            return next(reg_limit)"},{"line_number":211,"context_line":"        except StopIteration:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_7a9676a3","line":208,"in_reply_to":"3fa7e38b_67e90c18","updated":"2019-11-26 21:04:12.000000000","message":"Right now, this is blocking my Nova, so I am keen to do a new pre-release that includes the proposed interface.\n\nWe should come back to optimize later. I suspect we will need to optimize as this is on the critical path for Nova instance build times. It might not matter so much after a cache is added for some of these calls. I supect it will be something for the V release, unless we get other things merged really early.","commit_id":"a044cd9d70bc723cd3b3a46a7aaca82f9a0c4ed9"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"919076b56f2c367769d4b2515fccfc58b6050a9d","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        reg_limit \u003d self.connection.registered_limits("},{"line_number":206,"context_line":"            service_id\u003dself._service_id,"},{"line_number":207,"context_line":"            region_id\u003dself._region_id,"},{"line_number":208,"context_line":"            resource_name\u003dresource_name)"},{"line_number":209,"context_line":"        try:"},{"line_number":210,"context_line":"            return next(reg_limit)"},{"line_number":211,"context_line":"        except StopIteration:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_9a0572c4","line":208,"in_reply_to":"3fa7e38b_7a9676a3","updated":"2019-11-26 21:11:36.000000000","message":"This is all internal implementation stuff, right? As long as it doesn\u0027t impact the public API I\u0027m +1 on getting it out there even if it isn\u0027t terribly efficient. At this point I\u0027d rather have a somewhat slow library that does a thing than an empty library that does nothing (but really fast!). :-)","commit_id":"a044cd9d70bc723cd3b3a46a7aaca82f9a0c4ed9"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"9ccf90189e1ccdf447c0aa95aaec6ad7a6983c07","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        reg_limit \u003d self.connection.registered_limits("},{"line_number":206,"context_line":"            service_id\u003dself._service_id,"},{"line_number":207,"context_line":"            region_id\u003dself._region_id,"},{"line_number":208,"context_line":"            resource_name\u003dresource_name)"},{"line_number":209,"context_line":"        try:"},{"line_number":210,"context_line":"            return next(reg_limit)"},{"line_number":211,"context_line":"        except StopIteration:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_516271db","line":208,"in_reply_to":"3fa7e38b_9a0572c4","updated":"2019-11-27 16:57:53.000000000","message":"\u003e This is all internal implementation stuff, right? As long as it\n \u003e doesn\u0027t impact the public API I\u0027m +1 on getting it out there even\n \u003e if it isn\u0027t terribly efficient. At this point I\u0027d rather have a\n \u003e somewhat slow library that does a thing than an empty library that\n \u003e does nothing (but really fast!). :-)\n\n+1","commit_id":"a044cd9d70bc723cd3b3a46a7aaca82f9a0c4ed9"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"f567150c3d564c864b388e46fa608f867916646e","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        reg_limit \u003d self.connection.registered_limits("},{"line_number":206,"context_line":"            service_id\u003dself._service_id,"},{"line_number":207,"context_line":"            region_id\u003dself._region_id,"},{"line_number":208,"context_line":"            resource_name\u003dresource_name)"},{"line_number":209,"context_line":"        try:"},{"line_number":210,"context_line":"            return next(reg_limit)"},{"line_number":211,"context_line":"        except StopIteration:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_67e90c18","line":208,"in_reply_to":"3fa7e38b_c7024a0c","updated":"2019-11-26 09:47:45.000000000","message":"The retrieve logic seems close in the both case, we can avoid a connection usage by mixing the both and maybe introduce a new function who will be a filter for project or registered limits.\n\nAnyway the current code look good for me, the main question is can we optimize things and is it worth to optimize?\nIf we have excessive usages of this module maybe we can gain seconds and resources usages by mixing connections usage etc...\n\nDo connection usage for the both will help us to optimize things rather iterate through a loop at each usages in this part?\n\nThoughts?","commit_id":"a044cd9d70bc723cd3b3a46a7aaca82f9a0c4ed9"}],"oslo_limit/tests/test_limit.py":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"f2c4b19c3ccb1472b408172f5f26258eb4ba9a4c","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        e \u003d self.assertRaises(exception.LimitNotFound,"},{"line_number":168,"context_line":"                              utils.get_project_limits,"},{"line_number":169,"context_line":"                              project_id, [\"c\"])"},{"line_number":170,"context_line":"        self.assertEqual(\"c\", e.resource_name)"},{"line_number":171,"context_line":"        self.assertEqual(\"c\", e._service_id)"},{"line_number":172,"context_line":"        self.assertEqual(\"c\", e._region_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_8968fdf3","line":172,"range":{"start_line":170,"start_character":8,"end_line":172,"end_character":43},"updated":"2019-11-22 20:00:49.000000000","message":"Looks like these are just called resource, service, and region.","commit_id":"b07d36cd721dfaf35a8e10209c975e77b45da5cf"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"fe9b980987e5f16994415482886b0836b79683fb","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        e \u003d self.assertRaises(exception.LimitNotFound,"},{"line_number":168,"context_line":"                              utils.get_project_limits,"},{"line_number":169,"context_line":"                              project_id, [\"c\"])"},{"line_number":170,"context_line":"        self.assertEqual(\"c\", e.resource_name)"},{"line_number":171,"context_line":"        self.assertEqual(\"c\", e._service_id)"},{"line_number":172,"context_line":"        self.assertEqual(\"c\", e._region_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_317da31b","line":172,"range":{"start_line":170,"start_character":8,"end_line":172,"end_character":43},"in_reply_to":"3fa7e38b_8968fdf3","updated":"2019-11-25 10:01:49.000000000","message":"Dang, looks like I missed a commit -a when I was fixing this up (face palm).","commit_id":"b07d36cd721dfaf35a8e10209c975e77b45da5cf"}]}
