)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"b7bce02b24bd63a7949ffea585c4ff92e4460560","unresolved":false,"context_lines":[{"line_number":14,"context_line":"goes out of sync."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Also switch dns.domain.xxxxx to dns.zone.xxxxx events since"},{"line_number":17,"context_line":"zone is v2 api."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I459841423df776c5afa41255798dacc97b7d9e3e"},{"line_number":20,"context_line":"Closes-Bug: #1550506"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba0121b8_53402534","line":17,"range":{"start_line":17,"start_character":11,"end_line":17,"end_character":14},"updated":"2016-03-31 17:13:51.000000000","message":"Can you clarify this a bit? I\u0027m still confused which API version sends which notifications. It looks like the v1 API sends the dns.record notifications? And v2 only sends recordset ones? And do both v1 and v2 send dns.zone?","commit_id":"6ef43bc6cde5d6660945250d7cfdbd5046670e43"},{"author":{"_account_id":8959,"name":"Lakshmi N Sampath","email":"lakshmi.sampath@hp.com","username":"lakshmi"},"change_message_id":"5fe69291d0345f69bbc9ba6c846fd10d9fcc3805","unresolved":false,"context_lines":[{"line_number":14,"context_line":"goes out of sync."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Also switch dns.domain.xxxxx to dns.zone.xxxxx events since"},{"line_number":17,"context_line":"zone is v2 api."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I459841423df776c5afa41255798dacc97b7d9e3e"},{"line_number":20,"context_line":"Closes-Bug: #1550506"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"ba0121b8_852f083e","line":17,"range":{"start_line":17,"start_character":11,"end_line":17,"end_character":14},"in_reply_to":"ba0121b8_53402534","updated":"2016-03-31 18:18:31.000000000","message":"For domain/zone, irrespective of what you use(v1 or v2) designate always sends both dns.zone.xxxx and dns.domain.xxxx events\n\nFor recordset/record, v1 sends dns.recordset and dns.record events(forward compatibility; since record cannot exist without a recordset from v2 onwards). For v2 it only sends dns.recordset events.","commit_id":"6ef43bc6cde5d6660945250d7cfdbd5046670e43"}],"searchlight/elasticsearch/plugins/designate/notification_handlers.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"b7bce02b24bd63a7949ffea585c4ff92e4460560","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def get_event_handlers(self):"},{"line_number":40,"context_line":"        return {"},{"line_number":41,"context_line":"            \"dns.zone.create\": self.create_or_update,"},{"line_number":42,"context_line":"            \"dns.zone.update\": self.create_or_update,"},{"line_number":43,"context_line":"            \"dns.zone.delete\": self.delete,"},{"line_number":44,"context_line":"            \"dns.zone.exists\": self.create_or_update"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_d9f60f8e","line":41,"range":{"start_line":41,"start_character":22,"end_line":41,"end_character":28},"updated":"2016-03-31 17:13:51.000000000","message":"Add a note that both v1 and v2 zone (domain) create events send a zone notification.","commit_id":"6ef43bc6cde5d6660945250d7cfdbd5046670e43"},{"author":{"_account_id":8959,"name":"Lakshmi N Sampath","email":"lakshmi.sampath@hp.com","username":"lakshmi"},"change_message_id":"5fe69291d0345f69bbc9ba6c846fd10d9fcc3805","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def get_event_handlers(self):"},{"line_number":40,"context_line":"        return {"},{"line_number":41,"context_line":"            \"dns.zone.create\": self.create_or_update,"},{"line_number":42,"context_line":"            \"dns.zone.update\": self.create_or_update,"},{"line_number":43,"context_line":"            \"dns.zone.delete\": self.delete,"},{"line_number":44,"context_line":"            \"dns.zone.exists\": self.create_or_update"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_9fad979d","line":41,"range":{"start_line":41,"start_character":22,"end_line":41,"end_character":28},"in_reply_to":"ba0121b8_d9f60f8e","updated":"2016-03-31 18:18:31.000000000","message":"Done","commit_id":"6ef43bc6cde5d6660945250d7cfdbd5046670e43"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"b7bce02b24bd63a7949ffea585c4ff92e4460560","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    # backward compatibility with v1 api"},{"line_number":168,"context_line":"    # TODO(lakshmiS): Remove when designate v1 record api is phased out"},{"line_number":169,"context_line":"    def create_record(self, payload, timestamp):"},{"line_number":170,"context_line":"        recordset_es \u003d self.index_helper.get_document("},{"line_number":171,"context_line":"            payload[\u0027recordset_id\u0027], for_admin\u003dTrue,"},{"line_number":172,"context_line":"            routing\u003dpayload[\u0027zone_id\u0027])[\u0027_source\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_59667f51","line":169,"range":{"start_line":169,"start_character":22,"end_line":169,"end_character":26},"updated":"2016-03-31 17:13:51.000000000","message":"As discussed in IRC: we seem to get a recordset.create event but the timing\u0027s not predictable. We should ignore recordset.create events with empty \u0027records\u0027 fields, and always index from the recordset API here (as with updates below)","commit_id":"6ef43bc6cde5d6660945250d7cfdbd5046670e43"},{"author":{"_account_id":8959,"name":"Lakshmi N Sampath","email":"lakshmi.sampath@hp.com","username":"lakshmi"},"change_message_id":"5fe69291d0345f69bbc9ba6c846fd10d9fcc3805","unresolved":false,"context_lines":[{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    # backward compatibility with v1 api"},{"line_number":168,"context_line":"    # TODO(lakshmiS): Remove when designate v1 record api is phased out"},{"line_number":169,"context_line":"    def create_record(self, payload, timestamp):"},{"line_number":170,"context_line":"        recordset_es \u003d self.index_helper.get_document("},{"line_number":171,"context_line":"            payload[\u0027recordset_id\u0027], for_admin\u003dTrue,"},{"line_number":172,"context_line":"            routing\u003dpayload[\u0027zone_id\u0027])[\u0027_source\u0027]"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_8a027708","line":169,"range":{"start_line":169,"start_character":22,"end_line":169,"end_character":26},"in_reply_to":"ba0121b8_59667f51","updated":"2016-03-31 18:18:31.000000000","message":"Done","commit_id":"6ef43bc6cde5d6660945250d7cfdbd5046670e43"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"b7bce02b24bd63a7949ffea585c4ff92e4460560","unresolved":false,"context_lines":[{"line_number":181,"context_line":"    def update_record(self, payload, timestamp):"},{"line_number":182,"context_line":"        # designate v2 client doesn\u0027t support all_tenants param for"},{"line_number":183,"context_line":"        # get recordset, so retrieve all recordsets for zone"},{"line_number":184,"context_line":"        recordsets \u003d designate._get_recordsets(payload[\u0027zone_id\u0027])"},{"line_number":185,"context_line":"        for recordset in recordsets:"},{"line_number":186,"context_line":"            if recordset[\u0027id\u0027] \u003d\u003d payload[\u0027recordset_id\u0027]:"},{"line_number":187,"context_line":"                payload \u003d designate._serialize_recordset(recordset)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_995c977e","line":184,"range":{"start_line":184,"start_character":21,"end_line":184,"end_character":30},"updated":"2016-03-31 17:13:51.000000000","message":"Sad panda :(  I think generally there aren\u0027t many r-sets in a zone so this hsould be ok","commit_id":"6ef43bc6cde5d6660945250d7cfdbd5046670e43"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"b7bce02b24bd63a7949ffea585c4ff92e4460560","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        # so there is no way to delete a record by  record\u0027s id within"},{"line_number":204,"context_line":"        # a recordset."},{"line_number":205,"context_line":"        recordset_es[\u0027records\u0027] \u003d filter("},{"line_number":206,"context_line":"            lambda record: record[\u0027data\u0027] !\u003d payload[\u0027data\u0027], recordset_es[\u0027records\u0027])"},{"line_number":207,"context_line":"        self.index_helper.save_document("},{"line_number":208,"context_line":"            recordset_es, version\u003dversion)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_99ead772","line":206,"range":{"start_line":206,"start_character":27,"end_line":206,"end_character":33},"updated":"2016-03-31 17:13:51.000000000","message":"As discussed in IRC - if there are no records remaining, delete the recordset","commit_id":"6ef43bc6cde5d6660945250d7cfdbd5046670e43"},{"author":{"_account_id":8959,"name":"Lakshmi N Sampath","email":"lakshmi.sampath@hp.com","username":"lakshmi"},"change_message_id":"5fe69291d0345f69bbc9ba6c846fd10d9fcc3805","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        # so there is no way to delete a record by  record\u0027s id within"},{"line_number":204,"context_line":"        # a recordset."},{"line_number":205,"context_line":"        recordset_es[\u0027records\u0027] \u003d filter("},{"line_number":206,"context_line":"            lambda record: record[\u0027data\u0027] !\u003d payload[\u0027data\u0027], recordset_es[\u0027records\u0027])"},{"line_number":207,"context_line":"        self.index_helper.save_document("},{"line_number":208,"context_line":"            recordset_es, version\u003dversion)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_ca110f5f","line":206,"range":{"start_line":206,"start_character":27,"end_line":206,"end_character":33},"in_reply_to":"ba0121b8_99ead772","updated":"2016-03-31 18:18:31.000000000","message":"Done","commit_id":"6ef43bc6cde5d6660945250d7cfdbd5046670e43"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"35e53dc59b0b5aca807467cb6a18f320377a8eca","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        for recordset in recordsets:"},{"line_number":199,"context_line":"            if recordset[\u0027id\u0027] \u003d\u003d payload[\u0027recordset_id\u0027]:"},{"line_number":200,"context_line":"                payload \u003d designate._serialize_recordset(recordset)"},{"line_number":201,"context_line":"                self.index_helper.save_document("},{"line_number":202,"context_line":"                    payload, version\u003dversion)"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    # backward compatibility with v1 api"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_024e44c0","line":201,"range":{"start_line":201,"start_character":34,"end_line":201,"end_character":47},"updated":"2016-03-31 21:26:38.000000000","message":"Needs \u0027parent\u0027","commit_id":"4793f5be5bf29b27acd4a839f45bfcca6359495e"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"35e53dc59b0b5aca807467cb6a18f320377a8eca","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                # Since recordset doesn\u0027t have record id, there is no reliable"},{"line_number":215,"context_line":"                # way to update a record as \u0027data\u0027 field itself can change."},{"line_number":216,"context_line":"                # update the recordset itself"},{"line_number":217,"context_line":"                self.index_helper.save_document("},{"line_number":218,"context_line":"                    payload, version\u003dversion)"},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"    # backward compatibility with v1 api"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba0121b8_e24870b5","line":217,"range":{"start_line":217,"start_character":34,"end_line":217,"end_character":47},"updated":"2016-03-31 21:26:38.000000000","message":"Needs parent","commit_id":"4793f5be5bf29b27acd4a839f45bfcca6359495e"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"e5fa61857e3946a40b21cbc13d7e6ca228f728f0","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        recordsets \u003d designate._get_recordsets(payload[\u0027zone_id\u0027])"},{"line_number":212,"context_line":"        for recordset in recordsets:"},{"line_number":213,"context_line":"            if recordset[\u0027id\u0027] \u003d\u003d payload[\u0027recordset_id\u0027]:"},{"line_number":214,"context_line":"                recordset[\u0027_parent\u0027] \u003d payload[\u0027zone_id\u0027]"},{"line_number":215,"context_line":"                payload \u003d designate._serialize_recordset(recordset)"},{"line_number":216,"context_line":"                # Since recordset doesn\u0027t have record id, there is no reliable"},{"line_number":217,"context_line":"                # way to update a record as \u0027data\u0027 field itself can change."}],"source_content_type":"text/x-python","patch_set":5,"id":"ba0121b8_65e90ab7","line":214,"range":{"start_line":214,"start_character":27,"end_line":214,"end_character":34},"updated":"2016-03-31 21:46:00.000000000","message":"This is handled during indexing; adding it here adds a field called _parent to the source","commit_id":"058f0cc6fd07f93f34af8573308c4029f94351c1"}],"searchlight/elasticsearch/plugins/designate/zones.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"b7bce02b24bd63a7949ffea585c4ff92e4460560","unresolved":false,"context_lines":[{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class ZoneIndex(designate.DesignateBase):"},{"line_number":20,"context_line":"    NotificationHandlerCls \u003d notification_handlers.ZoneHandler"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    def get_notification_handler(self):"},{"line_number":23,"context_line":"        \"\"\"Override because the zone handler needs a handle to recordset"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba0121b8_53ae65e6","line":20,"range":{"start_line":20,"start_character":51,"end_line":20,"end_character":62},"updated":"2016-03-31 17:13:51.000000000","message":"How odd that we had ZoneIndex but DomainHandler :(","commit_id":"6ef43bc6cde5d6660945250d7cfdbd5046670e43"}]}
