)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"41363040e87df70564f405fec436cf4c26f9ad3d","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix 500 error when deleting domain"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If there are idps in a domain, when users try to delete the"},{"line_number":10,"context_line":"domain, 500 interal error will raise."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch added a new callback event to clean up the related"},{"line_number":13,"context_line":"idps."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bf659307_fd19ad87","line":10,"range":{"start_line":10,"start_character":8,"end_line":10,"end_character":37},"updated":"2018-04-10 15:12:11.000000000","message":"I couldn\u0027t recreate this with the test, but I imagine it has something to do with the FK sqlite setup?","commit_id":"43017ba8dcf9963aa98976243687c56732f45590"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"cbc12644aad16db5f7a0347a41017bcb80d3613f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Fix 500 error when deleting domain"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If there are idps in a domain, when users try to delete the"},{"line_number":10,"context_line":"domain, 500 interal error will raise."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"This patch added a new callback event to clean up the related"},{"line_number":13,"context_line":"idps."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bf659307_37bf32ab","line":10,"range":{"start_line":10,"start_character":8,"end_line":10,"end_character":37},"in_reply_to":"bf659307_fd19ad87","updated":"2018-04-11 02:37:46.000000000","message":"yes, the sqlite db that unit test uses missed the FK.","commit_id":"43017ba8dcf9963aa98976243687c56732f45590"}],"keystone/federation/core.py":[{"author":{"_account_id":8482,"name":"Colleen Murphy","email":"colleen@gazlene.net","username":"krinkle"},"change_message_id":"0e3ca3f99221f7596bc27c0b83219614224339c4","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        for idp in idps:"},{"line_number":63,"context_line":"            try:"},{"line_number":64,"context_line":"                self.delete_idp(idp[\u0027id\u0027])"},{"line_number":65,"context_line":"            except exception.GroupNotFound:"},{"line_number":66,"context_line":"                LOG.debug((\u0027Identity Provider %(idpid)s not found when \u0027"},{"line_number":67,"context_line":"                           \u0027deleting domain contents for %(domainid)s, \u0027"},{"line_number":68,"context_line":"                           \u0027continuing with cleanup.\u0027),"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf659307_f93dbaba","line":65,"range":{"start_line":65,"start_character":29,"end_line":65,"end_character":42},"updated":"2018-04-04 12:07:33.000000000","message":"Wrong exception?","commit_id":"ea9327c47a1e691d6ab2c298f6a69f7824c1fed0"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"41363040e87df70564f405fec436cf4c26f9ad3d","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            self._domain_deleted"},{"line_number":54,"context_line":"        )"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def _domain_deleted(self, service, resource_type, operation,"},{"line_number":57,"context_line":"                        payload):"},{"line_number":58,"context_line":"        domain_id \u003d payload[\u0027resource_info\u0027]"},{"line_number":59,"context_line":"        hints \u003d driver_hints.Hints()"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_7d3efd29","line":56,"range":{"start_line":56,"start_character":8,"end_line":56,"end_character":23},"updated":"2018-04-10 15:12:11.000000000","message":"Technically, the domain has already been deleted. This could be named to be more descriptive of the action that it\u0027s doing after the domain is gone. Maybe:\n\n  def _cleanup_identity_provider_for_domain(\n\nor just\n\n  def _cleanup_identity_provider(\n\n?","commit_id":"43017ba8dcf9963aa98976243687c56732f45590"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"cbc12644aad16db5f7a0347a41017bcb80d3613f","unresolved":false,"context_lines":[{"line_number":53,"context_line":"            self._domain_deleted"},{"line_number":54,"context_line":"        )"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def _domain_deleted(self, service, resource_type, operation,"},{"line_number":57,"context_line":"                        payload):"},{"line_number":58,"context_line":"        domain_id \u003d payload[\u0027resource_info\u0027]"},{"line_number":59,"context_line":"        hints \u003d driver_hints.Hints()"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_97807ef9","line":56,"range":{"start_line":56,"start_character":8,"end_line":56,"end_character":23},"in_reply_to":"bf659307_7d3efd29","updated":"2018-04-11 02:37:46.000000000","message":"Done","commit_id":"43017ba8dcf9963aa98976243687c56732f45590"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"4b29ee3893db1034b2dafc3594f5a1df926e9ea6","unresolved":false,"context_lines":[{"line_number":63,"context_line":"            try:"},{"line_number":64,"context_line":"                self.delete_idp(idp[\u0027id\u0027])"},{"line_number":65,"context_line":"            except exception.IdentityProviderNotFound:"},{"line_number":66,"context_line":"                LOG.debug((\u0027Identity Provider %(idpid)s not found when \u0027"},{"line_number":67,"context_line":"                           \u0027deleting domain contents for %(domainid)s, \u0027"},{"line_number":68,"context_line":"                           \u0027continuing with cleanup.\u0027),"},{"line_number":69,"context_line":"                          {\u0027idpid\u0027: idp[\u0027id\u0027], \u0027domainid\u0027: domain_id})"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_713f0125","line":66,"range":{"start_line":66,"start_character":20,"end_line":66,"end_character":25},"updated":"2018-05-09 22:35:52.000000000","message":"Is this something we want to keep as debug? Would an operator want to know there are stale IdPs hanging around?","commit_id":"42cf675c40311f5a483df19ff0aa258643d356e3"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"f1b3caf743b4915fcb283ad2e811512f464d8c8b","unresolved":false,"context_lines":[{"line_number":63,"context_line":"            try:"},{"line_number":64,"context_line":"                self.delete_idp(idp[\u0027id\u0027])"},{"line_number":65,"context_line":"            except exception.IdentityProviderNotFound:"},{"line_number":66,"context_line":"                LOG.debug((\u0027Identity Provider %(idpid)s not found when \u0027"},{"line_number":67,"context_line":"                           \u0027deleting domain contents for %(domainid)s, \u0027"},{"line_number":68,"context_line":"                           \u0027continuing with cleanup.\u0027),"},{"line_number":69,"context_line":"                          {\u0027idpid\u0027: idp[\u0027id\u0027], \u0027domainid\u0027: domain_id})"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_5de77413","line":66,"range":{"start_line":66,"start_character":20,"end_line":66,"end_character":25},"in_reply_to":"5f7c97a3_713f0125","updated":"2018-05-10 02:10:24.000000000","message":"It\u0027s to keep the same with group and user: https://github.com/openstack/keystone/blob/master/keystone/identity/core.py#L516-L534\nI think it\u0027s good to let admin know that the the resource is deleted by other operations.","commit_id":"42cf675c40311f5a483df19ff0aa258643d356e3"}],"keystone/tests/unit/test_v3_resource.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"41363040e87df70564f405fec436cf4c26f9ad3d","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    \"\"\"Test domains and projects.\"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def setUp(self):"},{"line_number":38,"context_line":"        super(ResourceTestCase, self).setUp(enable_sqlite_foreign_key\u003dTrue)"},{"line_number":39,"context_line":"        self.useFixture("},{"line_number":40,"context_line":"            ksfixtures.KeyRepository("},{"line_number":41,"context_line":"                self.config_fixture,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_3d764508","line":38,"range":{"start_line":38,"start_character":44,"end_line":38,"end_character":74},"updated":"2018-04-10 15:12:11.000000000","message":"So this should enable FK with sqlite for this entire testcase, right?","commit_id":"43017ba8dcf9963aa98976243687c56732f45590"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"cbc12644aad16db5f7a0347a41017bcb80d3613f","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    \"\"\"Test domains and projects.\"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def setUp(self):"},{"line_number":38,"context_line":"        super(ResourceTestCase, self).setUp(enable_sqlite_foreign_key\u003dTrue)"},{"line_number":39,"context_line":"        self.useFixture("},{"line_number":40,"context_line":"            ksfixtures.KeyRepository("},{"line_number":41,"context_line":"                self.config_fixture,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_b7b342e9","line":38,"range":{"start_line":38,"start_character":44,"end_line":38,"end_character":74},"in_reply_to":"bf659307_3d764508","updated":"2018-04-11 02:37:46.000000000","message":"yeah, 500 error is rasied by db FK error","commit_id":"43017ba8dcf9963aa98976243687c56732f45590"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"41363040e87df70564f405fec436cf4c26f9ad3d","unresolved":false,"context_lines":[{"line_number":401,"context_line":"        self.delete(\u0027/domains/%s\u0027 % domain_id)"},{"line_number":402,"context_line":"        # The Idp is deleted as well"},{"line_number":403,"context_line":"        self.get(\u0027/OS-FEDERATION/identity_providers/test_idp\u0027,"},{"line_number":404,"context_line":"                 expected_status\u003dhttp_client.NOT_FOUND)"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"    def test_delete_domain_deletes_is_domain_project(self):"},{"line_number":407,"context_line":"        \"\"\"Check the project that acts as a domain is deleted."}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_1dc101e5","line":404,"updated":"2018-04-10 15:12:11.000000000","message":"I tested this locally by reverting the notification change and running this test. I expected a 500 when this was called but it gave me a 200 instead [0]. Is that due to the FK relationship being enforced here?\n\n[0] http://paste.openstack.org/show/718841/","commit_id":"43017ba8dcf9963aa98976243687c56732f45590"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"ab8994097a166800c6e7843e2e416fa06874565c","unresolved":false,"context_lines":[{"line_number":401,"context_line":"        self.delete(\u0027/domains/%s\u0027 % domain_id)"},{"line_number":402,"context_line":"        # The Idp is deleted as well"},{"line_number":403,"context_line":"        self.get(\u0027/OS-FEDERATION/identity_providers/test_idp\u0027,"},{"line_number":404,"context_line":"                 expected_status\u003dhttp_client.NOT_FOUND)"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"    def test_delete_domain_deletes_is_domain_project(self):"},{"line_number":407,"context_line":"        \"\"\"Check the project that acts as a domain is deleted."}],"source_content_type":"text/x-python","patch_set":4,"id":"bf659307_35c5f93c","line":404,"in_reply_to":"bf659307_1dc101e5","updated":"2018-04-10 16:37:44.000000000","message":"It\u0027s an interesting problem. Your test is OK, but the problem is related to https://review.openstack.org/#/c/559676/\n\nThe 500 error is raised due to FK error in the real env. But in our unit test, keystone doesn\u0027t  do the db migration, it initializes the db schema by reading the sql model. Unfortunately, it missed FK here:  https://github.com/openstack/keystone/blob/master/keystone/federation/backends/sql.py#L58\nSo that you can\u0027t reproduce the 500 error by the unit test. It can be solved by add FK back to the sql model:  https://review.openstack.org/#/c/559676/1/keystone/federation/backends/sql.py","commit_id":"43017ba8dcf9963aa98976243687c56732f45590"}],"releasenotes/notes/bug-1760809-711df870a9d67c0d.yaml":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"41363040e87df70564f405fec436cf4c26f9ad3d","unresolved":false,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    [`bug 1760809 \u003chttps://bugs.launchpad.net/keystone/+bug/1760809\u003e`_]"},{"line_number":5,"context_line":"    Fixed the bug a domain can\u0027t be deleted if there are any related identity"},{"line_number":6,"context_line":"    providers in it. Now the the identity providers will be deleted once the"},{"line_number":7,"context_line":"    domain is deleted."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"bf659307_3d596559","line":5,"updated":"2018-04-10 15:12:11.000000000","message":"++ This message could be simplified further with:\n\n  Identity providers registered to domains will now be\n  cleaned up when the domain is deleted.","commit_id":"43017ba8dcf9963aa98976243687c56732f45590"},{"author":{"_account_id":15054,"name":"wangxiyuan","email":"wangxiyuan1007@gmail.com","username":"wangxiyuan"},"change_message_id":"cbc12644aad16db5f7a0347a41017bcb80d3613f","unresolved":false,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    [`bug 1760809 \u003chttps://bugs.launchpad.net/keystone/+bug/1760809\u003e`_]"},{"line_number":5,"context_line":"    Fixed the bug a domain can\u0027t be deleted if there are any related identity"},{"line_number":6,"context_line":"    providers in it. Now the the identity providers will be deleted once the"},{"line_number":7,"context_line":"    domain is deleted."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"bf659307_37a652ad","line":5,"in_reply_to":"bf659307_3d596559","updated":"2018-04-11 02:37:46.000000000","message":"Done","commit_id":"43017ba8dcf9963aa98976243687c56732f45590"}]}
