)]}'
{"controller.Dockerfile":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"6da793823aca718ab184e190b902323bd2010363","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    \u0026\u0026 yum install -y --setopt\u003dtsflags\u003dnodocs python3-pip libstdc++ \\"},{"line_number":9,"context_line":"    \u0026\u0026 yum install -y --setopt\u003dtsflags\u003dnodocs gcc gcc-c++ python3-devel git"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"RUN pip3 install -c $UPPER_CONSTRAINTS_FILE -r https://opendev.org/openstack/kuryr-kubernetes/raw/branch/master/requirements.txt"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"COPY . /opt/kuryr-kubernetes"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-dockerfile","patch_set":1,"id":"bf51134e_c26a1d18","line":11,"range":{"start_line":11,"start_character":0,"end_line":11,"end_character":128},"updated":"2020-06-24 16:36:37.000000000","message":"My debugging piece, to be removed.","commit_id":"1716b7eb96b14b291ae9730fd0447e7b1f7404ec"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"0966b417733c271448e9af915931a2d3006f32c9","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    \u0026\u0026 yum install -y --setopt\u003dtsflags\u003dnodocs python3-pip libstdc++ \\"},{"line_number":9,"context_line":"    \u0026\u0026 yum install -y --setopt\u003dtsflags\u003dnodocs gcc gcc-c++ python3-devel git"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"RUN pip3 install -c $UPPER_CONSTRAINTS_FILE -r https://opendev.org/openstack/kuryr-kubernetes/raw/branch/master/requirements.txt"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"COPY . /opt/kuryr-kubernetes"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-dockerfile","patch_set":2,"id":"bf51134e_30ad159b","line":11,"range":{"start_line":11,"start_character":0,"end_line":11,"end_character":128},"updated":"2020-06-25 10:19:47.000000000","message":"My debugging piece, to be removed.","commit_id":"c9eb3f0790495eec33d5885f23c764e707876906"}],"kuryr_kubernetes/controller/service.py":[{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"65676860378083efed77fdf57b0035669911a2f6","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            pipeline.register(handler)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"            @periodic_task.periodic_task("},{"line_number":97,"context_line":"                name\u003df\u0027{handler.__class__.__name__}.reconcile\u0027, spacing\u003d60)"},{"line_number":98,"context_line":"            def reconcile_task(self, context):"},{"line_number":99,"context_line":"                handler.reconcile(pipeline)"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_50e6c9e9","line":97,"range":{"start_line":97,"start_character":72,"end_line":97,"end_character":74},"updated":"2020-06-25 10:36:18.000000000","message":"is this seconds? I would run this every 5-10 mins at most","commit_id":"c9eb3f0790495eec33d5885f23c764e707876906"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"e6ba212d4a1954c095585abb1658dad98f4321f3","unresolved":false,"context_lines":[{"line_number":94,"context_line":"            pipeline.register(handler)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"            @periodic_task.periodic_task("},{"line_number":97,"context_line":"                name\u003df\u0027{handler.__class__.__name__}.reconcile\u0027, spacing\u003d60)"},{"line_number":98,"context_line":"            def reconcile_task(self, context):"},{"line_number":99,"context_line":"                handler.reconcile(pipeline)"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_26879f64","line":97,"range":{"start_line":97,"start_character":72,"end_line":97,"end_character":74},"in_reply_to":"bf51134e_50e6c9e9","updated":"2020-06-25 12:17:25.000000000","message":"It\u0027s seconds. It\u0027s probably best to tune it by checking out how it\u0027ll work on OpenShift installation to see it with some load.","commit_id":"c9eb3f0790495eec33d5885f23c764e707876906"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"c75fa026319fa1c27b11f2dff71fc9a16df8eb12","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"            @periodic_task.periodic_task("},{"line_number":97,"context_line":"                name\u003df\u0027{handler.__class__.__name__}.reconcile\u0027, spacing\u003d60)"},{"line_number":98,"context_line":"            def reconcile_task(self, context):"},{"line_number":99,"context_line":"                handler.reconcile(pipeline)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"            self.add_periodic_task(reconcile_task)"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_500d298e","line":99,"range":{"start_line":98,"start_character":0,"end_line":99,"end_character":43},"updated":"2020-06-25 10:36:07.000000000","message":"Here my simplified example:\n\n  In [1]: class A:\n     ...:     def foo(self):\n     ...:         return \u0027a\u0027\n     ...:\n\n  In [2]: class B:\n     ...:     def foo(self):\n     ...:         return \u0027b\u0027\n     ...:\n\n  In [3]: l \u003d []\n\n  In [4]: for i in (A, B):\n     ...:     def x():\n     ...:         return i().foo()\n     ...:     l.append(x)\n     ...:\n\n  In [5]: l\n  Out[5]: [\u003cfunction __main__.x()\u003e, \u003cfunction __main__.x()\u003e]\n\n  In [6]: [x() for x in l]\n  Out[6]: [\u0027b\u0027, \u0027b\u0027]\n\nI hope it doesn\u0027t work that way in your code :/","commit_id":"c9eb3f0790495eec33d5885f23c764e707876906"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"e6ba212d4a1954c095585abb1658dad98f4321f3","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"            @periodic_task.periodic_task("},{"line_number":97,"context_line":"                name\u003df\u0027{handler.__class__.__name__}.reconcile\u0027, spacing\u003d60)"},{"line_number":98,"context_line":"            def reconcile_task(self, context):"},{"line_number":99,"context_line":"                handler.reconcile(pipeline)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"            self.add_periodic_task(reconcile_task)"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_c64ea336","line":99,"range":{"start_line":98,"start_character":0,"end_line":99,"end_character":43},"in_reply_to":"bf51134e_500d298e","updated":"2020-06-25 12:17:25.000000000","message":"Well, it does. Damn, back to the drawing board.","commit_id":"c9eb3f0790495eec33d5885f23c764e707876906"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"65676860378083efed77fdf57b0035669911a2f6","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        LOG.info(\"Service \u0027%s\u0027 starting\", self.__class__.__name__)"},{"line_number":112,"context_line":"        super(KuryrK8sService, self).start()"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        f \u003d functools.partial(self.run_periodic_tasks, None)"},{"line_number":115,"context_line":"        self.tg.add_timer(1, f)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        if not CONF.kubernetes.controller_ha:"},{"line_number":118,"context_line":"            LOG.info(\u0027Running in non-HA mode, starting watcher immediately.\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_f030bd58","line":115,"range":{"start_line":114,"start_character":0,"end_line":115,"end_character":31},"updated":"2020-06-25 10:36:18.000000000","message":"should this be after the if/else block instead?","commit_id":"c9eb3f0790495eec33d5885f23c764e707876906"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"e6ba212d4a1954c095585abb1658dad98f4321f3","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        LOG.info(\"Service \u0027%s\u0027 starting\", self.__class__.__name__)"},{"line_number":112,"context_line":"        super(KuryrK8sService, self).start()"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        f \u003d functools.partial(self.run_periodic_tasks, None)"},{"line_number":115,"context_line":"        self.tg.add_timer(1, f)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        if not CONF.kubernetes.controller_ha:"},{"line_number":118,"context_line":"            LOG.info(\u0027Running in non-HA mode, starting watcher immediately.\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_4680d346","line":115,"range":{"start_line":114,"start_character":0,"end_line":115,"end_character":31},"in_reply_to":"bf51134e_f030bd58","updated":"2020-06-25 12:17:25.000000000","message":"No, which is quite interesting, probably worth a comment. So in order for periodic_tasks to work nicely we need to run `self.run_periodic_tasks` every second. Previously we only started them when running in HA, now we always need them to work.","commit_id":"c9eb3f0790495eec33d5885f23c764e707876906"}],"kuryr_kubernetes/handlers/asynchronous.py":[{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"65676860378083efed77fdf57b0035669911a2f6","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self._grace_period \u003d grace_period"},{"line_number":51,"context_line":"        self._queues \u003d {}"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def __call__(self, event, *args, injected\u003dFalse, **kwargs):"},{"line_number":54,"context_line":"        group \u003d self._group_by(event)"},{"line_number":55,"context_line":"        with lockutils.lock(group):"},{"line_number":56,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_101731a6","line":53,"range":{"start_line":53,"start_character":37,"end_line":53,"end_character":61},"updated":"2020-06-25 10:36:18.000000000","message":"if you are using **kwargs, shouldn\u0027t you check if injected is set instead of defining it here?","commit_id":"c9eb3f0790495eec33d5885f23c764e707876906"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"e6ba212d4a1954c095585abb1658dad98f4321f3","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self._grace_period \u003d grace_period"},{"line_number":51,"context_line":"        self._queues \u003d {}"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def __call__(self, event, *args, injected\u003dFalse, **kwargs):"},{"line_number":54,"context_line":"        group \u003d self._group_by(event)"},{"line_number":55,"context_line":"        with lockutils.lock(group):"},{"line_number":56,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_86482b2d","line":53,"range":{"start_line":53,"start_character":37,"end_line":53,"end_character":61},"in_reply_to":"bf51134e_101731a6","updated":"2020-06-25 12:17:25.000000000","message":"Well, for sure this will make the argument disappear from kwargs passed further, which might not be what we want. I\u0027ll change it.","commit_id":"c9eb3f0790495eec33d5885f23c764e707876906"}],"kuryr_kubernetes/handlers/k8s_base.py":[{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"65676860378083efed77fdf57b0035669911a2f6","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        for resource in resources:"},{"line_number":85,"context_line":"            event \u003d {"},{"line_number":86,"context_line":"                \u0027type\u0027: \u0027MODIFIED\u0027,"},{"line_number":87,"context_line":"                \u0027object\u0027: resource,"},{"line_number":88,"context_line":"            }"},{"line_number":89,"context_line":"            pipeline(event, injected\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_d04779bb","line":86,"range":{"start_line":86,"start_character":24,"end_line":86,"end_character":35},"updated":"2020-06-25 10:36:18.000000000","message":"what about delete events?","commit_id":"c9eb3f0790495eec33d5885f23c764e707876906"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"e6ba212d4a1954c095585abb1658dad98f4321f3","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        for resource in resources:"},{"line_number":85,"context_line":"            event \u003d {"},{"line_number":86,"context_line":"                \u0027type\u0027: \u0027MODIFIED\u0027,"},{"line_number":87,"context_line":"                \u0027object\u0027: resource,"},{"line_number":88,"context_line":"            }"},{"line_number":89,"context_line":"            pipeline(event, injected\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_c6b98315","line":86,"range":{"start_line":86,"start_character":24,"end_line":86,"end_character":35},"in_reply_to":"bf51134e_d04779bb","updated":"2020-06-25 12:17:25.000000000","message":"I don\u0027t think there\u0027s a way to support them in this approach. When we list all the resources we don\u0027t know which one disappeared as we don\u0027t keep a list anywhere. The only feasible protection from lost delete events can be implemented through finalizers.","commit_id":"c9eb3f0790495eec33d5885f23c764e707876906"}],"kuryr_kubernetes/tests/unit/handlers/test_asynchronous.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"18bfcdb581c888b9477310c847581b356a9653cd","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        m_queue.put.assert_called_once_with((event, (), {}))"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def test_call_injected(self):"},{"line_number":67,"context_line":"        event \u003d mock.sentinel.event"},{"line_number":68,"context_line":"        group \u003d mock.sentinel.group"},{"line_number":69,"context_line":"        m_queue \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_c6986376","line":66,"updated":"2020-06-25 12:24:51.000000000","message":"pep8: E303 too many blank lines (2)","commit_id":"c9eb3f0790495eec33d5885f23c764e707876906"}],"kuryr_kubernetes/watcher.py":[{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"6eca4a2b016897cd01b0f7ce07efdfcbf686329c","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        if tg:"},{"line_number":162,"context_line":"            self._watching[path] \u003d tg.add_thread(self._watch, path)"},{"line_number":163,"context_line":"            initial_delay \u003d 60 + 5 * len(self._timers)  # Randomize it a bit."},{"line_number":164,"context_line":"            self._timers[path] \u003d tg.add_timer_args("},{"line_number":165,"context_line":"                60, self._reconcile, args\u003d(path,), initial_delay\u003dinitial_delay,"},{"line_number":166,"context_line":"                stop_on_exception\u003dFalse)"},{"line_number":167,"context_line":"        else:"},{"line_number":168,"context_line":"            self._watching[path] \u003d None"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf51134e_1ea0b4f3","line":165,"range":{"start_line":164,"start_character":0,"end_line":165,"end_character":79},"updated":"2020-06-29 15:57:22.000000000","message":"Should the initial delay be smaller than the interval?","commit_id":"88e617e73efa65f3ca40e6e6acddef846bab0439"},{"author":{"_account_id":23567,"name":"Luis Tomas Bolivar","email":"ltomasbo@redhat.com","username":"ltomasbo"},"change_message_id":"732203a810cf38b361c256e8e851053d8824ab0d","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            self._watching[path] \u003d tg.add_thread(self._watch, path)"},{"line_number":163,"context_line":"            initial_delay \u003d 60 + 5 * len(self._timers)  # Randomize it a bit."},{"line_number":164,"context_line":"            self._timers[path] \u003d tg.add_timer_args("},{"line_number":165,"context_line":"                60, self._reconcile, args\u003d(path,), initial_delay\u003dinitial_delay,"},{"line_number":166,"context_line":"                stop_on_exception\u003dFalse)"},{"line_number":167,"context_line":"        else:"},{"line_number":168,"context_line":"            self._watching[path] \u003d None"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf51134e_816bc0ef","line":165,"range":{"start_line":165,"start_character":16,"end_line":165,"end_character":18},"updated":"2020-06-30 08:31:12.000000000","message":"do we want 60 seconds period? to me it feels like a bit too much, but no strong opinion","commit_id":"88e617e73efa65f3ca40e6e6acddef846bab0439"},{"author":{"_account_id":27032,"name":"Maysa de Macedo Souza","email":"maysa.macedo95@gmail.com","username":"maysa"},"change_message_id":"1cf15de7475c9806db4c64360f425cbc8d069d54","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        if tg:"},{"line_number":162,"context_line":"            self._watching[path] \u003d tg.add_thread(self._watch, path)"},{"line_number":163,"context_line":"            initial_delay \u003d 60 + 5 * len(self._timers)  # Randomize it a bit."},{"line_number":164,"context_line":"            self._timers[path] \u003d tg.add_timer_args("},{"line_number":165,"context_line":"                60, self._reconcile, args\u003d(path,), initial_delay\u003dinitial_delay,"},{"line_number":166,"context_line":"                stop_on_exception\u003dFalse)"},{"line_number":167,"context_line":"        else:"},{"line_number":168,"context_line":"            self._watching[path] \u003d None"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf51134e_c171387a","line":165,"range":{"start_line":164,"start_character":0,"end_line":165,"end_character":79},"in_reply_to":"bf51134e_0149705f","updated":"2020-06-30 07:41:21.000000000","message":"oh, perhaps I misunderstood, the initial_delay is used to set the delay in seconds before *first* triggering the timer. I thought that this delay was happening in every reconcile and as is bigger than the interval, it could make the reconcile to not get executed.","commit_id":"88e617e73efa65f3ca40e6e6acddef846bab0439"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"9e0c4e597a0cbec037bc4f6f5c635f5f68faf2ee","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        if tg:"},{"line_number":162,"context_line":"            self._watching[path] \u003d tg.add_thread(self._watch, path)"},{"line_number":163,"context_line":"            initial_delay \u003d 60 + 5 * len(self._timers)  # Randomize it a bit."},{"line_number":164,"context_line":"            self._timers[path] \u003d tg.add_timer_args("},{"line_number":165,"context_line":"                60, self._reconcile, args\u003d(path,), initial_delay\u003dinitial_delay,"},{"line_number":166,"context_line":"                stop_on_exception\u003dFalse)"},{"line_number":167,"context_line":"        else:"},{"line_number":168,"context_line":"            self._watching[path] \u003d None"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf51134e_0149705f","line":165,"range":{"start_line":164,"start_character":0,"end_line":165,"end_character":79},"in_reply_to":"bf51134e_1ea0b4f3","updated":"2020-06-30 07:20:14.000000000","message":"IMO it should not - when the watcher is started it\u0027s fetching full list of resources anyway. Can you elaborate?","commit_id":"88e617e73efa65f3ca40e6e6acddef846bab0439"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"ac95a9033f776286366d463a717873e8b5eb754c","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        if tg:"},{"line_number":162,"context_line":"            self._watching[path] \u003d tg.add_thread(self._watch, path)"},{"line_number":163,"context_line":"            initial_delay \u003d 60 + 5 * len(self._timers)  # Randomize it a bit."},{"line_number":164,"context_line":"            self._timers[path] \u003d tg.add_timer_args("},{"line_number":165,"context_line":"                60, self._reconcile, args\u003d(path,), initial_delay\u003dinitial_delay,"},{"line_number":166,"context_line":"                stop_on_exception\u003dFalse)"},{"line_number":167,"context_line":"        else:"},{"line_number":168,"context_line":"            self._watching[path] \u003d None"}],"source_content_type":"text/x-python","patch_set":8,"id":"bf51134e_41888821","line":165,"range":{"start_line":164,"start_character":0,"end_line":165,"end_character":79},"in_reply_to":"bf51134e_c171387a","updated":"2020-06-30 07:54:06.000000000","message":"Yup, it\u0027s the delay before first execution of the timer. After which, period is 60 seconds.","commit_id":"88e617e73efa65f3ca40e6e6acddef846bab0439"}],"lower-constraints.txt":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"9e0c4e597a0cbec037bc4f6f5c635f5f68faf2ee","unresolved":false,"context_lines":[{"line_number":73,"context_line":"oslo.privsep\u003d\u003d1.28.0"},{"line_number":74,"context_line":"oslo.reports\u003d\u003d1.18.0"},{"line_number":75,"context_line":"oslo.serialization\u003d\u003d2.18.0"},{"line_number":76,"context_line":"oslo.service\u003d\u003d1.40.2"},{"line_number":77,"context_line":"oslo.utils\u003d\u003d3.33.0"},{"line_number":78,"context_line":"oslo.versionedobjects\u003d\u003d1.32.0"},{"line_number":79,"context_line":"oslotest\u003d\u003d3.2.0"}],"source_content_type":"text/plain","patch_set":6,"id":"bf51134e_f2c25a52","line":76,"range":{"start_line":76,"start_character":0,"end_line":76,"end_character":20},"updated":"2020-06-30 07:20:14.000000000","message":"This is latest Train release version, I bet it\u0027s fairly safe to bump.","commit_id":"a89b77e7dd83ea3ed640ee9e0b4fc466e60eb4ce"}]}
