)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"690d1231fbb481fe5795c832606de466e0481961","unresolved":true,"context_lines":[{"line_number":7,"context_line":"wip: KuryrLoadBalancer Listener Reconciliation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The project checks for KuryrLoadBalancer Listeners"},{"line_number":10,"context_line":"on Kubernetes with OpenStack and reconciles missing"},{"line_number":11,"context_line":"Listeners"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Implements: blueprint reconcile-openstack-resources-with-k8s"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7006e024_15dff096","line":10,"range":{"start_line":10,"start_character":14,"end_line":10,"end_character":28},"updated":"2021-10-20 09:59:30.000000000","message":"maybe you meant:\ncompares with the ones on OpenStack","commit_id":"8afe9ed018cac974da64308c0dd9b920edd51249"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"cd20c1301d5115ed01f49fcbb8b311038ba8f952","unresolved":true,"context_lines":[{"line_number":7,"context_line":"KuryrLoadBalancer Listener Reconciliation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit checks for KuryrLoadBalancer Listeners"},{"line_number":10,"context_line":"on Kubernetes and compares  with OpenStack. It then"},{"line_number":11,"context_line":"reconciles missing Listeners"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Implements: blueprint reconcile-openstack-resources-with-k8s"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"97e9befe_c8e579f4","line":10,"range":{"start_line":10,"start_character":26,"end_line":10,"end_character":28},"updated":"2021-12-07 09:01:20.000000000","message":"nit: two spaces.","commit_id":"68e55339a6290a7418668a9e27dd0e0e64db14b3"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"9aebf4db07e86b314814a51639f671121a5eafa2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"628cc6fc_567f61f3","updated":"2021-10-20 15:33:40.000000000","message":"I am thinking of passing the name of the resource to the list while retrieving the list\u0027s resources ID and selflink ","commit_id":"8afe9ed018cac974da64308c0dd9b920edd51249"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"690d1231fbb481fe5795c832606de466e0481961","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"3681aacd_225b07a6","updated":"2021-10-20 09:59:30.000000000","message":"It\u0027s already in good shape. I had one suggestion to maybe make it more generic:","commit_id":"8afe9ed018cac974da64308c0dd9b920edd51249"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"b88d859bab8746ee227319b49520043e940bc64e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"cd938bcf_8a2f3796","updated":"2021-10-20 07:00:06.000000000","message":"LGTM, although I\u0027d love to see the unit test for it :)","commit_id":"8afe9ed018cac974da64308c0dd9b920edd51249"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"557c1e9f2090d8a271bed5645a60f64c0425ef63","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"6ddb7215_a818f66b","updated":"2021-10-15 08:08:55.000000000","message":"recheck","commit_id":"8afe9ed018cac974da64308c0dd9b920edd51249"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"8b8892cdef9dd8ea1e6ef8618ed8d0e02b420590","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"b4f5275d_6034a278","updated":"2021-10-15 21:52:45.000000000","message":"recheck","commit_id":"8afe9ed018cac974da64308c0dd9b920edd51249"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"930c7c00f9806eb1d74f7a9f50d900da68d42d9f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"157eb73d_bbf87ccf","updated":"2021-10-21 16:21:47.000000000","message":"Looks pretty good, just some structural changes are needed.","commit_id":"98a54c9ff285bb8d1a6ecf2d7eb013c9caca644b"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"7fce0b94358b5ebd8b913b7017376d5940908856","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"cd3fa6b8_c32cfa4a","updated":"2021-10-29 11:08:18.000000000","message":"It already looks great, thanks Sunday. There is some improvement left around duplicated code and it would be great to have the tempest tests adapted to include listeners as well","commit_id":"c593efe954f8bfea52ffe6a5698ae10a40b54d91"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"4427329da661cc71c9a3564c23f8c499ba969100","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"3ca6ef06_83e8a896","updated":"2021-10-28 04:52:22.000000000","message":"recheck","commit_id":"c593efe954f8bfea52ffe6a5698ae10a40b54d91"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"07edb1eeef0fd141a1edd0553973c4bf315b1ae9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"8370e521_34d14284","updated":"2021-10-28 07:49:55.000000000","message":"recheck","commit_id":"c593efe954f8bfea52ffe6a5698ae10a40b54d91"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"8cf9d652f1e3a0545495c7907028c438e99a6fa5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"ec432500_75d87ce0","updated":"2021-10-28 13:59:12.000000000","message":"recheck","commit_id":"c593efe954f8bfea52ffe6a5698ae10a40b54d91"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c0b2c1f5ee55bc7d4456b3b22592c39d03185ef7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"a0132b03_ac3bf894","updated":"2021-11-09 14:37:21.000000000","message":"#1 - there\u0027s a mistake in the test, \"%\" should be used to format the message here [1], but nevertheless it\u0027s timing out.\n#2 - the traceback from kuryr-controller suggests the problem:\n\n2021-11-09 00:03:11.853 1 ERROR kuryr_kubernetes.controller.handlers.loadbalancer [-] Error while running loadbalancers reconciliation.: AttributeError: \u0027Proxy\u0027 object has no attribute \u0027load_balancer\u0027\n2021-11-09 00:03:11.853 1 ERROR kuryr_kubernetes.controller.handlers.loadbalancer Traceback (most recent call last):\n2021-11-09 00:03:11.853 1 ERROR kuryr_kubernetes.controller.handlers.loadbalancer   File \"/usr/local/lib/python3.6/site-packages/kuryr_kubernetes/controller/handlers/loadbalancer.py\", line 124, in reconcile\n2021-11-09 00:03:11.853 1 ERROR kuryr_kubernetes.controller.handlers.loadbalancer     self._trigger_reconciliation(loadbalancer_crds)\n2021-11-09 00:03:11.853 1 ERROR kuryr_kubernetes.controller.handlers.loadbalancer   File \"/usr/local/lib/python3.6/site-packages/kuryr_kubernetes/controller/handlers/loadbalancer.py\", line 131, in _trigger_reconciliation\n2021-11-09 00:03:11.853 1 ERROR kuryr_kubernetes.controller.handlers.loadbalancer     lbaas_listings \u003d [{\u0027loadbalancer\u0027: lbaas.load_balancer},\n2021-11-09 00:03:11.853 1 ERROR kuryr_kubernetes.controller.handlers.loadbalancer AttributeError: \u0027Proxy\u0027 object has no attribute \u0027load_balancer\u0027\n\n[1] https://github.com/openstack/kuryr-tempest-plugin/blob/4bb12bd975a17dccfef0a7647c4a9bf3eae7134d/kuryr_tempest_plugin/tests/scenario/test_service.py#L343-L344","commit_id":"5a33364d172a9b7bc49c35bc10f0c146f08f745b"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"4a6dd28b4d737cce0f195e5647a39ff43f44760b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"bdb63163_66d25296","updated":"2021-11-09 14:58:51.000000000","message":"Can you check out my try to consolidate this so that we pull data to process in one place and put it as a list of tuples? It\u0027s in GitHub [1] and I haven\u0027t been fixing unit tests, so probably it\u0027s required.\n\n[1] https://github.com/dulek/kuryr-kubernetes/commit/46633792e2649dc81418ce311cbcf46613e63bcd","commit_id":"5a33364d172a9b7bc49c35bc10f0c146f08f745b"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"360a914788276875842208eda569991b17f2cb5b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"400240fb_10f38470","updated":"2021-11-08 23:01:01.000000000","message":"recheck","commit_id":"5a33364d172a9b7bc49c35bc10f0c146f08f745b"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"f7b563502affb559a21d118089e19703d996ad70","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":11,"id":"a940cc3c_e6a29989","in_reply_to":"bdb63163_66d25296","updated":"2021-11-09 15:13:20.000000000","message":"\u003e Can you check out my try to consolidate this so that we pull data to process in one place and put it as a list of tuples? It\u0027s in GitHub [1] and I haven\u0027t been fixing unit tests, so probably it\u0027s required.\n\u003e \n\u003e [1] https://github.com/dulek/kuryr-kubernetes/commit/46633792e2649dc81418ce311cbcf46613e63bcd\n\nI have taken a look and sure this approach looks more cleaner. Let me adapt and also fix the unit tests","commit_id":"5a33364d172a9b7bc49c35bc10f0c146f08f745b"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"e2cabceee7ff770c4c9e3146f9598a0fed7ce749","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"edede9ca_7729a8c7","updated":"2021-11-24 09:32:48.000000000","message":"Great work, Sunday! I just have one small suggestion:","commit_id":"1fea33c5acecf74a5703874e609042d3d37a1c56"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"870766e7a4a29760405944f4666d02b61ee15be4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"9c96dd78_94ff84d3","updated":"2021-11-25 18:13:50.000000000","message":"recheck","commit_id":"3e31b6abdbc609fd2320c5935da3e12bfd04443a"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"594138eccc81b8e5a1f4133cc4630474d25e518b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"c35cee13_c5ae5dd8","updated":"2021-11-26 12:27:02.000000000","message":"recheck","commit_id":"3e31b6abdbc609fd2320c5935da3e12bfd04443a"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"2c238dc53f332f8cff95b1736d031e8be1ae130f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"b25ab78c_e8c7b0a5","updated":"2021-11-30 16:55:03.000000000","message":"This looks pretty okay now.","commit_id":"2dbf212d47a1e904064cb1e1870888f7d97903fb"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"103d8713c4124eb43da5480a510d0d0cd8e453d4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":17,"id":"fb3456f6_15ef866a","updated":"2021-12-02 12:30:56.000000000","message":"I guess you should remove \"wip:\" from the commit title now?","commit_id":"1836ba60df1b0996ec12d960f73da995f2483e79"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"c7710cdde59bac055a9b674d28a36cff68bb9674","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"ba0b813d_44557b97","updated":"2021-12-03 06:19:07.000000000","message":"recheck","commit_id":"6429f7674d8a78e529a4510a8a52bc0bcda6bc4f"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"e003532248cf2a2ead809324dba677c651390c01","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"18103c66_a3879207","updated":"2021-12-04 16:43:01.000000000","message":"recheck","commit_id":"160b96ec34d73e314533e72e0ccc4f486d8aeff8"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"71f6c36ad782b9970caee171e7fb98bb7824eb4d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"3a6e1e19_1be6f44e","updated":"2021-12-03 17:01:06.000000000","message":"recheck","commit_id":"160b96ec34d73e314533e72e0ccc4f486d8aeff8"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"cd20c1301d5115ed01f49fcbb8b311038ba8f952","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":21,"id":"fb24d989_73f4abac","updated":"2021-12-07 09:01:20.000000000","message":"There are some tiny findings, but overall looks good.","commit_id":"68e55339a6290a7418668a9e27dd0e0e64db14b3"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"125f681aa9c829d2cb9f769947bb54a35bb1bcb9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":25,"id":"a74295bb_669b3f36","updated":"2021-12-10 16:16:34.000000000","message":"Okay, let\u0027s see if the unnecessary reconciliation disappears from the gate logs.","commit_id":"71b6d018a493a9492522499e11a0dab7866c8e2b"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"5aaf01c4c91ea2c09bfadac90fae261168ce559f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":25,"id":"b94e5f44_b8452f62","updated":"2021-12-11 13:55:02.000000000","message":"Thank you, Sunday. The patch already looks great, there is just minor adjustment left:","commit_id":"71b6d018a493a9492522499e11a0dab7866c8e2b"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"957e73c3d8c20da5f6834b6079cc4abb40539881","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":25,"id":"213c0686_98e5ac39","updated":"2021-12-10 18:32:16.000000000","message":"Yup, looks better now.","commit_id":"71b6d018a493a9492522499e11a0dab7866c8e2b"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"f286504bd01441ce7751b2d1dc6932d1369553ed","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":25,"id":"84c77755_256ce1c4","updated":"2021-12-10 18:32:01.000000000","message":"recheck","commit_id":"71b6d018a493a9492522499e11a0dab7866c8e2b"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"7067c822f8632115e08de8b5e4d632f32d0bcdaa","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":26,"id":"d92e63b9_cdd5bdc4","updated":"2021-12-15 23:12:32.000000000","message":"It looks good. Just needs to be rebased. You can do it with the UI, there is a \"rebase\" button","commit_id":"6762bdb25c40294c91c2d95bffb0c78c6cf8053b"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"57a397b78e30e8f25e93eece3845fdca9a01440f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":26,"id":"7c9e3ebe_67c021a4","in_reply_to":"d92e63b9_cdd5bdc4","updated":"2021-12-16 05:31:51.000000000","message":"\u003e It looks good. Just needs to be rebased. You can do it with the UI, there is a \"rebase\" button\n\nI am getting a error using the UI button. \u0027The change could not be rebased due to conflict during merge\u0027. So let me rebase with the CLI","commit_id":"6762bdb25c40294c91c2d95bffb0c78c6cf8053b"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"d28cfe5b03d3f62768f8495069c6a9a0471582ab","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":29,"id":"cb3acbd3_3e23d7d7","updated":"2021-12-16 12:55:25.000000000","message":"recheck","commit_id":"6da97aa78811286fdfba90c60a7a87212222bfd0"}],"kuryr_kubernetes/controller/handlers/loadbalancer.py":[{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"690d1231fbb481fe5795c832606de466e0481961","unresolved":true,"context_lines":[{"line_number":151,"context_line":"                  crds_to_reconcile_selflink)"},{"line_number":152,"context_line":"        self._reconcile_lbaas(crds_to_reconcile_selflink)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def _trigger_listener_reconciliation(self, loadbalancer_crds):"},{"line_number":155,"context_line":"        LOG.debug(\"Reconciling the listener CRDs\")"},{"line_number":156,"context_line":"        # get the loadbalancers id in the CRD status"},{"line_number":157,"context_line":"        crd_lsnrs_by_id \u003d [{\u0027id\u0027: l[\u0027id\u0027], \u0027selflink\u0027: utils.get_res_link("},{"line_number":158,"context_line":"                           loadbalancer_crd)} for loadbalancer_crd in"},{"line_number":159,"context_line":"                           loadbalancer_crds for l in loadbalancer_crd["},{"line_number":160,"context_line":"                           \u0027status\u0027].get(\u0027listeners\u0027, [])]"},{"line_number":161,"context_line":"        lbaas \u003d clients.get_loadbalancer_client()"},{"line_number":162,"context_line":"        lbaas_spec \u003d {}"},{"line_number":163,"context_line":"        self._drv_lbaas.add_tags(\u0027listener\u0027, lbaas_spec)"},{"line_number":164,"context_line":"        lsners \u003d lbaas.listeners(**lbaas_spec)"},{"line_number":165,"context_line":"        lsners_id \u003d [lsner[\u0027id\u0027] for lsner in lsners]"},{"line_number":166,"context_line":"        crds_to_reconcile_selflink \u003d [crd_lb[\u0027selflink\u0027] for crd_lb in"},{"line_number":167,"context_line":"                                      crd_lsnrs_by_id if"},{"line_number":168,"context_line":"                                      crd_lb[\u0027id\u0027] not in lsners_id]"},{"line_number":169,"context_line":"        if not crds_to_reconcile_selflink:"},{"line_number":170,"context_line":"            LOG.debug(\"KuryrLoadBalancer Listener CRDs already in sync\""},{"line_number":171,"context_line":"                      \"with OpenStack\")"},{"line_number":172,"context_line":"            return"},{"line_number":173,"context_line":"        LOG.debug(\"Reconciling the following KuryrLoadBalancer CRDs: %r\","},{"line_number":174,"context_line":"                  crds_to_reconcile_selflink)"},{"line_number":175,"context_line":"        self._reconcile_lbaas(crds_to_reconcile_selflink)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def _reconcile_lbaas(self, crds_to_reconcile_selflink):"},{"line_number":178,"context_line":"        kubernetes \u003d clients.get_kubernetes_client()"}],"source_content_type":"text/x-python","patch_set":1,"id":"99491f54_a5eb80e9","line":175,"range":{"start_line":154,"start_character":0,"end_line":175,"end_character":57},"updated":"2021-10-20 09:59:30.000000000","message":"This code fragment is almost the same as in _trigger_loadbalancer_reconciliation. Perhaps we could make this a bit more generic by creating a generic function that would be used by all the resources(loadbalancers, listeners, pools, members). Basically this function could receive as parameters the list of crd_resources_by_id and then the name of the attribute to be fetched by the lbaas client (probably by using getattr) and the rest would be the same.\n\nwdyt?","commit_id":"8afe9ed018cac974da64308c0dd9b920edd51249"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"695c47fcb2bc676b5566a3ccd5106150db71933d","unresolved":true,"context_lines":[{"line_number":151,"context_line":"                  crds_to_reconcile_selflink)"},{"line_number":152,"context_line":"        self._reconcile_lbaas(crds_to_reconcile_selflink)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def _trigger_listener_reconciliation(self, loadbalancer_crds):"},{"line_number":155,"context_line":"        LOG.debug(\"Reconciling the listener CRDs\")"},{"line_number":156,"context_line":"        # get the loadbalancers id in the CRD status"},{"line_number":157,"context_line":"        crd_lsnrs_by_id \u003d [{\u0027id\u0027: l[\u0027id\u0027], \u0027selflink\u0027: utils.get_res_link("},{"line_number":158,"context_line":"                           loadbalancer_crd)} for loadbalancer_crd in"},{"line_number":159,"context_line":"                           loadbalancer_crds for l in loadbalancer_crd["},{"line_number":160,"context_line":"                           \u0027status\u0027].get(\u0027listeners\u0027, [])]"},{"line_number":161,"context_line":"        lbaas \u003d clients.get_loadbalancer_client()"},{"line_number":162,"context_line":"        lbaas_spec \u003d {}"},{"line_number":163,"context_line":"        self._drv_lbaas.add_tags(\u0027listener\u0027, lbaas_spec)"},{"line_number":164,"context_line":"        lsners \u003d lbaas.listeners(**lbaas_spec)"},{"line_number":165,"context_line":"        lsners_id \u003d [lsner[\u0027id\u0027] for lsner in lsners]"},{"line_number":166,"context_line":"        crds_to_reconcile_selflink \u003d [crd_lb[\u0027selflink\u0027] for crd_lb in"},{"line_number":167,"context_line":"                                      crd_lsnrs_by_id if"},{"line_number":168,"context_line":"                                      crd_lb[\u0027id\u0027] not in lsners_id]"},{"line_number":169,"context_line":"        if not crds_to_reconcile_selflink:"},{"line_number":170,"context_line":"            LOG.debug(\"KuryrLoadBalancer Listener CRDs already in sync\""},{"line_number":171,"context_line":"                      \"with OpenStack\")"},{"line_number":172,"context_line":"            return"},{"line_number":173,"context_line":"        LOG.debug(\"Reconciling the following KuryrLoadBalancer CRDs: %r\","},{"line_number":174,"context_line":"                  crds_to_reconcile_selflink)"},{"line_number":175,"context_line":"        self._reconcile_lbaas(crds_to_reconcile_selflink)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def _reconcile_lbaas(self, crds_to_reconcile_selflink):"},{"line_number":178,"context_line":"        kubernetes \u003d clients.get_kubernetes_client()"}],"source_content_type":"text/x-python","patch_set":1,"id":"8b8fda2c_22c2572c","line":175,"range":{"start_line":154,"start_character":0,"end_line":175,"end_character":57},"in_reply_to":"99491f54_a5eb80e9","updated":"2021-10-20 10:07:47.000000000","message":"\u003e This code fragment is almost the same as in _trigger_loadbalancer_reconciliation. Perhaps we could make this a bit more generic by creating a generic function that would be used by all the resources(loadbalancers, listeners, pools, members). Basically this function could receive as parameters the list of crd_resources_by_id and then the name of the attribute to be fetched by the lbaas client (probably by using getattr) and the rest would be the same.\n\u003e \n\u003e wdyt?\n\nYes, I thought of refactoring to make the reconciliation more generic like defining _trigger_reconciliation() and passing the crd_resources_id. Let me see what I can come up with","commit_id":"8afe9ed018cac974da64308c0dd9b920edd51249"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"930c7c00f9806eb1d74f7a9f50d900da68d42d9f","unresolved":true,"context_lines":[{"line_number":142,"context_line":"    def _run_reconciliation(self, crd_resources_by_id):"},{"line_number":143,"context_line":"        lbaas \u003d clients.get_loadbalancer_client()"},{"line_number":144,"context_line":"        lbaas_spec \u003d {}"},{"line_number":145,"context_line":"        # loop through resource and get the name attribute"},{"line_number":146,"context_line":"        for resource in crd_resources_by_id:"},{"line_number":147,"context_line":"            for crd in resource:"},{"line_number":148,"context_line":"                name \u003d crd.get(\u0027name\u0027, {})"},{"line_number":149,"context_line":"                self._drv_lbaas.add_tags(name, lbaas_spec)"},{"line_number":150,"context_line":"                if name \u003d\u003d \u0027loadbalancer\u0027:"},{"line_number":151,"context_line":"                    resources \u003d lbaas.load_balancers(**lbaas_spec)"},{"line_number":152,"context_line":"                elif name \u003d\u003d \u0027listener\u0027:"},{"line_number":153,"context_line":"                    resources \u003d lbaas.listeners(**lbaas_spec)"},{"line_number":154,"context_line":"                resources_id \u003d [rsrc[\u0027id\u0027] for rsrc in resources]"},{"line_number":155,"context_line":"                if crd[\u0027id\u0027] in resources_id:"},{"line_number":156,"context_line":"                    continue"},{"line_number":157,"context_line":"                else:"},{"line_number":158,"context_line":"                    crd_to_reconcile_selflink \u003d crd[\u0027selflink\u0027]"},{"line_number":159,"context_line":"                    LOG.debug(\"Reconciling {} KuryrLoadBalancer CRDs:\""},{"line_number":160,"context_line":"                              \"{}\".format(name, crd_to_reconcile_selflink))"},{"line_number":161,"context_line":"                    self._reconcile_lbaas(crd_to_reconcile_selflink)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def _reconcile_lbaas(self, selflink):"},{"line_number":164,"context_line":"        kubernetes \u003d clients.get_kubernetes_client()"}],"source_content_type":"text/x-python","patch_set":2,"id":"c7fb9723_c8ac5078","line":161,"range":{"start_line":145,"start_character":0,"end_line":161,"end_character":68},"updated":"2021-10-21 16:21:47.000000000","message":"A better structure would be to loop over functions you use to fetch the state from Octavia API, i.e. lbaas.load_balancers and lbaas.listeners. Also this code calls Octavia for each of the CRDs, isn\u0027t it? This is waste of resources, that should be on the upper loop.","commit_id":"98a54c9ff285bb8d1a6ecf2d7eb013c9caca644b"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"c8d818f251ae9948b1a7b23df610bee12f0335d5","unresolved":true,"context_lines":[{"line_number":142,"context_line":"    def _run_reconciliation(self, crd_resources_by_id):"},{"line_number":143,"context_line":"        lbaas \u003d clients.get_loadbalancer_client()"},{"line_number":144,"context_line":"        lbaas_spec \u003d {}"},{"line_number":145,"context_line":"        # loop through resource and get the name attribute"},{"line_number":146,"context_line":"        for resource in crd_resources_by_id:"},{"line_number":147,"context_line":"            for crd in resource:"},{"line_number":148,"context_line":"                name \u003d crd.get(\u0027name\u0027, {})"},{"line_number":149,"context_line":"                self._drv_lbaas.add_tags(name, lbaas_spec)"},{"line_number":150,"context_line":"                if name \u003d\u003d \u0027loadbalancer\u0027:"},{"line_number":151,"context_line":"                    resources \u003d lbaas.load_balancers(**lbaas_spec)"},{"line_number":152,"context_line":"                elif name \u003d\u003d \u0027listener\u0027:"},{"line_number":153,"context_line":"                    resources \u003d lbaas.listeners(**lbaas_spec)"},{"line_number":154,"context_line":"                resources_id \u003d [rsrc[\u0027id\u0027] for rsrc in resources]"},{"line_number":155,"context_line":"                if crd[\u0027id\u0027] in resources_id:"},{"line_number":156,"context_line":"                    continue"},{"line_number":157,"context_line":"                else:"},{"line_number":158,"context_line":"                    crd_to_reconcile_selflink \u003d crd[\u0027selflink\u0027]"},{"line_number":159,"context_line":"                    LOG.debug(\"Reconciling {} KuryrLoadBalancer CRDs:\""},{"line_number":160,"context_line":"                              \"{}\".format(name, crd_to_reconcile_selflink))"},{"line_number":161,"context_line":"                    self._reconcile_lbaas(crd_to_reconcile_selflink)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def _reconcile_lbaas(self, selflink):"},{"line_number":164,"context_line":"        kubernetes \u003d clients.get_kubernetes_client()"}],"source_content_type":"text/x-python","patch_set":2,"id":"ea4654e8_589a4f30","line":161,"range":{"start_line":145,"start_character":0,"end_line":161,"end_character":68},"in_reply_to":"1e9754a7_e1d04fb1","updated":"2021-10-25 13:21:29.000000000","message":"\u003e Yep, I believe Octavia calls should be moved to line 146. I\u0027d also change the method to something like this so that you can pass it lbaas.load_balancers and lbaas.listeners and don\u0027t need to save resource type:\n\u003e \n\u003e def _run_reconciliation(self, crd_resources_by_id, method):\n\u003e     lbaas \u003d clients.get_loadbalancer_client()\n\u003e     lbaas_spec \u003d {}\n\u003e     # loop through resource and get the name attribute\n\u003e     for resource in crd_resources_by_id:\n\u003e         for crd in resource:\n\u003e             name \u003d crd.get(\u0027name\u0027, {})\n\u003e             self._drv_lbaas.add_tags(name, lbaas_spec)\n\u003e             resources \u003d method(**lbaas_spec)\n\u003e             resources_id \u003d [rsrc[\u0027id\u0027] for rsrc in resources]\n\u003e             if crd[\u0027id\u0027] in resources_id:\n\u003e                 continue\n\u003e             else:\n\u003e                 crd_to_reconcile_selflink \u003d crd[\u0027selflink\u0027]\n\u003e                 LOG.debug(\"Reconciling {} KuryrLoadBalancer CRDs:\"\n\u003e                           \"{}\".format(name, crd_to_reconcile_selflink))\n\u003e                 self._reconcile_lbaas(crd_to_reconcile_selflink)\n\nCould method be a list of lbaas.load_balancers and lbaas.listeners?","commit_id":"98a54c9ff285bb8d1a6ecf2d7eb013c9caca644b"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"3a3e3b963302df3a2c8614a90888c971b0dce41c","unresolved":true,"context_lines":[{"line_number":142,"context_line":"    def _run_reconciliation(self, crd_resources_by_id):"},{"line_number":143,"context_line":"        lbaas \u003d clients.get_loadbalancer_client()"},{"line_number":144,"context_line":"        lbaas_spec \u003d {}"},{"line_number":145,"context_line":"        # loop through resource and get the name attribute"},{"line_number":146,"context_line":"        for resource in crd_resources_by_id:"},{"line_number":147,"context_line":"            for crd in resource:"},{"line_number":148,"context_line":"                name \u003d crd.get(\u0027name\u0027, {})"},{"line_number":149,"context_line":"                self._drv_lbaas.add_tags(name, lbaas_spec)"},{"line_number":150,"context_line":"                if name \u003d\u003d \u0027loadbalancer\u0027:"},{"line_number":151,"context_line":"                    resources \u003d lbaas.load_balancers(**lbaas_spec)"},{"line_number":152,"context_line":"                elif name \u003d\u003d \u0027listener\u0027:"},{"line_number":153,"context_line":"                    resources \u003d lbaas.listeners(**lbaas_spec)"},{"line_number":154,"context_line":"                resources_id \u003d [rsrc[\u0027id\u0027] for rsrc in resources]"},{"line_number":155,"context_line":"                if crd[\u0027id\u0027] in resources_id:"},{"line_number":156,"context_line":"                    continue"},{"line_number":157,"context_line":"                else:"},{"line_number":158,"context_line":"                    crd_to_reconcile_selflink \u003d crd[\u0027selflink\u0027]"},{"line_number":159,"context_line":"                    LOG.debug(\"Reconciling {} KuryrLoadBalancer CRDs:\""},{"line_number":160,"context_line":"                              \"{}\".format(name, crd_to_reconcile_selflink))"},{"line_number":161,"context_line":"                    self._reconcile_lbaas(crd_to_reconcile_selflink)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def _reconcile_lbaas(self, selflink):"},{"line_number":164,"context_line":"        kubernetes \u003d clients.get_kubernetes_client()"}],"source_content_type":"text/x-python","patch_set":2,"id":"d258a8f1_47ee0194","line":161,"range":{"start_line":145,"start_character":0,"end_line":161,"end_character":68},"in_reply_to":"c7fb9723_c8ac5078","updated":"2021-10-23 07:50:02.000000000","message":"\u003e A better structure would be to loop over functions you use to fetch the state from Octavia API, i.e. lbaas.load_balancers and lbaas.listeners. Also this code calls Octavia for each of the CRDs, isn\u0027t it? This is waste of resources, that should be on the upper loop.\n\nI am getting each resource in lines 146,147. Do you mean I need to move line 149 to line 147 then loop through the octavia calls?","commit_id":"98a54c9ff285bb8d1a6ecf2d7eb013c9caca644b"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"678b4af87d319a6d2c67ce04b6e196ea4e780a7f","unresolved":true,"context_lines":[{"line_number":142,"context_line":"    def _run_reconciliation(self, crd_resources_by_id):"},{"line_number":143,"context_line":"        lbaas \u003d clients.get_loadbalancer_client()"},{"line_number":144,"context_line":"        lbaas_spec \u003d {}"},{"line_number":145,"context_line":"        # loop through resource and get the name attribute"},{"line_number":146,"context_line":"        for resource in crd_resources_by_id:"},{"line_number":147,"context_line":"            for crd in resource:"},{"line_number":148,"context_line":"                name \u003d crd.get(\u0027name\u0027, {})"},{"line_number":149,"context_line":"                self._drv_lbaas.add_tags(name, lbaas_spec)"},{"line_number":150,"context_line":"                if name \u003d\u003d \u0027loadbalancer\u0027:"},{"line_number":151,"context_line":"                    resources \u003d lbaas.load_balancers(**lbaas_spec)"},{"line_number":152,"context_line":"                elif name \u003d\u003d \u0027listener\u0027:"},{"line_number":153,"context_line":"                    resources \u003d lbaas.listeners(**lbaas_spec)"},{"line_number":154,"context_line":"                resources_id \u003d [rsrc[\u0027id\u0027] for rsrc in resources]"},{"line_number":155,"context_line":"                if crd[\u0027id\u0027] in resources_id:"},{"line_number":156,"context_line":"                    continue"},{"line_number":157,"context_line":"                else:"},{"line_number":158,"context_line":"                    crd_to_reconcile_selflink \u003d crd[\u0027selflink\u0027]"},{"line_number":159,"context_line":"                    LOG.debug(\"Reconciling {} KuryrLoadBalancer CRDs:\""},{"line_number":160,"context_line":"                              \"{}\".format(name, crd_to_reconcile_selflink))"},{"line_number":161,"context_line":"                    self._reconcile_lbaas(crd_to_reconcile_selflink)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def _reconcile_lbaas(self, selflink):"},{"line_number":164,"context_line":"        kubernetes \u003d clients.get_kubernetes_client()"}],"source_content_type":"text/x-python","patch_set":2,"id":"1e9754a7_e1d04fb1","line":161,"range":{"start_line":145,"start_character":0,"end_line":161,"end_character":68},"in_reply_to":"d258a8f1_47ee0194","updated":"2021-10-25 12:32:28.000000000","message":"Yep, I believe Octavia calls should be moved to line 146. I\u0027d also change the method to something like this so that you can pass it lbaas.load_balancers and lbaas.listeners and don\u0027t need to save resource type:\n\ndef _run_reconciliation(self, crd_resources_by_id, method):\n    lbaas \u003d clients.get_loadbalancer_client()\n    lbaas_spec \u003d {}\n    # loop through resource and get the name attribute\n    for resource in crd_resources_by_id:\n        for crd in resource:\n            name \u003d crd.get(\u0027name\u0027, {})\n            self._drv_lbaas.add_tags(name, lbaas_spec)\n            resources \u003d method(**lbaas_spec)\n            resources_id \u003d [rsrc[\u0027id\u0027] for rsrc in resources]\n            if crd[\u0027id\u0027] in resources_id:\n                continue\n            else:\n                crd_to_reconcile_selflink \u003d crd[\u0027selflink\u0027]\n                LOG.debug(\"Reconciling {} KuryrLoadBalancer CRDs:\"\n                          \"{}\".format(name, crd_to_reconcile_selflink))\n                self._reconcile_lbaas(crd_to_reconcile_selflink)","commit_id":"98a54c9ff285bb8d1a6ecf2d7eb013c9caca644b"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"7fce0b94358b5ebd8b913b7017376d5940908856","unresolved":true,"context_lines":[{"line_number":129,"context_line":"        LOG.debug(\"Reconciling the KuryrLoadBalancer CRDs\")"},{"line_number":130,"context_line":"        lbaas_spec \u003d {}"},{"line_number":131,"context_line":"        lbaas \u003d clients.get_loadbalancer_client()"},{"line_number":132,"context_line":"        crd_lsnrs_by_id \u003d [{\u0027id\u0027: l[\u0027id\u0027],"},{"line_number":133,"context_line":"                           \u0027selflink\u0027: utils.get_res_link(loadbalancer_crd)}"},{"line_number":134,"context_line":"                           for loadbalancer_crd in loadbalancer_crds"},{"line_number":135,"context_line":"                           for l in loadbalancer_crd[\u0027status\u0027].get(\u0027listeners\u0027,"},{"line_number":136,"context_line":"                           [])]"},{"line_number":137,"context_line":"        self._drv_lbaas.add_tags(\u0027listener\u0027, lbaas_spec)"},{"line_number":138,"context_line":"        self._run_reconciliation(crd_lsnrs_by_id, lbaas.listeners)"},{"line_number":139,"context_line":"        crd_lbs_by_id \u003d [{\u0027id\u0027: loadbalancer_crd.get("},{"line_number":140,"context_line":"                         \u0027status\u0027, {}).get(\u0027loadbalancer\u0027, {}).get(\u0027id\u0027, {}),"},{"line_number":141,"context_line":"                         \u0027selflink\u0027: utils.get_res_link(loadbalancer_crd)}"},{"line_number":142,"context_line":"                         for loadbalancer_crd in loadbalancer_crds]"},{"line_number":143,"context_line":"        self._drv_lbaas.add_tags(\u0027loadbalancer\u0027, lbaas_spec)"},{"line_number":144,"context_line":"        self._run_reconciliation(crd_lbs_by_id, lbaas.load_balancers)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _run_reconciliation(self, crd_resources_by_id, os_list):"},{"line_number":147,"context_line":"        lbaas_spec \u003d {}"}],"source_content_type":"text/x-python","patch_set":6,"id":"b0339342_78e9eac4","line":144,"range":{"start_line":132,"start_character":0,"end_line":144,"end_character":69},"updated":"2021-10-29 11:08:18.000000000","message":"Note that this code fragment looks duplicated. You could have a list of the lbaas functions like [{\u0027loadbalancer\u0027: lbaas.load_balancers}, {\u0027listeners\u0027: lbaas.listeners}, ...] iterate over it, fetch the crds_by_id inside this loop and let _run_reconciliation handle the rest.","commit_id":"c593efe954f8bfea52ffe6a5698ae10a40b54d91"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"7fce0b94358b5ebd8b913b7017376d5940908856","unresolved":true,"context_lines":[{"line_number":154,"context_line":"                crd_to_reconcile_selflink \u003d crd[\u0027selflink\u0027]"},{"line_number":155,"context_line":"                LOG.debug(\"Reconciling KuryrLoadBalancer CRDs: %s\","},{"line_number":156,"context_line":"                          crd_to_reconcile_selflink)"},{"line_number":157,"context_line":"                self._reconcile_lbaas(crd_to_reconcile_selflink)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def _reconcile_lbaas(self, selflink):"},{"line_number":160,"context_line":"        kubernetes \u003d clients.get_kubernetes_client()"}],"source_content_type":"text/x-python","patch_set":6,"id":"669a154a_0424d0dc","line":157,"range":{"start_line":157,"start_character":16,"end_line":157,"end_character":64},"updated":"2021-10-29 11:08:18.000000000","message":"If any k8s exception is seen it should still continue to allow the rest of resources to be handled, just as was done previously.","commit_id":"c593efe954f8bfea52ffe6a5698ae10a40b54d91"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"c0b2c1f5ee55bc7d4456b3b22592c39d03185ef7","unresolved":true,"context_lines":[{"line_number":128,"context_line":"    def _trigger_reconciliation(self, loadbalancer_crds):"},{"line_number":129,"context_line":"        LOG.debug(\"Reconciling the KuryrLoadBalancer CRDs\")"},{"line_number":130,"context_line":"        lbaas \u003d clients.get_loadbalancer_client()"},{"line_number":131,"context_line":"        lbaas_listings \u003d [{\u0027loadbalancer\u0027: lbaas.load_balancer},"},{"line_number":132,"context_line":"                          {\u0027listener\u0027: lbaas.listener}]"},{"line_number":133,"context_line":"        for lst in lbaas_listings:"},{"line_number":134,"context_line":"            crd_lbs_by_id \u003d [{\u0027id\u0027: loadbalancer_crd.get(\u0027status\u0027, {}).get("}],"source_content_type":"text/x-python","patch_set":11,"id":"51bf1cea_2b12f549","line":131,"range":{"start_line":131,"start_character":49,"end_line":131,"end_character":62},"updated":"2021-11-09 14:37:21.000000000","message":"This should be load_balancers.","commit_id":"5a33364d172a9b7bc49c35bc10f0c146f08f745b"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"e2cabceee7ff770c4c9e3146f9598a0fed7ce749","unresolved":true,"context_lines":[{"line_number":128,"context_line":"    def _trigger_reconciliation(self, loadbalancer_crds):"},{"line_number":129,"context_line":"        LOG.debug(\"Reconciling the KuryrLoadBalancer CRDs\")"},{"line_number":130,"context_line":"        lbaas \u003d clients.get_loadbalancer_client()"},{"line_number":131,"context_line":"        to_check \u003d [(\u0027loadbalancer\u0027, lbaas.load_balancers,"},{"line_number":132,"context_line":"                    [{\u0027id\u0027: loadbalancer_crd.get(\u0027status\u0027, {}).get("},{"line_number":133,"context_line":"                        \u0027loadbalancer\u0027, {}).get(\u0027id\u0027, {}),"},{"line_number":134,"context_line":"                     \u0027selflink\u0027: utils.get_res_link(loadbalancer_crd)}"},{"line_number":135,"context_line":"                     for loadbalancer_crd in loadbalancer_crds]),"},{"line_number":136,"context_line":"                    (\u0027listener\u0027, lbaas.listeners,"},{"line_number":137,"context_line":"                     [{\u0027id\u0027: l[\u0027id\u0027], \u0027selflink\u0027: utils.get_res_link("},{"line_number":138,"context_line":"                         loadbalancer_crd)} for loadbalancer_crd in"},{"line_number":139,"context_line":"                      loadbalancer_crds for l in loadbalancer_crd["},{"line_number":140,"context_line":"                          \u0027status\u0027].get(\u0027listeners\u0027, [])])]"},{"line_number":141,"context_line":"        for res, os_list, ids in to_check:"},{"line_number":142,"context_line":"            filters \u003d {}"},{"line_number":143,"context_line":"            self._drv_lbaas.add_tags(res, filters)"}],"source_content_type":"text/x-python","patch_set":13,"id":"5ecf37fe_fc336403","line":140,"range":{"start_line":131,"start_character":0,"end_line":140,"end_character":59},"updated":"2021-11-24 09:32:48.000000000","message":"instead  of having 3 loops, it might be better to have 2 by first looping trough the loadbalancer CRDs populating the list with the loadbalancer info and inside this loop iterate over the listeners and populate the list.","commit_id":"1fea33c5acecf74a5703874e609042d3d37a1c56"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"80f8487f2fd6426c3d20ce56577c9f07d7471fc3","unresolved":true,"context_lines":[{"line_number":128,"context_line":"    def _trigger_reconciliation(self, loadbalancer_crds):"},{"line_number":129,"context_line":"        LOG.debug(\"Reconciling the KuryrLoadBalancer CRDs\")"},{"line_number":130,"context_line":"        lbaas \u003d clients.get_loadbalancer_client()"},{"line_number":131,"context_line":"        to_check \u003d [(\u0027loadbalancer\u0027, lbaas.load_balancers,"},{"line_number":132,"context_line":"                    [{\u0027id\u0027: loadbalancer_crd.get(\u0027status\u0027, {}).get("},{"line_number":133,"context_line":"                        \u0027loadbalancer\u0027, {}).get(\u0027id\u0027, {}),"},{"line_number":134,"context_line":"                     \u0027selflink\u0027: utils.get_res_link(loadbalancer_crd)}"},{"line_number":135,"context_line":"                     for loadbalancer_crd in loadbalancer_crds]),"},{"line_number":136,"context_line":"                    (\u0027listener\u0027, lbaas.listeners,"},{"line_number":137,"context_line":"                     [{\u0027id\u0027: l[\u0027id\u0027], \u0027selflink\u0027: utils.get_res_link("},{"line_number":138,"context_line":"                         loadbalancer_crd)} for loadbalancer_crd in"},{"line_number":139,"context_line":"                      loadbalancer_crds for l in loadbalancer_crd["},{"line_number":140,"context_line":"                          \u0027status\u0027].get(\u0027listeners\u0027, [])])]"},{"line_number":141,"context_line":"        for res, os_list, ids in to_check:"},{"line_number":142,"context_line":"            filters \u003d {}"},{"line_number":143,"context_line":"            self._drv_lbaas.add_tags(res, filters)"}],"source_content_type":"text/x-python","patch_set":13,"id":"88c206b5_f39f970e","line":140,"range":{"start_line":131,"start_character":0,"end_line":140,"end_character":59},"in_reply_to":"5ecf37fe_fc336403","updated":"2021-11-24 11:24:45.000000000","message":"Okay let me fix this. Thanks","commit_id":"1fea33c5acecf74a5703874e609042d3d37a1c56"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"e2cabceee7ff770c4c9e3146f9598a0fed7ce749","unresolved":true,"context_lines":[{"line_number":138,"context_line":"                         loadbalancer_crd)} for loadbalancer_crd in"},{"line_number":139,"context_line":"                      loadbalancer_crds for l in loadbalancer_crd["},{"line_number":140,"context_line":"                          \u0027status\u0027].get(\u0027listeners\u0027, [])])]"},{"line_number":141,"context_line":"        for res, os_list, ids in to_check:"},{"line_number":142,"context_line":"            filters \u003d {}"},{"line_number":143,"context_line":"            self._drv_lbaas.add_tags(res, filters)"},{"line_number":144,"context_line":"            for crd in ids:"}],"source_content_type":"text/x-python","patch_set":13,"id":"24d91cf3_b33ce34f","line":141,"range":{"start_line":141,"start_character":12,"end_line":141,"end_character":15},"updated":"2021-11-24 09:32:48.000000000","message":"having the full name might be more clear, like \"resource\"","commit_id":"1fea33c5acecf74a5703874e609042d3d37a1c56"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"80f8487f2fd6426c3d20ce56577c9f07d7471fc3","unresolved":true,"context_lines":[{"line_number":138,"context_line":"                         loadbalancer_crd)} for loadbalancer_crd in"},{"line_number":139,"context_line":"                      loadbalancer_crds for l in loadbalancer_crd["},{"line_number":140,"context_line":"                          \u0027status\u0027].get(\u0027listeners\u0027, [])])]"},{"line_number":141,"context_line":"        for res, os_list, ids in to_check:"},{"line_number":142,"context_line":"            filters \u003d {}"},{"line_number":143,"context_line":"            self._drv_lbaas.add_tags(res, filters)"},{"line_number":144,"context_line":"            for crd in ids:"}],"source_content_type":"text/x-python","patch_set":13,"id":"daf30fbb_c64f040a","line":141,"range":{"start_line":141,"start_character":12,"end_line":141,"end_character":15},"in_reply_to":"24d91cf3_b33ce34f","updated":"2021-11-24 11:24:45.000000000","message":"Perfect!","commit_id":"1fea33c5acecf74a5703874e609042d3d37a1c56"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"dc233064e2a306ea94497679a55aacad5e723d75","unresolved":true,"context_lines":[{"line_number":128,"context_line":"    def _trigger_reconciliation(self, loadbalancer_crds):"},{"line_number":129,"context_line":"        LOG.debug(\"Reconciling the KuryrLoadBalancer CRDs\")"},{"line_number":130,"context_line":"        lbaas \u003d clients.get_loadbalancer_client()"},{"line_number":131,"context_line":"        method_map \u003d {"},{"line_number":132,"context_line":"                      \u0027loadbalancer\u0027: lbaas.load_balancers,"},{"line_number":133,"context_line":"                      \u0027listener\u0027: lbaas.listeners,"},{"line_number":134,"context_line":"                }"}],"source_content_type":"text/x-python","patch_set":14,"id":"6eebb9aa_79dfb29a","line":131,"range":{"start_line":131,"start_character":8,"end_line":131,"end_character":18},"updated":"2021-11-26 21:39:50.000000000","message":"resources_fn would be more descriptive","commit_id":"3e31b6abdbc609fd2320c5935da3e12bfd04443a"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"dc233064e2a306ea94497679a55aacad5e723d75","unresolved":true,"context_lines":[{"line_number":132,"context_line":"                      \u0027loadbalancer\u0027: lbaas.load_balancers,"},{"line_number":133,"context_line":"                      \u0027listener\u0027: lbaas.listeners,"},{"line_number":134,"context_line":"                }"},{"line_number":135,"context_line":"        to_check \u003d {"},{"line_number":136,"context_line":"                    \u0027loadbalancer\u0027: [],"},{"line_number":137,"context_line":"                    \u0027listener\u0027: [],"},{"line_number":138,"context_line":"                }"}],"source_content_type":"text/x-python","patch_set":14,"id":"f8a85eef_fc924856","line":135,"range":{"start_line":135,"start_character":8,"end_line":135,"end_character":16},"updated":"2021-11-26 21:39:50.000000000","message":"maybe \"resources\" would fit better?","commit_id":"3e31b6abdbc609fd2320c5935da3e12bfd04443a"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"d4b5746e0204fdb0cdd1f35ed78ea1a6f5a4eaa1","unresolved":true,"context_lines":[{"line_number":142,"context_line":"                \u0027status\u0027, {}).get(\u0027loadbalancer\u0027, {}).get(\u0027id\u0027, {}),"},{"line_number":143,"context_line":"                \u0027selflink\u0027: selflink})"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"            to_check[\u0027listener\u0027].extend({\u0027id\u0027: l[\u0027id\u0027], \u0027selflink\u0027: selflink}"},{"line_number":146,"context_line":"                                        for l in loadbalancer_crd.get("},{"line_number":147,"context_line":"                                            \u0027status\u0027, {}).get(\u0027listeners\u0027, []))"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7ac3b379_9bd475f2","line":145,"range":{"start_line":145,"start_character":33,"end_line":145,"end_character":39},"updated":"2021-11-26 21:41:14.000000000","message":"looks like an append could be done instead?","commit_id":"3e31b6abdbc609fd2320c5935da3e12bfd04443a"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"b5486e1cba155bfd70a089588e3aad60fcde377e","unresolved":true,"context_lines":[{"line_number":142,"context_line":"                \u0027status\u0027, {}).get(\u0027loadbalancer\u0027, {}).get(\u0027id\u0027, {}),"},{"line_number":143,"context_line":"                \u0027selflink\u0027: selflink})"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"            to_check[\u0027listener\u0027].extend({\u0027id\u0027: l[\u0027id\u0027], \u0027selflink\u0027: selflink}"},{"line_number":146,"context_line":"                                        for l in loadbalancer_crd.get("},{"line_number":147,"context_line":"                                            \u0027status\u0027, {}).get(\u0027listeners\u0027, []))"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"42991230_07293739","line":145,"range":{"start_line":145,"start_character":33,"end_line":145,"end_character":39},"in_reply_to":"7ac3b379_9bd475f2","updated":"2021-11-27 05:48:07.000000000","message":"I tested with append and it returned generators instead of the list items.","commit_id":"3e31b6abdbc609fd2320c5935da3e12bfd04443a"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"dc233064e2a306ea94497679a55aacad5e723d75","unresolved":true,"context_lines":[{"line_number":146,"context_line":"                                        for l in loadbalancer_crd.get("},{"line_number":147,"context_line":"                                            \u0027status\u0027, {}).get(\u0027listeners\u0027, []))"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        for resource, ids in to_check.items():"},{"line_number":150,"context_line":"            filters \u003d {}"},{"line_number":151,"context_line":"            self._drv_lbaas.add_tags(resource, filters)"},{"line_number":152,"context_line":"            os_list \u003d method_map.get(resource)"}],"source_content_type":"text/x-python","patch_set":14,"id":"935db407_b809c3fb","line":149,"range":{"start_line":149,"start_character":22,"end_line":149,"end_character":25},"updated":"2021-11-26 21:39:50.000000000","message":"shouldn\u0027t this be resource_details instead? it contains the list of dicts with ids and selflinks","commit_id":"3e31b6abdbc609fd2320c5935da3e12bfd04443a"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"dc233064e2a306ea94497679a55aacad5e723d75","unresolved":true,"context_lines":[{"line_number":151,"context_line":"            self._drv_lbaas.add_tags(resource, filters)"},{"line_number":152,"context_line":"            os_list \u003d method_map.get(resource)"},{"line_number":153,"context_line":"            for crd in ids:"},{"line_number":154,"context_line":"                os_resources \u003d os_list(**filters)"},{"line_number":155,"context_line":"                os_resources_id \u003d [rsrc[\u0027id\u0027] for rsrc in os_resources]"},{"line_number":156,"context_line":"                if crd[\u0027id\u0027] in os_resources_id:"},{"line_number":157,"context_line":"                    continue"},{"line_number":158,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":14,"id":"4d55c6e7_c416d89c","line":155,"range":{"start_line":154,"start_character":0,"end_line":155,"end_character":71},"updated":"2021-11-26 21:39:50.000000000","message":"It looks like this code fragment can be done before this loop at line 152 to avoid listing openstack resources multiple times.","commit_id":"3e31b6abdbc609fd2320c5935da3e12bfd04443a"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"2c238dc53f332f8cff95b1736d031e8be1ae130f","unresolved":true,"context_lines":[{"line_number":161,"context_line":"                    LOG.debug(\"Reconciling KuryrLoadBalancer CRD: %s\","},{"line_number":162,"context_line":"                              crd_to_reconcile_selflink)"},{"line_number":163,"context_line":"                    self._reconcile_lb(crd_to_reconcile_selflink)"},{"line_number":164,"context_line":"                    continue"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def _reconcile_lb(self, selflink):"},{"line_number":167,"context_line":"        kubernetes \u003d clients.get_kubernetes_client()"}],"source_content_type":"text/x-python","patch_set":15,"id":"ba680420_3c4409dc","line":164,"range":{"start_line":164,"start_character":20,"end_line":164,"end_character":28},"updated":"2021-11-30 16:55:03.000000000","message":"This continue is not really needed in this case…? Actually could it just be?\n\n                if crd[\u0027id\u0027] not in os_resources_id:\n                    crd_to_reconcile_selflink \u003d crd[\u0027selflink\u0027]\n                    LOG.debug(\"Reconciling KuryrLoadBalancer CRD: %s\",\n                              crd_to_reconcile_selflink)\n                    self._reconcile_lb(crd_to_reconcile_selflink)","commit_id":"2dbf212d47a1e904064cb1e1870888f7d97903fb"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"d6644133027dce5f86c744aed46fb375af5cf71c","unresolved":true,"context_lines":[{"line_number":159,"context_line":"                    LOG.debug(\"Reconciling KuryrLoadBalancer CRD: %s\","},{"line_number":160,"context_line":"                              crd_to_reconcile_selflink)"},{"line_number":161,"context_line":"                    self._reconcile_lb(crd_to_reconcile_selflink)"},{"line_number":162,"context_line":"                    continue"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def _reconcile_lb(self, selflink):"},{"line_number":165,"context_line":"        kubernetes \u003d clients.get_kubernetes_client()"}],"source_content_type":"text/x-python","patch_set":16,"id":"98b7be7b_2bdc051a","line":162,"range":{"start_line":162,"start_character":20,"end_line":162,"end_character":28},"updated":"2021-12-02 08:50:17.000000000","message":"This continue is still unnecessary, don\u0027t you think? The loop reaches it\u0027s end without interruptions, so it\u0027ll just do another iteration, no need to do `continue` explicitly.","commit_id":"78988c1f4cc688e563d2ccc05dd43a1bccf3234d"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"a3b291db03d7b5092f29657a4f2658388714c492","unresolved":true,"context_lines":[{"line_number":159,"context_line":"                    LOG.debug(\"Reconciling KuryrLoadBalancer CRD: %s\","},{"line_number":160,"context_line":"                              crd_to_reconcile_selflink)"},{"line_number":161,"context_line":"                    self._reconcile_lb(crd_to_reconcile_selflink)"},{"line_number":162,"context_line":"                    continue"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def _reconcile_lb(self, selflink):"},{"line_number":165,"context_line":"        kubernetes \u003d clients.get_kubernetes_client()"}],"source_content_type":"text/x-python","patch_set":16,"id":"fef073a9_f7d6ab31","line":162,"range":{"start_line":162,"start_character":20,"end_line":162,"end_character":28},"in_reply_to":"6150143c_da1dc967","updated":"2021-12-02 12:11:05.000000000","message":"\u003e +1\n\nOkay sure, not needed explicitly","commit_id":"78988c1f4cc688e563d2ccc05dd43a1bccf3234d"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"5162719c0ced0423fc679db58aa542b1fcc03c54","unresolved":true,"context_lines":[{"line_number":159,"context_line":"                    LOG.debug(\"Reconciling KuryrLoadBalancer CRD: %s\","},{"line_number":160,"context_line":"                              crd_to_reconcile_selflink)"},{"line_number":161,"context_line":"                    self._reconcile_lb(crd_to_reconcile_selflink)"},{"line_number":162,"context_line":"                    continue"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def _reconcile_lb(self, selflink):"},{"line_number":165,"context_line":"        kubernetes \u003d clients.get_kubernetes_client()"}],"source_content_type":"text/x-python","patch_set":16,"id":"6150143c_da1dc967","line":162,"range":{"start_line":162,"start_character":20,"end_line":162,"end_character":28},"in_reply_to":"98b7be7b_2bdc051a","updated":"2021-12-02 11:25:43.000000000","message":"+1","commit_id":"78988c1f4cc688e563d2ccc05dd43a1bccf3234d"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"103d8713c4124eb43da5480a510d0d0cd8e453d4","unresolved":true,"context_lines":[{"line_number":158,"context_line":"                    crd_to_reconcile_selflink \u003d crd[\u0027selflink\u0027]"},{"line_number":159,"context_line":"                    LOG.debug(\"Reconciling KuryrLoadBalancer CRD: %s\","},{"line_number":160,"context_line":"                              crd_to_reconcile_selflink)"},{"line_number":161,"context_line":"                    self._reconcile_lb(crd_to_reconcile_selflink)"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"    def _reconcile_lb(self, selflink):"},{"line_number":164,"context_line":"        kubernetes \u003d clients.get_kubernetes_client()"}],"source_content_type":"text/x-python","patch_set":17,"id":"0b0e1de7_66e12d83","line":161,"range":{"start_line":161,"start_character":0,"end_line":161,"end_character":65},"updated":"2021-12-02 12:30:56.000000000","message":"Hm, if the LB is gone, then the listener is gone too. Won\u0027t we call this twice for such KLB CRDs? Should we put them into a set here and only then run reconciling to make sure it\u0027s not executed twice?","commit_id":"1836ba60df1b0996ec12d960f73da995f2483e79"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"c4379f28c4eee634de2ab6a1d7b66e6f61aaef1c","unresolved":true,"context_lines":[{"line_number":147,"context_line":"                                             \u0027status\u0027, {}).get(\u0027listeners\u0027,"},{"line_number":148,"context_line":"                                                               []))"},{"line_number":149,"context_line":"        crd_to_reconcile_selflink \u003d set()"},{"line_number":150,"context_line":"        for resource, resource_details in resources.items():"},{"line_number":151,"context_line":"            filters \u003d {}"},{"line_number":152,"context_line":"            self._drv_lbaas.add_tags(resource, filters)"},{"line_number":153,"context_line":"            os_list \u003d resources_fn.get(resource)"}],"source_content_type":"text/x-python","patch_set":18,"id":"7c7238dc_65d71f4f","line":150,"range":{"start_line":150,"start_character":0,"end_line":150,"end_character":60},"updated":"2021-12-03 07:58:26.000000000","message":"this is resource_type, resource_list, right?","commit_id":"6429f7674d8a78e529a4510a8a52bc0bcda6bc4f"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"c45254f879506b97b7924cf71d245ddddd2e913d","unresolved":true,"context_lines":[{"line_number":147,"context_line":"                                             \u0027status\u0027, {}).get(\u0027listeners\u0027,"},{"line_number":148,"context_line":"                                                               []))"},{"line_number":149,"context_line":"        crd_to_reconcile_selflink \u003d set()"},{"line_number":150,"context_line":"        for resource, resource_details in resources.items():"},{"line_number":151,"context_line":"            filters \u003d {}"},{"line_number":152,"context_line":"            self._drv_lbaas.add_tags(resource, filters)"},{"line_number":153,"context_line":"            os_list \u003d resources_fn.get(resource)"}],"source_content_type":"text/x-python","patch_set":18,"id":"0b6d3e3f_aa12ef49","line":150,"range":{"start_line":150,"start_character":0,"end_line":150,"end_character":60},"in_reply_to":"7c7238dc_65d71f4f","updated":"2021-12-03 08:42:24.000000000","message":"\u003e this is resource_type, resource_list, right?\n\nGot it! Thanks","commit_id":"6429f7674d8a78e529a4510a8a52bc0bcda6bc4f"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"cd20c1301d5115ed01f49fcbb8b311038ba8f952","unresolved":true,"context_lines":[{"line_number":150,"context_line":"        for resource_type, resource_lists in resources.items():"},{"line_number":151,"context_line":"            filters \u003d {}"},{"line_number":152,"context_line":"            self._drv_lbaas.add_tags(resource_type, filters)"},{"line_number":153,"context_line":"            os_list \u003d resources_fn.get(resource_type)"},{"line_number":154,"context_line":"            os_resources \u003d os_list(**filters)"},{"line_number":155,"context_line":"            os_resources_id \u003d [rsrc[\u0027id\u0027] for rsrc in os_resources]"},{"line_number":156,"context_line":"            for crd in resource_lists:"}],"source_content_type":"text/x-python","patch_set":21,"id":"7937b112_59d39fdd","line":153,"updated":"2021-12-07 09:01:20.000000000","message":"I guess we don\u0027t need to be forgiving in case of lacking of key for the resource_fn dict, since it\u0027ll die anyway next line below with error NoneType is not callable (or smth like this), so simply:\n\n    resources_fn[resource_type]\n\nshould be fine.","commit_id":"68e55339a6290a7418668a9e27dd0e0e64db14b3"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"32304aa6913d162513dd7e4f1c9128ca8b81b86b","unresolved":true,"context_lines":[{"line_number":150,"context_line":"        for resource_type, resource_lists in resources.items():"},{"line_number":151,"context_line":"            filters \u003d {}"},{"line_number":152,"context_line":"            self._drv_lbaas.add_tags(resource_type, filters)"},{"line_number":153,"context_line":"            os_list \u003d resources_fn.get(resource_type)"},{"line_number":154,"context_line":"            os_resources \u003d os_list(**filters)"},{"line_number":155,"context_line":"            os_resources_id \u003d [rsrc[\u0027id\u0027] for rsrc in os_resources]"},{"line_number":156,"context_line":"            for crd in resource_lists:"}],"source_content_type":"text/x-python","patch_set":21,"id":"6819e747_da699ef8","line":153,"in_reply_to":"7937b112_59d39fdd","updated":"2021-12-07 09:19:13.000000000","message":"\u003e I guess we don\u0027t need to be forgiving in case of lacking of key for the resource_fn dict, since it\u0027ll die anyway next line below with error NoneType is not callable (or smth like this), so simply:\n\u003e \n\u003e     resources_fn[resource_type]\n\u003e \n\u003e should be fine.\n\nOkay got it! Thanks","commit_id":"68e55339a6290a7418668a9e27dd0e0e64db14b3"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"2f7d0b2524aeedb7abb86a1b4157d0e6b2ed123e","unresolved":true,"context_lines":[{"line_number":136,"context_line":"                    \u0027loadbalancer\u0027: [],"},{"line_number":137,"context_line":"                    \u0027listener\u0027: [],"},{"line_number":138,"context_line":"                }"},{"line_number":139,"context_line":"        for loadbalancer_crd in loadbalancer_crds:"},{"line_number":140,"context_line":"            selflink \u003d utils.get_res_link(loadbalancer_crd)"},{"line_number":141,"context_line":"            resources[\u0027loadbalancer\u0027].append({\u0027id\u0027: loadbalancer_crd.get("},{"line_number":142,"context_line":"                \u0027status\u0027, {}).get(\u0027loadbalancer\u0027, {}).get(\u0027id\u0027, {}),"}],"source_content_type":"text/x-python","patch_set":22,"id":"0d41bd4d_198b6a04","line":139,"range":{"start_line":139,"start_character":32,"end_line":139,"end_character":49},"updated":"2021-12-08 13:15:24.000000000","message":"CRDs with `metadata.deletionTimestamp` should be ignored here, these are in the process of deletion, so it may happen that LBs are already gone there. Somthing like this should work:\n\n if loadbalancer_crd[\u0027metadata\u0027].get(\u0027deletionTimestamp\u0027):\n     continue","commit_id":"5d0083c473a38b22d0681d5a9082f96b78cbab8c"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"2f7d0b2524aeedb7abb86a1b4157d0e6b2ed123e","unresolved":true,"context_lines":[{"line_number":138,"context_line":"                }"},{"line_number":139,"context_line":"        for loadbalancer_crd in loadbalancer_crds:"},{"line_number":140,"context_line":"            selflink \u003d utils.get_res_link(loadbalancer_crd)"},{"line_number":141,"context_line":"            resources[\u0027loadbalancer\u0027].append({\u0027id\u0027: loadbalancer_crd.get("},{"line_number":142,"context_line":"                \u0027status\u0027, {}).get(\u0027loadbalancer\u0027, {}).get(\u0027id\u0027, {}),"},{"line_number":143,"context_line":"                \u0027selflink\u0027: selflink})"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"            resources[\u0027listener\u0027].extend({\u0027id\u0027: l[\u0027id\u0027], \u0027selflink\u0027: selflink}"},{"line_number":146,"context_line":"                                         for l in loadbalancer_crd.get("}],"source_content_type":"text/x-python","patch_set":22,"id":"a46e7fb9_eb821ec5","line":143,"range":{"start_line":141,"start_character":0,"end_line":143,"end_character":38},"updated":"2021-12-08 13:15:24.000000000","message":"If the LB has no status set yet, this will still return an empty dict as ID, which later on won\u0027t be found on IDs from the OpenStack API (obviously), so will trigger reconciliation. This is serious, we might end up removing whole lot of information on the LBs that are being created. You got to filter out these here somehow.","commit_id":"5d0083c473a38b22d0681d5a9082f96b78cbab8c"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"1800a8bc2288a542903b82d3a19aa0237a96bd32","unresolved":true,"context_lines":[{"line_number":147,"context_line":"                                         for l in loadbalancer_crd.get("},{"line_number":148,"context_line":"                                             \u0027status\u0027, {}).get(\u0027listeners\u0027,"},{"line_number":149,"context_line":"                                                               []))"},{"line_number":150,"context_line":"        resources[\u0027loadbalancer\u0027] \u003d list(filter(lambda lb: lb.get(\u0027id\u0027) !\u003d \u0027\u0027,"},{"line_number":151,"context_line":"                                         resources[\u0027loadbalancer\u0027]))"},{"line_number":152,"context_line":"        resources[\u0027listener\u0027] \u003d list(filter(lambda lsnr: lsnr.get(\u0027id\u0027) !\u003d \u0027\u0027,"},{"line_number":153,"context_line":"                                     resources[\u0027listener\u0027]))"},{"line_number":154,"context_line":"        crd_to_reconcile_selflink \u003d set()"},{"line_number":155,"context_line":"        for resource_type, resource_lists in resources.items():"},{"line_number":156,"context_line":"            filters \u003d {}"}],"source_content_type":"text/x-python","patch_set":23,"id":"71aa3c15_0145435a","line":153,"range":{"start_line":150,"start_character":7,"end_line":153,"end_character":60},"updated":"2021-12-10 14:55:35.000000000","message":"I needed to pre-populate the resources items before applying the filter to the \u0027id\u0027 fields separately.","commit_id":"f94c08ea8f55bcde77bd5b34dc186e7fe04f77d9"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"5aaf01c4c91ea2c09bfadac90fae261168ce559f","unresolved":true,"context_lines":[{"line_number":147,"context_line":"                                         for l in loadbalancer_crd.get("},{"line_number":148,"context_line":"                                             \u0027status\u0027, {}).get(\u0027listeners\u0027,"},{"line_number":149,"context_line":"                                                               []))"},{"line_number":150,"context_line":"        resources[\u0027loadbalancer\u0027] \u003d [lb for lb in resources[\u0027loadbalancer\u0027]"},{"line_number":151,"context_line":"                                     if lb[\u0027id\u0027]]"},{"line_number":152,"context_line":"        crd_to_reconcile_selflink \u003d set()"},{"line_number":153,"context_line":"        for resource_type, resource_lists in resources.items():"},{"line_number":154,"context_line":"            filters \u003d {}"}],"source_content_type":"text/x-python","patch_set":25,"id":"416ee8c6_c73182ff","line":151,"range":{"start_line":150,"start_character":1,"end_line":151,"end_character":49},"updated":"2021-12-11 13:55:02.000000000","message":"Instead of iterating over the list of loadbalancers IDs, it\u0027s possible to check if the load-balancer has the ID at line 143 before adding it to the list.","commit_id":"71b6d018a493a9492522499e11a0dab7866c8e2b"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"a5ed41e51206e40e58e8c8ca3078133230c668d9","unresolved":true,"context_lines":[{"line_number":207,"context_line":"        for entry in crds_to_reconcile:"},{"line_number":208,"context_line":"            selflink \u003d entry[\u0027selflink\u0027]"},{"line_number":209,"context_line":"            try:"},{"line_number":210,"context_line":"                self._add_event("},{"line_number":211,"context_line":"                    entry[\u0027klb\u0027], \u0027LoadBalancerRecreating\u0027,"},{"line_number":212,"context_line":"                    \u0027Load balancer for the Service seems to not exist anymore.\u0027"},{"line_number":213,"context_line":"                    \u0027 Recreating it.\u0027, \u0027Warning\u0027)"},{"line_number":214,"context_line":"                self.k8s.patch_crd(\u0027status\u0027, selflink, {})"},{"line_number":215,"context_line":"            except k_exc.K8sResourceNotFound:"},{"line_number":216,"context_line":"                LOG.debug(\u0027Unable to reconcile the KuryLoadBalancer CRD %s\u0027,"}],"source_content_type":"text/x-python","patch_set":29,"id":"de46546c_c9d9999a","side":"PARENT","line":213,"range":{"start_line":210,"start_character":0,"end_line":213,"end_character":49},"updated":"2021-12-16 17:20:15.000000000","message":"You\u0027ve removed adding an event when an LB has .status removed. If this won\u0027t merge now because of CI error, please fix this. It should be placed before line 224 now. Otherwise we\u0027ll fix it in a follow up patch.","commit_id":"b36d09284c0ffc76bf6f0d83fd2404a1ac393cc7"},{"author":{"_account_id":33240,"name":"Sunday Mgbogu","email":"digitalsimboja@gmail.com","username":"digitalsimboja"},"change_message_id":"f457f9e306d7ac47dc55e6abf3cb197b3875f881","unresolved":true,"context_lines":[{"line_number":207,"context_line":"        for entry in crds_to_reconcile:"},{"line_number":208,"context_line":"            selflink \u003d entry[\u0027selflink\u0027]"},{"line_number":209,"context_line":"            try:"},{"line_number":210,"context_line":"                self._add_event("},{"line_number":211,"context_line":"                    entry[\u0027klb\u0027], \u0027LoadBalancerRecreating\u0027,"},{"line_number":212,"context_line":"                    \u0027Load balancer for the Service seems to not exist anymore.\u0027"},{"line_number":213,"context_line":"                    \u0027 Recreating it.\u0027, \u0027Warning\u0027)"},{"line_number":214,"context_line":"                self.k8s.patch_crd(\u0027status\u0027, selflink, {})"},{"line_number":215,"context_line":"            except k_exc.K8sResourceNotFound:"},{"line_number":216,"context_line":"                LOG.debug(\u0027Unable to reconcile the KuryLoadBalancer CRD %s\u0027,"}],"source_content_type":"text/x-python","patch_set":29,"id":"3d448e81_ad241ba7","side":"PARENT","line":213,"range":{"start_line":210,"start_character":0,"end_line":213,"end_character":49},"in_reply_to":"2d28d7b8_338efc08","updated":"2021-12-16 22:33:35.000000000","message":"\u003e I\u0027ll take it from here.\n\nYes it could come in as a follow up patch. I was also thinking that it is not necesary to repeat lin 195 on line 198. I could just use `lb_id`","commit_id":"b36d09284c0ffc76bf6f0d83fd2404a1ac393cc7"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"d2b4e5e5b6618ace5b151c4cb4812e251fd9bb3d","unresolved":true,"context_lines":[{"line_number":207,"context_line":"        for entry in crds_to_reconcile:"},{"line_number":208,"context_line":"            selflink \u003d entry[\u0027selflink\u0027]"},{"line_number":209,"context_line":"            try:"},{"line_number":210,"context_line":"                self._add_event("},{"line_number":211,"context_line":"                    entry[\u0027klb\u0027], \u0027LoadBalancerRecreating\u0027,"},{"line_number":212,"context_line":"                    \u0027Load balancer for the Service seems to not exist anymore.\u0027"},{"line_number":213,"context_line":"                    \u0027 Recreating it.\u0027, \u0027Warning\u0027)"},{"line_number":214,"context_line":"                self.k8s.patch_crd(\u0027status\u0027, selflink, {})"},{"line_number":215,"context_line":"            except k_exc.K8sResourceNotFound:"},{"line_number":216,"context_line":"                LOG.debug(\u0027Unable to reconcile the KuryLoadBalancer CRD %s\u0027,"}],"source_content_type":"text/x-python","patch_set":29,"id":"2d28d7b8_338efc08","side":"PARENT","line":213,"range":{"start_line":210,"start_character":0,"end_line":213,"end_character":49},"in_reply_to":"de46546c_c9d9999a","updated":"2021-12-16 19:42:25.000000000","message":"I\u0027ll take it from here.","commit_id":"b36d09284c0ffc76bf6f0d83fd2404a1ac393cc7"}]}
