)]}'
{"ironic_python_agent/__init__.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e76eaca35ba16bfa1c65f27d5b3c6061ae2f709a","unresolved":false,"context_lines":[{"line_number":16,"context_line":"# dns resolver methods. This can lead to compatability issues,"},{"line_number":17,"context_line":"# and un-expected exceptions being raised during the process"},{"line_number":18,"context_line":"# of monkey patching. Such as one if there are no resolvers."},{"line_number":19,"context_line":"os.environ[\u0027EVENTLET_NO_GREENDNS\u0027] \u003d \"yes\""}],"source_content_type":"text/x-python","patch_set":5,"id":"9f560f44_91cc038a","side":"PARENT","line":19,"updated":"2020-08-23 14:32:20.000000000","message":"This seems a common bit, I\u0027d prefer it stays here.","commit_id":"ba6ca246f542b49e59d51692231a59abdaf6290b"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"ee04bab0327b31f5dd0d0f5b28f59d1ee29f771b","unresolved":false,"context_lines":[{"line_number":16,"context_line":"# dns resolver methods. This can lead to compatability issues,"},{"line_number":17,"context_line":"# and un-expected exceptions being raised during the process"},{"line_number":18,"context_line":"# of monkey patching. Such as one if there are no resolvers."},{"line_number":19,"context_line":"os.environ[\u0027EVENTLET_NO_GREENDNS\u0027] \u003d \"yes\""}],"source_content_type":"text/x-python","patch_set":5,"id":"9f560f44_c131835b","side":"PARENT","line":19,"in_reply_to":"9f560f44_91cc038a","updated":"2020-08-24 14:17:14.000000000","message":"So we\u0027re not concerned about breaking users of apache+mod_wsgi, as noted in the commit message?","commit_id":"ba6ca246f542b49e59d51692231a59abdaf6290b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5e3de22b1070d0e1133a2f166c1960a3ac9ffd09","unresolved":false,"context_lines":[{"line_number":16,"context_line":"# dns resolver methods. This can lead to compatability issues,"},{"line_number":17,"context_line":"# and un-expected exceptions being raised during the process"},{"line_number":18,"context_line":"# of monkey patching. Such as one if there are no resolvers."},{"line_number":19,"context_line":"os.environ[\u0027EVENTLET_NO_GREENDNS\u0027] \u003d \"yes\""}],"source_content_type":"text/x-python","patch_set":5,"id":"9f560f44_a1472f77","side":"PARENT","line":19,"in_reply_to":"9f560f44_c131835b","updated":"2020-08-24 14:32:50.000000000","message":"This bit has no effect without actually doing monkey-patching","commit_id":"ba6ca246f542b49e59d51692231a59abdaf6290b"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"568067a3d9fc757832b33e16c60dbaca4b07e23b","unresolved":false,"context_lines":[{"line_number":17,"context_line":"# and un-expected exceptions being raised during the process"},{"line_number":18,"context_line":"# of monkey patching. Such as one if there are no resolvers."},{"line_number":19,"context_line":"os.environ[\u0027EVENTLET_NO_GREENDNS\u0027] \u003d \"yes\""},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"9f560f44_23df48d7","line":20,"updated":"2020-08-29 02:02:28.000000000","message":"pep8: W391 blank line at end of file","commit_id":"1bb90c8cb94b5c35824b8d8f7e71bcea299eebd3"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"6d09830f48642fc052d08a1bb6fd4408a55a4477","unresolved":false,"context_lines":[{"line_number":16,"context_line":"# dns resolver methods. This can lead to compatability issues,"},{"line_number":17,"context_line":"# and un-expected exceptions being raised during the process"},{"line_number":18,"context_line":"# of monkey patching. Such as one if there are no resolvers."},{"line_number":19,"context_line":"os.environ[\u0027EVENTLET_NO_GREENDNS\u0027] \u003d \"yes\""}],"source_content_type":"text/x-python","patch_set":22,"id":"9f560f44_c6113507","line":19,"updated":"2020-08-30 08:23:25.000000000","message":"pep8: W292 no newline at end of file","commit_id":"5a9ef4d174c02e316a8ef264d7fd54ce64f4d440"}],"ironic_python_agent/agent.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"15434adcda076545e21a96380caff1bd2831d7b8","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        LOG.info(\u0027Starting heartbeater\u0027)"},{"line_number":96,"context_line":"        self.agent.set_agent_advertise_addr()"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"        while not self.stop_event.wait(self.interval):"},{"line_number":99,"context_line":"            self.do_heartbeat()"},{"line_number":100,"context_line":"            eventlet.sleep(0)"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"9f560f44_b59269fb","line":98,"updated":"2020-08-29 12:34:12.000000000","message":"let\u0027s maybe keep the jitter?","commit_id":"1bb90c8cb94b5c35824b8d8f7e71bcea299eebd3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"15434adcda076545e21a96380caff1bd2831d7b8","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        finally:"},{"line_number":118,"context_line":"            interval_multiplier \u003d random.uniform(self.min_jitter_multiplier,"},{"line_number":119,"context_line":"                                                 self.max_jitter_multiplier)"},{"line_number":120,"context_line":"            self.interval \u003d self.agent.heartbeat_timeout * interval_multiplier"},{"line_number":121,"context_line":"            log_msg \u003d \u0027sleeping before next heartbeat, interval: {0}\u0027"},{"line_number":122,"context_line":"            LOG.info(log_msg.format(self.interval))"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"9f560f44_959765ec","line":120,"updated":"2020-08-29 12:34:12.000000000","message":"I\u0027m not sure what you\u0027re doing here, it looks like you\u0027re increasing interval on every heartbeat?","commit_id":"1bb90c8cb94b5c35824b8d8f7e71bcea299eebd3"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"ee4191194d19cecd21d84dbcb995effa011e5b27","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        finally:"},{"line_number":118,"context_line":"            interval_multiplier \u003d random.uniform(self.min_jitter_multiplier,"},{"line_number":119,"context_line":"                                                 self.max_jitter_multiplier)"},{"line_number":120,"context_line":"            self.interval \u003d self.agent.heartbeat_timeout * interval_multiplier"},{"line_number":121,"context_line":"            log_msg \u003d \u0027sleeping before next heartbeat, interval: {0}\u0027"},{"line_number":122,"context_line":"            LOG.info(log_msg.format(self.interval))"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"9f560f44_c6593536","line":120,"in_reply_to":"9f560f44_959765ec","updated":"2020-08-30 05:40:49.000000000","message":"This is the same algorithm as before, as evidenced by test_agent.TestHeartbeater passing.\n\nThis is what is adding the jitter you asked about on line 98 -- we take a random number between the jitter multipliers (.3 - .6), then multiply the interval by that. This maintains the existing algorithm, which ensures we\u0027ll have at least two chances to heartbeat before timeout.\n\nI just moved it around in order to take less of the logic out of the run() method.","commit_id":"1bb90c8cb94b5c35824b8d8f7e71bcea299eebd3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"9c7d264322e0def14611c57db774dc5cc076368f","unresolved":false,"context_lines":[{"line_number":122,"context_line":"            LOG.info(log_msg.format(self.interval))"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def force_heartbeat(self):"},{"line_number":125,"context_line":"        self.do_heartbeat()"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def stop(self):"},{"line_number":128,"context_line":"        \"\"\"Stop the heartbeat thread.\"\"\""}],"source_content_type":"text/x-python","patch_set":28,"id":"9f560f44_92b9407e","line":125,"updated":"2020-09-29 13:57:48.000000000","message":"nit: now in theory two heartbeats may clash, while the previous implementation would serialize them","commit_id":"a01646f56b3074df0756af4147fa8c5f5735681a"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"31acfd84975fee392515ee85e13883a2e8731a58","unresolved":false,"context_lines":[{"line_number":122,"context_line":"            LOG.info(log_msg.format(self.interval))"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def force_heartbeat(self):"},{"line_number":125,"context_line":"        self.do_heartbeat()"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def stop(self):"},{"line_number":128,"context_line":"        \"\"\"Stop the heartbeat thread.\"\"\""}],"source_content_type":"text/x-python","patch_set":28,"id":"9f560f44_18dd4fdd","line":125,"in_reply_to":"9f560f44_92b9407e","updated":"2020-09-29 15:06:03.000000000","message":"The second one would get a 409 conflict and quickly fail.","commit_id":"a01646f56b3074df0756af4147fa8c5f5735681a"}],"ironic_python_agent/extensions/standby.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"a6d4c8c1edfdb30895903cd7e7b45b12f4a56ee9","unresolved":false,"context_lines":[{"line_number":574,"context_line":"                    LOG.debug(\u0027device open in _stream_raw_image_onto_device\u0027)"},{"line_number":575,"context_line":"                    try:"},{"line_number":576,"context_line":"                        for chunk in image_download:"},{"line_number":577,"context_line":"                            LOG.debug(\u0027got chunk in _stream_raw_image_onto_device\u0027)"},{"line_number":578,"context_line":"                            f.write(chunk)"},{"line_number":579,"context_line":"                            LOG.debug(\u0027sleeping in _stream_raw_image_onto_device\u0027)"},{"line_number":580,"context_line":"                            eventlet.sleep(0)"}],"source_content_type":"text/x-python","patch_set":19,"id":"9f560f44_5e66b852","line":577,"updated":"2020-08-27 00:33:19.000000000","message":"pep8: E501 line too long (83 \u003e 79 characters)","commit_id":"0c0f6c0706ed0bced1eeac33cc40ae7a77708312"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"a6d4c8c1edfdb30895903cd7e7b45b12f4a56ee9","unresolved":false,"context_lines":[{"line_number":576,"context_line":"                        for chunk in image_download:"},{"line_number":577,"context_line":"                            LOG.debug(\u0027got chunk in _stream_raw_image_onto_device\u0027)"},{"line_number":578,"context_line":"                            f.write(chunk)"},{"line_number":579,"context_line":"                            LOG.debug(\u0027sleeping in _stream_raw_image_onto_device\u0027)"},{"line_number":580,"context_line":"                            eventlet.sleep(0)"},{"line_number":581,"context_line":"                    except Exception as e:"},{"line_number":582,"context_line":"                        msg \u003d (\u0027Unable to write image to device {}. \u0027"}],"source_content_type":"text/x-python","patch_set":19,"id":"9f560f44_be59d48e","line":579,"updated":"2020-08-27 00:33:19.000000000","message":"pep8: E501 line too long (82 \u003e 79 characters)","commit_id":"0c0f6c0706ed0bced1eeac33cc40ae7a77708312"}],"ironic_python_agent/tests/unit/__init__.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"e76eaca35ba16bfa1c65f27d5b3c6061ae2f709a","unresolved":false,"context_lines":[{"line_number":24,"context_line":"# done as early in an application\u0027s lifecycle as possible. Instead of relying"},{"line_number":25,"context_line":"# on libraries we use to monkey_patch late, proactively monkey_patch here"},{"line_number":26,"context_line":"# to limit cases of undefined behavior."},{"line_number":27,"context_line":"eventlet.monkey_patch()"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f560f44_f1ec5ff5","line":27,"updated":"2020-08-23 14:32:20.000000000","message":"Removing this allows unit tests to proceed. I wonder if we need monkey patching in unit tests at all, maybe leave only EVENTLET_NO_GREENDNS?","commit_id":"12dad706037aa1c511b4d08720b23727a6033a18"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5e3de22b1070d0e1133a2f166c1960a3ac9ffd09","unresolved":false,"context_lines":[{"line_number":24,"context_line":"# done as early in an application\u0027s lifecycle as possible. Instead of relying"},{"line_number":25,"context_line":"# on libraries we use to monkey_patch late, proactively monkey_patch here"},{"line_number":26,"context_line":"# to limit cases of undefined behavior."},{"line_number":27,"context_line":"eventlet.monkey_patch()"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f560f44_a13c4fe1","line":27,"in_reply_to":"9f560f44_e1f6478f","updated":"2020-08-24 14:32:50.000000000","message":"It may be okay because we mock everything that would require eventlet in production. You may try determine which packages have to be added/updated to lower-constraints, but it may be a daunting job.","commit_id":"12dad706037aa1c511b4d08720b23727a6033a18"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"ee04bab0327b31f5dd0d0f5b28f59d1ee29f771b","unresolved":false,"context_lines":[{"line_number":24,"context_line":"# done as early in an application\u0027s lifecycle as possible. Instead of relying"},{"line_number":25,"context_line":"# on libraries we use to monkey_patch late, proactively monkey_patch here"},{"line_number":26,"context_line":"# to limit cases of undefined behavior."},{"line_number":27,"context_line":"eventlet.monkey_patch()"}],"source_content_type":"text/x-python","patch_set":5,"id":"9f560f44_e1f6478f","line":27,"in_reply_to":"9f560f44_f1ec5ff5","updated":"2020-08-24 14:17:14.000000000","message":"I\u0027m surprised at that -- unit tests locally were freezing without this here. Maybe it does just need the NO_GREENDNS?\n\nEither way -- I don\u0027t understand why it\u0027s \"OK\" to test without eventlet monkey patched, if we\u0027re running it with eventlet monkey patched.","commit_id":"12dad706037aa1c511b4d08720b23727a6033a18"}],"ironic_python_agent/tests/unit/test_agent.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"361c39e63f6ad3fd5f89f075a41386b71cbbe8ff","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    @mock.patch(\u0027selectors.DefaultSelector\u0027, autospec\u003dTrue)"},{"line_number":65,"context_line":"    @mock.patch(\u0027ironic_python_agent.agent._time\u0027, autospec\u003dTrue)"},{"line_number":66,"context_line":"    @mock.patch(\u0027random.uniform\u0027, autospec\u003dTrue)"},{"line_number":67,"context_line":"    def test_heartbeat(self, mock_uniform, mock_time, mock_selector, mock_read):"},{"line_number":68,"context_line":"        time_responses \u003d []"},{"line_number":69,"context_line":"        uniform_responses \u003d []"},{"line_number":70,"context_line":"        heartbeat_responses \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_590bd128","line":67,"updated":"2020-08-21 00:11:49.000000000","message":"pep8: E501 line too long (80 \u003e 79 characters)","commit_id":"57c420cf906a59dbad2d8b3ec95a50b9ea274fae"}]}
