)]}'
{"keystone/assignment/core.py":[{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"3353e51c06e981867b189951e22000d2813b62e9","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    @notifications.updated(_PROJECT)"},{"line_number":93,"context_line":"    def update_project(self, tenant_id, tenant):"},{"line_number":94,"context_line":"        original_tenant \u003d self.get_project(tenant_id)"},{"line_number":95,"context_line":"        tenant \u003d tenant.copy()"},{"line_number":96,"context_line":"        if \u0027enabled\u0027 in tenant:"},{"line_number":97,"context_line":"            tenant[\u0027enabled\u0027] \u003d clean.project_enabled(tenant[\u0027enabled\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_0c0b7e8e","line":94,"updated":"2014-06-05 05:26:19.000000000","message":"Very straightforward. Just making sure you can get access to the original tenant name later on when doing the cache invalidate.  I like it!","commit_id":"c4b5d396365b02f7abe62c95a01ed90fc94674f2"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"7131e0fc9fa52c313ffc4dab3fa86cc35b71ff54","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        tenant \u003d tenant.copy()"},{"line_number":96,"context_line":"        if \u0027enabled\u0027 in tenant:"},{"line_number":97,"context_line":"            tenant[\u0027enabled\u0027] \u003d clean.project_enabled(tenant[\u0027enabled\u0027])"},{"line_number":98,"context_line":"        if not tenant.get(\u0027enabled\u0027, True):"},{"line_number":99,"context_line":"            self._disable_project(tenant_id)"},{"line_number":100,"context_line":"        ret \u003d self.driver.update_project(tenant_id, tenant)"},{"line_number":101,"context_line":"        self.get_project.invalidate(self, tenant_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_720fa239","line":98,"updated":"2014-06-11 21:39:16.000000000","message":"(note) now we could check if the project was enabled before and not do _disabled if it didn\u0027t change.","commit_id":"c4b5d396365b02f7abe62c95a01ed90fc94674f2"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"6b522fbe57b50f61141e3c0ff0dfbd3f69c54dc3","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        tenant \u003d tenant.copy()"},{"line_number":96,"context_line":"        if \u0027enabled\u0027 in tenant:"},{"line_number":97,"context_line":"            tenant[\u0027enabled\u0027] \u003d clean.project_enabled(tenant[\u0027enabled\u0027])"},{"line_number":98,"context_line":"        if not tenant.get(\u0027enabled\u0027, True):"},{"line_number":99,"context_line":"            self._disable_project(tenant_id)"},{"line_number":100,"context_line":"        ret \u003d self.driver.update_project(tenant_id, tenant)"},{"line_number":101,"context_line":"        self.get_project.invalidate(self, tenant_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_e3da0677","line":98,"in_reply_to":"1ae5cdf2_720fa239","updated":"2014-06-11 23:07:06.000000000","message":"Good point! I\u0027ll clean that up here.","commit_id":"c4b5d396365b02f7abe62c95a01ed90fc94674f2"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"45eac56b0a809feec2de799558f1263c0c21ba09","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            self._disable_project(tenant_id)"},{"line_number":100,"context_line":"        ret \u003d self.driver.update_project(tenant_id, tenant)"},{"line_number":101,"context_line":"        self.get_project.invalidate(self, tenant_id)"},{"line_number":102,"context_line":"        self.get_project_by_name.invalidate(self, original_tenant[\u0027name\u0027],"},{"line_number":103,"context_line":"                                            original_tenant[\u0027domain_id\u0027])"},{"line_number":104,"context_line":"        return ret"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_19379a4f","line":102,"updated":"2014-06-02 22:53:52.000000000","message":"I get the original bug and the solution provided here fixes that issue. \n\nJust curious why the cached value is not updated (via refresh) instead of being invalidated. I see in create project, the logic is to set the value if cache is enabled, so possibly value can be updated similarly in cache.\n\nSimilar behavior is there for update_domain.","commit_id":"c4b5d396365b02f7abe62c95a01ed90fc94674f2"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"72532e37486c0c10a4ee5743c53279d6ab3f4eca","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            self._disable_project(tenant_id)"},{"line_number":100,"context_line":"        ret \u003d self.driver.update_project(tenant_id, tenant)"},{"line_number":101,"context_line":"        self.get_project.invalidate(self, tenant_id)"},{"line_number":102,"context_line":"        self.get_project_by_name.invalidate(self, original_tenant[\u0027name\u0027],"},{"line_number":103,"context_line":"                                            original_tenant[\u0027domain_id\u0027])"},{"line_number":104,"context_line":"        return ret"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_2b9e8a07","line":102,"in_reply_to":"1ae5cdf2_19379a4f","updated":"2014-06-04 06:08:37.000000000","message":"Refresh has extra overhead: it would make the same call a get would make to the DB. This is a case of trying to avoid incurring an extra DB call with no direct reason to.\n\nThere is little reason to pre-seed the cache in this case as the next call to the get method will seed the cache. Updates do not necessitate a subsequent operation, sometimes an update is just an update.","commit_id":"c4b5d396365b02f7abe62c95a01ed90fc94674f2"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"520ba9c149c39c2f3e7ae81fcc8d7ba58c5b8a3a","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            self._disable_project(tenant_id)"},{"line_number":100,"context_line":"        ret \u003d self.driver.update_project(tenant_id, tenant)"},{"line_number":101,"context_line":"        self.get_project.invalidate(self, tenant_id)"},{"line_number":102,"context_line":"        self.get_project_by_name.invalidate(self, original_tenant[\u0027name\u0027],"},{"line_number":103,"context_line":"                                            original_tenant[\u0027domain_id\u0027])"},{"line_number":104,"context_line":"        return ret"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_87d009cb","line":102,"in_reply_to":"1ae5cdf2_1b52b766","updated":"2014-06-06 18:08:41.000000000","message":"I found that create usually is followed by a get. Updates less so.\n\nAlso, in this case use of .set() would be better than .refresh. refresh would call back to the DB for no reason. The benefit of the pre-seeding of the cache is negligible in most cases and I could argue to remove it from the .create calls for roughly the same reasons as I\u0027m not using it here.\n\nThe first .get will populate the cache and in most cases is sufficient (even under high load) to increase performance noticeably.\n\nIn either case, if we are making a change from .invalidate to .set or .refresh, I\u0027d like it separate from this bug fix.","commit_id":"c4b5d396365b02f7abe62c95a01ed90fc94674f2"},{"author":{"_account_id":1091,"name":"Arun Kant","email":"arukant@cisco.com","username":"arunkant-uws"},"change_message_id":"4309139571675bb4627480eed41a9808bcd00df7","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            self._disable_project(tenant_id)"},{"line_number":100,"context_line":"        ret \u003d self.driver.update_project(tenant_id, tenant)"},{"line_number":101,"context_line":"        self.get_project.invalidate(self, tenant_id)"},{"line_number":102,"context_line":"        self.get_project_by_name.invalidate(self, original_tenant[\u0027name\u0027],"},{"line_number":103,"context_line":"                                            original_tenant[\u0027domain_id\u0027])"},{"line_number":104,"context_line":"        return ret"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_1b52b766","line":102,"in_reply_to":"1ae5cdf2_2b9e8a07","updated":"2014-06-05 18:59:44.000000000","message":"Yes, not every update needs to be followed by get call. I was trying to follow the pattern where in above create_project logic, the entity is pushed into cache after driver create call. Instead of refresh, other option is to call \u0027set\u0027 as latest data (\u0027ret\u0027) is already read from DB. This can be useful for subsequent gets.","commit_id":"c4b5d396365b02f7abe62c95a01ed90fc94674f2"}],"keystone/tests/test_backend.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"70a13d4fdf6f0054daf4656338f8e6adcc993a9b","unresolved":false,"context_lines":[{"line_number":2790,"context_line":"        domain_id \u003d domain[\u0027id\u0027]"},{"line_number":2791,"context_line":"        domain_name \u003d domain[\u0027name\u0027]"},{"line_number":2792,"context_line":"        self.assignment_api.create_domain(domain_id, domain)"},{"line_number":2793,"context_line":"        self.assignment_api.get_domain(domain_id)"},{"line_number":2794,"context_line":"        domain_ref \u003d self.assignment_api.get_domain(domain_id)"},{"line_number":2795,"context_line":"        domain_ref[\u0027name\u0027] \u003d uuid.uuid4().hex"},{"line_number":2796,"context_line":"        self.assignment_api.update_domain(domain_id, domain_ref)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_a04aefc2","line":2793,"updated":"2014-06-02 20:55:35.000000000","message":"Why have this line: \n\n     self.assignment_api.get_domain(domain_id)\n\nwhen you have the same call just storing the return value next? \n\n     domain_ref \u003d self.assignment_api.get_domain(domain_id)","commit_id":"233068187ee58c55f7b131301e25e6e1e445a243"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"33a04275fd2360fcc78403e72b24b9a2a2a4f4c7","unresolved":false,"context_lines":[{"line_number":2790,"context_line":"        domain_id \u003d domain[\u0027id\u0027]"},{"line_number":2791,"context_line":"        domain_name \u003d domain[\u0027name\u0027]"},{"line_number":2792,"context_line":"        self.assignment_api.create_domain(domain_id, domain)"},{"line_number":2793,"context_line":"        self.assignment_api.get_domain(domain_id)"},{"line_number":2794,"context_line":"        domain_ref \u003d self.assignment_api.get_domain(domain_id)"},{"line_number":2795,"context_line":"        domain_ref[\u0027name\u0027] \u003d uuid.uuid4().hex"},{"line_number":2796,"context_line":"        self.assignment_api.update_domain(domain_id, domain_ref)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1ae5cdf2_56273112","line":2793,"in_reply_to":"1ae5cdf2_a04aefc2","updated":"2014-06-02 22:12:30.000000000","message":"Fixed in next patch.","commit_id":"233068187ee58c55f7b131301e25e6e1e445a243"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"3353e51c06e981867b189951e22000d2813b62e9","unresolved":false,"context_lines":[{"line_number":2795,"context_line":"        self.assignment_api.update_domain(domain_id, domain_ref)"},{"line_number":2796,"context_line":"        self.assertRaises(exception.DomainNotFound,"},{"line_number":2797,"context_line":"                          self.assignment_api.get_domain_by_name,"},{"line_number":2798,"context_line":"                          domain_name)"},{"line_number":2799,"context_line":""},{"line_number":2800,"context_line":"    @tests.skip_if_cache_disabled(\u0027assignment\u0027)"},{"line_number":2801,"context_line":"    def test_cache_layer_domain_crud(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_2c9f5a04","line":2798,"updated":"2014-06-05 05:26:19.000000000","message":"Well that\u0027s a pretty straightforward test case!","commit_id":"c4b5d396365b02f7abe62c95a01ed90fc94674f2"},{"author":{"_account_id":6460,"name":"Brad Topol","email":"btopol@us.ibm.com","username":"btopol"},"change_message_id":"3353e51c06e981867b189951e22000d2813b62e9","unresolved":false,"context_lines":[{"line_number":2869,"context_line":"        self.assertRaises(exception.ProjectNotFound,"},{"line_number":2870,"context_line":"                          self.assignment_api.get_project_by_name,"},{"line_number":2871,"context_line":"                          project_name,"},{"line_number":2872,"context_line":"                          domain[\u0027id\u0027])"},{"line_number":2873,"context_line":""},{"line_number":2874,"context_line":"    @tests.skip_if_cache_disabled(\u0027assignment\u0027)"},{"line_number":2875,"context_line":"    def test_cache_layer_project_crud(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_6cb32298","line":2872,"updated":"2014-06-05 05:26:19.000000000","message":"Next verse, almost the same as the first! Again very straightforward test case!","commit_id":"c4b5d396365b02f7abe62c95a01ed90fc94674f2"},{"author":{"_account_id":11045,"name":"Bob Thyne","email":"bob.thyne@hp.com","username":"bobt"},"change_message_id":"869fbbaf299ce1ef3e902c014f3e51f997daf6b1","unresolved":false,"context_lines":[{"line_number":2784,"context_line":"        self.assertEqual(3, len(user_projects))"},{"line_number":2785,"context_line":""},{"line_number":2786,"context_line":"    @tests.skip_if_cache_disabled(\u0027assignment\u0027)"},{"line_number":2787,"context_line":"    def test_domain_rename_invalidates_get_domain_by_name_cache(self):"},{"line_number":2788,"context_line":"        domain \u003d {\u0027id\u0027: uuid.uuid4().hex, \u0027name\u0027: uuid.uuid4().hex,"},{"line_number":2789,"context_line":"                  \u0027enabled\u0027: True}"},{"line_number":2790,"context_line":"        domain_id \u003d domain[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_40a4fe07","line":2787,"updated":"2014-06-17 02:17:35.000000000","message":"Could we rename this: test_domain_rename_invalidates_cache?","commit_id":"5777f84451aadb421800c7411919e6b9518b5653"},{"author":{"_account_id":11045,"name":"Bob Thyne","email":"bob.thyne@hp.com","username":"bobt"},"change_message_id":"869fbbaf299ce1ef3e902c014f3e51f997daf6b1","unresolved":false,"context_lines":[{"line_number":2853,"context_line":"                          domain_id)"},{"line_number":2854,"context_line":""},{"line_number":2855,"context_line":"    @tests.skip_if_cache_disabled(\u0027assignment\u0027)"},{"line_number":2856,"context_line":"    def test_project_rename_invalidates_get_project_by_name_cache(self):"},{"line_number":2857,"context_line":"        domain \u003d {\u0027id\u0027: uuid.uuid4().hex, \u0027name\u0027: uuid.uuid4().hex,"},{"line_number":2858,"context_line":"                  \u0027enabled\u0027: True}"},{"line_number":2859,"context_line":"        project \u003d {\u0027id\u0027: uuid.uuid4().hex, \u0027name\u0027: uuid.uuid4().hex,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_407b1e7b","line":2856,"updated":"2014-06-17 02:17:35.000000000","message":"Could we rename: test_project_rename_invalidates_cache?","commit_id":"5777f84451aadb421800c7411919e6b9518b5653"}],"keystone/tests/test_backend_ldap.py":[{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"7131e0fc9fa52c313ffc4dab3fa86cc35b71ff54","unresolved":false,"context_lines":[{"line_number":1232,"context_line":"        self.skipTest(\u0027Domains are read-only against LDAP\u0027)"},{"line_number":1233,"context_line":""},{"line_number":1234,"context_line":"    def test_project_rename_invalidates_get_project_by_name_cache(self):"},{"line_number":1235,"context_line":"        self.skipTest(\u0027Project renames not supported against LDAP.\u0027)"},{"line_number":1236,"context_line":""},{"line_number":1237,"context_line":"    def test_project_crud(self):"},{"line_number":1238,"context_line":"        # NOTE(topol): LDAP implementation does not currently support the"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_7554ecfd","line":1235,"updated":"2014-06-11 21:39:16.000000000","message":"If the LDAP backend changes so that you can change the project name (why can\u0027t you change a project name?), we won\u0027t know to fix this test because it\u0027ll be skipped rather than fail. I\u0027d prefer the test validates the current behavior by calling the super and check that it fails.","commit_id":"c4b5d396365b02f7abe62c95a01ed90fc94674f2"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"6b522fbe57b50f61141e3c0ff0dfbd3f69c54dc3","unresolved":false,"context_lines":[{"line_number":1232,"context_line":"        self.skipTest(\u0027Domains are read-only against LDAP\u0027)"},{"line_number":1233,"context_line":""},{"line_number":1234,"context_line":"    def test_project_rename_invalidates_get_project_by_name_cache(self):"},{"line_number":1235,"context_line":"        self.skipTest(\u0027Project renames not supported against LDAP.\u0027)"},{"line_number":1236,"context_line":""},{"line_number":1237,"context_line":"    def test_project_crud(self):"},{"line_number":1238,"context_line":"        # NOTE(topol): LDAP implementation does not currently support the"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_83c78297","line":1235,"in_reply_to":"1ae5cdf2_7554ecfd","updated":"2014-06-11 23:07:06.000000000","message":"Ok Will convert this over to do that, no problem","commit_id":"c4b5d396365b02f7abe62c95a01ed90fc94674f2"},{"author":{"_account_id":11045,"name":"Bob Thyne","email":"bob.thyne@hp.com","username":"bobt"},"change_message_id":"869fbbaf299ce1ef3e902c014f3e51f997daf6b1","unresolved":false,"context_lines":[{"line_number":1299,"context_line":"        # just skip this time."},{"line_number":1300,"context_line":"        self.skipTest(\u0027Domains are read-only against LDAP\u0027)"},{"line_number":1301,"context_line":""},{"line_number":1302,"context_line":"    def test_domain_rename_invalidates_get_domain_by_name_cache(self):"},{"line_number":1303,"context_line":"        parent \u003d super(LDAPIdentity, self)"},{"line_number":1304,"context_line":"        self.assertRaises("},{"line_number":1305,"context_line":"            exception.Forbidden,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_a091429c","line":1302,"updated":"2014-06-17 02:17:35.000000000","message":"Could we rename: test_domain_rename_invalidates_cache?","commit_id":"5777f84451aadb421800c7411919e6b9518b5653"},{"author":{"_account_id":11045,"name":"Bob Thyne","email":"bob.thyne@hp.com","username":"bobt"},"change_message_id":"869fbbaf299ce1ef3e902c014f3e51f997daf6b1","unresolved":false,"context_lines":[{"line_number":1305,"context_line":"            exception.Forbidden,"},{"line_number":1306,"context_line":"            parent.test_domain_rename_invalidates_get_domain_by_name_cache)"},{"line_number":1307,"context_line":""},{"line_number":1308,"context_line":"    def test_project_rename_invalidates_get_project_by_name_cache(self):"},{"line_number":1309,"context_line":"        parent \u003d super(LDAPIdentity, self)"},{"line_number":1310,"context_line":"        self.assertRaises("},{"line_number":1311,"context_line":"            exception.Forbidden,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_e08b4a66","line":1308,"updated":"2014-06-17 02:17:35.000000000","message":"Could we rename: test_project_rename_invalidates_cache?","commit_id":"5777f84451aadb421800c7411919e6b9518b5653"}]}
