)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"b99c3da74b455954c3cd9048458faf7545d39d4c","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Clean up auto created domain when creating duplicate idp in federation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If we create an idp with ID \u0027keystone-ipd\u0027, then we create idp with"},{"line_number":10,"context_line":"the same ID. We get the result like \u0027conflict happens\u0027, it is ok."},{"line_number":11,"context_line":"But when I see the domain list. the auto generated domain still here."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"I think, the second idp was created failed, then the resource auto"},{"line_number":14,"context_line":"generated it used should be cleared. If we create an idp specifing the"},{"line_number":15,"context_line":"domain, the idp was created failed and the specifing domain was not auto"},{"line_number":16,"context_line":"generated, so the resource should not be cleared."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"In the fix, we may check whether the idp exists first, and then if it is,"},{"line_number":19,"context_line":"and we could raise a conflic; While it is not, we should consider"},{"line_number":20,"context_line":"the race condition, the auto created domain of failed idp created,"},{"line_number":21,"context_line":"should be cleared."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: I9b7c3c1fae32b9412f75323a75d9ebe4ad756729"},{"line_number":24,"context_line":"Closes-Bug: #1688188"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"3f1d235d_1b03dc44","line":21,"range":{"start_line":9,"start_character":0,"end_line":21,"end_character":18},"updated":"2017-06-29 09:36:26.000000000","message":"you dont need to describe the scenario of the bug, just say what this fixes.\n\nthis could be summarized in something like:\n\n    When creating an IdP, if a domain was generated for it and a\n    conflict was raised while effectively creating the IdP in the\n    database, the auto-generated domain must be cleaned up.","commit_id":"bae21aa27d05d8b2136483b8d857e413c4238536"},{"author":{"_account_id":17430,"name":"yangweiwei","email":"yangweiwei@cmss.chinamobile.com","username":"yangweiwei"},"change_message_id":"262e2674ffb800565b6908a0a83e7ee3c93a47cf","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Clean up auto created domain when creating duplicate idp in federation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If we create an idp with ID \u0027keystone-ipd\u0027, then we create idp with"},{"line_number":10,"context_line":"the same ID. We get the result like \u0027conflict happens\u0027, it is ok."},{"line_number":11,"context_line":"But when I see the domain list. the auto generated domain still here."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"I think, the second idp was created failed, then the resource auto"},{"line_number":14,"context_line":"generated it used should be cleared. If we create an idp specifing the"},{"line_number":15,"context_line":"domain, the idp was created failed and the specifing domain was not auto"},{"line_number":16,"context_line":"generated, so the resource should not be cleared."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"In the fix, we may check whether the idp exists first, and then if it is,"},{"line_number":19,"context_line":"and we could raise a conflic; While it is not, we should consider"},{"line_number":20,"context_line":"the race condition, the auto created domain of failed idp created,"},{"line_number":21,"context_line":"should be cleared."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: I9b7c3c1fae32b9412f75323a75d9ebe4ad756729"},{"line_number":24,"context_line":"Closes-Bug: #1688188"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"3f1d235d_11273b15","line":21,"range":{"start_line":9,"start_character":0,"end_line":21,"end_character":18},"in_reply_to":"3f1d235d_1b03dc44","updated":"2017-06-29 10:15:38.000000000","message":"Ok, thanks! I will recheck it.","commit_id":"bae21aa27d05d8b2136483b8d857e413c4238536"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"a9b12343a7a7d1042bb8ede4518b3178c5a640ee","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     yangweiwei \u003cyangweiwei@cmss.chinamobile.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-06-29 18:49:33 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Clean up auto created domain when creating duplicate idp in federation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When creating an IdP, if a domain was generated for it and a conflict"},{"line_number":10,"context_line":"was raised while effectively creating the IdP in the database, the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"3f1d235d_50d26dd2","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":70},"updated":"2017-07-06 23:22:08.000000000","message":"The title needs to be \u003e\u003d 50 characters. Could do something like:\n\n\"Handle auto created domain with duplicate idp\"\nor\n\"Clean auto-gen domain when creating duplicate idp\"","commit_id":"ca4b9c3ddbcedb4093a21ef85442dbb4387d8709"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"9e5f6f7c478dd4a05473af415afd3e61e5c9e376","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     yangweiwei \u003cyangweiwei@cmss.chinamobile.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-06-29 18:49:33 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Clean up auto created domain when creating duplicate idp in federation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When creating an IdP, if a domain was generated for it and a conflict"},{"line_number":10,"context_line":"was raised while effectively creating the IdP in the database, the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"ff346bd7_226b611e","line":7,"in_reply_to":"3f1d235d_50d26dd2","updated":"2017-07-27 20:20:56.000000000","message":"Done","commit_id":"ca4b9c3ddbcedb4093a21ef85442dbb4387d8709"}],"keystone/federation/core.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"43f79cccdb891d0b8276718a73c8a68b39c78297","unresolved":false,"context_lines":[{"line_number":59,"context_line":"    def __init__(self):"},{"line_number":60,"context_line":"        super(Manager, self).__init__(CONF.federation.driver)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def create_idp(self, idp_id, idp):"},{"line_number":63,"context_line":"        if not idp.get(\u0027domain_id\u0027):"},{"line_number":64,"context_line":"            idp[\u0027domain_id\u0027] \u003d self._create_idp_domain(idp_id)"},{"line_number":65,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f044301_0e77d704","side":"PARENT","line":62,"updated":"2017-05-05 18:34:08.000000000","message":"Another possible solution here that doesn\u0027t require all the cleanup logic is to check if an Identity Provider exists with the given ID before entering the create logic.","commit_id":"c287714cd33a8a1681fb4199e9f46e7ae46d5db1"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"43f79cccdb891d0b8276718a73c8a68b39c78297","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            self._assert_valid_domain_id(idp[\u0027domain_id\u0027])"},{"line_number":69,"context_line":"        try:"},{"line_number":70,"context_line":"            return self.driver.create_idp(idp_id, idp)"},{"line_number":71,"context_line":"        except exception.Conflict, Exception:"},{"line_number":72,"context_line":"            if idp_domain_auto_flag:"},{"line_number":73,"context_line":"                self._delete_idp_auto_generated_domain(idp[\u0027domain_id\u0027])"},{"line_number":74,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f044301_8e5c077f","line":71,"updated":"2017-05-05 18:34:08.000000000","message":"I get why we\u0027re catching the Conflict, but why we are catching an Exception? This is going to mask any other errors that happen at the layer below the Manager, which can lead to poor user experience if the error was not caused by a conflict.","commit_id":"b5499bab48a91a96e96e8a08ec8e8f8d1ac4bce8"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"43f79cccdb891d0b8276718a73c8a68b39c78297","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    def _delete_idp_auto_generated_domain(self, domain_id):"},{"line_number":93,"context_line":"        domain \u003d {\u0027enabled\u0027: False}"},{"line_number":94,"context_line":"        self.resource_api.update_domain(domain_id, domain)"},{"line_number":95,"context_line":"        self.resource_api.delete_domain(domain_id)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    @MEMOIZE"},{"line_number":98,"context_line":"    def get_enabled_service_providers(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f044301_6e5f7b72","line":95,"updated":"2017-05-05 18:34:08.000000000","message":"If we take the pre-processing route - we won\u0027t need this cleanup logic.","commit_id":"b5499bab48a91a96e96e8a08ec8e8f8d1ac4bce8"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"d4fda255a3b08899afef1ebf2a58b7aad7e234dc","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        try:"},{"line_number":77,"context_line":"            self.get_idp(idp_id)"},{"line_number":78,"context_line":"            return True"},{"line_number":79,"context_line":"        except Exception:"},{"line_number":80,"context_line":"            return False"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def _handle_idp_conflict(self, idp_id):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f013ff3_90d1025b","line":79,"updated":"2017-05-12 21:16:53.000000000","message":"Please catch the actual exception that is raised in the case where the IdP is not found. https://github.com/openstack/keystone/blob/master/keystone/federation/backends/sql.py#L201","commit_id":"7f3eda7444dc89f29a0c33c22d3f0ac614eb9ba6"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"d4fda255a3b08899afef1ebf2a58b7aad7e234dc","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            return False"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def _handle_idp_conflict(self, idp_id):"},{"line_number":83,"context_line":"        _CONFLICT_LOG_MSG \u003d \u0027Conflict %(conflict_type)s: %(details)s\u0027"},{"line_number":84,"context_line":"        conflict_type \u003d \u0027identity_provider\u0027"},{"line_number":85,"context_line":"        details \u003d six.text_type(idp_id)"},{"line_number":86,"context_line":"        LOG.debug(_CONFLICT_LOG_MSG, {\u0027conflict_type\u0027: conflict_type,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f013ff3_10c5f28e","line":83,"range":{"start_line":83,"start_character":8,"end_line":83,"end_character":25},"updated":"2017-05-12 21:16:53.000000000","message":"All-caps signifies a global variable, which this is not.","commit_id":"7f3eda7444dc89f29a0c33c22d3f0ac614eb9ba6"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"d4fda255a3b08899afef1ebf2a58b7aad7e234dc","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        _CONFLICT_LOG_MSG \u003d \u0027Conflict %(conflict_type)s: %(details)s\u0027"},{"line_number":84,"context_line":"        conflict_type \u003d \u0027identity_provider\u0027"},{"line_number":85,"context_line":"        details \u003d six.text_type(idp_id)"},{"line_number":86,"context_line":"        LOG.debug(_CONFLICT_LOG_MSG, {\u0027conflict_type\u0027: conflict_type,"},{"line_number":87,"context_line":"                                      \u0027details\u0027: details})"},{"line_number":88,"context_line":"        msg \u003d _(\u0027Duplicate entry: %s\u0027)"},{"line_number":89,"context_line":"        msg \u003d msg % idp_id"},{"line_number":90,"context_line":"        raise exception.Conflict(type\u003dconflict_type, details\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f013ff3_50593afc","line":87,"range":{"start_line":86,"start_character":8,"end_line":87,"end_character":58},"updated":"2017-05-12 21:16:53.000000000","message":"I\u0027m not sure logging here is required, since the exception isn\u0027t being caught anywhere, therefore the exception itself will get logged.","commit_id":"7f3eda7444dc89f29a0c33c22d3f0ac614eb9ba6"},{"author":{"_account_id":17430,"name":"yangweiwei","email":"yangweiwei@cmss.chinamobile.com","username":"yangweiwei"},"change_message_id":"97b79ff48df831efe225f398ad0ad1de5de211a2","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        _CONFLICT_LOG_MSG \u003d \u0027Conflict %(conflict_type)s: %(details)s\u0027"},{"line_number":84,"context_line":"        conflict_type \u003d \u0027identity_provider\u0027"},{"line_number":85,"context_line":"        details \u003d six.text_type(idp_id)"},{"line_number":86,"context_line":"        LOG.debug(_CONFLICT_LOG_MSG, {\u0027conflict_type\u0027: conflict_type,"},{"line_number":87,"context_line":"                                      \u0027details\u0027: details})"},{"line_number":88,"context_line":"        msg \u003d _(\u0027Duplicate entry: %s\u0027)"},{"line_number":89,"context_line":"        msg \u003d msg % idp_id"},{"line_number":90,"context_line":"        raise exception.Conflict(type\u003dconflict_type, details\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f013ff3_47a3c150","line":87,"range":{"start_line":86,"start_character":8,"end_line":87,"end_character":58},"in_reply_to":"1f013ff3_50593afc","updated":"2017-05-13 10:36:56.000000000","message":"Done","commit_id":"7f3eda7444dc89f29a0c33c22d3f0ac614eb9ba6"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"4c7009a7d74f99222eefcf922e3fb3c5cccfa5af","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        super(Manager, self).__init__(CONF.federation.driver)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def create_idp(self, idp_id, idp):"},{"line_number":63,"context_line":"        if self._check_if_idp_exist(idp_id):"},{"line_number":64,"context_line":"            self._handle_idp_conflict(idp_id)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        if not idp.get(\u0027domain_id\u0027):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1f013ff3_f3496b60","line":63,"updated":"2017-05-14 10:36:17.000000000","message":"It would be nice if we didn\u0027t auto commit. This is actually a race condition. An unlikely one, but indeed a race.","commit_id":"8efd347ff6faf580bf23b31ea7fd8d396e27c510"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"5c3481bc0fee95a958873096f9d112e8f96debf0","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        super(Manager, self).__init__(CONF.federation.driver)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def create_idp(self, idp_id, idp):"},{"line_number":63,"context_line":"        if self._check_if_idp_exist(idp_id):"},{"line_number":64,"context_line":"            self._handle_idp_conflict(idp_id)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        if not idp.get(\u0027domain_id\u0027):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ff0f0b1f_ed77f839","line":63,"in_reply_to":"1f013ff3_e7e2c02f","updated":"2017-05-19 17:38:39.000000000","message":"I agree that this is highly unlikely. Let me see if I understood correctly.\n\nConsider the scenario when the same create idp api call is issued twice and at the same time (trying to create the same idp). \n\n1. `create_idp` method here will check if the idp exists. Both calls go through.\n\n2. Then it will try to create the idp domain. Both calls will be assigning different ids, therefore there will not be a conflict and both will go through. Two domains are created with different ids.\n\n3. Both calls will now try to create the idp, only one will go through, the other will get a Conflict since the idp has already been created. The domain will still have been created though.\n\nMaybe the create_idp can be wrapped in a try except, with orphan domain cleanup in the case of hitting this unlikely race condition.","commit_id":"8efd347ff6faf580bf23b31ea7fd8d396e27c510"},{"author":{"_account_id":17430,"name":"yangweiwei","email":"yangweiwei@cmss.chinamobile.com","username":"yangweiwei"},"change_message_id":"8b441c0b8a6cc95d3df299c74403a3529fdc4769","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        super(Manager, self).__init__(CONF.federation.driver)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def create_idp(self, idp_id, idp):"},{"line_number":63,"context_line":"        if self._check_if_idp_exist(idp_id):"},{"line_number":64,"context_line":"            self._handle_idp_conflict(idp_id)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        if not idp.get(\u0027domain_id\u0027):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1f013ff3_e7e2c02f","line":63,"in_reply_to":"1f013ff3_f3496b60","updated":"2017-05-15 07:19:53.000000000","message":"Thanks for review. Here, I think it may not be a race condition. I have do a test:\nI create one idp and at the same time I get another idp, it is ok.\n\nAnd would you please tell me why it is a race condition? Thanks.","commit_id":"8efd347ff6faf580bf23b31ea7fd8d396e27c510"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"11e942b65242f7e54026773210b54a7d96f3d633","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        if self._check_if_idp_exist(idp_id):"},{"line_number":64,"context_line":"            self._handle_idp_conflict(idp_id)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        idp_domain_auto_flag \u003d False"},{"line_number":67,"context_line":"        if not idp.get(\u0027domain_id\u0027):"},{"line_number":68,"context_line":"            idp[\u0027domain_id\u0027] \u003d self._create_idp_domain(idp_id)"},{"line_number":69,"context_line":"            idp_domain_auto_flag \u003d True"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff0f0b1f_f43e91d8","line":66,"range":{"start_line":66,"start_character":8,"end_line":66,"end_character":28},"updated":"2017-05-21 05:04:50.000000000","message":"Please rename this to something more readable like `auto_created_domain`. Flags are very C.","commit_id":"75b9642bdf2b3445829250e7a695a630677cd265"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"11e942b65242f7e54026773210b54a7d96f3d633","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        else:"},{"line_number":71,"context_line":"            self._assert_valid_domain_id(idp[\u0027domain_id\u0027])"},{"line_number":72,"context_line":"        try:"},{"line_number":73,"context_line":"            return self.driver.create_idp(idp_id, idp)"},{"line_number":74,"context_line":"        except exception.Conflict:"},{"line_number":75,"context_line":"            if idp_domain_auto_flag:"},{"line_number":76,"context_line":"                self._delete_idp_auto_generated_domain(idp[\u0027domain_id\u0027])"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff0f0b1f_1415854a","line":73,"updated":"2017-05-21 05:04:50.000000000","message":"Please add a note here explaining the race condition.","commit_id":"75b9642bdf2b3445829250e7a695a630677cd265"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"11e942b65242f7e54026773210b54a7d96f3d633","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                self._delete_idp_auto_generated_domain(idp[\u0027domain_id\u0027])"},{"line_number":77,"context_line":"            raise"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _check_if_idp_exist(self, idp_id):"},{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            self.get_idp(idp_id)"},{"line_number":82,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff0f0b1f_d4602d04","line":79,"range":{"start_line":79,"start_character":22,"end_line":79,"end_character":27},"updated":"2017-05-21 05:04:50.000000000","message":"nit: exists","commit_id":"75b9642bdf2b3445829250e7a695a630677cd265"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"11e942b65242f7e54026773210b54a7d96f3d633","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        except exception.IdentityProviderNotFound:"},{"line_number":84,"context_line":"            return False"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def _delete_idp_auto_generated_domain(self, domain_id):"},{"line_number":87,"context_line":"        domain \u003d {\u0027enabled\u0027: False}"},{"line_number":88,"context_line":"        self.resource_api.update_domain(domain_id, domain)"},{"line_number":89,"context_line":"        self.resource_api.delete_domain(domain_id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff0f0b1f_742a8190","line":86,"range":{"start_line":86,"start_character":16,"end_line":86,"end_character":34},"updated":"2017-05-21 05:04:50.000000000","message":"There\u0027s nothing specific about idp_auto_generated here. This is just a function that disables and deletes a domain by id.","commit_id":"75b9642bdf2b3445829250e7a695a630677cd265"},{"author":{"_account_id":16465,"name":"Kristi Nikolla","email":"knikolla@bu.edu","username":"knikolla"},"change_message_id":"11e942b65242f7e54026773210b54a7d96f3d633","unresolved":false,"context_lines":[{"line_number":88,"context_line":"        self.resource_api.update_domain(domain_id, domain)"},{"line_number":89,"context_line":"        self.resource_api.delete_domain(domain_id)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    def _handle_idp_conflict(self, idp_id):"},{"line_number":92,"context_line":"        conflict_type \u003d \u0027identity_provider\u0027"},{"line_number":93,"context_line":"        msg \u003d _(\u0027Duplicate entry: %s\u0027)"},{"line_number":94,"context_line":"        msg \u003d msg % idp_id"}],"source_content_type":"text/x-python","patch_set":8,"id":"ff0f0b1f_f449f18a","line":91,"range":{"start_line":91,"start_character":9,"end_line":91,"end_character":15},"updated":"2017-05-21 05:04:50.000000000","message":"Instead of `handle`, use the word `raise`, since you\u0027re not handling the conflict but just notifying the user by raising an exception.","commit_id":"75b9642bdf2b3445829250e7a695a630677cd265"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"90e5a3a786aee27df91ba7b767b30adca8caa445","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        super(Manager, self).__init__(CONF.federation.driver)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def create_idp(self, idp_id, idp):"},{"line_number":63,"context_line":"        if self._check_if_idp_exists(idp_id):"},{"line_number":64,"context_line":"            self._raise_idp_conflict(idp_id)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        auto_created_domain \u003d False"},{"line_number":67,"context_line":"        if not idp.get(\u0027domain_id\u0027):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_ad5799ca","line":64,"range":{"start_line":63,"start_character":0,"end_line":64,"end_character":44},"updated":"2017-05-22 11:36:20.000000000","message":"I am not getting why this is needed. you should be able to fix the bug with the code below: if create_idp has failed and the domain was auto created, delete it.","commit_id":"70bc3ee3dea9ea76d2cad3a66b305c79b2eed046"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"90e5a3a786aee27df91ba7b767b30adca8caa445","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            return self.driver.create_idp(idp_id, idp)"},{"line_number":81,"context_line":"        except exception.Conflict:"},{"line_number":82,"context_line":"            if auto_created_domain:"},{"line_number":83,"context_line":"                self._delete_domain_by_id(idp[\u0027domain_id\u0027])"},{"line_number":84,"context_line":"            raise"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def _check_if_idp_exists(self, idp_id):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_cd340d96","line":83,"range":{"start_line":83,"start_character":16,"end_line":83,"end_character":59},"updated":"2017-05-22 11:36:20.000000000","message":"(nit)I would add the code directly here instead of adding a few auxiliar functions:\n\n    self.resource_api.update_domain(idp[\u0027domain_id\u0027], {\u0027enabled\u0027: False})\n    self.resource_api.delete_domain(idp[\u0027domain_id\u0027])","commit_id":"70bc3ee3dea9ea76d2cad3a66b305c79b2eed046"},{"author":{"_account_id":17430,"name":"yangweiwei","email":"yangweiwei@cmss.chinamobile.com","username":"yangweiwei"},"change_message_id":"36e473446dd151389eb66ad7dc2b3f5f770a37c6","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            return self.driver.create_idp(idp_id, idp)"},{"line_number":81,"context_line":"        except exception.Conflict:"},{"line_number":82,"context_line":"            if auto_created_domain:"},{"line_number":83,"context_line":"                self._delete_domain_by_id(idp[\u0027domain_id\u0027])"},{"line_number":84,"context_line":"            raise"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def _check_if_idp_exists(self, idp_id):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ff0f0b1f_64f85d48","line":83,"range":{"start_line":83,"start_character":16,"end_line":83,"end_character":59},"in_reply_to":"ff0f0b1f_cd340d96","updated":"2017-05-23 06:08:14.000000000","message":"Thanks for your tips. I think it is ok. I will recheck.","commit_id":"70bc3ee3dea9ea76d2cad3a66b305c79b2eed046"},{"author":{"_account_id":13063,"name":"WEI CHEN","email":"dave.jungler@gmail.com","username":"wei.d.chen"},"change_message_id":"18fc05bfb1b2dc781670040a5d81f606f4992fe0","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        except exception.Conflict:"},{"line_number":82,"context_line":"            if auto_created_domain:"},{"line_number":83,"context_line":"                domain \u003d {\u0027enabled\u0027: False}"},{"line_number":84,"context_line":"                self.resource_api.update_domain(domain_id, domain)"},{"line_number":85,"context_line":"                self.resource_api.delete_domain(domain_id)"},{"line_number":86,"context_line":"            raise"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ff0f0b1f_1a4c5940","line":84,"updated":"2017-05-23 08:51:31.000000000","message":"2017-05-23 06:38:14.134895 |   /home/jenkins/workspace/gate-keystone-pep8-ubuntu-xenial$ /home/jenkins/workspace/gate-keystone-pep8-ubuntu-xenial/.tox/pep8/bin/flake8 \n2017-05-23 06:38:24.100964 | ./keystone/federation/core.py:84:49: F821 undefined name \u0027domain_id\u0027\n2017-05-23 06:38:24.101061 |                 self.resource_api.update_domain(domain_id, domain)\n2017-05-23 06:38:24.101087 |                                                 ^\n2017-05-23 06:38:24.101114 | ./keystone/federation/core.py:85:49: F821 undefined name \u0027domain_id\u0027\n2017-05-23 06:38:24.101139 |                 self.resource_api.delete_domain(domain_id)\n\n\nlooks like it should be idp[\u0027domain_id\u0027]?","commit_id":"1edd1584519ca5cc1a423a5c153729d72473336e"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"5d824a8b7d573ff1211df9aff3abc81350c519cb","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def create_idp(self, idp_id, idp):"},{"line_number":63,"context_line":"        if self._check_if_idp_exists(idp_id):"},{"line_number":64,"context_line":"            self._raise_idp_conflict(idp_id)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"        auto_created_domain \u003d False"},{"line_number":67,"context_line":"        if not idp.get(\u0027domain_id\u0027):"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f201791_ce1a556d","line":64,"updated":"2017-06-28 15:47:09.000000000","message":"We get this for free at the database layer - so it should just be a matter of letting the exceptions bubble up when they should.","commit_id":"4ae811afc38b95e8d56fa07bfe3a34c6cd420761"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"51261af9240e984c0f2cbd6fb2de6061314bf4be","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        auto_created_domain \u003d False"},{"line_number":67,"context_line":"        if not idp.get(\u0027domain_id\u0027):"},{"line_number":68,"context_line":"            idp[\u0027domain_id\u0027] \u003d self._create_idp_domain(idp_id)"},{"line_number":69,"context_line":"            auto_created_domain \u003d True"},{"line_number":70,"context_line":"        else:"},{"line_number":71,"context_line":"            self._assert_valid_domain_id(idp[\u0027domain_id\u0027])"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5f201791_c8524d35","line":69,"updated":"2017-06-28 15:07:54.000000000","message":"Nice work here - it took me a minute to catch what this was until I started tinkering with it locally.\n\nWe should add a test for this if we don\u0027t already have it:\n\n  - create a domain\n  - create an idp\n  - attempt to create the same idp with the domain from step one\n  - assert a conflict is raised\n  - ensure the domain still exists (because it wasn\u0027t autogenerated)","commit_id":"4ae811afc38b95e8d56fa07bfe3a34c6cd420761"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"b99c3da74b455954c3cd9048458faf7545d39d4c","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        except exception.Conflict:"},{"line_number":73,"context_line":"            # If there is a conflict storing the Identity Provider in the"},{"line_number":74,"context_line":"            # backend, then we need to make sure we clean up the domain we just"},{"line_number":75,"context_line":"            # created for it and raise the Conflict exception afterwords."},{"line_number":76,"context_line":"            if auto_created_domain:"},{"line_number":77,"context_line":"                self._cleanup_idp_domain(idp[\u0027domain_id\u0027])"},{"line_number":78,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f1d235d_bb44e8b8","line":75,"range":{"start_line":75,"start_character":62,"end_line":75,"end_character":72},"updated":"2017-06-29 09:36:26.000000000","message":"(typo) afterwards","commit_id":"bae21aa27d05d8b2136483b8d857e413c4238536"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"93edddc94dc6fd21be5b7654e740080fa755db5b","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def create_idp(self, idp_id, idp):"},{"line_number":63,"context_line":"        auto_created_domain \u003d False"},{"line_number":64,"context_line":"        if not idp.get(\u0027domain_id\u0027):"},{"line_number":65,"context_line":"            idp[\u0027domain_id\u0027] \u003d self._create_idp_domain(idp_id)"},{"line_number":66,"context_line":"            auto_created_domain \u003d True"},{"line_number":67,"context_line":"        else:"},{"line_number":68,"context_line":"            self._assert_valid_domain_id(idp[\u0027domain_id\u0027])"},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"df3967d1_0a8c2f34","line":66,"range":{"start_line":64,"start_character":0,"end_line":66,"end_character":38},"updated":"2017-08-02 19:32:47.000000000","message":"Does this need a try/except in the case of a race for creating the domain?","commit_id":"6e60948c20e9a8fe5469bb7735641026a1f36cd5"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"ec0efc0c2d8be80beabc6d4f9ca078341d715df6","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        auto_created_domain \u003d False"},{"line_number":64,"context_line":"        if not idp.get(\u0027domain_id\u0027):"},{"line_number":65,"context_line":"            idp[\u0027domain_id\u0027] \u003d self._create_idp_domain(idp_id)"},{"line_number":66,"context_line":"            auto_created_domain \u003d True"},{"line_number":67,"context_line":"        else:"},{"line_number":68,"context_line":"            self._assert_valid_domain_id(idp[\u0027domain_id\u0027])"},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"df3967d1_6aca9b4e","line":66,"in_reply_to":"df3967d1_0a8c2f34","updated":"2017-08-02 19:34:48.000000000","message":"Oh - in the case two processes get a create_idp request and they generate the same random uuid for the domain not present in the reference?","commit_id":"6e60948c20e9a8fe5469bb7735641026a1f36cd5"},{"author":{"_account_id":2903,"name":"Morgan Fainberg","email":"morgan.fainberg@gmail.com","username":"mdrnstm"},"change_message_id":"db0d180902cfda338dad99998649cad2c83fe8e0","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        auto_created_domain \u003d False"},{"line_number":64,"context_line":"        if not idp.get(\u0027domain_id\u0027):"},{"line_number":65,"context_line":"            idp[\u0027domain_id\u0027] \u003d self._create_idp_domain(idp_id)"},{"line_number":66,"context_line":"            auto_created_domain \u003d True"},{"line_number":67,"context_line":"        else:"},{"line_number":68,"context_line":"            self._assert_valid_domain_id(idp[\u0027domain_id\u0027])"},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"df3967d1_aa02c36d","line":66,"in_reply_to":"df3967d1_6aca9b4e","updated":"2017-08-02 19:36:19.000000000","message":"possible. unlikely actually, was mis-reading as idp_id being used directly vs in the description.","commit_id":"6e60948c20e9a8fe5469bb7735641026a1f36cd5"}],"keystone/tests/unit/common/test_database_conflicts.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"43f79cccdb891d0b8276718a73c8a68b39c78297","unresolved":false,"context_lines":[{"line_number":265,"context_line":"        else:"},{"line_number":266,"context_line":"            self.fail(\"Create duplicate region did not raise a conflict\")"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    def test_idp_duplicate_conflict_gives_name(self):"},{"line_number":269,"context_line":"        idp \u003d {"},{"line_number":270,"context_line":"            \u0027id\u0027: uuid.uuid4().hex,"},{"line_number":271,"context_line":"            \u0027enabled\u0027: True,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f044301_aeca2317","line":268,"updated":"2017-05-05 18:34:08.000000000","message":"We should an API test to test_v3_federation.py since that tests the behavior of the federation APIs. Maybe somewhere in our restful identity provider tests [0]\n\n[0] https://github.com/openstack/keystone/blob/da472c5f3b9c9d80f54284300a818acc2741c7e9/keystone/tests/unit/test_v3_federation.py#L787","commit_id":"b5499bab48a91a96e96e8a08ec8e8f8d1ac4bce8"}],"keystone/tests/unit/test_v3_federation.py":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"51261af9240e984c0f2cbd6fb2de6061314bf4be","unresolved":false,"context_lines":[{"line_number":913,"context_line":"        self.assertIdpDomainCreated(attr[\u0027id\u0027], attr[\u0027domain_id\u0027])"},{"line_number":914,"context_line":""},{"line_number":915,"context_line":"    @utils.wip(\u0027This will fail because of bug #1688188\u0027)"},{"line_number":916,"context_line":"    def test_conflicting_idp_results_in_unhandled_domain_cleanup(self):"},{"line_number":917,"context_line":"        # NOTE(lbragstad): Create an identity provider, save its ID, and count"},{"line_number":918,"context_line":"        # the number of domains."},{"line_number":919,"context_line":"        resp \u003d self._create_default_idp()"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f201791_68b459f2","side":"PARENT","line":916,"updated":"2017-06-28 15:07:54.000000000","message":"The test name could be updated here since it\u0027s inaccurate now that you\u0027ve fixed the bug.","commit_id":"fb60f18165154e6d763bf184447d698e55b47521"},{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"51261af9240e984c0f2cbd6fb2de6061314bf4be","unresolved":false,"context_lines":[{"line_number":926,"context_line":"        # new identity provider. The domain for the new identity provider is"},{"line_number":927,"context_line":"        # going to be created before the conflict is raised from the database"},{"line_number":928,"context_line":"        # layer. The resulting domain is never cleaned up but it should be"},{"line_number":929,"context_line":"        # since the identity provider was never created."},{"line_number":930,"context_line":"        resp \u003d self.put("},{"line_number":931,"context_line":"            self.base_url(suffix\u003didp_id),"},{"line_number":932,"context_line":"            body\u003d{\u0027identity_provider\u0027: self.default_body.copy()},"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f201791_e8ee29eb","side":"PARENT","line":929,"updated":"2017-06-28 15:07:54.000000000","message":"This comment isn\u0027t necessarily accurate now that the bug is fixed. We should take the opportunity to update it, saying the domain isn\u0027t created because we\u0027re detecting if the idp already exists prior to creating the domain.","commit_id":"fb60f18165154e6d763bf184447d698e55b47521"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"b99c3da74b455954c3cd9048458faf7545d39d4c","unresolved":false,"context_lines":[{"line_number":925,"context_line":"        # new identity provider. The domain for the new identity provider is"},{"line_number":926,"context_line":"        # going to be created before the conflict is raised from the database"},{"line_number":927,"context_line":"        # layer. This makes sure the domain is cleaned up after a Conflict is"},{"line_number":928,"context_line":"        # detected, but only if the domain was auto-generated."},{"line_number":929,"context_line":"        resp \u003d self.put("},{"line_number":930,"context_line":"            self.base_url(suffix\u003didp_id),"},{"line_number":931,"context_line":"            body\u003d{\u0027identity_provider\u0027: self.default_body.copy()},"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f1d235d_dbf2049b","line":928,"range":{"start_line":928,"start_character":20,"end_line":928,"end_character":61},"updated":"2017-06-29 09:36:26.000000000","message":"in this case it is autogenerated. you\u0027re not testing it is autogenerated or not. this can be removed and we describe further in the release note","commit_id":"bae21aa27d05d8b2136483b8d857e413c4238536"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"b99c3da74b455954c3cd9048458faf7545d39d4c","unresolved":false,"context_lines":[{"line_number":934,"context_line":"        domains \u003d self.resource_api.list_domains()"},{"line_number":935,"context_line":"        self.assertEqual(number_of_domains, len(domains))"},{"line_number":936,"context_line":""},{"line_number":937,"context_line":"    def test_conflicting_idp_with_existing_domain_does_not_delete_domain(self):"},{"line_number":938,"context_line":"        # Create a new domain"},{"line_number":939,"context_line":"        body \u003d self.default_body.copy()"},{"line_number":940,"context_line":"        body[\u0027description\u0027] \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f1d235d_dbc44443","line":937,"range":{"start_line":937,"start_character":29,"end_line":937,"end_character":72},"updated":"2017-06-29 09:36:26.000000000","message":"(nit/suggestion) does_not_delete_existing_domain","commit_id":"bae21aa27d05d8b2136483b8d857e413c4238536"},{"author":{"_account_id":17430,"name":"yangweiwei","email":"yangweiwei@cmss.chinamobile.com","username":"yangweiwei"},"change_message_id":"262e2674ffb800565b6908a0a83e7ee3c93a47cf","unresolved":false,"context_lines":[{"line_number":934,"context_line":"        domains \u003d self.resource_api.list_domains()"},{"line_number":935,"context_line":"        self.assertEqual(number_of_domains, len(domains))"},{"line_number":936,"context_line":""},{"line_number":937,"context_line":"    def test_conflicting_idp_with_existing_domain_does_not_delete_domain(self):"},{"line_number":938,"context_line":"        # Create a new domain"},{"line_number":939,"context_line":"        body \u003d self.default_body.copy()"},{"line_number":940,"context_line":"        body[\u0027description\u0027] \u003d uuid.uuid4().hex"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f1d235d_11da9be8","line":937,"range":{"start_line":937,"start_character":29,"end_line":937,"end_character":72},"in_reply_to":"3f1d235d_dbc44443","updated":"2017-06-29 10:15:38.000000000","message":"Ok, I will think and change the name. Thanks!","commit_id":"bae21aa27d05d8b2136483b8d857e413c4238536"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"b99c3da74b455954c3cd9048458faf7545d39d4c","unresolved":false,"context_lines":[{"line_number":942,"context_line":"        self.resource_api.create_domain(domain[\u0027id\u0027], domain)"},{"line_number":943,"context_line":""},{"line_number":944,"context_line":"        # Create an identity provider and specify the domain"},{"line_number":945,"context_line":"        body[\u0027domain_id\u0027] \u003d domain[\u0027id\u0027]"},{"line_number":946,"context_line":"        resp \u003d self._create_default_idp(body\u003dbody)"},{"line_number":947,"context_line":"        idp \u003d resp.json_body[\u0027identity_provider\u0027]"},{"line_number":948,"context_line":"        idp_id \u003d idp[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f1d235d_3b2c5846","line":945,"updated":"2017-06-29 09:36:26.000000000","message":"would be nice to body \u003d self.default_body.copy() before here","commit_id":"bae21aa27d05d8b2136483b8d857e413c4238536"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"b99c3da74b455954c3cd9048458faf7545d39d4c","unresolved":false,"context_lines":[{"line_number":948,"context_line":"        idp_id \u003d idp[\u0027id\u0027]"},{"line_number":949,"context_line":"        self.assertEqual(idp[\u0027domain_id\u0027], domain[\u0027id\u0027])"},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"        # Create an identity provider with the same domain but ensure a"},{"line_number":952,"context_line":"        # Conflict is raised"},{"line_number":953,"context_line":"        body \u003d self.default_body.copy()"},{"line_number":954,"context_line":"        body[\u0027domain_id\u0027] \u003d domain[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f1d235d_1b7d1c1c","line":951,"range":{"start_line":951,"start_character":59,"end_line":951,"end_character":62},"updated":"2017-06-29 09:36:26.000000000","message":"\"and ID to\"","commit_id":"bae21aa27d05d8b2136483b8d857e413c4238536"},{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"b99c3da74b455954c3cd9048458faf7545d39d4c","unresolved":false,"context_lines":[{"line_number":949,"context_line":"        self.assertEqual(idp[\u0027domain_id\u0027], domain[\u0027id\u0027])"},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"        # Create an identity provider with the same domain but ensure a"},{"line_number":952,"context_line":"        # Conflict is raised"},{"line_number":953,"context_line":"        body \u003d self.default_body.copy()"},{"line_number":954,"context_line":"        body[\u0027domain_id\u0027] \u003d domain[\u0027id\u0027]"},{"line_number":955,"context_line":"        resp \u003d self.put("}],"source_content_type":"text/x-python","patch_set":13,"id":"3f1d235d_9b892c28","line":952,"range":{"start_line":952,"start_character":10,"end_line":952,"end_character":28},"updated":"2017-06-29 09:36:26.000000000","message":"why? I suggest adding hte text above to make it clearer why we\u0027re getting a conflict","commit_id":"bae21aa27d05d8b2136483b8d857e413c4238536"}],"releasenotes/notes/bug_1688188-256e3572295231a1.yaml":[{"author":{"_account_id":17860,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@gmail.com","username":"samueldmq"},"change_message_id":"b99c3da74b455954c3cd9048458faf7545d39d4c","unresolved":false,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    [`bug 1688188 \u003chttps://bugs.launchpad.net/keystone/+bug/1688188\u003e`_]"},{"line_number":5,"context_line":"    Create an identity provider with the same ID to intentionally cause a"},{"line_number":6,"context_line":"    conflict. If the requested body does not contain the domain and then domain"},{"line_number":7,"context_line":"    for identity provider is going to be created before the conflict is raised"},{"line_number":8,"context_line":"    from the database layer. So the auto-generated domain needs to be cleaned"},{"line_number":9,"context_line":"    up. But if the requeste body specifies the domain and it does not need to"},{"line_number":10,"context_line":"    clean up the domain."}],"source_content_type":"text/x-yaml","patch_set":13,"id":"3f1d235d_9b4b6c86","line":10,"range":{"start_line":5,"start_character":4,"end_line":10,"end_character":24},"updated":"2017-06-29 09:36:26.000000000","message":"Same as in the commit message, we need to be more direct here\n\n    When creating an IdP, if a domain was generated for it and a\n    conflict was raised while effectively creating the IdP in the\n    database, the auto-generated domain is now cleaned up.","commit_id":"bae21aa27d05d8b2136483b8d857e413c4238536"}]}
