)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"7bc1854e7fd50d8da654327424dbf9ae73d01416","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Michel Peterson \u003cmpeterso@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-09-18 14:45:40 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add SIGHUP handling to journal periodic processing"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"It is a common practice in *NIX to handle SIGHUP to restart a service"},{"line_number":10,"context_line":"gracefully or reload configurations. This allows the worker to be"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3f4b6375_747838c3","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":50},"updated":"2017-10-23 18:43:44.000000000","message":"The change itself looks good cleanup. But this commit message doesn\u0027t seem correct.\n\nI don\u0027t see where this patch adds signal handling.\nSignal handler is setup by neutron-lib, not by this patch.\nThis patch seems simple cleanup, correct? Am I missing anything?\nMaybe due to rebase?","commit_id":"5219495805828ec264a80500c9d0fdcc97afded0"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"f5b1be01077e4b4e8877f3365a8bceccb3eca019","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Michel Peterson \u003cmpeterso@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-09-18 14:45:40 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add SIGHUP handling to journal periodic processing"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"It is a common practice in *NIX to handle SIGHUP to restart a service"},{"line_number":10,"context_line":"gracefully or reload configurations. This allows the worker to be"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3f4b6375_e4a204ae","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":50},"in_reply_to":"3f4b6375_747838c3","updated":"2017-10-25 10:37:19.000000000","message":"Even though signal handling is setup by neutron-lib, without this patch SIGHUP is not handled at all by this worker. It just results on a crash of the process. This patch adds the necessary logic to allow to restart it without crashing the process.","commit_id":"5219495805828ec264a80500c9d0fdcc97afded0"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"4eb64056e5845332571fab63a93a5fbce7bedbdc","unresolved":false,"context_lines":[{"line_number":12,"context_line":"journal related tasks externally (ie: full sync, maintenance, etc)."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Even though signal handling is setup by neutron-lib, without this patch"},{"line_number":15,"context_line":"SIGHUP is not handled at all by this worker. It just results on a crash"},{"line_number":16,"context_line":"of the process. This patch adds the necessary logic to allow to restart"},{"line_number":17,"context_line":"it without crashing the process."},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3f4b6375_3e0f1d89","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":43},"updated":"2017-11-03 01:02:45.000000000","message":"Can you please elaborate?\nsignal handler is installed by Launcher, right?\nso","commit_id":"a57bfa083c44c1b1bc91d0955cf65334ba46b8e3"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"ae269ebe0de8658d2a33b1811d2a72ab8c49874a","unresolved":false,"context_lines":[{"line_number":12,"context_line":"journal related tasks externally (ie: full sync, maintenance, etc)."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Even though signal handling is setup by neutron-lib, without this patch"},{"line_number":15,"context_line":"SIGHUP is not handled at all by this worker. It just results on a crash"},{"line_number":16,"context_line":"of the process. This patch adds the necessary logic to allow to restart"},{"line_number":17,"context_line":"it without crashing the process."},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"ff82abbf_24e09396","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":43},"in_reply_to":"3f4b6375_3e0f1d89","updated":"2017-11-23 07:35:14.000000000","message":"Yes, but without this patch it just excepts because the handling is incorrect. It is explained if you keep reading.","commit_id":"a57bfa083c44c1b1bc91d0955cf65334ba46b8e3"}],"networking_odl/journal/journal.py":[{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"1229ff8d4c5c0568dac20ff1828de45ca4676758","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    def start(self):"},{"line_number":193,"context_line":"        # Start the sync thread"},{"line_number":194,"context_line":"        LOG.debug(\"Starting a new sync thread\")"},{"line_number":195,"context_line":"        if self._odl_sync_thread_stop.is_set():"},{"line_number":196,"context_line":"            self._odl_sync_thread_stop.clear()"},{"line_number":197,"context_line":"            self._odl_sync_thread \u003d self._create_odl_sync_thread()"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        if not self._odl_sync_thread.is_alive():"},{"line_number":200,"context_line":"            self._odl_sync_thread.start()"}],"source_content_type":"text/x-python","patch_set":19,"id":"df87a7cf_8938b8d3","line":197,"range":{"start_line":195,"start_character":8,"end_line":197,"end_character":66},"updated":"2017-12-04 10:11:45.000000000","message":"Shouldn\u0027t this be part of change 492603?","commit_id":"af4962c50b802b6e5eaf0cdb05ace5573ae1a9e8"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"c92f408d0b6e555fb8bd578e9a9dc5944ee38165","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    def start(self):"},{"line_number":193,"context_line":"        # Start the sync thread"},{"line_number":194,"context_line":"        LOG.debug(\"Starting a new sync thread\")"},{"line_number":195,"context_line":"        if self._odl_sync_thread_stop.is_set():"},{"line_number":196,"context_line":"            self._odl_sync_thread_stop.clear()"},{"line_number":197,"context_line":"            self._odl_sync_thread \u003d self._create_odl_sync_thread()"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"        if not self._odl_sync_thread.is_alive():"},{"line_number":200,"context_line":"            self._odl_sync_thread.start()"}],"source_content_type":"text/x-python","patch_set":19,"id":"df87a7cf_491e30bb","line":197,"range":{"start_line":195,"start_character":8,"end_line":197,"end_character":66},"in_reply_to":"df87a7cf_8938b8d3","updated":"2017-12-04 10:23:55.000000000","message":"Not really, that patch is about making it stoppable so it exits gracefully. That doesn\u0027t necessarily means being able to start it again. This one allows to start it again.","commit_id":"af4962c50b802b6e5eaf0cdb05ace5573ae1a9e8"}],"networking_odl/journal/worker.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"4eb64056e5845332571fab63a93a5fbce7bedbdc","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f4b6375_787b6d8b","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":20},"updated":"2017-11-03 01:02:45.000000000","message":"2017","commit_id":"a57bfa083c44c1b1bc91d0955cf65334ba46b8e3"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"e50d350dea47c5b376c493c286fecec9ead4f0b4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f4b6375_31440747","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":41},"updated":"2017-11-06 04:25:37.000000000","message":"correct it.","commit_id":"a57bfa083c44c1b1bc91d0955cf65334ba46b8e3"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"ae269ebe0de8658d2a33b1811d2a72ab8c49874a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2015 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff82abbf_843b9fe9","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":41},"in_reply_to":"3f4b6375_31440747","updated":"2017-11-23 07:35:14.000000000","message":"Done","commit_id":"a57bfa083c44c1b1bc91d0955cf65334ba46b8e3"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"e50d350dea47c5b376c493c286fecec9ead4f0b4","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from oslo_log import log as logging"},{"line_number":19,"context_line":"from oslo_service import loopingcall"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from networking_odl.journal.journal import OpenDaylightJournalThread"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f4b6375_91417b3c","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":68},"updated":"2017-11-06 04:25:37.000000000","message":"Please import module, don\u0027t import class directly.","commit_id":"a57bfa083c44c1b1bc91d0955cf65334ba46b8e3"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"ae269ebe0de8658d2a33b1811d2a72ab8c49874a","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from oslo_log import log as logging"},{"line_number":19,"context_line":"from oslo_service import loopingcall"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from networking_odl.journal.journal import OpenDaylightJournalThread"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff82abbf_1746e350","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":68},"in_reply_to":"3f4b6375_91417b3c","updated":"2017-11-23 07:35:14.000000000","message":"Done","commit_id":"a57bfa083c44c1b1bc91d0955cf65334ba46b8e3"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"4eb64056e5845332571fab63a93a5fbce7bedbdc","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        super(JournalPeriodicProcessor, self).start()"},{"line_number":47,"context_line":"        LOG.debug(\u0027JournalPeriodicProcessor starting\u0027)"},{"line_number":48,"context_line":"        self._journal.start()"},{"line_number":49,"context_line":"        self._timer \u003d loopingcall.FixedIntervalLoopingCall(self._call_journal)"},{"line_number":50,"context_line":"        self._timer.start(self._interval)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def stop(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f4b6375_fef505cc","line":49,"range":{"start_line":49,"start_character":8,"end_line":49,"end_character":78},"updated":"2017-11-03 01:02:45.000000000","message":"Is this the essential change?\nBy looking at the code of FixedIntervalLoopingCall, it looks like stoppable and re-startable again.\nIt looks like wait is missing?","commit_id":"a57bfa083c44c1b1bc91d0955cf65334ba46b8e3"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"e50d350dea47c5b376c493c286fecec9ead4f0b4","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        super(JournalPeriodicProcessor, self).start()"},{"line_number":47,"context_line":"        LOG.debug(\u0027JournalPeriodicProcessor starting\u0027)"},{"line_number":48,"context_line":"        self._journal.start()"},{"line_number":49,"context_line":"        self._timer \u003d loopingcall.FixedIntervalLoopingCall(self._call_journal)"},{"line_number":50,"context_line":"        self._timer.start(self._interval)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def stop(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f4b6375_b40a251d","line":49,"range":{"start_line":49,"start_character":0,"end_line":49,"end_character":78},"updated":"2017-11-06 04:25:37.000000000","message":"is there any reason, why it is moved from start __init__ to start, as it\u0027s function is more closer to __init__ definiation.","commit_id":"a57bfa083c44c1b1bc91d0955cf65334ba46b8e3"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"ae269ebe0de8658d2a33b1811d2a72ab8c49874a","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        super(JournalPeriodicProcessor, self).start()"},{"line_number":47,"context_line":"        LOG.debug(\u0027JournalPeriodicProcessor starting\u0027)"},{"line_number":48,"context_line":"        self._journal.start()"},{"line_number":49,"context_line":"        self._timer \u003d loopingcall.FixedIntervalLoopingCall(self._call_journal)"},{"line_number":50,"context_line":"        self._timer.start(self._interval)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def stop(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff82abbf_f7b81f2b","line":49,"range":{"start_line":49,"start_character":0,"end_line":49,"end_character":78},"in_reply_to":"3f4b6375_b40a251d","updated":"2017-11-23 07:35:14.000000000","message":"to answer you both, it is not restartable, once a FixedIntervalLoopingCall is started and then stopped it can\u0027t be started again. That\u0027s why it has been moved into the start function so a new one will be created and replaced.","commit_id":"a57bfa083c44c1b1bc91d0955cf65334ba46b8e3"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"e50d350dea47c5b376c493c286fecec9ead4f0b4","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        LOG.debug(\u0027JournalPeriodicProcessor starting\u0027)"},{"line_number":48,"context_line":"        self._journal.start()"},{"line_number":49,"context_line":"        self._timer \u003d loopingcall.FixedIntervalLoopingCall(self._call_journal)"},{"line_number":50,"context_line":"        self._timer.start(self._interval)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def stop(self):"},{"line_number":53,"context_line":"        LOG.debug(\u0027JournalPeriodicProcessor stopping\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f4b6375_b13c77e1","line":50,"updated":"2017-11-06 04:25:37.000000000","message":"Would like to have started log as well.","commit_id":"a57bfa083c44c1b1bc91d0955cf65334ba46b8e3"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"ae269ebe0de8658d2a33b1811d2a72ab8c49874a","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        LOG.debug(\u0027JournalPeriodicProcessor starting\u0027)"},{"line_number":48,"context_line":"        self._journal.start()"},{"line_number":49,"context_line":"        self._timer \u003d loopingcall.FixedIntervalLoopingCall(self._call_journal)"},{"line_number":50,"context_line":"        self._timer.start(self._interval)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    def stop(self):"},{"line_number":53,"context_line":"        LOG.debug(\u0027JournalPeriodicProcessor stopping\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff82abbf_9781934d","line":50,"in_reply_to":"3f4b6375_b13c77e1","updated":"2017-11-23 07:35:14.000000000","message":"I think it\u0027s too much verbosity on already verbose logs.","commit_id":"a57bfa083c44c1b1bc91d0955cf65334ba46b8e3"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"4eb64056e5845332571fab63a93a5fbce7bedbdc","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        LOG.debug(\u0027JournalPeriodicProcessor stopping\u0027)"},{"line_number":54,"context_line":"        self._journal.stop()"},{"line_number":55,"context_line":"        if self._timer:"},{"line_number":56,"context_line":"            self._timer.stop()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def wait(self):"},{"line_number":59,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f4b6375_3e84bdd2","line":56,"range":{"start_line":56,"start_character":30,"end_line":56,"end_character":30},"updated":"2017-11-03 01:02:45.000000000","message":"self._timer.wait()?\nWith wait, the crash mentioned in the log message wouldn\u0027t be fixed?","commit_id":"a57bfa083c44c1b1bc91d0955cf65334ba46b8e3"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"ae269ebe0de8658d2a33b1811d2a72ab8c49874a","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        LOG.debug(\u0027JournalPeriodicProcessor stopping\u0027)"},{"line_number":54,"context_line":"        self._journal.stop()"},{"line_number":55,"context_line":"        if self._timer:"},{"line_number":56,"context_line":"            self._timer.stop()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def wait(self):"},{"line_number":59,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":11,"id":"ff82abbf_d7ecfb2a","line":56,"range":{"start_line":56,"start_character":30,"end_line":56,"end_character":30},"in_reply_to":"3f4b6375_3e84bdd2","updated":"2017-11-23 07:35:14.000000000","message":"as explained before, the crash happens because a stopped timer can\u0027t be started again.","commit_id":"a57bfa083c44c1b1bc91d0955cf65334ba46b8e3"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"e50d350dea47c5b376c493c286fecec9ead4f0b4","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self._journal.stop()"},{"line_number":55,"context_line":"        if self._timer:"},{"line_number":56,"context_line":"            self._timer.stop()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def wait(self):"},{"line_number":59,"context_line":"        pass"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"3f4b6375_512b0394","line":57,"updated":"2017-11-06 04:25:37.000000000","message":"Would like to have stopped logs as well.","commit_id":"a57bfa083c44c1b1bc91d0955cf65334ba46b8e3"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"ae269ebe0de8658d2a33b1811d2a72ab8c49874a","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self._journal.stop()"},{"line_number":55,"context_line":"        if self._timer:"},{"line_number":56,"context_line":"            self._timer.stop()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def wait(self):"},{"line_number":59,"context_line":"        pass"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"ff82abbf_77f3af0b","line":57,"in_reply_to":"3f4b6375_512b0394","updated":"2017-11-23 07:35:14.000000000","message":"same","commit_id":"a57bfa083c44c1b1bc91d0955cf65334ba46b8e3"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"1229ff8d4c5c0568dac20ff1828de45ca4676758","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"df87a7cf_e9838455","updated":"2017-12-04 10:11:45.000000000","message":"Whats the motivation to move it to a separate module?","commit_id":"af4962c50b802b6e5eaf0cdb05ace5573ae1a9e8"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"c92f408d0b6e555fb8bd578e9a9dc5944ee38165","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":19,"id":"df87a7cf_c9eec087","in_reply_to":"df87a7cf_e9838455","updated":"2017-12-04 10:23:55.000000000","message":"For clarity purposes, so we can have workers on the journal worker on it\u0027s own module and it\u0027s much more explicit.","commit_id":"af4962c50b802b6e5eaf0cdb05ace5573ae1a9e8"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"95abd8e5d9d5d7c6c9d5601efd44e38fa3b51fac","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    def stop(self):"},{"line_number":53,"context_line":"        LOG.debug(\u0027JournalPeriodicProcessor stopping\u0027)"},{"line_number":54,"context_line":"        self._journal.stop()"},{"line_number":55,"context_line":"        if self._timer:"},{"line_number":56,"context_line":"            self._timer.stop()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def wait(self):"}],"source_content_type":"text/x-python","patch_set":19,"id":"df87a7cf_df05127c","line":55,"range":{"start_line":55,"start_character":8,"end_line":55,"end_character":23},"updated":"2017-12-04 11:44:00.000000000","message":"Per [1] should be \u0027if self._timer is not None\u0027\n\n[1] http://legacy.python.org/dev/peps/pep-0008/#programming-recommendations","commit_id":"af4962c50b802b6e5eaf0cdb05ace5573ae1a9e8"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"dd626216ed58cd2dd5a51060292b087b94a7468d","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    def stop(self):"},{"line_number":53,"context_line":"        LOG.debug(\u0027JournalPeriodicProcessor stopping\u0027)"},{"line_number":54,"context_line":"        self._journal.stop()"},{"line_number":55,"context_line":"        if self._timer:"},{"line_number":56,"context_line":"            self._timer.stop()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def wait(self):"}],"source_content_type":"text/x-python","patch_set":19,"id":"df87a7cf_3f8f5ecd","line":55,"range":{"start_line":55,"start_character":8,"end_line":55,"end_character":23},"in_reply_to":"df87a7cf_df05127c","updated":"2017-12-04 11:55:46.000000000","message":"Done","commit_id":"af4962c50b802b6e5eaf0cdb05ace5573ae1a9e8"}],"networking_odl/tests/unit/journal/test_journal.py":[{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"1229ff8d4c5c0568dac20ff1828de45ca4676758","unresolved":false,"context_lines":[{"line_number":191,"context_line":"    @mock.patch.object(journal.OpenDaylightJournalThread,"},{"line_number":192,"context_line":"                       \u0027sync_pending_entries\u0027)"},{"line_number":193,"context_line":"    def test_allow_multiple_starts_gracefully(self, mock_journal):"},{"line_number":194,"context_line":"        self.journal_thread_fixture.journal_thread_mock.stop()"},{"line_number":195,"context_line":"        self.addCleanup(self.journal_thread_fixture.journal_thread_mock.start)"},{"line_number":196,"context_line":"        journal_thread \u003d journal.OpenDaylightJournalThread(start_thread\u003dFalse)"},{"line_number":197,"context_line":"        self.addCleanup(journal_thread.stop)"},{"line_number":198,"context_line":"        journal_thread.start()"}],"source_content_type":"text/x-python","patch_set":19,"id":"df87a7cf_69f9b47e","line":195,"range":{"start_line":194,"start_character":0,"end_line":195,"end_character":78},"updated":"2017-12-04 10:11:45.000000000","message":"This seems to repeat a lot, seems like you can extract the code to a method..","commit_id":"af4962c50b802b6e5eaf0cdb05ace5573ae1a9e8"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"c92f408d0b6e555fb8bd578e9a9dc5944ee38165","unresolved":false,"context_lines":[{"line_number":191,"context_line":"    @mock.patch.object(journal.OpenDaylightJournalThread,"},{"line_number":192,"context_line":"                       \u0027sync_pending_entries\u0027)"},{"line_number":193,"context_line":"    def test_allow_multiple_starts_gracefully(self, mock_journal):"},{"line_number":194,"context_line":"        self.journal_thread_fixture.journal_thread_mock.stop()"},{"line_number":195,"context_line":"        self.addCleanup(self.journal_thread_fixture.journal_thread_mock.start)"},{"line_number":196,"context_line":"        journal_thread \u003d journal.OpenDaylightJournalThread(start_thread\u003dFalse)"},{"line_number":197,"context_line":"        self.addCleanup(journal_thread.stop)"},{"line_number":198,"context_line":"        journal_thread.start()"}],"source_content_type":"text/x-python","patch_set":19,"id":"df87a7cf_a96c9c08","line":195,"range":{"start_line":194,"start_character":0,"end_line":195,"end_character":78},"in_reply_to":"df87a7cf_69f9b47e","updated":"2017-12-04 10:23:55.000000000","message":"I prefer clarity through explicitness on Tests but if enough people prefer it to be a method I can modify it.","commit_id":"af4962c50b802b6e5eaf0cdb05ace5573ae1a9e8"},{"author":{"_account_id":22380,"name":"Josh Hershberg","email":"jhershbe@redhat.com","username":"jhershbe"},"change_message_id":"f6d57e8938a778c56deebb49ac81cd3e3e4fa295","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"class JournalPeriodicProcessorTest(base_v2.OpenDaylightConfigBase,"},{"line_number":40,"context_line":"                                   test_service.ServiceTestBase):"},{"line_number":41,"context_line":"    def _get_pid_status(self, pid):"},{"line_number":42,"context_line":"        with os.popen(\u0027ps ax -o pid,state,cmd\u0027) as f:"},{"line_number":43,"context_line":"            # Skip ps header"},{"line_number":44,"context_line":"            f.readline()"}],"source_content_type":"text/x-python","patch_set":22,"id":"df87a7cf_43f4e4cf","line":41,"updated":"2017-12-13 12:00:22.000000000","message":"I think this function is sufficiently hard to read such that it deserves a brief comment explaining what exactly it returns","commit_id":"0def0e4f925dd23a87dec063bd8308d161c66304"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"ee14f0200b78ccb02be9a55d83fcd91bf665c790","unresolved":false,"context_lines":[{"line_number":38,"context_line":""},{"line_number":39,"context_line":"class JournalPeriodicProcessorTest(base_v2.OpenDaylightConfigBase,"},{"line_number":40,"context_line":"                                   test_service.ServiceTestBase):"},{"line_number":41,"context_line":"    def _get_pid_status(self, pid):"},{"line_number":42,"context_line":"        with os.popen(\u0027ps ax -o pid,state,cmd\u0027) as f:"},{"line_number":43,"context_line":"            # Skip ps header"},{"line_number":44,"context_line":"            f.readline()"}],"source_content_type":"text/x-python","patch_set":22,"id":"df87a7cf_29209f49","line":41,"in_reply_to":"df87a7cf_43f4e4cf","updated":"2017-12-13 13:19:02.000000000","message":"Done","commit_id":"0def0e4f925dd23a87dec063bd8308d161c66304"},{"author":{"_account_id":22380,"name":"Josh Hershberg","email":"jhershbe@redhat.com","username":"jhershbe"},"change_message_id":"f6d57e8938a778c56deebb49ac81cd3e3e4fa295","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        try:"},{"line_number":80,"context_line":"            periodic_processor.stop()"},{"line_number":81,"context_line":"        except AttributeError:"},{"line_number":82,"context_line":"            self.fail(\u0027start() was not called before calling stop()\u0027)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    @mock.patch.object(journal.OpenDaylightJournalThread,"}],"source_content_type":"text/x-python","patch_set":22,"id":"df87a7cf_43cb8471","line":81,"updated":"2017-12-13 12:00:22.000000000","message":"I don\u0027t like assuming that the error will be AttributeError...too whitebox and implementation specific.","commit_id":"0def0e4f925dd23a87dec063bd8308d161c66304"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"ee14f0200b78ccb02be9a55d83fcd91bf665c790","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        try:"},{"line_number":80,"context_line":"            periodic_processor.stop()"},{"line_number":81,"context_line":"        except AttributeError:"},{"line_number":82,"context_line":"            self.fail(\u0027start() was not called before calling stop()\u0027)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    @mock.patch.object(journal.OpenDaylightJournalThread,"}],"source_content_type":"text/x-python","patch_set":22,"id":"df87a7cf_493ac334","line":81,"in_reply_to":"df87a7cf_43cb8471","updated":"2017-12-13 13:19:02.000000000","message":"I agree it\u0027s implementation specific, but then again unit tests are whitebox, not blackbox. Said that, do you have a suggestion on how to check this differently?","commit_id":"0def0e4f925dd23a87dec063bd8308d161c66304"},{"author":{"_account_id":22380,"name":"Josh Hershberg","email":"jhershbe@redhat.com","username":"jhershbe"},"change_message_id":"c9482408555b440dfde6970c88bf37d0045aa967","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        try:"},{"line_number":80,"context_line":"            periodic_processor.stop()"},{"line_number":81,"context_line":"        except AttributeError:"},{"line_number":82,"context_line":"            self.fail(\u0027start() was not called before calling stop()\u0027)"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    @mock.patch.object(journal.OpenDaylightJournalThread,"}],"source_content_type":"text/x-python","patch_set":22,"id":"df87a7cf_c91d7374","line":81,"in_reply_to":"df87a7cf_493ac334","updated":"2017-12-13 13:24:46.000000000","message":"Sure. Just catch anything?","commit_id":"0def0e4f925dd23a87dec063bd8308d161c66304"},{"author":{"_account_id":22380,"name":"Josh Hershberg","email":"jhershbe@redhat.com","username":"jhershbe"},"change_message_id":"f6d57e8938a778c56deebb49ac81cd3e3e4fa295","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        self.assertIn(state, running_statuses)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        os.kill(pid, signal.SIGHUP)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        new_cmd, new_state \u003d self._get_pid_status(pid)"},{"line_number":106,"context_line":"        self.assertIn(new_state, running_statuses)"},{"line_number":107,"context_line":"        self.assertEqual(cmd, new_cmd)"}],"source_content_type":"text/x-python","patch_set":22,"id":"df87a7cf_2323e0c0","line":104,"updated":"2017-12-13 12:00:22.000000000","message":"I think there should be a small sleep here","commit_id":"0def0e4f925dd23a87dec063bd8308d161c66304"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"ee14f0200b78ccb02be9a55d83fcd91bf665c790","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        self.assertIn(state, running_statuses)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        os.kill(pid, signal.SIGHUP)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        new_cmd, new_state \u003d self._get_pid_status(pid)"},{"line_number":106,"context_line":"        self.assertIn(new_state, running_statuses)"},{"line_number":107,"context_line":"        self.assertEqual(cmd, new_cmd)"}],"source_content_type":"text/x-python","patch_set":22,"id":"df87a7cf_c9f33373","line":104,"in_reply_to":"df87a7cf_2323e0c0","updated":"2017-12-13 13:19:02.000000000","message":"I understand why is your proposal to include a sleep and a sleep is also not enough, what would happen if the kernel doesn\u0027t give processing time to that process for the duration of the sleep? We would be fooling ourselves thinking that the sleep solved our problem.\n\nThe other problem with a sleep is that it adds an artificial delay on the tests, thus adding to longer test times without an actual benefit. That\u0027s why in some cases we replaced artificial delays with events. \n\nSaid that, we could implement here inter process communication and introduce MITM in the functions involved in a SIGHUP to trigger an event on the test process when it finished the handling of the SIGHUP succeed. The downside to this is that it would complicate the test unnecessarily.","commit_id":"0def0e4f925dd23a87dec063bd8308d161c66304"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"3b2a6c6a072cc82109e595248963d3c305a39935","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        self.assertIn(state, running_statuses)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        os.kill(pid, signal.SIGHUP)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        new_cmd, new_state \u003d self._get_pid_status(pid)"},{"line_number":106,"context_line":"        self.assertIn(new_state, running_statuses)"},{"line_number":107,"context_line":"        self.assertEqual(cmd, new_cmd)"}],"source_content_type":"text/x-python","patch_set":22,"id":"df87a7cf_31032512","line":104,"in_reply_to":"df87a7cf_c4879a61","updated":"2017-12-13 16:09:44.000000000","message":"I had the logic somewhere else, decided to do it event driven instead.","commit_id":"0def0e4f925dd23a87dec063bd8308d161c66304"},{"author":{"_account_id":22380,"name":"Josh Hershberg","email":"jhershbe@redhat.com","username":"jhershbe"},"change_message_id":"c9482408555b440dfde6970c88bf37d0045aa967","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        self.assertIn(state, running_statuses)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        os.kill(pid, signal.SIGHUP)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        new_cmd, new_state \u003d self._get_pid_status(pid)"},{"line_number":106,"context_line":"        self.assertIn(new_state, running_statuses)"},{"line_number":107,"context_line":"        self.assertEqual(cmd, new_cmd)"}],"source_content_type":"text/x-python","patch_set":22,"id":"df87a7cf_e905d715","line":104,"in_reply_to":"df87a7cf_c9f33373","updated":"2017-12-13 13:24:46.000000000","message":"I get all that but still think a sleep here would not be a big deal, say 2 seconds?","commit_id":"0def0e4f925dd23a87dec063bd8308d161c66304"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"335ef312ba53187e51311197b00fa9df9b79f099","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        self.assertIn(state, running_statuses)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        os.kill(pid, signal.SIGHUP)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        new_cmd, new_state \u003d self._get_pid_status(pid)"},{"line_number":106,"context_line":"        self.assertIn(new_state, running_statuses)"},{"line_number":107,"context_line":"        self.assertEqual(cmd, new_cmd)"}],"source_content_type":"text/x-python","patch_set":22,"id":"df87a7cf_c4879a61","line":104,"in_reply_to":"df87a7cf_e905d715","updated":"2017-12-13 13:38:06.000000000","message":"Agreed that out of two compromises this is the cheapest while providing more value. Done.","commit_id":"0def0e4f925dd23a87dec063bd8308d161c66304"},{"author":{"_account_id":22380,"name":"Josh Hershberg","email":"jhershbe@redhat.com","username":"jhershbe"},"change_message_id":"f6d57e8938a778c56deebb49ac81cd3e3e4fa295","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        try:"},{"line_number":201,"context_line":"            journal_thread.start()"},{"line_number":202,"context_line":"        except RuntimeError:"},{"line_number":203,"context_line":"            self.fail(\u0027OpenDaylightJournalThread started twice\u0027)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"df87a7cf_3e3777e6","line":202,"updated":"2017-12-13 12:00:22.000000000","message":"Again, why catch a specific exception. Better to just catch all, IMHO","commit_id":"0def0e4f925dd23a87dec063bd8308d161c66304"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"ee14f0200b78ccb02be9a55d83fcd91bf665c790","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        try:"},{"line_number":201,"context_line":"            journal_thread.start()"},{"line_number":202,"context_line":"        except RuntimeError:"},{"line_number":203,"context_line":"            self.fail(\u0027OpenDaylightJournalThread started twice\u0027)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"df87a7cf_c998131d","line":202,"in_reply_to":"df87a7cf_3e3777e6","updated":"2017-12-13 13:19:02.000000000","message":"same comment as before. Catch all exceptions are for sure not a good solution in python.","commit_id":"0def0e4f925dd23a87dec063bd8308d161c66304"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"4a4c2258d35265e303037786619fe73d204c9686","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            # not called."},{"line_number":92,"context_line":"            called \u003d int(f.read(1))"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        self.assertEqual(called, 1, \u0027The IPC mock was called but it excepted\u0027)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    @mock.patch.object(journal.OpenDaylightJournalThread, \u0027set_sync_event\u0027)"},{"line_number":97,"context_line":"    def test_processing(self, mock_journal):"}],"source_content_type":"text/x-python","patch_set":27,"id":"bf8cb3f7_d64387ae","line":94,"range":{"start_line":94,"start_character":65,"end_line":94,"end_character":76},"updated":"2017-12-27 09:27:18.000000000","message":"was expected?","commit_id":"877f8ba40c53b1d2094a02196f5051ff5726a648"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"4a4c2258d35265e303037786619fe73d204c9686","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            # not called."},{"line_number":92,"context_line":"            called \u003d int(f.read(1))"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        self.assertEqual(called, 1, \u0027The IPC mock was called but it excepted\u0027)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    @mock.patch.object(journal.OpenDaylightJournalThread, \u0027set_sync_event\u0027)"},{"line_number":97,"context_line":"    def test_processing(self, mock_journal):"}],"source_content_type":"text/x-python","patch_set":27,"id":"bf8cb3f7_163a4f33","line":94,"range":{"start_line":94,"start_character":50,"end_line":94,"end_character":53},"updated":"2017-12-27 09:27:18.000000000","message":"wasn\u0027t?","commit_id":"877f8ba40c53b1d2094a02196f5051ff5726a648"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"eedac3210b51d710c4f9d63bc3faca7636a05be3","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            # not called."},{"line_number":92,"context_line":"            called \u003d int(f.read(1))"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        self.assertEqual(called, 1, \u0027The IPC mock was called but it excepted\u0027)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    @mock.patch.object(journal.OpenDaylightJournalThread, \u0027set_sync_event\u0027)"},{"line_number":97,"context_line":"    def test_processing(self, mock_journal):"}],"source_content_type":"text/x-python","patch_set":27,"id":"bf8cb3f7_1426c8b8","line":94,"range":{"start_line":94,"start_character":50,"end_line":94,"end_character":53},"in_reply_to":"bf8cb3f7_163a4f33","updated":"2017-12-27 13:56:46.000000000","message":"Done","commit_id":"877f8ba40c53b1d2094a02196f5051ff5726a648"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"eedac3210b51d710c4f9d63bc3faca7636a05be3","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            # not called."},{"line_number":92,"context_line":"            called \u003d int(f.read(1))"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        self.assertEqual(called, 1, \u0027The IPC mock was called but it excepted\u0027)"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    @mock.patch.object(journal.OpenDaylightJournalThread, \u0027set_sync_event\u0027)"},{"line_number":97,"context_line":"    def test_processing(self, mock_journal):"}],"source_content_type":"text/x-python","patch_set":27,"id":"bf8cb3f7_b43cbcc8","line":94,"range":{"start_line":94,"start_character":65,"end_line":94,"end_character":76},"in_reply_to":"bf8cb3f7_d64387ae","updated":"2017-12-27 13:56:46.000000000","message":"Done","commit_id":"877f8ba40c53b1d2094a02196f5051ff5726a648"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"9ffc7e828c58b10a7b151dc2f3b30d2c297bed32","unresolved":false,"context_lines":[{"line_number":49,"context_line":"                  in a single char as defined in the manpage PS(1) under"},{"line_number":50,"context_line":"                  PROCESS STATE CODES."},{"line_number":51,"context_line":"        \"\"\""},{"line_number":52,"context_line":"        with os.popen(\u0027ps ax -o pid,state,cmd\u0027) as f:"},{"line_number":53,"context_line":"            # Skip ps header"},{"line_number":54,"context_line":"            f.readline()"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"7f96bb07_473f0bb5","line":52,"range":{"start_line":52,"start_character":0,"end_line":52,"end_character":53},"updated":"2018-01-20 07:05:43.000000000","message":"Michel,\n\nIt is platform dependent, could something be done about it? May be if some alternative is possible through libraries etc","commit_id":"a13eb005950b189cc4f713722c45706a92d56530"}]}
