)]}'
{"keystone/catalog/core.py":[{"author":{"_account_id":5707,"name":"Henry Nash","email":"henryn@linux.vnet.ibm.com","username":"henry-nash"},"change_message_id":"063befe2276ebe8e128b823ecae135d26300b23b","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    def list_endpoints(self, hints\u003dNone):"},{"line_number":271,"context_line":"        return self.driver.list_endpoints(hints or driver_hints.Hints())"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    @MEMOIZE"},{"line_number":274,"context_line":"    def get_catalog(self, user_id, tenant_id):"},{"line_number":275,"context_line":"        try:"},{"line_number":276,"context_line":"            return self.driver.get_catalog(user_id, tenant_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_f7267e15","line":273,"updated":"2015-09-14 13:36:28.000000000","message":"Should a create endpoint invalidate this?  I\u0027m just thinking of the case where I add an endpoint, then do a get catalog...and then endpoint isn\u0027t there....","commit_id":"53fb7d817f7f7c58067de6feff98271dd7072b6f"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"545666b21c0c303faec2f950f3a4527f3ebf410a","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    def list_endpoints(self, hints\u003dNone):"},{"line_number":271,"context_line":"        return self.driver.list_endpoints(hints or driver_hints.Hints())"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    @MEMOIZE"},{"line_number":274,"context_line":"    def get_catalog(self, user_id, tenant_id):"},{"line_number":275,"context_line":"        try:"},{"line_number":276,"context_line":"            return self.driver.get_catalog(user_id, tenant_id)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_5be3a533","line":273,"in_reply_to":"ba15a1d1_f7267e15","updated":"2015-09-15 12:59:09.000000000","message":"That\u0027s a good point. In order to accomplish that, we would have to get the user_id and the project_id in the create_endpoint call; to do something like - \n\n    self.get_catalog.invalidate(user_id, project_id)\n\nNot sure what the best way to do that would be though...","commit_id":"53fb7d817f7f7c58067de6feff98271dd7072b6f"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"a040948e36d52cc2c02d1227623b40c5d3f0d32e","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    def list_endpoints(self, hints\u003dNone):"},{"line_number":271,"context_line":"        return self.driver.list_endpoints(hints or driver_hints.Hints())"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    @MEMOIZE"},{"line_number":274,"context_line":"    def get_catalog(self, user_id, tenant_id):"},{"line_number":275,"context_line":"        try:"},{"line_number":276,"context_line":"            return self.driver.get_catalog(user_id, tenant_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_9bf5bdcc","line":273,"updated":"2015-09-15 13:01:19.000000000","message":"Per Henry\u0027s comment on PS 5, should we add cache invalidation to create_endpoint? \n\nFor that we would need to be able to pass the user_id and the project_id from the create_endpoint call to invalidate the cache for get_catalog: \n\n    self.get_catalog.invalidate(user_id, project_id)","commit_id":"c4140e4f0325506f40fef7c962fe231682c0120f"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"a3ae2fb414e3af10109d555dfde2961c0c1b1666","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    def list_endpoints(self, hints\u003dNone):"},{"line_number":271,"context_line":"        return self.driver.list_endpoints(hints or driver_hints.Hints())"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    @MEMOIZE"},{"line_number":274,"context_line":"    def get_catalog(self, user_id, tenant_id):"},{"line_number":275,"context_line":"        try:"},{"line_number":276,"context_line":"            return self.driver.get_catalog(user_id, tenant_id)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_36787bf8","line":273,"in_reply_to":"ba15a1d1_9bf5bdcc","updated":"2015-09-21 09:39:17.000000000","message":"I think Henry\u0027s comments is reasonable, but looks like if we add this it will complicate the logic and may bloat the patch. :(","commit_id":"c4140e4f0325506f40fef7c962fe231682c0120f"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"a5c0d0979e5de0d30e54a35c362d97fd4fcf1b12","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    def list_endpoints(self, hints\u003dNone):"},{"line_number":271,"context_line":"        return self.driver.list_endpoints(hints or driver_hints.Hints())"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    @MEMOIZE"},{"line_number":274,"context_line":"    def get_catalog(self, user_id, tenant_id):"},{"line_number":275,"context_line":"        try:"},{"line_number":276,"context_line":"            return self.driver.get_catalog(user_id, tenant_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba15a1d1_d6821852","line":273,"updated":"2015-09-22 14:38:40.000000000","message":"I also have the same concern about cache invalidation. We need to make sure that modifications to the catalog will be reflected in the get catalog response in some reasonable time period.","commit_id":"c0dfff39eeaed62e2502349d8f4fd975e0545200"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"3ba618779bb2232e723a0c1ccc1504a1017cbe9f","unresolved":false,"context_lines":[{"line_number":43,"context_line":"# This is a general cache region for catalog administration (CRUD operations)."},{"line_number":44,"context_line":"MEMOIZE \u003d cache.get_memoization_decorator(section\u003d\u0027catalog\u0027)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"# This build a discrete cache region dedicated to complete service catalogs"},{"line_number":47,"context_line":"# computed for a given user + project pair. Any write operation to create,"},{"line_number":48,"context_line":"# modify or delete elements of the service catalog should invalidate this"},{"line_number":49,"context_line":"# entire cache region."}],"source_content_type":"text/x-python","patch_set":10,"id":"7a2fa921_f39d3c5a","line":46,"updated":"2015-10-05 23:58:52.000000000","message":"s/build/builds/","commit_id":"adfce0bc3af1d71e37f84c84bf09765e60f5c5b0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"66455ca2cb13a7ac1cbd6afe097ddeec85eb6e90","unresolved":false,"context_lines":[{"line_number":43,"context_line":"# This is a general cache region for catalog administration (CRUD operations)."},{"line_number":44,"context_line":"MEMOIZE \u003d cache.get_memoization_decorator(section\u003d\u0027catalog\u0027)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"# This build a discrete cache region dedicated to complete service catalogs"},{"line_number":47,"context_line":"# computed for a given user + project pair. Any write operation to create,"},{"line_number":48,"context_line":"# modify or delete elements of the service catalog should invalidate this"},{"line_number":49,"context_line":"# entire cache region."}],"source_content_type":"text/x-python","patch_set":10,"id":"7a2fa921_f014eb44","line":46,"in_reply_to":"7a2fa921_f39d3c5a","updated":"2015-10-07 20:32:08.000000000","message":"Will fix if I have another patchset.","commit_id":"adfce0bc3af1d71e37f84c84bf09765e60f5c5b0"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"3ba618779bb2232e723a0c1ccc1504a1017cbe9f","unresolved":false,"context_lines":[{"line_number":46,"context_line":"# This build a discrete cache region dedicated to complete service catalogs"},{"line_number":47,"context_line":"# computed for a given user + project pair. Any write operation to create,"},{"line_number":48,"context_line":"# modify or delete elements of the service catalog should invalidate this"},{"line_number":49,"context_line":"# entire cache region."},{"line_number":50,"context_line":"COMPUTED_CATALOG_REGION \u003d cache.make_region("},{"line_number":51,"context_line":"    function_key_generator\u003dcache.function_key_generator)"},{"line_number":52,"context_line":"MEMOIZE_COMPUTED_CATALOG \u003d cache.get_memoization_decorator("}],"source_content_type":"text/x-python","patch_set":10,"id":"7a2fa921_f3b45cd2","line":49,"updated":"2015-10-05 23:58:52.000000000","message":"So, I think this is a bit of premature optimization. The single cache region for this one request can just as easily be invalidated with minimal consequence.\n\nWhat might not be obvious based on these comments is that this is just in case the current request does a subsequent call to get_catalog. Since the cache contents are not actually affected by dogpile\u0027s region invalidate (something, that, IMO, is a heinous crime and makes it really easy to accidentally screw things up badly in a distributed system), the only way individual catalogs already cached will be updated is by timing out. So invalidating the whole cache region is \"meh\", since it will only cause things in the life of this particular cache region object to refresh their cache contents. Since IIRC wsgi is going to make a new object each request.. just invalidate the whole thing, and we get a lot less code. :)","commit_id":"adfce0bc3af1d71e37f84c84bf09765e60f5c5b0"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"263c6624c627d8d92d8672a501d1a610c6a83979","unresolved":false,"context_lines":[{"line_number":46,"context_line":"# This build a discrete cache region dedicated to complete service catalogs"},{"line_number":47,"context_line":"# computed for a given user + project pair. Any write operation to create,"},{"line_number":48,"context_line":"# modify or delete elements of the service catalog should invalidate this"},{"line_number":49,"context_line":"# entire cache region."},{"line_number":50,"context_line":"COMPUTED_CATALOG_REGION \u003d cache.make_region("},{"line_number":51,"context_line":"    function_key_generator\u003dcache.function_key_generator)"},{"line_number":52,"context_line":"MEMOIZE_COMPUTED_CATALOG \u003d cache.get_memoization_decorator("}],"source_content_type":"text/x-python","patch_set":10,"id":"7a2fa921_cb1ca0c3","line":49,"in_reply_to":"7a2fa921_300a6322","updated":"2015-10-07 21:12:20.000000000","message":"I\u0027m suggesting that you could just use the same region that the other cache bits use, reducing the number of global cache region objects. But on second thought, making it self contained has a nice benefit of simpler code, so it\u0027s probably fine.\n\nAlso, don\u0027t discount enumerating all of the things. It is definitely something you\u0027d want to do asynchronously, after the update, but that technique allows for a much wider scale, as one can use crazy high TTLs if one knows a bunch of workers will fire off pushing new catalogs into the cache on any changes.","commit_id":"adfce0bc3af1d71e37f84c84bf09765e60f5c5b0"},{"author":{"_account_id":4,"name":"Dolph Mathews","email":"dolph.mathews@gmail.com","username":"dolph"},"change_message_id":"66455ca2cb13a7ac1cbd6afe097ddeec85eb6e90","unresolved":false,"context_lines":[{"line_number":46,"context_line":"# This build a discrete cache region dedicated to complete service catalogs"},{"line_number":47,"context_line":"# computed for a given user + project pair. Any write operation to create,"},{"line_number":48,"context_line":"# modify or delete elements of the service catalog should invalidate this"},{"line_number":49,"context_line":"# entire cache region."},{"line_number":50,"context_line":"COMPUTED_CATALOG_REGION \u003d cache.make_region("},{"line_number":51,"context_line":"    function_key_generator\u003dcache.function_key_generator)"},{"line_number":52,"context_line":"MEMOIZE_COMPUTED_CATALOG \u003d cache.get_memoization_decorator("}],"source_content_type":"text/x-python","patch_set":10,"id":"7a2fa921_300a6322","line":49,"in_reply_to":"7a2fa921_f3b45cd2","updated":"2015-10-07 20:32:08.000000000","message":"I\u0027m not sure I follow what you\u0027re suggesting, nor do I understand how this is a premature optimization :( This seems to be the only way to invalidate an entire \"type\" of cached object, without enumerating through individual things in the cache (which is especially painful when we don\u0027t know what might be in the cache at the time of the request).\n\nThe cache invalidation behavior here in a distributed system is unfortunate, but I don\u0027t know of a way to improve that (?).","commit_id":"adfce0bc3af1d71e37f84c84bf09765e60f5c5b0"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"1babde56adf5bd277d053dda6205060ec9e93a3f","unresolved":false,"context_lines":[{"line_number":43,"context_line":"# This is a general cache region for catalog administration (CRUD operations)."},{"line_number":44,"context_line":"MEMOIZE \u003d cache.get_memoization_decorator(section\u003d\u0027catalog\u0027)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"# This build a discrete cache region dedicated to complete service catalogs"},{"line_number":47,"context_line":"# computed for a given user + project pair. Any write operation to create,"},{"line_number":48,"context_line":"# modify or delete elements of the service catalog should invalidate this"},{"line_number":49,"context_line":"# entire cache region."}],"source_content_type":"text/x-python","patch_set":11,"id":"7a2fa921_7b716c75","line":46,"updated":"2015-10-08 18:21:48.000000000","message":"builds* \n\nfrom Clint comment in patch set 10","commit_id":"7690fce72a5a56116f55046d3ca11f39c00f8320"}],"keystone/common/cache/core.py":[{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"d1806018d4c37ea62dd4fbd8eb63c51231d71dc1","unresolved":false,"context_lines":[{"line_number":254,"context_line":"on_arguments \u003d REGION.cache_on_arguments"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"def get_memoization_decorator(section, expiration_section\u003dNone, region\u003dNone):"},{"line_number":258,"context_line":"    \"\"\"Build a function based on the `on_arguments` decorator for the section."},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    For any given driver in Keystone that has caching capabilities, a"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a2fa921_cd109f51","line":257,"updated":"2015-10-05 21:28:59.000000000","message":"Any reason why the default isn\u0027t REGION instead of None?","commit_id":"adfce0bc3af1d71e37f84c84bf09765e60f5c5b0"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"9c74d7e01bd4ba05ab66519b264fead7ca3de0d1","unresolved":false,"context_lines":[{"line_number":254,"context_line":"on_arguments \u003d REGION.cache_on_arguments"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"def get_memoization_decorator(section, expiration_section\u003dNone, region\u003dNone):"},{"line_number":258,"context_line":"    \"\"\"Build a function based on the `on_arguments` decorator for the section."},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    For any given driver in Keystone that has caching capabilities, a"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa80f949_25f78bf6","line":257,"in_reply_to":"7a2fa921_59ad3187","updated":"2015-11-05 21:22:24.000000000","message":"I don\u0027t agree with this. For a list or dict I definitely agree because is making a static variable and that is typically not expected. In this case I think it\u0027s fine because it is actually what is expected and exactly what happens.","commit_id":"adfce0bc3af1d71e37f84c84bf09765e60f5c5b0"},{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"3ba618779bb2232e723a0c1ccc1504a1017cbe9f","unresolved":false,"context_lines":[{"line_number":254,"context_line":"on_arguments \u003d REGION.cache_on_arguments"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"def get_memoization_decorator(section, expiration_section\u003dNone, region\u003dNone):"},{"line_number":258,"context_line":"    \"\"\"Build a function based on the `on_arguments` decorator for the section."},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    For any given driver in Keystone that has caching capabilities, a"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a2fa921_59ad3187","line":257,"in_reply_to":"7a2fa921_cd109f51","updated":"2015-10-05 23:58:52.000000000","message":"Because you should not make defaults mutable:\n\nhttp://stackoverflow.com/questions/1132941/least-astonishment-in-python-the-mutable-default-argument\n\nhttp://docs.python-guide.org/en/latest/writing/gotchas/","commit_id":"adfce0bc3af1d71e37f84c84bf09765e60f5c5b0"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"0dbfc0a6871a83a31dee1075ba813b28cbcc54ec","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def configure_cache(region\u003dNone):"},{"line_number":27,"context_line":"    if region is None:"},{"line_number":28,"context_line":"        region \u003d CACHE_REGION"},{"line_number":29,"context_line":"    cache.configure_cache_region(CONF, region)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"fa80f949_851e7761","line":28,"updated":"2015-11-05 21:22:04.000000000","message":"(nit) why isn\u0027t CACHE_REGION the default value?","commit_id":"0bbf4c5b73c4a49a9c8d574b3326d0a16cbf6c2c"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ae66a8cf879e1da2c37365a8abed1ccba5d17cf4","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"def configure_cache(region\u003dNone):"},{"line_number":27,"context_line":"    if region is None:"},{"line_number":28,"context_line":"        region \u003d CACHE_REGION"},{"line_number":29,"context_line":"    cache.configure_cache_region(CONF, region)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"fa80f949_425de277","line":28,"in_reply_to":"fa80f949_851e7761","updated":"2015-11-05 22:40:12.000000000","message":"huh, good question. I can dig into that and post a subsequent patch. I\u0027ll follow up with dolph, too. He might have an idea of why that is since he had a few iterations on this patch?","commit_id":"0bbf4c5b73c4a49a9c8d574b3326d0a16cbf6c2c"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"0dbfc0a6871a83a31dee1075ba813b28cbcc54ec","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def get_memoization_decorator(group, expiration_group\u003dNone, region\u003dNone):"},{"line_number":33,"context_line":"    if region is None:"},{"line_number":34,"context_line":"        region \u003d CACHE_REGION"},{"line_number":35,"context_line":"    return cache.get_memoization_decorator(CONF, region, group,"},{"line_number":36,"context_line":"                                           expiration_group\u003dexpiration_group)"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"fa80f949_45272fb6","line":34,"updated":"2015-11-05 21:22:04.000000000","message":"same...","commit_id":"0bbf4c5b73c4a49a9c8d574b3326d0a16cbf6c2c"}],"keystone/contrib/endpoint_filter/core.py":[{"author":{"_account_id":2218,"name":"Adam Young","email":"adam@younglogic.com","username":"ayoung"},"change_message_id":"a254842c9caa286770c8101b424501b22770a8ae","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        self.driver.add_endpoint_to_project(endpoint_id, project_id)"},{"line_number":69,"context_line":"        catalog.COMPUTED_CATALOG_REGION.invalidate()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def remove_endpoint_to_project(self, endpoint_id, project_id):"},{"line_number":72,"context_line":"        self.driver.remove_endpoint_to_project(endpoint_id, project_id)"},{"line_number":73,"context_line":"        catalog.COMPUTED_CATALOG_REGION.invalidate()"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a29b11f_3f4035a5","line":71,"updated":"2015-10-19 16:26:47.000000000","message":"\"from_project\"","commit_id":"0bbf4c5b73c4a49a9c8d574b3326d0a16cbf6c2c"}],"keystone/tests/unit/core.py":[{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"a3ae2fb414e3af10109d555dfde2961c0c1b1666","unresolved":false,"context_lines":[{"line_number":208,"context_line":"    return wrapper"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"def skip_if_cache_is_enabled(*sections):"},{"line_number":212,"context_line":"    def wrapper(f):"},{"line_number":213,"context_line":"        @functools.wraps(f)"},{"line_number":214,"context_line":"        def inner(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_964aa7ab","line":211,"updated":"2015-09-21 09:39:17.000000000","message":"this decorator is cool.","commit_id":"c4140e4f0325506f40fef7c962fe231682c0120f"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"a3ae2fb414e3af10109d555dfde2961c0c1b1666","unresolved":false,"context_lines":[{"line_number":212,"context_line":"    def wrapper(f):"},{"line_number":213,"context_line":"        @functools.wraps(f)"},{"line_number":214,"context_line":"        def inner(*args, **kwargs):"},{"line_number":215,"context_line":"            if CONF.cache.enabled:"},{"line_number":216,"context_line":"                raise testcase.TestSkipped(\u0027Cache globally enabled.\u0027)"},{"line_number":217,"context_line":"            for s in sections:"},{"line_number":218,"context_line":"                conf_sec \u003d getattr(CONF, s, None)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_766b5386","line":215,"updated":"2015-09-21 09:39:17.000000000","message":"this is wrong, CONF.cache.enabled is just the prerequisite of enabling of caching of each section. CONF.cache.enabled enabled doesn\u0027t mean cache is enabled for each section.","commit_id":"c4140e4f0325506f40fef7c962fe231682c0120f"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"ff08229e8da82558065fabb21671343562c97cc7","unresolved":false,"context_lines":[{"line_number":212,"context_line":"    def wrapper(f):"},{"line_number":213,"context_line":"        @functools.wraps(f)"},{"line_number":214,"context_line":"        def inner(*args, **kwargs):"},{"line_number":215,"context_line":"            if CONF.cache.enabled:"},{"line_number":216,"context_line":"                raise testcase.TestSkipped(\u0027Cache globally enabled.\u0027)"},{"line_number":217,"context_line":"            for s in sections:"},{"line_number":218,"context_line":"                conf_sec \u003d getattr(CONF, s, None)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_20aec798","line":215,"in_reply_to":"ba15a1d1_1111b75d","updated":"2015-09-22 02:29:34.000000000","message":"Lance, I don\u0027t think so. Seen from this patch, it will raise \"testcase.TestSkipped(\u0027Cache globally enabled.\u0027)\" just as long as \u0027enabled\u0027 option is turned on for \u0027cache\u0027 section. L217 - 221 will be ignored here since you raise TestSkipped before that.\n\nBut we need to skip the testcase only in the case that \u0027cache globally enabled\u0027 and \u0027caching\u0027 enabled for the specfic section.\n\nThe impact is if \u0027CONF.cache.enabled\u0027 is true but \u0027caching\u0027 is not enabled for the specfic section, the testcase will be skipped. But actually, we shouldn\u0027t ignore such testcase since it\u0027s not cached for this section at all.","commit_id":"c4140e4f0325506f40fef7c962fe231682c0120f"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d19f3e773e3d4102d89d76a6d335adbc4ef0b534","unresolved":false,"context_lines":[{"line_number":212,"context_line":"    def wrapper(f):"},{"line_number":213,"context_line":"        @functools.wraps(f)"},{"line_number":214,"context_line":"        def inner(*args, **kwargs):"},{"line_number":215,"context_line":"            if CONF.cache.enabled:"},{"line_number":216,"context_line":"                raise testcase.TestSkipped(\u0027Cache globally enabled.\u0027)"},{"line_number":217,"context_line":"            for s in sections:"},{"line_number":218,"context_line":"                conf_sec \u003d getattr(CONF, s, None)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_1111b75d","line":215,"in_reply_to":"ba15a1d1_766b5386","updated":"2015-09-21 14:09:17.000000000","message":"I believe that is handled by lines 217 - 221?","commit_id":"c4140e4f0325506f40fef7c962fe231682c0120f"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"a5c0d0979e5de0d30e54a35c362d97fd4fcf1b12","unresolved":false,"context_lines":[{"line_number":212,"context_line":"    def wrapper(f):"},{"line_number":213,"context_line":"        @functools.wraps(f)"},{"line_number":214,"context_line":"        def inner(*args, **kwargs):"},{"line_number":215,"context_line":"            if CONF.cache.enabled:"},{"line_number":216,"context_line":"                raise testcase.TestSkipped(\u0027Cache globally enabled.\u0027)"},{"line_number":217,"context_line":"            for s in sections:"},{"line_number":218,"context_line":"                conf_sec \u003d getattr(CONF, s, None)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba15a1d1_164c106f","line":215,"updated":"2015-09-22 14:38:40.000000000","message":"I agree with the earlier comments. I think this should guard the for loop. So delete the raise and tab over the for loop.","commit_id":"c0dfff39eeaed62e2502349d8f4fd975e0545200"},{"author":{"_account_id":15640,"name":"Roxana Gherle","email":"roxana.gherle@hpe.com","username":"roxana-gherle"},"change_message_id":"ed6c2d7413e714da5126222b2d106c9cec4bcedc","unresolved":false,"context_lines":[{"line_number":208,"context_line":"    return wrapper"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"def skip_if_cache_is_enabled(*sections):"},{"line_number":212,"context_line":"    def wrapper(f):"},{"line_number":213,"context_line":"        @functools.wraps(f)"},{"line_number":214,"context_line":"        def inner(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":14,"id":"1a26ad4f_2e58c431","line":211,"updated":"2015-10-30 17:28:51.000000000","message":"Could we add a function doc string explaining why/when should we use this decorator?","commit_id":"0bbf4c5b73c4a49a9c8d574b3326d0a16cbf6c2c"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"0dbfc0a6871a83a31dee1075ba813b28cbcc54ec","unresolved":false,"context_lines":[{"line_number":208,"context_line":"    return wrapper"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"def skip_if_cache_is_enabled(*sections):"},{"line_number":212,"context_line":"    def wrapper(f):"},{"line_number":213,"context_line":"        @functools.wraps(f)"},{"line_number":214,"context_line":"        def inner(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa80f949_c5423f3e","line":211,"in_reply_to":"1a26ad4f_2e58c431","updated":"2015-11-05 21:22:04.000000000","message":"++","commit_id":"0bbf4c5b73c4a49a9c8d574b3326d0a16cbf6c2c"}],"keystone/tests/unit/test_backend_templated.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"c017181cb25dcd422b37b2145bdb77ba61d02bcf","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        catalog_ref \u003d self.catalog_api.get_catalog(\u0027foo\u0027, \u0027bar\u0027)"},{"line_number":67,"context_line":"        self.assertDictEqual(catalog_ref, self.DEFAULT_FIXTURE)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @tests.skip_if_cache_is_enabled()"},{"line_number":70,"context_line":"    def test_catalog_ignored_malformed_urls(self):"},{"line_number":71,"context_line":"        # both endpoints are in the catalog"},{"line_number":72,"context_line":"        catalog_ref \u003d self.catalog_api.get_catalog(\u0027foo\u0027, \u0027bar\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_6e4b90b1","line":69,"updated":"2015-09-13 23:46:52.000000000","message":"what is this doing here? Needs a comment.","commit_id":"ea55f6de457fc753c1545ada21e490d3f62c9d27"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"89b76433a5fde2083bd118e2bcf319d33295bc21","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        catalog_ref \u003d self.catalog_api.get_catalog(\u0027foo\u0027, \u0027bar\u0027)"},{"line_number":67,"context_line":"        self.assertDictEqual(catalog_ref, self.DEFAULT_FIXTURE)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @tests.skip_if_cache_is_enabled()"},{"line_number":70,"context_line":"    def test_catalog_ignored_malformed_urls(self):"},{"line_number":71,"context_line":"        # both endpoints are in the catalog"},{"line_number":72,"context_line":"        catalog_ref \u003d self.catalog_api.get_catalog(\u0027foo\u0027, \u0027bar\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_f4dbdceb","line":69,"in_reply_to":"ba15a1d1_6e4b90b1","updated":"2015-09-14 13:18:51.000000000","message":"Done","commit_id":"ea55f6de457fc753c1545ada21e490d3f62c9d27"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"a3ae2fb414e3af10109d555dfde2961c0c1b1666","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.assertDictEqual(catalog_ref, self.DEFAULT_FIXTURE)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    # NOTE(lbragstad): This test is skipped because the catalog is being"},{"line_number":70,"context_line":"    # modified wihin the test and not through the API."},{"line_number":71,"context_line":"    @unit.skip_if_cache_is_enabled()"},{"line_number":72,"context_line":"    def test_catalog_ignored_malformed_urls(self):"},{"line_number":73,"context_line":"        # both endpoints are in the catalog"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_b3a26899","line":70,"updated":"2015-09-21 09:39:17.000000000","message":"nit: s/wihin/within","commit_id":"c4140e4f0325506f40fef7c962fe231682c0120f"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"d19f3e773e3d4102d89d76a6d335adbc4ef0b534","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.assertDictEqual(catalog_ref, self.DEFAULT_FIXTURE)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    # NOTE(lbragstad): This test is skipped because the catalog is being"},{"line_number":70,"context_line":"    # modified wihin the test and not through the API."},{"line_number":71,"context_line":"    @unit.skip_if_cache_is_enabled()"},{"line_number":72,"context_line":"    def test_catalog_ignored_malformed_urls(self):"},{"line_number":73,"context_line":"        # both endpoints are in the catalog"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba15a1d1_31163b56","line":70,"in_reply_to":"ba15a1d1_b3a26899","updated":"2015-09-21 14:09:17.000000000","message":"Done","commit_id":"c4140e4f0325506f40fef7c962fe231682c0120f"}]}
