)]}'
{"tests/unit/test_scheduler.py":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"aa03220bcde10990aedb08f3e4995de37c8e9815","unresolved":false,"context_lines":[{"line_number":8204,"context_line":"                out.write(fd.read())"},{"line_number":8205,"context_line":"                out.write(data)"},{"line_number":8206,"context_line":"        self.log.debug(\"Move %s to %s\", out.name, self.tenant_config_file)"},{"line_number":8207,"context_line":"        os.rename(out.name, self.tenant_config_file)"},{"line_number":8208,"context_line":"        for _ in iterate_timeout(5, \u0027reconfiguration\u0027):"},{"line_number":8209,"context_line":"            new_time \u003d self.sched.tenant_last_reconfigured.get("},{"line_number":8210,"context_line":"                \u0027tenant-four\u0027, 0)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_e57fd0b9","line":8207,"updated":"2019-12-20 23:43:36.000000000","message":"If the test fails between this line and line 8202 then we will leak this file.\n\nMaybe add a cleanup that tests if the file is present and deletes it?","commit_id":"0f5ffd0c55bfed38f2099e64e5598b0cadc8b8ee"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"aa03220bcde10990aedb08f3e4995de37c8e9815","unresolved":false,"context_lines":[{"line_number":8225,"context_line":""},{"line_number":8226,"context_line":"class TestSchedulerAutoConfigurationSmart(TestSchedulerAutoConfiguration):"},{"line_number":8227,"context_line":"    config_file \u003d \u0027zuul-auto-config-smart.conf\u0027"},{"line_number":8228,"context_line":"    foo \u003d 0"},{"line_number":8229,"context_line":""},{"line_number":8230,"context_line":"    def test_auto_reconfig(self):"},{"line_number":8231,"context_line":"        self._test_update_config(\"          - org/project2\\n\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_459104f7","line":8228,"range":{"start_line":8228,"start_character":4,"end_line":8228,"end_character":11},"updated":"2019-12-20 23:43:36.000000000","message":"Can this be removed?","commit_id":"0f5ffd0c55bfed38f2099e64e5598b0cadc8b8ee"}],"zuul/scheduler.py":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"aa03220bcde10990aedb08f3e4995de37c8e9815","unresolved":false,"context_lines":[{"line_number":610,"context_line":"        if self.auto_reconfig_watch:"},{"line_number":611,"context_line":"            self.log.debug(\"Clearing previously set inotify watch\")"},{"line_number":612,"context_line":"            self.inotify.rm_watch(self.auto_reconfig_watch)"},{"line_number":613,"context_line":"            self.auto_reconfig_watch \u003d None"},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"        # Check to see if the mode has changed"},{"line_number":616,"context_line":"        self.auto_reconfig_mode \u003d get_default("}],"source_content_type":"text/x-python","patch_set":6,"id":"3fa7e38b_65bd2066","line":613,"updated":"2019-12-20 23:43:36.000000000","message":"I think there is a small race here where we:\n\n  1) Send event to reconfigure\n  2) Reconfigure\n  3) event.wait() above returns\n  4) Remove our watch\n  5) Config is updated\n  6) Add our watch\n  7) Return without enqueuing a new event for events at step 5\n\nReading the C manpage it should add new watches or update an existing watch. I think that means we can make the order here:\n\n  3) event.wait() above returns\n  4) Check if watch mode has changed\n  5) If mode is not None then inotify.add_watch()\n     Else inotify.rm_watch()\n\nThen we only ever remove the watch when we are no longer interested in the file.","commit_id":"0f5ffd0c55bfed38f2099e64e5598b0cadc8b8ee"}]}
