)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"a47a12e224e655802ba06c9a66955f51337f3c81","unresolved":false,"context_lines":[{"line_number":11,"context_line":"Users can disable notifications by setting driver in oslo_messaging_notifications to \"noop\""},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ia986a5e1fc29badf1fe87fe51c906050bb1e2d06"},{"line_number":14,"context_line":"Implements: sending octavia notifications"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7faddb67_fe813efc","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":41},"updated":"2019-08-02 23:02:39.000000000","message":"Where is this specification? I don\u0027t remember seeing one that was approved.","commit_id":"337d4ba66ef3c916620e0543d6f48c4c67017e55"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"2083a6b84344212ad623f10342890801356f8a73","unresolved":false,"context_lines":[{"line_number":11,"context_line":"Users can disable notifications by setting driver in oslo_messaging_notifications to \"noop\""},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ia986a5e1fc29badf1fe87fe51c906050bb1e2d06"},{"line_number":14,"context_line":"Implements: blueprint octavia-event-notifier"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_3e083690","line":14,"updated":"2019-08-02 23:16:16.000000000","message":"https://blueprints.launchpad.net/octavia\n\nThat is an archived blueprint. Octavia does not use launchpad for blueprints.\nI think you want this story:\nhttps://storyboard.openstack.org/#!/story/2004122","commit_id":"bfd83b77cef6e531d9a665dc160d34b4c900168e"},{"author":{"_account_id":30709,"name":"Anqi Li","email":"anqi.li@ormuco.com","username":"anqi.li426"},"change_message_id":"2050fdda21a5ad9c7eb0a27e777ed68e0aceb745","unresolved":false,"context_lines":[{"line_number":11,"context_line":"Users can disable notifications by setting driver in oslo_messaging_notifications to \"noop\""},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ia986a5e1fc29badf1fe87fe51c906050bb1e2d06"},{"line_number":14,"context_line":"Implements: blueprint octavia-event-notifier"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_8ba8f18b","line":14,"in_reply_to":"7faddb67_3e083690","updated":"2019-08-05 21:00:07.000000000","message":"Updated. Thank you!","commit_id":"bfd83b77cef6e531d9a665dc160d34b4c900168e"}],"octavia/api/v2/controllers/load_balancer.py":[{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"a47a12e224e655802ba06c9a66955f51337f3c81","unresolved":false,"context_lines":[{"line_number":354,"context_line":"                    resource\u003ddata_models.LoadBalancer._name())"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"            db_lb, db_pools, db_lists \u003d None, None, None"},{"line_number":357,"context_line":"            "},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"            lb_dict \u003d db_prepare.create_load_balancer(load_balancer.to_dict("},{"line_number":360,"context_line":"                    render_unsets\u003dFalse)) "}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_be7f4613","line":357,"updated":"2019-08-02 23:02:39.000000000","message":"Unrelated change and white space should be removed.","commit_id":"337d4ba66ef3c916620e0543d6f48c4c67017e55"},{"author":{"_account_id":30709,"name":"Anqi Li","email":"anqi.li@ormuco.com","username":"anqi.li426"},"change_message_id":"169dbc839d9b96ff535bce091fa0e92485516fba","unresolved":false,"context_lines":[{"line_number":354,"context_line":"                    resource\u003ddata_models.LoadBalancer._name())"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"            db_lb, db_pools, db_lists \u003d None, None, None"},{"line_number":357,"context_line":"            "},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"            lb_dict \u003d db_prepare.create_load_balancer(load_balancer.to_dict("},{"line_number":360,"context_line":"                    render_unsets\u003dFalse)) "}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_d92a032b","line":357,"in_reply_to":"7faddb67_be7f4613","updated":"2019-08-08 18:14:40.000000000","message":"Done","commit_id":"337d4ba66ef3c916620e0543d6f48c4c67017e55"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"a47a12e224e655802ba06c9a66955f51337f3c81","unresolved":false,"context_lines":[{"line_number":371,"context_line":"            flavor_dict \u003d self._apply_flavor_to_lb_dict(lock_session, driver,"},{"line_number":372,"context_line":"                                                        lb_dict)"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"            with notification.send_lb_start_notification(context, lb_dict):"},{"line_number":375,"context_line":"                db_lb \u003d self.repositories.create_load_balancer_and_vip(lock_session, lb_dict, vip_dict)"},{"line_number":376,"context_line":"                "},{"line_number":377,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_de7a4222","line":374,"updated":"2019-08-02 23:02:39.000000000","message":"We need to have a design discussion about he correct points to integrate these hooks.\n\nIs this going to roll back correctly?\nUntil line 431, all of this could roll back and return the user an API HTTP status 400 (or similar) code. No record of this request will be in the service and the IDs will never be seen again.","commit_id":"337d4ba66ef3c916620e0543d6f48c4c67017e55"},{"author":{"_account_id":30709,"name":"Anqi Li","email":"anqi.li@ormuco.com","username":"anqi.li426"},"change_message_id":"169dbc839d9b96ff535bce091fa0e92485516fba","unresolved":false,"context_lines":[{"line_number":371,"context_line":"            flavor_dict \u003d self._apply_flavor_to_lb_dict(lock_session, driver,"},{"line_number":372,"context_line":"                                                        lb_dict)"},{"line_number":373,"context_line":""},{"line_number":374,"context_line":"            with notification.send_lb_start_notification(context, lb_dict):"},{"line_number":375,"context_line":"                db_lb \u003d self.repositories.create_load_balancer_and_vip(lock_session, lb_dict, vip_dict)"},{"line_number":376,"context_line":"                "},{"line_number":377,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_b925c75e","line":374,"in_reply_to":"7faddb67_de7a4222","updated":"2019-08-08 18:14:40.000000000","message":"In the lastest patch set, I removed the with statement because I realized that it wasn\u0027t necessary.","commit_id":"337d4ba66ef3c916620e0543d6f48c4c67017e55"}],"octavia/common/notification.py":[{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"1cb1a7f5be6d718a786dd7d8e96e4c2e5ce84a73","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        self.context \u003d context"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        self.payload \u003d {}"},{"line_number":119,"context_line":"        self.payload.update({\u0027tenant_id\u0027: context.tenant})"},{"line_number":120,"context_line":"        self.payload.update(kwargs)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def serialize(self, context):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_feaffe79","line":119,"updated":"2019-08-02 23:12:43.000000000","message":"tenant_id has been deprecated, we should only use project_id","commit_id":"337d4ba66ef3c916620e0543d6f48c4c67017e55"},{"author":{"_account_id":30709,"name":"Anqi Li","email":"anqi.li@ormuco.com","username":"anqi.li426"},"change_message_id":"2050fdda21a5ad9c7eb0a27e777ed68e0aceb745","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        self.context \u003d context"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        self.payload \u003d {}"},{"line_number":119,"context_line":"        self.payload.update({\u0027tenant_id\u0027: context.tenant})"},{"line_number":120,"context_line":"        self.payload.update(kwargs)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def serialize(self, context):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_eba5e5b5","line":119,"in_reply_to":"7faddb67_feaffe79","updated":"2019-08-05 21:00:07.000000000","message":"Done","commit_id":"337d4ba66ef3c916620e0543d6f48c4c67017e55"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"1cb1a7f5be6d718a786dd7d8e96e4c2e5ce84a73","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                **kwargs):"},{"line_number":138,"context_line":"        self.payload.update(kwargs)"},{"line_number":139,"context_line":"        self.validate(self.required_base_traits() + required_traits)"},{"line_number":140,"context_line":"        available_values \u003d self.serialize(self.context)"},{"line_number":141,"context_line":"        payload \u003d {"},{"line_number":142,"context_line":"            k: available_values[k]"},{"line_number":143,"context_line":"            for k in self.required_base_traits() + required_traits"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_1ee8dab0","line":140,"updated":"2019-08-02 23:12:43.000000000","message":"Is this sending the whole context object? If so, I don\u0027t think that is a good idea.","commit_id":"337d4ba66ef3c916620e0543d6f48c4c67017e55"},{"author":{"_account_id":30709,"name":"Anqi Li","email":"anqi.li@ormuco.com","username":"anqi.li426"},"change_message_id":"169dbc839d9b96ff535bce091fa0e92485516fba","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                **kwargs):"},{"line_number":138,"context_line":"        self.payload.update(kwargs)"},{"line_number":139,"context_line":"        self.validate(self.required_base_traits() + required_traits)"},{"line_number":140,"context_line":"        available_values \u003d self.serialize(self.context)"},{"line_number":141,"context_line":"        payload \u003d {"},{"line_number":142,"context_line":"            k: available_values[k]"},{"line_number":143,"context_line":"            for k in self.required_base_traits() + required_traits"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_99e1ebff","line":140,"in_reply_to":"7faddb67_1ee8dab0","updated":"2019-08-08 18:14:40.000000000","message":"Updated. No need to pass context because it\u0027s not used. Thanks for pointing out!","commit_id":"337d4ba66ef3c916620e0543d6f48c4c67017e55"}],"octavia/controller/worker/v1/tasks/database_tasks.py":[{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"a47a12e224e655802ba06c9a66955f51337f3c81","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        LOG.debug(\"DB delete health monitor: %s \", health_mon.id)"},{"line_number":169,"context_line":"        try:  "},{"line_number":170,"context_line":"            ctx \u003d context.Context(project_id\u003dhealth_mon.project_id)"},{"line_number":171,"context_line":"            ctx.notification \u003d notification.MonitorDelete(ctx)"},{"line_number":172,"context_line":"            with notification.send_monitor_end_notification(ctx, health_mon.to_dict(), constants.DELETED):"},{"line_number":173,"context_line":"                self.health_mon_repo.delete(db_apis.get_session(),"},{"line_number":174,"context_line":"                                            id\u003dhealth_mon.id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_de91e253","line":171,"updated":"2019-08-02 23:02:39.000000000","message":"We should not add notifications to the database layer.\nThese are only used for the amphora driver, so third party provider drivers would never send any of these notifications.\nAlso, adding them to existing tasks means these tasks can\u0027t be used for non-user facing tasks such as managing spares pools, etc. If we decide that adding notifications to the flows is the correct design, we should add unique notification tasks to the flows.","commit_id":"337d4ba66ef3c916620e0543d6f48c4c67017e55"},{"author":{"_account_id":30709,"name":"Anqi Li","email":"anqi.li@ormuco.com","username":"anqi.li426"},"change_message_id":"2050fdda21a5ad9c7eb0a27e777ed68e0aceb745","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        LOG.debug(\"DB delete health monitor: %s \", health_mon.id)"},{"line_number":169,"context_line":"        try:  "},{"line_number":170,"context_line":"            ctx \u003d context.Context(project_id\u003dhealth_mon.project_id)"},{"line_number":171,"context_line":"            ctx.notification \u003d notification.MonitorDelete(ctx)"},{"line_number":172,"context_line":"            with notification.send_monitor_end_notification(ctx, health_mon.to_dict(), constants.DELETED):"},{"line_number":173,"context_line":"                self.health_mon_repo.delete(db_apis.get_session(),"},{"line_number":174,"context_line":"                                            id\u003dhealth_mon.id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_8bb3110a","line":171,"in_reply_to":"7faddb67_de91e253","updated":"2019-08-05 21:00:07.000000000","message":"Thank you very much for your prompt feedback! I added the code to send end notifications here because I want them to be sent immediately after the status changes, which happens in the database layer. \n\nCould you please elaborate how we can make the design flexible enough such that third party provider drivers can send those notifications as well? I used notifier from oslo_messaging to send notifications. To enable notifications, we only need to set notification driver to \u0027messaging\u0027 in the config file. Notifications in other openstack projects such as trove and karbor are also implemented in this way. I personally don\u0027t see the necessity for octavia to be adaptable to other notification drivers.    \n\nMoreover, would you mind explaining \"non-user facing tasks\" and how sending notifications here will make them fail in more details?\n\nThank you very much for taking the time!","commit_id":"337d4ba66ef3c916620e0543d6f48c4c67017e55"}]}
